diff --git a/.changeset/metal-mice-sit.md b/.changeset/metal-mice-sit.md new file mode 100644 index 000000000..bfb9f3c45 --- /dev/null +++ b/.changeset/metal-mice-sit.md @@ -0,0 +1,10 @@ +--- +'@commercetools-test-data/inventory-entry': minor +--- + +Refactored `InventoryEntry` and `InventoryEntryDraft` models to use the new implementation patterns. +This means the existing models are now deprecated (though we still support them for backwards compatibility) and consumers should move to the new ones implemented: +* `InventoryEntryRest` +* `InventoryEntryGraphql` +* `InventoryEntryDraftRest` +* `InventoryEntryDraftGraphql` diff --git a/models/inventory-entry/src/builder.spec.ts b/models/inventory-entry/src/builder.spec.ts deleted file mode 100644 index f61daf664..000000000 --- a/models/inventory-entry/src/builder.spec.ts +++ /dev/null @@ -1,98 +0,0 @@ -/* eslint-disable jest/no-disabled-tests */ -/* eslint-disable jest/valid-title */ -import { createBuilderSpec } from '@commercetools-test-data/core/test-utils'; -import { - TInventoryEntry, - TInventoryEntryRest, - TInventoryEntryGraphql, -} from './types'; -import * as InventoryEntry from '.'; - -describe('builder', () => { - it( - ...createBuilderSpec( - 'default', - InventoryEntry.random(), - expect.objectContaining({ - id: expect.any(String), - key: expect.any(String), - version: expect.any(Number), - createdAt: expect.any(String), - createdBy: null, - lastModifiedAt: expect.any(String), - lastModifiedBy: null, - sku: expect.any(String), - availableQuantity: expect.any(Number), - quantityOnStock: expect.any(Number), - restockableInDays: expect.any(Number), - expectedDelivery: expect.any(String), - supplyChannel: expect.objectContaining({ - address: expect.objectContaining({ - country: expect.any(String), - }), - }), - custom: null, - }) - ) - ); - - it( - ...createBuilderSpec( - 'rest', - InventoryEntry.random(), - expect.objectContaining({ - id: expect.any(String), - key: expect.any(String), - version: expect.any(Number), - createdAt: expect.any(String), - createdBy: null, - lastModifiedAt: expect.any(String), - lastModifiedBy: null, - sku: expect.any(String), - quantityOnStock: expect.any(Number), - restockableInDays: expect.any(Number), - availableQuantity: expect.any(Number), - expectedDelivery: expect.any(String), - supplyChannel: expect.objectContaining({ - id: expect.any(String), - typeId: 'channel', - }), - custom: null, - }) - ) - ); - - it( - ...createBuilderSpec( - 'graphql', - InventoryEntry.random(), - expect.objectContaining({ - id: expect.any(String), - key: expect.any(String), - version: expect.any(Number), - createdAt: expect.any(String), - createdBy: null, - lastModifiedAt: expect.any(String), - lastModifiedBy: null, - sku: expect.any(String), - quantityOnStock: expect.any(Number), - restockableInDays: expect.any(Number), - availableQuantity: expect.any(Number), - expectedDelivery: expect.any(String), - supplyChannel: expect.objectContaining({ - __typename: 'Channel', - address: expect.objectContaining({ - country: expect.any(String), - }), - }), - supplyChannelRef: expect.objectContaining({ - __typename: 'Reference', - id: expect.any(String), - typeId: 'channel', - }), - custom: null, - __typename: 'InventoryEntry', - }) - ) - ); -}); diff --git a/models/inventory-entry/src/builder.ts b/models/inventory-entry/src/builder.ts deleted file mode 100644 index e4eeca4e7..000000000 --- a/models/inventory-entry/src/builder.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { Builder } from '@commercetools-test-data/core'; -import generator from './generator'; -import transformers from './transformers'; -import type { TInventoryEntry, TCreateInventoryEntryBuilder } from './types'; - -const Model: TCreateInventoryEntryBuilder = () => - Builder({ - generator, - transformers, - }); - -export default Model; diff --git a/models/inventory-entry/src/builders.spec.ts b/models/inventory-entry/src/builders.spec.ts new file mode 100644 index 000000000..6761367ee --- /dev/null +++ b/models/inventory-entry/src/builders.spec.ts @@ -0,0 +1,114 @@ +import { + InventoryEntry, + InventoryEntryRest, + InventoryEntryGraphql, +} from './index'; + +describe('InventoryEntry model builders', () => { + it('builds a REST model', () => { + const restModel = InventoryEntryRest.random().build(); + + expect(restModel).toEqual( + expect.objectContaining({ + id: expect.any(String), + key: expect.any(String), + version: expect.any(Number), + createdAt: expect.any(String), + createdBy: expect.any(Object), + lastModifiedAt: expect.any(String), + lastModifiedBy: expect.any(Object), + sku: expect.any(String), + quantityOnStock: expect.any(Number), + restockableInDays: expect.any(Number), + availableQuantity: expect.any(Number), + expectedDelivery: expect.any(String), + supplyChannel: expect.any(Object), + custom: null, + }) + ); + }); + + it('builds a GraphQL model', () => { + const graphqlModel = InventoryEntryGraphql.random().build(); + + expect(graphqlModel).toMatchObject( + expect.objectContaining({ + id: expect.any(String), + key: expect.any(String), + version: expect.any(Number), + createdAt: expect.any(String), + createdBy: expect.any(Object), + lastModifiedAt: expect.any(String), + lastModifiedBy: expect.any(Object), + sku: expect.any(String), + quantityOnStock: expect.any(Number), + restockableInDays: expect.any(Number), + availableQuantity: expect.any(Number), + expectedDelivery: expect.any(String), + supplyChannel: expect.objectContaining({ + __typename: 'Channel', + address: expect.objectContaining({ + country: expect.any(String), + }), + }), + supplyChannelRef: expect.objectContaining({ + __typename: 'Reference', + id: expect.any(String), + typeId: 'channel', + }), + custom: null, + __typename: 'InventoryEntry', + }) + ); + }); +}); + +describe('InventoryEntry model compatibility builders', () => { + it('builds a REST model', () => { + const restModel = InventoryEntry.random().buildRest(); + + expect(restModel).toEqual( + expect.objectContaining({ + id: expect.any(String), + key: expect.any(String), + version: expect.any(Number), + createdAt: expect.any(String), + createdBy: expect.any(Object), + lastModifiedAt: expect.any(String), + lastModifiedBy: expect.any(Object), + sku: expect.any(String), + quantityOnStock: expect.any(Number), + restockableInDays: expect.any(Number), + availableQuantity: expect.any(Number), + expectedDelivery: expect.any(String), + supplyChannel: expect.any(Object), + custom: null, + }) + ); + }); + + it('builds a GraphQL model', () => { + const graphqlModel = InventoryEntry.random().buildGraphql(); + + expect(graphqlModel).toMatchObject( + expect.objectContaining({ + id: expect.any(String), + key: expect.any(String), + version: expect.any(Number), + createdAt: expect.any(String), + createdBy: expect.any(Object), + lastModifiedAt: expect.any(String), + lastModifiedBy: expect.any(Object), + sku: expect.any(String), + availableQuantity: expect.any(Number), + quantityOnStock: expect.any(Number), + restockableInDays: expect.any(Number), + expectedDelivery: expect.any(String), + supplyChannel: expect.objectContaining({ + __typename: 'Channel', + }), + custom: null, + }) + ); + }); +}); diff --git a/models/inventory-entry/src/builders.ts b/models/inventory-entry/src/builders.ts new file mode 100644 index 000000000..b7abb9864 --- /dev/null +++ b/models/inventory-entry/src/builders.ts @@ -0,0 +1,42 @@ +import { + createCompatibilityBuilder, + createSpecializedBuilder, + TModelFieldsConfig, +} from '@commercetools-test-data/core'; +import { restFieldsConfig, graphqlFieldsConfig } from './fields-config'; +import type { + TCreateInventoryEntryBuilder, + TInventoryEntryRest, + TInventoryEntryGraphql, +} from './types'; + +export const RestModelBuilder: TCreateInventoryEntryBuilder< + TInventoryEntryRest +> = () => + createSpecializedBuilder({ + name: 'InventoryEntryRestBuilder', + type: 'rest', + modelFieldsConfig: restFieldsConfig, + }); + +export const GraphqlModelBuilder: TCreateInventoryEntryBuilder< + TInventoryEntryGraphql +> = () => + createSpecializedBuilder({ + name: 'InventoryEntryGraphqlBuilder', + type: 'graphql', + modelFieldsConfig: graphqlFieldsConfig, + }); + +export const CompatInventoryEntryModelBuilder = < + TInventoryEntryModel extends + | TInventoryEntryRest + | TInventoryEntryGraphql = TInventoryEntryRest, +>() => + createCompatibilityBuilder({ + name: 'InventoryEntryCompatBuilder', + modelFieldsConfig: { + rest: restFieldsConfig as TModelFieldsConfig, + graphql: graphqlFieldsConfig as TModelFieldsConfig, + }, + }); diff --git a/models/inventory-entry/src/fields-config.ts b/models/inventory-entry/src/fields-config.ts new file mode 100644 index 000000000..a14747cf7 --- /dev/null +++ b/models/inventory-entry/src/fields-config.ts @@ -0,0 +1,56 @@ +import { ChannelGraphql } from '@commercetools-test-data/channel'; +import { + ClientLogging, + Reference, + TReferenceGraphql, +} from '@commercetools-test-data/commons'; +import { + fake, + sequence, + type TModelFieldsConfig, +} from '@commercetools-test-data/core'; +import { createRelatedDates } from '@commercetools-test-data/utils'; +import type { TInventoryEntryGraphql, TInventoryEntryRest } from './types'; + +const [getOlderDate, getNewerDate, getFutureDate] = createRelatedDates(); + +const commonFieldsConfig = { + id: fake((f) => f.string.uuid()), + version: sequence(), + createdAt: fake(getOlderDate), + createdBy: fake(() => ClientLogging.random()), + lastModifiedAt: fake(getNewerDate), + lastModifiedBy: fake(() => ClientLogging.random()), + key: fake((f) => f.lorem.slug(2)), + sku: fake((f) => f.lorem.words()), + quantityOnStock: fake((f) => f.number.int()), + availableQuantity: fake((f) => f.number.int()), + restockableInDays: fake((f) => f.number.int()), + expectedDelivery: fake(getFutureDate), + custom: null, +}; +export const restFieldsConfig: TModelFieldsConfig = { + fields: { + ...commonFieldsConfig, + supplyChannel: fake(() => Reference.presets.channelReference()), + }, +}; +export const graphqlFieldsConfig: TModelFieldsConfig = { + fields: { + ...commonFieldsConfig, + __typename: 'InventoryEntry', + supplyChannel: fake(() => ChannelGraphql.random()), + supplyChannelRef: fake((f) => Reference.presets.channelReference()), + }, + postBuild: (model) => { + const supplyChannelRef = model.supplyChannel + ? Reference.presets + .channelReference() + .id(model.supplyChannel.id) + .buildGraphql>() + : null; + return { + supplyChannelRef, + }; + }, +}; diff --git a/models/inventory-entry/src/generator.ts b/models/inventory-entry/src/generator.ts deleted file mode 100644 index 9f1c837f8..000000000 --- a/models/inventory-entry/src/generator.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { Channel } from '@commercetools-test-data/channel'; -import { fake, Generator } from '@commercetools-test-data/core'; -import { createRelatedDates } from '@commercetools-test-data/utils'; -import { TInventoryEntry } from './types'; - -const [getOlderDate, getNewerDate, getFutureDate] = createRelatedDates(); - -// https://docs.commercetools.com/api/projects/inventory#inventoryentry - -const generator = Generator({ - fields: { - id: fake((f) => f.string.uuid()), - key: fake((f) => f.lorem.slug(2)), - version: fake((f) => f.number.int()), - createdAt: fake(getOlderDate), - createdBy: null, - lastModifiedAt: fake(getNewerDate), - lastModifiedBy: null, - sku: fake((f) => f.lorem.words()), - supplyChannel: fake(() => Channel.random()), - quantityOnStock: fake((f) => f.number.int()), - availableQuantity: fake((f) => f.number.int()), - restockableInDays: fake((f) => f.number.int()), - expectedDelivery: fake(getFutureDate), - custom: null, - }, -}); - -export default generator; diff --git a/models/inventory-entry/src/index.ts b/models/inventory-entry/src/index.ts index f4251f63c..269654622 100644 --- a/models/inventory-entry/src/index.ts +++ b/models/inventory-entry/src/index.ts @@ -1,6 +1,27 @@ +import { + RestModelBuilder, + GraphqlModelBuilder, + CompatInventoryEntryModelBuilder, +} from './builders'; +import * as modelPresets from './presets'; + export * as InventoryEntryDraft from './inventory-entry-draft'; export * as InventoryEntry from '.'; -export { default as random } from './builder'; -export { default as presets } from './presets'; export * from './types'; + +export const InventoryEntryRest = { + random: RestModelBuilder, + presets: modelPresets.restPresets, +}; + +export const InventoryEntryGraphql = { + random: GraphqlModelBuilder, + presets: modelPresets.graphqlPresets, +}; + +/** + * @deprecated Use `InventoryEntryRest` or `InventoryEntryGraphql` exported models instead of `InventoryEntry`. + */ +export const random = CompatInventoryEntryModelBuilder; +export const presets = modelPresets.graphqlPresets; diff --git a/models/inventory-entry/src/inventory-entry-draft/builder.spec.ts b/models/inventory-entry/src/inventory-entry-draft/builder.spec.ts index d3d1e789b..1cca99f35 100644 --- a/models/inventory-entry/src/inventory-entry-draft/builder.spec.ts +++ b/models/inventory-entry/src/inventory-entry-draft/builder.spec.ts @@ -1,18 +1,16 @@ /* eslint-disable jest/no-disabled-tests */ /* eslint-disable jest/valid-title */ -import { createBuilderSpec } from '@commercetools-test-data/core/test-utils'; import { - TInventoryEntryDraft, - TInventoryEntryDraftRest, - TInventoryEntryDraftGraphql, -} from '../types'; -import * as InventoryEntryDraft from '.'; + InventoryEntryDraft, + InventoryEntryDraftRest, + InventoryEntryDraftGraphql, +} from './index'; -describe('builder', () => { - it( - ...createBuilderSpec( - 'default', - InventoryEntryDraft.random(), +describe('InventoryEntry model builders', () => { + it('builds a REST model', () => { + const restModel = InventoryEntryDraftRest.random().build(); + + expect(restModel).toEqual( expect.objectContaining({ key: expect.any(String), sku: expect.any(String), @@ -25,13 +23,13 @@ describe('builder', () => { }), custom: null, }) - ) - ); + ); + }); + + it('builds a GraphQL model', () => { + const graphqlModel = InventoryEntryDraftGraphql.random().build(); - it( - ...createBuilderSpec( - 'rest', - InventoryEntryDraft.random(), + expect(graphqlModel).toMatchObject( expect.objectContaining({ key: expect.any(String), sku: expect.any(String), @@ -40,17 +38,19 @@ describe('builder', () => { expectedDelivery: expect.any(String), supplyChannel: expect.objectContaining({ id: expect.any(String), - typeId: 'channel', + __typename: 'Channel', }), custom: null, }) - ) - ); + ); + }); +}); + +describe('InventoryEntryDraft model compatibility builders', () => { + it('builds a REST model', () => { + const restModel = InventoryEntryDraft.random().buildRest(); - it( - ...createBuilderSpec( - 'graphql', - InventoryEntryDraft.random(), + expect(restModel).toEqual( expect.objectContaining({ key: expect.any(String), sku: expect.any(String), @@ -63,6 +63,25 @@ describe('builder', () => { }), custom: null, }) - ) - ); + ); + }); + + it('builds a GraphQL model', () => { + const graphqlModel = InventoryEntryDraft.random().buildGraphql(); + + expect(graphqlModel).toMatchObject( + expect.objectContaining({ + key: expect.any(String), + sku: expect.any(String), + quantityOnStock: expect.any(Number), + restockableInDays: expect.any(Number), + expectedDelivery: expect.any(String), + supplyChannel: expect.objectContaining({ + id: expect.any(String), + __typename: 'Channel', + }), + custom: null, + }) + ); + }); }); diff --git a/models/inventory-entry/src/inventory-entry-draft/builder.ts b/models/inventory-entry/src/inventory-entry-draft/builder.ts deleted file mode 100644 index 93ca57c81..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/builder.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { Builder } from '@commercetools-test-data/core'; -import type { - TCreateInventoryEntryDraftBuilder, - TInventoryEntryDraft, -} from '../types'; -import generator from './generator'; -import transformers from './transformers'; - -const Model: TCreateInventoryEntryDraftBuilder = () => - Builder({ - generator, - transformers, - }); - -export default Model; diff --git a/models/inventory-entry/src/inventory-entry-draft/builders.ts b/models/inventory-entry/src/inventory-entry-draft/builders.ts new file mode 100644 index 000000000..492b4038b --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/builders.ts @@ -0,0 +1,42 @@ +import { + createCompatibilityBuilder, + createSpecializedBuilder, + TModelFieldsConfig, +} from '@commercetools-test-data/core'; +import type { + TCreateInventoryEntryBuilder, + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../types'; +import { restFieldsConfig, graphqlFieldsConfig } from './fields-config'; + +export const RestModelBuilder: TCreateInventoryEntryBuilder< + TInventoryEntryDraftRest +> = () => + createSpecializedBuilder({ + name: 'InventoryEntryDraftRestBuilder', + type: 'rest', + modelFieldsConfig: restFieldsConfig, + }); + +export const GraphqlModelBuilder: TCreateInventoryEntryBuilder< + TInventoryEntryDraftGraphql +> = () => + createSpecializedBuilder({ + name: 'InventoryEntryDraftGraphqlBuilder', + type: 'graphql', + modelFieldsConfig: graphqlFieldsConfig, + }); + +export const CompatInventoryEntryModelBuilder = < + TInventoryEntryModel extends + | TInventoryEntryDraftRest + | TInventoryEntryDraftGraphql = TInventoryEntryDraftRest, +>() => + createCompatibilityBuilder({ + name: 'InventoryEntryDraftCompatBuilder', + modelFieldsConfig: { + rest: restFieldsConfig as TModelFieldsConfig, + graphql: graphqlFieldsConfig as TModelFieldsConfig, + }, + }); diff --git a/models/inventory-entry/src/inventory-entry-draft/fields-config.ts b/models/inventory-entry/src/inventory-entry-draft/fields-config.ts new file mode 100644 index 000000000..36dfb7244 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/fields-config.ts @@ -0,0 +1,37 @@ +import { ChannelGraphql } from '@commercetools-test-data/channel'; +import { + Reference, + ReferenceDraft, + TReferenceGraphql, +} from '@commercetools-test-data/commons'; +import { fake, type TModelFieldsConfig } from '@commercetools-test-data/core'; +import { createRelatedDates } from '@commercetools-test-data/utils'; +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../types'; + +const [getFutureDate] = createRelatedDates(); + +const commonFieldsConfig = { + key: fake((f) => f.lorem.slug(2)), + sku: fake((f) => f.lorem.words()), + quantityOnStock: fake((f) => f.number.int({ min: 11, max: 30 })), + restockableInDays: fake((f) => f.number.int({ min: 1, max: 10 })), + expectedDelivery: fake(getFutureDate), + supplyChannel: fake(() => ReferenceDraft.random().typeId('channel')), + custom: null, +}; +export const restFieldsConfig: TModelFieldsConfig = { + fields: { + ...commonFieldsConfig, + supplyChannel: fake(() => Reference.presets.channelReference()), + }, +}; +export const graphqlFieldsConfig: TModelFieldsConfig = + { + fields: { + ...commonFieldsConfig, + supplyChannel: fake(() => ChannelGraphql.random()), + }, + }; diff --git a/models/inventory-entry/src/inventory-entry-draft/index.ts b/models/inventory-entry/src/inventory-entry-draft/index.ts index 96e2519e1..4a3cc50e6 100644 --- a/models/inventory-entry/src/inventory-entry-draft/index.ts +++ b/models/inventory-entry/src/inventory-entry-draft/index.ts @@ -1,2 +1,24 @@ -export { default as random } from './builder'; -export { default as presets } from './presets'; +import { + RestModelBuilder, + GraphqlModelBuilder, + CompatInventoryEntryModelBuilder, +} from './builders'; +import * as modelPresets from './presets'; + +export const InventoryEntryDraftRest = { + random: RestModelBuilder, + presets: modelPresets.restPresets, +}; + +export const InventoryEntryDraftGraphql = { + random: GraphqlModelBuilder, + presets: modelPresets.graphqlPresets, +}; + +/** + * @deprecated Use `InventoryEntryDraftRest` or `InventoryEntryDraftGraphql` exported models instead of `InventoryEntryDraft`. + */ +export const InventoryEntryDraft = { + random: CompatInventoryEntryModelBuilder, + presets: modelPresets.compatPresets, +}; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/change-history-data/index.ts b/models/inventory-entry/src/inventory-entry-draft/presets/change-history-data/index.ts index 87b9f9206..5f096e6b6 100644 --- a/models/inventory-entry/src/inventory-entry-draft/presets/change-history-data/index.ts +++ b/models/inventory-entry/src/inventory-entry-draft/presets/change-history-data/index.ts @@ -1,7 +1,13 @@ -import withNoSupplyChannel from './with-no-supply-channel'; +import * as withNoSupplyChannelPresets from './with-no-supply-channel'; -const presets = { - withNoSupplyChannel, +export const restPresets = { + withNoSupplyChannel: withNoSupplyChannelPresets.restPreset, }; -export default presets; +export const graphqlPresets = { + withNoSupplyChannel: withNoSupplyChannelPresets.graphqlPreset, +}; + +export const compatPresets = { + withNoSupplyChannel: withNoSupplyChannelPresets.compatPreset, +}; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/change-history-data/with-no-supply-channel.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/change-history-data/with-no-supply-channel.spec.ts index fbbd4e7bc..4c9031fde 100644 --- a/models/inventory-entry/src/inventory-entry-draft/presets/change-history-data/with-no-supply-channel.spec.ts +++ b/models/inventory-entry/src/inventory-entry-draft/presets/change-history-data/with-no-supply-channel.spec.ts @@ -1,14 +1,36 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import withNoSupplyChannel from './with-no-supply-channel'; +import { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + restPreset, + graphqlPreset, + compatPreset, +} from './with-no-supply-channel'; -describe('Inventory Entry with no supply channel', () => { - it('should return an inventory entry with supply channel undefined', () => { - const inventoryEntry = withNoSupplyChannel().build(); +const inventoryEntryExpectation = ( + inventoryEntry: TInventoryEntryDraftRest | TInventoryEntryDraftGraphql +) => { + expect(inventoryEntry).toMatchObject({ + supplyChannel: undefined, + }); +}; - expect(inventoryEntry).toEqual( - expect.objectContaining({ - supplyChannel: undefined, - }) - ); +describe('WithNoSupplyChannel preset', () => { + it('[REST] should set all specified fields to undefined', () => { + const emptyInventoryEntryDraft = restPreset().build(); + inventoryEntryExpectation(emptyInventoryEntryDraft); + }); + it('[Graphql] should set all specified fields to undefined', () => { + const emptyInventoryEntryDraft = graphqlPreset().build(); + inventoryEntryExpectation(emptyInventoryEntryDraft); + }); + it('[Compat - REST] should set all specified fields to undefined', () => { + const emptyInventoryEntryDraft = compatPreset().buildRest(); + inventoryEntryExpectation(emptyInventoryEntryDraft); + }); + it('[Compat - Graphql] should set all specified fields to undefined', () => { + const emptyInventoryEntryDraft = compatPreset().buildGraphql(); + inventoryEntryExpectation(emptyInventoryEntryDraft); }); }); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/change-history-data/with-no-supply-channel.ts b/models/inventory-entry/src/inventory-entry-draft/presets/change-history-data/with-no-supply-channel.ts index 169d07faf..d315b7bd3 100644 --- a/models/inventory-entry/src/inventory-entry-draft/presets/change-history-data/with-no-supply-channel.ts +++ b/models/inventory-entry/src/inventory-entry-draft/presets/change-history-data/with-no-supply-channel.ts @@ -1,6 +1,28 @@ -import InventoryEntryDraft from '../../builder'; +import { TBuilder } from '@commercetools-test-data/core'; +import type { + TInventoryEntryDraft, + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; -const withNoSupplyChannel = () => - InventoryEntryDraft().supplyChannel(undefined); +const populatePreset = < + TModel extends TInventoryEntryDraftRest | TInventoryEntryDraftGraphql, +>( + builder: TBuilder +): TBuilder => { + return builder.supplyChannel(undefined); +}; -export default withNoSupplyChannel; +export const restPreset = (): TBuilder => + populatePreset(InventoryEntryDraftRest.random()); + +export const graphqlPreset = (): TBuilder => + populatePreset(InventoryEntryDraftGraphql.random()); + +export const compatPreset = (): TBuilder => + populatePreset(InventoryEntryDraft.random()); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/empty.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/empty.spec.ts index 0e3b354a9..092c7954e 100644 --- a/models/inventory-entry/src/inventory-entry-draft/presets/empty.spec.ts +++ b/models/inventory-entry/src/inventory-entry-draft/presets/empty.spec.ts @@ -1,16 +1,32 @@ -import { TInventoryEntryDraft } from '../../types'; -import empty from './empty'; +import { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../types'; +import { restPreset, graphqlPreset, compatPreset } from './empty'; -it(`should set all specified fields to undefined`, () => { - const emptyInventoryEntryDraft = empty().build(); - expect(emptyInventoryEntryDraft.key).toMatchInlineSnapshot(`undefined`); - expect(emptyInventoryEntryDraft.supplyChannel).toMatchInlineSnapshot( - `undefined` - ); - expect(emptyInventoryEntryDraft.restockableInDays).toMatchInlineSnapshot( - `undefined` - ); - expect(emptyInventoryEntryDraft.expectedDelivery).toMatchInlineSnapshot( - `undefined` - ); +const inventoryEntryExpectation = ( + inventoryEntry: TInventoryEntryDraftRest | TInventoryEntryDraftGraphql +) => { + expect(inventoryEntry).toMatchObject({ + custom: null, + }); +}; + +describe('Empty preset', () => { + it('[REST] should set all specified fields to undefined', () => { + const emptyInventoryEntryDraft = restPreset().build(); + inventoryEntryExpectation(emptyInventoryEntryDraft); + }); + it('[Graphql] should set all specified fields to undefined', () => { + const emptyInventoryEntryDraft = graphqlPreset().build(); + inventoryEntryExpectation(emptyInventoryEntryDraft); + }); + it('[Compat - REST] should set all specified fields to undefined', () => { + const emptyInventoryEntryDraft = compatPreset().buildRest(); + inventoryEntryExpectation(emptyInventoryEntryDraft); + }); + it('[Compat - Graphql] should set all specified fields to undefined', () => { + const emptyInventoryEntryDraft = compatPreset().buildGraphql(); + inventoryEntryExpectation(emptyInventoryEntryDraft); + }); }); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/empty.ts b/models/inventory-entry/src/inventory-entry-draft/presets/empty.ts index 6c20ad561..2e4a471bd 100644 --- a/models/inventory-entry/src/inventory-entry-draft/presets/empty.ts +++ b/models/inventory-entry/src/inventory-entry-draft/presets/empty.ts @@ -1,11 +1,32 @@ -import type { TInventoryEntryDraftBuilder } from '../../types'; -import InventoryEntryDraft from '../builder'; +import { TBuilder } from '@commercetools-test-data/core'; +import type { + TInventoryEntryDraft, + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../index'; -const empty = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft() +const populatePreset = < + TModel extends TInventoryEntryDraftGraphql | TInventoryEntryDraftRest, +>( + builder: TBuilder +) => { + return builder .key(undefined) .supplyChannel(undefined) .restockableInDays(undefined) .expectedDelivery(undefined); +}; -export default empty; +export const restPreset = (): TBuilder => + populatePreset(InventoryEntryDraftRest.random()); + +export const graphqlPreset = (): TBuilder => + populatePreset(InventoryEntryDraftGraphql.random()); + +export const compatPreset = (): TBuilder => + populatePreset(InventoryEntryDraft.random()); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/index.ts b/models/inventory-entry/src/inventory-entry-draft/presets/index.ts index e4f8d8dff..82971081a 100644 --- a/models/inventory-entry/src/inventory-entry-draft/presets/index.ts +++ b/models/inventory-entry/src/inventory-entry-draft/presets/index.ts @@ -1,13 +1,25 @@ -import changeHistoryData from './change-history-data'; -import empty from './empty'; -import sampleDataB2B from './sample-data-b2b'; -import sampleDataB2CLifestyle from './sample-data-b2c-lifestyle'; +import * as changeHistoryData from './change-history-data'; +import * as empty from './empty'; +import * as sampleDataB2B from './sample-data-b2b'; +import * as sampleDataB2CLifestyle from './sample-data-b2c-lifestyle'; -const presets = { +export const restPresets = { changeHistoryData, empty, sampleDataB2B, sampleDataB2CLifestyle, }; -export default presets; +export const graphqlPresets = { + changeHistoryData, + empty, + sampleDataB2B, + sampleDataB2CLifestyle, +}; + +export const compatPresets = { + changeHistoryData, + empty, + sampleDataB2B, + sampleDataB2CLifestyle, +}; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/index.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/index.ts index 43b679103..53d122686 100644 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/index.ts +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/index.ts @@ -1,1157 +1,2899 @@ -import skuA789Bc2015Default from './sku-a789-bc-2015-default'; -import skuA789Bc2015Eu from './sku-a789-bc-2015-eu'; -import skuA789Bc2015Us from './sku-a789-bc-2015-us'; -import skuA789Bc2019Default from './sku-a789-bc-2019-default'; -import skuA789Bc2019Eu from './sku-a789-bc-2019-eu'; -import skuA789Bc2019Us from './sku-a789-bc-2019-us'; -import skuA789Bc2023Default from './sku-a789-bc-2023-default'; -import skuA789Bc2023Eu from './sku-a789-bc-2023-eu'; -import skuA789Bc2023Us from './sku-a789-bc-2023-us'; -import skuAa123Qr2015Default from './sku-aa123-qr-2015-default'; -import skuAa123Qr2015Eu from './sku-aa123-qr-2015-eu'; -import skuAa123Qr2015Us from './sku-aa123-qr-2015-us'; -import skuAa123Qr2019Default from './sku-aa123-qr-2019-default'; -import skuAa123Qr2019Eu from './sku-aa123-qr-2019-eu'; -import skuAa123Qr2019Us from './sku-aa123-qr-2019-us'; -import skuAa123Qr2023Default from './sku-aa123-qr-2023-default'; -import skuAa123Qr2023Eu from './sku-aa123-qr-2023-eu'; -import skuAa123Qr2023Us from './sku-aa123-qr-2023-us'; -import skuAaa789UvBlueDefault from './sku-aaa789-uv-blue-default'; -import skuAaa789UvBlueEu from './sku-aaa789-uv-blue-eu'; -import skuAaa789UvBlueUs from './sku-aaa789-uv-blue-us'; -import skuAaa789UvGreenDefault from './sku-aaa789-uv-green-default'; -import skuAaa789UvGreenEu from './sku-aaa789-uv-green-eu'; -import skuAaa789UvGreenUs from './sku-aaa789-uv-green-us'; -import skuAaa789UvRedDefault from './sku-aaa789-uv-red-default'; -import skuAaa789UvRedEu from './sku-aaa789-uv-red-eu'; -import skuAaa789UvRedUs from './sku-aaa789-uv-red-us'; -import skuAirFilterDefault from './sku-air-filter-default'; -import skuAirFilterEu from './sku-air-filter-eu'; -import skuAirFilterUs from './sku-air-filter-us'; -import skuAlternatorDefault from './sku-alternator-default'; -import skuAlternatorEu from './sku-alternator-eu'; -import skuAlternatorUs from './sku-alternator-us'; -import skuB456St2015Default from './sku-b456-st-2015-default'; -import skuB456St2015Eu from './sku-b456-st-2015-eu'; -import skuB456St2015Us from './sku-b456-st-2015-us'; -import skuB456St2019Default from './sku-b456-st-2019-default'; -import skuB456St2019Eu from './sku-b456-st-2019-eu'; -import skuB456St2019Us from './sku-b456-st-2019-us'; -import skuB456St2023Default from './sku-b456-st-2023-default'; -import skuB456St2023Eu from './sku-b456-st-2023-eu'; -import skuB456St2023Us from './sku-b456-st-2023-us'; -import skuBb456St2015Default from './sku-bb456-st-2015-default'; -import skuBb456St2015Eu from './sku-bb456-st-2015-eu'; -import skuBb456St2015Us from './sku-bb456-st-2015-us'; -import skuBb456St2019Default from './sku-bb456-st-2019-default'; -import skuBb456St2019Eu from './sku-bb456-st-2019-eu'; -import skuBb456St2019Us from './sku-bb456-st-2019-us'; -import skuBb456St2023Default from './sku-bb456-st-2023-default'; -import skuBb456St2023Eu from './sku-bb456-st-2023-eu'; -import skuBb456St2023Us from './sku-bb456-st-2023-us'; -import skuBbb234WxBlueDefault from './sku-bbb234-wx-blue-default'; -import skuBbb234WxBlueEu from './sku-bbb234-wx-blue-eu'; -import skuBbb234WxBlueUs from './sku-bbb234-wx-blue-us'; -import skuBbb234WxGreenDefault from './sku-bbb234-wx-green-default'; -import skuBbb234WxGreenEu from './sku-bbb234-wx-green-eu'; -import skuBbb234WxGreenUs from './sku-bbb234-wx-green-us'; -import skuBbb234WxRedDefault from './sku-bbb234-wx-red-default'; -import skuBbb234WxRedEu from './sku-bbb234-wx-red-eu'; -import skuBbb234WxRedUs from './sku-bbb234-wx-red-us'; -import skuBrakePadSetDefault from './sku-brake-pad-set-default'; -import skuBrakePadSetEu from './sku-brake-pad-set-eu'; -import skuBrakePadSetUs from './sku-brake-pad-set-us'; -import skuC789Uv2015Default from './sku-c789-uv-2015-default'; -import skuC789Uv2015Eu from './sku-c789-uv-2015-eu'; -import skuC789Uv2015Us from './sku-c789-uv-2015-us'; -import skuC789Uv2019Default from './sku-c789-uv-2019-default'; -import skuC789Uv2019Eu from './sku-c789-uv-2019-eu'; -import skuC789Uv2019Us from './sku-c789-uv-2019-us'; -import skuC789Uv2023Default from './sku-c789-uv-2023-default'; -import skuC789Uv2023Eu from './sku-c789-uv-2023-eu'; -import skuC789Uv2023Us from './sku-c789-uv-2023-us'; -import skuCc789Uv2015Default from './sku-cc789-uv-2015-default'; -import skuCc789Uv2015Eu from './sku-cc789-uv-2015-eu'; -import skuCc789Uv2015Us from './sku-cc789-uv-2015-us'; -import skuCc789Uv2019Default from './sku-cc789-uv-2019-default'; -import skuCc789Uv2019Eu from './sku-cc789-uv-2019-eu'; -import skuCc789Uv2019Us from './sku-cc789-uv-2019-us'; -import skuCc789Uv2023Default from './sku-cc789-uv-2023-default'; -import skuCc789Uv2023Eu from './sku-cc789-uv-2023-eu'; -import skuCc789Uv2023Us from './sku-cc789-uv-2023-us'; -import skuCcc567YzBlueDefault from './sku-ccc567-yz-blue-default'; -import skuCcc567YzBlueEu from './sku-ccc567-yz-blue-eu'; -import skuCcc567YzBlueUs from './sku-ccc567-yz-blue-us'; -import skuCcc567YzGreenDefault from './sku-ccc567-yz-green-default'; -import skuCcc567YzGreenEu from './sku-ccc567-yz-green-eu'; -import skuCcc567YzGreenUs from './sku-ccc567-yz-green-us'; -import skuCcc567YzRedDefault from './sku-ccc567-yz-red-default'; -import skuCcc567YzRedEu from './sku-ccc567-yz-red-eu'; -import skuCcc567YzRedUs from './sku-ccc567-yz-red-us'; -import skuD234Wx2015Default from './sku-d234-wx-2015-default'; -import skuD234Wx2015Eu from './sku-d234-wx-2015-eu'; -import skuD234Wx2015Us from './sku-d234-wx-2015-us'; -import skuD234Wx2019Default from './sku-d234-wx-2019-default'; -import skuD234Wx2019Eu from './sku-d234-wx-2019-eu'; -import skuD234Wx2019Us from './sku-d234-wx-2019-us'; -import skuD234Wx2023Default from './sku-d234-wx-2023-default'; -import skuD234Wx2023Eu from './sku-d234-wx-2023-eu'; -import skuD234Wx2023Us from './sku-d234-wx-2023-us'; -import skuDd234Wx2015Default from './sku-dd234-wx-2015-default'; -import skuDd234Wx2015Eu from './sku-dd234-wx-2015-eu'; -import skuDd234Wx2015Us from './sku-dd234-wx-2015-us'; -import skuDd234Wx2019Default from './sku-dd234-wx-2019-default'; -import skuDd234Wx2019Eu from './sku-dd234-wx-2019-eu'; -import skuDd234Wx2019Us from './sku-dd234-wx-2019-us'; -import skuDd234Wx2023Default from './sku-dd234-wx-2023-default'; -import skuDd234Wx2023Eu from './sku-dd234-wx-2023-eu'; -import skuDd234Wx2023Us from './sku-dd234-wx-2023-us'; -import skuDdd890OpBlueDefault from './sku-ddd890-op-blue-default'; -import skuDdd890OpBlueEu from './sku-ddd890-op-blue-eu'; -import skuDdd890OpBlueUs from './sku-ddd890-op-blue-us'; -import skuDdd890OpGreenDefault from './sku-ddd890-op-green-default'; -import skuDdd890OpGreenEu from './sku-ddd890-op-green-eu'; -import skuDdd890OpGreenUs from './sku-ddd890-op-green-us'; -import skuDdd890OpRedDefault from './sku-ddd890-op-red-default'; -import skuDdd890OpRedEu from './sku-ddd890-op-red-eu'; -import skuDdd890OpRedUs from './sku-ddd890-op-red-us'; -import skuE567Yz2015Default from './sku-e567-yz-2015-default'; -import skuE567Yz2015Eu from './sku-e567-yz-2015-eu'; -import skuE567Yz2015Us from './sku-e567-yz-2015-us'; -import skuE567Yz2019Default from './sku-e567-yz-2019-default'; -import skuE567Yz2019Eu from './sku-e567-yz-2019-eu'; -import skuE567Yz2019Us from './sku-e567-yz-2019-us'; -import skuE567Yz2023Default from './sku-e567-yz-2023-default'; -import skuE567Yz2023Eu from './sku-e567-yz-2023-eu'; -import skuE567Yz2023Us from './sku-e567-yz-2023-us'; -import skuEe567Yz2015Default from './sku-ee567-yz-2015-default'; -import skuEe567Yz2015Eu from './sku-ee567-yz-2015-eu'; -import skuEe567Yz2015Us from './sku-ee567-yz-2015-us'; -import skuEe567Yz2019Default from './sku-ee567-yz-2019-default'; -import skuEe567Yz2019Eu from './sku-ee567-yz-2019-eu'; -import skuEe567Yz2019Us from './sku-ee567-yz-2019-us'; -import skuEe567Yz2023Default from './sku-ee567-yz-2023-default'; -import skuEe567Yz2023Eu from './sku-ee567-yz-2023-eu'; -import skuEe567Yz2023Us from './sku-ee567-yz-2023-us'; -import skuEee123QrBlueDefault from './sku-eee123-qr-blue-default'; -import skuEee123QrBlueEu from './sku-eee123-qr-blue-eu'; -import skuEee123QrBlueUs from './sku-eee123-qr-blue-us'; -import skuEee123QrGreenDefault from './sku-eee123-qr-green-default'; -import skuEee123QrGreenEu from './sku-eee123-qr-green-eu'; -import skuEee123QrGreenUs from './sku-eee123-qr-green-us'; -import skuEee123QrRedDefault from './sku-eee123-qr-red-default'; -import skuEee123QrRedEu from './sku-eee123-qr-red-eu'; -import skuEee123QrRedUs from './sku-eee123-qr-red-us'; -import skuF890Op2015Default from './sku-f890-op-2015-default'; -import skuF890Op2015Eu from './sku-f890-op-2015-eu'; -import skuF890Op2015Us from './sku-f890-op-2015-us'; -import skuF890Op2019Default from './sku-f890-op-2019-default'; -import skuF890Op2019Eu from './sku-f890-op-2019-eu'; -import skuF890Op2019Us from './sku-f890-op-2019-us'; -import skuF890Op2023Default from './sku-f890-op-2023-default'; -import skuF890Op2023Eu from './sku-f890-op-2023-eu'; -import skuF890Op2023Us from './sku-f890-op-2023-us'; -import skuFf890Op2015Default from './sku-ff890-op-2015-default'; -import skuFf890Op2015Eu from './sku-ff890-op-2015-eu'; -import skuFf890Op2015Us from './sku-ff890-op-2015-us'; -import skuFf890Op2019Default from './sku-ff890-op-2019-default'; -import skuFf890Op2019Eu from './sku-ff890-op-2019-eu'; -import skuFf890Op2019Us from './sku-ff890-op-2019-us'; -import skuFf890Op2023Default from './sku-ff890-op-2023-default'; -import skuFf890Op2023Eu from './sku-ff890-op-2023-eu'; -import skuFf890Op2023Us from './sku-ff890-op-2023-us'; -import skuFff456StBlueDefault from './sku-fff456-st-blue-default'; -import skuFff456StBlueEu from './sku-fff456-st-blue-eu'; -import skuFff456StBlueUs from './sku-fff456-st-blue-us'; -import skuFff456StGreenDefault from './sku-fff456-st-green-default'; -import skuFff456StGreenEu from './sku-fff456-st-green-eu'; -import skuFff456StGreenUs from './sku-fff456-st-green-us'; -import skuFff456StRedDefault from './sku-fff456-st-red-default'; -import skuFff456StRedEu from './sku-fff456-st-red-eu'; -import skuFff456StRedUs from './sku-fff456-st-red-us'; -import skuFuelFilterDefault from './sku-fuel-filter-default'; -import skuFuelFilterEu from './sku-fuel-filter-eu'; -import skuFuelFilterUs from './sku-fuel-filter-us'; -import skuG123Qr2015Default from './sku-g123-qr-2015-default'; -import skuG123Qr2015Eu from './sku-g123-qr-2015-eu'; -import skuG123Qr2015Us from './sku-g123-qr-2015-us'; -import skuG123Qr2019Default from './sku-g123-qr-2019-default'; -import skuG123Qr2019Eu from './sku-g123-qr-2019-eu'; -import skuG123Qr2019Us from './sku-g123-qr-2019-us'; -import skuG123Qr2023Default from './sku-g123-qr-2023-default'; -import skuG123Qr2023Eu from './sku-g123-qr-2023-eu'; -import skuG123Qr2023Us from './sku-g123-qr-2023-us'; -import skuGg123Qr2015Default from './sku-gg123-qr-2015-default'; -import skuGg123Qr2015Eu from './sku-gg123-qr-2015-eu'; -import skuGg123Qr2015Us from './sku-gg123-qr-2015-us'; -import skuGg123Qr2019Default from './sku-gg123-qr-2019-default'; -import skuGg123Qr2019Eu from './sku-gg123-qr-2019-eu'; -import skuGg123Qr2019Us from './sku-gg123-qr-2019-us'; -import skuGg123Qr2023Default from './sku-gg123-qr-2023-default'; -import skuGg123Qr2023Eu from './sku-gg123-qr-2023-eu'; -import skuGg123Qr2023Us from './sku-gg123-qr-2023-us'; -import skuGgg789UvBlueDefault from './sku-ggg789-uv-blue-default'; -import skuGgg789UvBlueEu from './sku-ggg789-uv-blue-eu'; -import skuGgg789UvBlueUs from './sku-ggg789-uv-blue-us'; -import skuGgg789UvGreenDefault from './sku-ggg789-uv-green-default'; -import skuGgg789UvGreenEu from './sku-ggg789-uv-green-eu'; -import skuGgg789UvGreenUs from './sku-ggg789-uv-green-us'; -import skuGgg789UvRedDefault from './sku-ggg789-uv-red-default'; -import skuGgg789UvRedEu from './sku-ggg789-uv-red-eu'; -import skuGgg789UvRedUs from './sku-ggg789-uv-red-us'; -import skuH456St2015Default from './sku-h456-st-2015-default'; -import skuH456St2015Eu from './sku-h456-st-2015-eu'; -import skuH456St2015Us from './sku-h456-st-2015-us'; -import skuH456St2019Default from './sku-h456-st-2019-default'; -import skuH456St2019Eu from './sku-h456-st-2019-eu'; -import skuH456St2019Us from './sku-h456-st-2019-us'; -import skuH456St2023Default from './sku-h456-st-2023-default'; -import skuH456St2023Eu from './sku-h456-st-2023-eu'; -import skuH456St2023Us from './sku-h456-st-2023-us'; -import skuHh456St2015Default from './sku-hh456-st-2015-default'; -import skuHh456St2015Eu from './sku-hh456-st-2015-eu'; -import skuHh456St2015Us from './sku-hh456-st-2015-us'; -import skuHh456St2019Default from './sku-hh456-st-2019-default'; -import skuHh456St2019Eu from './sku-hh456-st-2019-eu'; -import skuHh456St2019Us from './sku-hh456-st-2019-us'; -import skuHh456St2023Default from './sku-hh456-st-2023-default'; -import skuHh456St2023Eu from './sku-hh456-st-2023-eu'; -import skuHh456St2023Us from './sku-hh456-st-2023-us'; -import skuHhh234WxBlueDefault from './sku-hhh234-wx-blue-default'; -import skuHhh234WxBlueEu from './sku-hhh234-wx-blue-eu'; -import skuHhh234WxBlueUs from './sku-hhh234-wx-blue-us'; -import skuHhh234WxGreenDefault from './sku-hhh234-wx-green-default'; -import skuHhh234WxGreenEu from './sku-hhh234-wx-green-eu'; -import skuHhh234WxGreenUs from './sku-hhh234-wx-green-us'; -import skuHhh234WxRedDefault from './sku-hhh234-wx-red-default'; -import skuHhh234WxRedEu from './sku-hhh234-wx-red-eu'; -import skuHhh234WxRedUs from './sku-hhh234-wx-red-us'; -import skuHydraulicHoseDefault from './sku-hydraulic-hose-default'; -import skuHydraulicHoseEu from './sku-hydraulic-hose-eu'; -import skuHydraulicHoseUs from './sku-hydraulic-hose-us'; -import skuI789Uv2015Default from './sku-i789-uv-2015-default'; -import skuI789Uv2015Eu from './sku-i789-uv-2015-eu'; -import skuI789Uv2015Us from './sku-i789-uv-2015-us'; -import skuI789Uv2019Default from './sku-i789-uv-2019-default'; -import skuI789Uv2019Eu from './sku-i789-uv-2019-eu'; -import skuI789Uv2019Us from './sku-i789-uv-2019-us'; -import skuI789Uv2023Default from './sku-i789-uv-2023-default'; -import skuI789Uv2023Eu from './sku-i789-uv-2023-eu'; -import skuI789Uv2023Us from './sku-i789-uv-2023-us'; -import skuIi789Uv2015Default from './sku-ii789-uv-2015-default'; -import skuIi789Uv2015Eu from './sku-ii789-uv-2015-eu'; -import skuIi789Uv2015Us from './sku-ii789-uv-2015-us'; -import skuIi789Uv2019Default from './sku-ii789-uv-2019-default'; -import skuIi789Uv2019Eu from './sku-ii789-uv-2019-eu'; -import skuIi789Uv2019Us from './sku-ii789-uv-2019-us'; -import skuIi789Uv2023Default from './sku-ii789-uv-2023-default'; -import skuIi789Uv2023Eu from './sku-ii789-uv-2023-eu'; -import skuIi789Uv2023Us from './sku-ii789-uv-2023-us'; -import skuIii567YzBlueDefault from './sku-iii567-yz-blue-default'; -import skuIii567YzBlueEu from './sku-iii567-yz-blue-eu'; -import skuIii567YzBlueUs from './sku-iii567-yz-blue-us'; -import skuIii567YzGreenDefault from './sku-iii567-yz-green-default'; -import skuIii567YzGreenEu from './sku-iii567-yz-green-eu'; -import skuIii567YzGreenUs from './sku-iii567-yz-green-us'; -import skuIii567YzRedDefault from './sku-iii567-yz-red-default'; -import skuIii567YzRedEu from './sku-iii567-yz-red-eu'; -import skuIii567YzRedUs from './sku-iii567-yz-red-us'; -import skuJ234Wx2015Default from './sku-j234-wx-2015-default'; -import skuJ234Wx2015Eu from './sku-j234-wx-2015-eu'; -import skuJ234Wx2015Us from './sku-j234-wx-2015-us'; -import skuJ234Wx2019Default from './sku-j234-wx-2019-default'; -import skuJ234Wx2019Eu from './sku-j234-wx-2019-eu'; -import skuJ234Wx2019Us from './sku-j234-wx-2019-us'; -import skuJ234Wx2023Default from './sku-j234-wx-2023-default'; -import skuJ234Wx2023Eu from './sku-j234-wx-2023-eu'; -import skuJ234Wx2023Us from './sku-j234-wx-2023-us'; -import skuJj234Wx2015Default from './sku-jj234-wx-2015-default'; -import skuJj234Wx2015Eu from './sku-jj234-wx-2015-eu'; -import skuJj234Wx2015Us from './sku-jj234-wx-2015-us'; -import skuJj234Wx2019Default from './sku-jj234-wx-2019-default'; -import skuJj234Wx2019Eu from './sku-jj234-wx-2019-eu'; -import skuJj234Wx2019Us from './sku-jj234-wx-2019-us'; -import skuJj234Wx2023Default from './sku-jj234-wx-2023-default'; -import skuJj234Wx2023Eu from './sku-jj234-wx-2023-eu'; -import skuJj234Wx2023Us from './sku-jj234-wx-2023-us'; -import skuJjj890OpBlueDefault from './sku-jjj890-op-blue-default'; -import skuJjj890OpBlueEu from './sku-jjj890-op-blue-eu'; -import skuJjj890OpBlueUs from './sku-jjj890-op-blue-us'; -import skuJjj890OpGreenDefault from './sku-jjj890-op-green-default'; -import skuJjj890OpGreenEu from './sku-jjj890-op-green-eu'; -import skuJjj890OpGreenUs from './sku-jjj890-op-green-us'; -import skuJjj890OpRedDefault from './sku-jjj890-op-red-default'; -import skuJjj890OpRedEu from './sku-jjj890-op-red-eu'; -import skuJjj890OpRedUs from './sku-jjj890-op-red-us'; -import skuK567Yz2015Default from './sku-k567-yz-2015-default'; -import skuK567Yz2015Eu from './sku-k567-yz-2015-eu'; -import skuK567Yz2015Us from './sku-k567-yz-2015-us'; -import skuK567Yz2019Default from './sku-k567-yz-2019-default'; -import skuK567Yz2019Eu from './sku-k567-yz-2019-eu'; -import skuK567Yz2019Us from './sku-k567-yz-2019-us'; -import skuK567Yz2023Default from './sku-k567-yz-2023-default'; -import skuK567Yz2023Eu from './sku-k567-yz-2023-eu'; -import skuK567Yz2023Us from './sku-k567-yz-2023-us'; -import skuKk567Yz2015Default from './sku-kk567-yz-2015-default'; -import skuKk567Yz2015Eu from './sku-kk567-yz-2015-eu'; -import skuKk567Yz2015Us from './sku-kk567-yz-2015-us'; -import skuKk567Yz2019Default from './sku-kk567-yz-2019-default'; -import skuKk567Yz2019Eu from './sku-kk567-yz-2019-eu'; -import skuKk567Yz2019Us from './sku-kk567-yz-2019-us'; -import skuKk567Yz2023Default from './sku-kk567-yz-2023-default'; -import skuKk567Yz2023Eu from './sku-kk567-yz-2023-eu'; -import skuKk567Yz2023Us from './sku-kk567-yz-2023-us'; -import skuL890Op2015Default from './sku-l890-op-2015-default'; -import skuL890Op2015Eu from './sku-l890-op-2015-eu'; -import skuL890Op2015Us from './sku-l890-op-2015-us'; -import skuL890Op2019Default from './sku-l890-op-2019-default'; -import skuL890Op2019Eu from './sku-l890-op-2019-eu'; -import skuL890Op2019Us from './sku-l890-op-2019-us'; -import skuL890Op2023Default from './sku-l890-op-2023-default'; -import skuL890Op2023Eu from './sku-l890-op-2023-eu'; -import skuL890Op2023Us from './sku-l890-op-2023-us'; -import skuLedWorkLightDefault from './sku-led-work-light-default'; -import skuLedWorkLightEu from './sku-led-work-light-eu'; -import skuLedWorkLightUs from './sku-led-work-light-us'; -import skuLl890Op2015Default from './sku-ll890-op-2015-default'; -import skuLl890Op2015Eu from './sku-ll890-op-2015-eu'; -import skuLl890Op2015Us from './sku-ll890-op-2015-us'; -import skuLl890Op2019Default from './sku-ll890-op-2019-default'; -import skuLl890Op2019Eu from './sku-ll890-op-2019-eu'; -import skuLl890Op2019Us from './sku-ll890-op-2019-us'; -import skuLl890Op2023Default from './sku-ll890-op-2023-default'; -import skuLl890Op2023Eu from './sku-ll890-op-2023-eu'; -import skuLl890Op2023Us from './sku-ll890-op-2023-us'; -import skuM890Op2015Default from './sku-m890-op-2015-default'; -import skuM890Op2015Eu from './sku-m890-op-2015-eu'; -import skuM890Op2015Us from './sku-m890-op-2015-us'; -import skuM890Op2019Default from './sku-m890-op-2019-default'; -import skuM890Op2019Eu from './sku-m890-op-2019-eu'; -import skuM890Op2019Us from './sku-m890-op-2019-us'; -import skuM890Op2023Default from './sku-m890-op-2023-default'; -import skuM890Op2023Eu from './sku-m890-op-2023-eu'; -import skuM890Op2023Us from './sku-m890-op-2023-us'; -import skuMm123Qr2015Default from './sku-mm123-qr-2015-default'; -import skuMm123Qr2015Eu from './sku-mm123-qr-2015-eu'; -import skuMm123Qr2015Us from './sku-mm123-qr-2015-us'; -import skuMm123Qr2019Default from './sku-mm123-qr-2019-default'; -import skuMm123Qr2019Eu from './sku-mm123-qr-2019-eu'; -import skuMm123Qr2019Us from './sku-mm123-qr-2019-us'; -import skuMm123Qr2023Default from './sku-mm123-qr-2023-default'; -import skuMm123Qr2023Eu from './sku-mm123-qr-2023-eu'; -import skuMm123Qr2023Us from './sku-mm123-qr-2023-us'; -import skuN123Qr2015Default from './sku-n123-qr-2015-default'; -import skuN123Qr2015Eu from './sku-n123-qr-2015-eu'; -import skuN123Qr2015Us from './sku-n123-qr-2015-us'; -import skuN123Qr2019Default from './sku-n123-qr-2019-default'; -import skuN123Qr2019Eu from './sku-n123-qr-2019-eu'; -import skuN123Qr2019Us from './sku-n123-qr-2019-us'; -import skuN123Qr2023Default from './sku-n123-qr-2023-default'; -import skuN123Qr2023Eu from './sku-n123-qr-2023-eu'; -import skuN123Qr2023Us from './sku-n123-qr-2023-us'; -import skuNn456St2015Default from './sku-nn456-st-2015-default'; -import skuNn456St2015Eu from './sku-nn456-st-2015-eu'; -import skuNn456St2015Us from './sku-nn456-st-2015-us'; -import skuNn456St2019Default from './sku-nn456-st-2019-default'; -import skuNn456St2019Eu from './sku-nn456-st-2019-eu'; -import skuNn456St2019Us from './sku-nn456-st-2019-us'; -import skuNn456St2023Default from './sku-nn456-st-2023-default'; -import skuNn456St2023Eu from './sku-nn456-st-2023-eu'; -import skuNn456St2023Us from './sku-nn456-st-2023-us'; -import skuOilFilterDefault from './sku-oil-filter-default'; -import skuOilFilterEu from './sku-oil-filter-eu'; -import skuOilFilterUs from './sku-oil-filter-us'; -import skuOo789Uv2015Default from './sku-oo789-uv-2015-default'; -import skuOo789Uv2015Eu from './sku-oo789-uv-2015-eu'; -import skuOo789Uv2015Us from './sku-oo789-uv-2015-us'; -import skuOo789Uv2019Default from './sku-oo789-uv-2019-default'; -import skuOo789Uv2019Eu from './sku-oo789-uv-2019-eu'; -import skuOo789Uv2019Us from './sku-oo789-uv-2019-us'; -import skuOo789Uv2023Default from './sku-oo789-uv-2023-default'; -import skuOo789Uv2023Eu from './sku-oo789-uv-2023-eu'; -import skuOo789Uv2023Us from './sku-oo789-uv-2023-us'; -import skuP234Qw2015Default from './sku-p234-qw-2015-default'; -import skuP234Qw2015Eu from './sku-p234-qw-2015-eu'; -import skuP234Qw2015Us from './sku-p234-qw-2015-us'; -import skuP234Qw2019Default from './sku-p234-qw-2019-default'; -import skuP234Qw2019Eu from './sku-p234-qw-2019-eu'; -import skuP234Qw2019Us from './sku-p234-qw-2019-us'; -import skuP234Qw2023Default from './sku-p234-qw-2023-default'; -import skuP234Qw2023Eu from './sku-p234-qw-2023-eu'; -import skuP234Qw2023Us from './sku-p234-qw-2023-us'; -import skuPinAndBushingKitDefault from './sku-pin-and-bushing-kit-default'; -import skuPinAndBushingKitEu from './sku-pin-and-bushing-kit-eu'; -import skuPinAndBushingKitUs from './sku-pin-and-bushing-kit-us'; -import skuPistonRingSetDefault from './sku-piston-ring-set-default'; -import skuPistonRingSetEu from './sku-piston-ring-set-eu'; -import skuPistonRingSetUs from './sku-piston-ring-set-us'; -import skuPneumaticTireDefault from './sku-pneumatic-tire-default'; -import skuPneumaticTireEu from './sku-pneumatic-tire-eu'; -import skuPneumaticTireUs from './sku-pneumatic-tire-us'; -import skuPp234Wx2015Default from './sku-pp234-wx-2015-default'; -import skuPp234Wx2015Eu from './sku-pp234-wx-2015-eu'; -import skuPp234Wx2015Us from './sku-pp234-wx-2015-us'; -import skuPp234Wx2019Default from './sku-pp234-wx-2019-default'; -import skuPp234Wx2019Eu from './sku-pp234-wx-2019-eu'; -import skuPp234Wx2019Us from './sku-pp234-wx-2019-us'; -import skuPp234Wx2023Default from './sku-pp234-wx-2023-default'; -import skuPp234Wx2023Eu from './sku-pp234-wx-2023-eu'; -import skuPp234Wx2023Us from './sku-pp234-wx-2023-us'; -import skuQq567Yz2015Default from './sku-qq567-yz-2015-default'; -import skuQq567Yz2015Eu from './sku-qq567-yz-2015-eu'; -import skuQq567Yz2015Us from './sku-qq567-yz-2015-us'; -import skuQq567Yz2019Default from './sku-qq567-yz-2019-default'; -import skuQq567Yz2019Eu from './sku-qq567-yz-2019-eu'; -import skuQq567Yz2019Us from './sku-qq567-yz-2019-us'; -import skuQq567Yz2023Default from './sku-qq567-yz-2023-default'; -import skuQq567Yz2023Eu from './sku-qq567-yz-2023-eu'; -import skuQq567Yz2023Us from './sku-qq567-yz-2023-us'; -import skuR123Ts2015Default from './sku-r123-ts-2015-default'; -import skuR123Ts2015Eu from './sku-r123-ts-2015-eu'; -import skuR123Ts2015Us from './sku-r123-ts-2015-us'; -import skuR123Ts2019Default from './sku-r123-ts-2019-default'; -import skuR123Ts2019Eu from './sku-r123-ts-2019-eu'; -import skuR123Ts2019Us from './sku-r123-ts-2019-us'; -import skuR123Ts2023Default from './sku-r123-ts-2023-default'; -import skuR123Ts2023Eu from './sku-r123-ts-2023-eu'; -import skuR123Ts2023Us from './sku-r123-ts-2023-us'; -import skuRr890Op2015Default from './sku-rr890-op-2015-default'; -import skuRr890Op2015Eu from './sku-rr890-op-2015-eu'; -import skuRr890Op2015Us from './sku-rr890-op-2015-us'; -import skuRr890Op2019Default from './sku-rr890-op-2019-default'; -import skuRr890Op2019Eu from './sku-rr890-op-2019-eu'; -import skuRr890Op2019Us from './sku-rr890-op-2019-us'; -import skuRr890Op2023Default from './sku-rr890-op-2023-default'; -import skuRr890Op2023Eu from './sku-rr890-op-2023-eu'; -import skuRr890Op2023Us from './sku-rr890-op-2023-us'; -import skuS567Uv2015Default from './sku-s567-uv-2015-default'; -import skuS567Uv2015Eu from './sku-s567-uv-2015-eu'; -import skuS567Uv2015Us from './sku-s567-uv-2015-us'; -import skuS567Uv2019Default from './sku-s567-uv-2019-default'; -import skuS567Uv2019Eu from './sku-s567-uv-2019-eu'; -import skuS567Uv2019Us from './sku-s567-uv-2019-us'; -import skuS567Uv2023Default from './sku-s567-uv-2023-default'; -import skuS567Uv2023Eu from './sku-s567-uv-2023-eu'; -import skuS567Uv2023Us from './sku-s567-uv-2023-us'; -import skuSs123QrBlueDefault from './sku-ss123-qr-blue-default'; -import skuSs123QrBlueEu from './sku-ss123-qr-blue-eu'; -import skuSs123QrBlueUs from './sku-ss123-qr-blue-us'; -import skuSs123QrGreenDefault from './sku-ss123-qr-green-default'; -import skuSs123QrGreenEu from './sku-ss123-qr-green-eu'; -import skuSs123QrGreenUs from './sku-ss123-qr-green-us'; -import skuSs123QrRedDefault from './sku-ss123-qr-red-default'; -import skuSs123QrRedEu from './sku-ss123-qr-red-eu'; -import skuSs123QrRedUs from './sku-ss123-qr-red-us'; -import skuStarterMotorDefault from './sku-starter-motor-default'; -import skuStarterMotorEu from './sku-starter-motor-eu'; -import skuStarterMotorUs from './sku-starter-motor-us'; -import skuTaperedRollerBearingDefault from './sku-tapered-roller-bearing-default'; -import skuTaperedRollerBearingEu from './sku-tapered-roller-bearing-eu'; -import skuTaperedRollerBearingUs from './sku-tapered-roller-bearing-us'; -import skuTt456StBlueDefault from './sku-tt456-st-blue-default'; -import skuTt456StBlueEu from './sku-tt456-st-blue-eu'; -import skuTt456StBlueUs from './sku-tt456-st-blue-us'; -import skuTt456StGreenDefault from './sku-tt456-st-green-default'; -import skuTt456StGreenEu from './sku-tt456-st-green-eu'; -import skuTt456StGreenUs from './sku-tt456-st-green-us'; -import skuTt456StRedDefault from './sku-tt456-st-red-default'; -import skuTt456StRedEu from './sku-tt456-st-red-eu'; -import skuTt456StRedUs from './sku-tt456-st-red-us'; -import skuU123Qr2015Default from './sku-u123-qr-2015-default'; -import skuU123Qr2015Eu from './sku-u123-qr-2015-eu'; -import skuU123Qr2015Us from './sku-u123-qr-2015-us'; -import skuU123Qr2019Default from './sku-u123-qr-2019-default'; -import skuU123Qr2019Eu from './sku-u123-qr-2019-eu'; -import skuU123Qr2019Us from './sku-u123-qr-2019-us'; -import skuU123Qr2023Default from './sku-u123-qr-2023-default'; -import skuU123Qr2023Eu from './sku-u123-qr-2023-eu'; -import skuU123Qr2023Us from './sku-u123-qr-2023-us'; -import skuUu789UvBlueDefault from './sku-uu789-uv-blue-default'; -import skuUu789UvBlueEu from './sku-uu789-uv-blue-eu'; -import skuUu789UvBlueUs from './sku-uu789-uv-blue-us'; -import skuUu789UvGreenDefault from './sku-uu789-uv-green-default'; -import skuUu789UvGreenEu from './sku-uu789-uv-green-eu'; -import skuUu789UvGreenUs from './sku-uu789-uv-green-us'; -import skuUu789UvRedDefault from './sku-uu789-uv-red-default'; -import skuUu789UvRedEu from './sku-uu789-uv-red-eu'; -import skuUu789UvRedUs from './sku-uu789-uv-red-us'; -import skuV456St2015Default from './sku-v456-st-2015-default'; -import skuV456St2015Eu from './sku-v456-st-2015-eu'; -import skuV456St2015Us from './sku-v456-st-2015-us'; -import skuV456St2019Default from './sku-v456-st-2019-default'; -import skuV456St2019Eu from './sku-v456-st-2019-eu'; -import skuV456St2019Us from './sku-v456-st-2019-us'; -import skuV456St2023Default from './sku-v456-st-2023-default'; -import skuV456St2023Eu from './sku-v456-st-2023-eu'; -import skuV456St2023Us from './sku-v456-st-2023-us'; -import skuVv234WxBlueDefault from './sku-vv234-wx-blue-default'; -import skuVv234WxBlueEu from './sku-vv234-wx-blue-eu'; -import skuVv234WxBlueUs from './sku-vv234-wx-blue-us'; -import skuVv234WxGreenDefault from './sku-vv234-wx-green-default'; -import skuVv234WxGreenEu from './sku-vv234-wx-green-eu'; -import skuVv234WxGreenUs from './sku-vv234-wx-green-us'; -import skuVv234WxRedDefault from './sku-vv234-wx-red-default'; -import skuVv234WxRedEu from './sku-vv234-wx-red-eu'; -import skuVv234WxRedUs from './sku-vv234-wx-red-us'; -import skuW789Uv2015Default from './sku-w789-uv-2015-default'; -import skuW789Uv2015Eu from './sku-w789-uv-2015-eu'; -import skuW789Uv2015Us from './sku-w789-uv-2015-us'; -import skuW789Uv2019Default from './sku-w789-uv-2019-default'; -import skuW789Uv2019Eu from './sku-w789-uv-2019-eu'; -import skuW789Uv2019Us from './sku-w789-uv-2019-us'; -import skuW789Uv2023Default from './sku-w789-uv-2023-default'; -import skuW789Uv2023Eu from './sku-w789-uv-2023-eu'; -import skuW789Uv2023Us from './sku-w789-uv-2023-us'; -import skuWw567YzBlueDefault from './sku-ww567-yz-blue-default'; -import skuWw567YzBlueEu from './sku-ww567-yz-blue-eu'; -import skuWw567YzBlueUs from './sku-ww567-yz-blue-us'; -import skuWw567YzGreenDefault from './sku-ww567-yz-green-default'; -import skuWw567YzGreenEu from './sku-ww567-yz-green-eu'; -import skuWw567YzGreenUs from './sku-ww567-yz-green-us'; -import skuWw567YzRedDefault from './sku-ww567-yz-red-default'; -import skuWw567YzRedEu from './sku-ww567-yz-red-eu'; -import skuWw567YzRedUs from './sku-ww567-yz-red-us'; -import skuX234Wx2015Default from './sku-x234-wx-2015-default'; -import skuX234Wx2015Eu from './sku-x234-wx-2015-eu'; -import skuX234Wx2015Us from './sku-x234-wx-2015-us'; -import skuX234Wx2019Default from './sku-x234-wx-2019-default'; -import skuX234Wx2019Eu from './sku-x234-wx-2019-eu'; -import skuX234Wx2019Us from './sku-x234-wx-2019-us'; -import skuX234Wx2023Default from './sku-x234-wx-2023-default'; -import skuX234Wx2023Eu from './sku-x234-wx-2023-eu'; -import skuX234Wx2023Us from './sku-x234-wx-2023-us'; -import skuX456Yz2015Default from './sku-x456-yz-2015-default'; -import skuX456Yz2015Eu from './sku-x456-yz-2015-eu'; -import skuX456Yz2015Us from './sku-x456-yz-2015-us'; -import skuX456Yz2019Default from './sku-x456-yz-2019-default'; -import skuX456Yz2019Eu from './sku-x456-yz-2019-eu'; -import skuX456Yz2019Us from './sku-x456-yz-2019-us'; -import skuX456Yz2023Default from './sku-x456-yz-2023-default'; -import skuX456Yz2023Eu from './sku-x456-yz-2023-eu'; -import skuX456Yz2023Us from './sku-x456-yz-2023-us'; -import skuXx890OpBlueDefault from './sku-xx890-op-blue-default'; -import skuXx890OpBlueEu from './sku-xx890-op-blue-eu'; -import skuXx890OpBlueUs from './sku-xx890-op-blue-us'; -import skuXx890OpGreenDefault from './sku-xx890-op-green-default'; -import skuXx890OpGreenEu from './sku-xx890-op-green-eu'; -import skuXx890OpGreenUs from './sku-xx890-op-green-us'; -import skuXx890OpRedDefault from './sku-xx890-op-red-default'; -import skuXx890OpRedEu from './sku-xx890-op-red-eu'; -import skuXx890OpRedUs from './sku-xx890-op-red-us'; -import skuY567Yz2015Default from './sku-y567-yz-2015-default'; -import skuY567Yz2015Eu from './sku-y567-yz-2015-eu'; -import skuY567Yz2015Us from './sku-y567-yz-2015-us'; -import skuY567Yz2019Default from './sku-y567-yz-2019-default'; -import skuY567Yz2019Eu from './sku-y567-yz-2019-eu'; -import skuY567Yz2019Us from './sku-y567-yz-2019-us'; -import skuY567Yz2023Default from './sku-y567-yz-2023-default'; -import skuY567Yz2023Eu from './sku-y567-yz-2023-eu'; -import skuY567Yz2023Us from './sku-y567-yz-2023-us'; -import skuYy123QrBlueDefault from './sku-yy123-qr-blue-default'; -import skuYy123QrBlueEu from './sku-yy123-qr-blue-eu'; -import skuYy123QrBlueUs from './sku-yy123-qr-blue-us'; -import skuYy123QrGreenDefault from './sku-yy123-qr-green-default'; -import skuYy123QrGreenEu from './sku-yy123-qr-green-eu'; -import skuYy123QrGreenUs from './sku-yy123-qr-green-us'; -import skuYy123QrRedDefault from './sku-yy123-qr-red-default'; -import skuYy123QrRedEu from './sku-yy123-qr-red-eu'; -import skuYy123QrRedUs from './sku-yy123-qr-red-us'; -import skuZ890Op2015Default from './sku-z890-op-2015-default'; -import skuZ890Op2015Eu from './sku-z890-op-2015-eu'; -import skuZ890Op2015Us from './sku-z890-op-2015-us'; -import skuZ890Op2019Default from './sku-z890-op-2019-default'; -import skuZ890Op2019Eu from './sku-z890-op-2019-eu'; -import skuZ890Op2019Us from './sku-z890-op-2019-us'; -import skuZ890Op2023Default from './sku-z890-op-2023-default'; -import skuZ890Op2023Eu from './sku-z890-op-2023-eu'; -import skuZ890Op2023Us from './sku-z890-op-2023-us'; -import skuZz456StBlueDefault from './sku-zz456-st-blue-default'; -import skuZz456StBlueEu from './sku-zz456-st-blue-eu'; -import skuZz456StBlueUs from './sku-zz456-st-blue-us'; -import skuZz456StGreenDefault from './sku-zz456-st-green-default'; -import skuZz456StGreenEu from './sku-zz456-st-green-eu'; -import skuZz456StGreenUs from './sku-zz456-st-green-us'; -import skuZz456StRedDefault from './sku-zz456-st-red-default'; -import skuZz456StRedEu from './sku-zz456-st-red-eu'; -import skuZz456StRedUs from './sku-zz456-st-red-us'; +import * as skuA789Bc2019UsWarehousePresets from './sku-a-789-bc-2019-us-warehouse'; +import * as skuX456Yz2023EuWarehousePresets from './sku-x-456-yz-2023-eu-warehouse'; +import * as skuX456Yz2023DefaultWarehousePresets from './sku-x-456-yz-2023-default-warehouse'; +import * as skuR123Ts2015UsWarehousePresets from './sku-r-123-ts-2015-us-warehouse'; +import * as skuM890Op2019EuWarehousePresets from './sku-m-890-op-2019-eu-warehouse'; +import * as skuM890Op2015UsWarehousePresets from './sku-m-890-op-2015-us-warehouse'; +import * as skuS567Uv2019DefaultWarehousePresets from './sku-s-567-uv-2019-default-warehouse'; +import * as skuR123Ts2019UsWarehousePresets from './sku-r-123-ts-2019-us-warehouse'; +import * as skuR123Ts2023DefaultWarehousePresets from './sku-r-123-ts-2023-default-warehouse'; +import * as skuM890Op2023EuWarehousePresets from './sku-m-890-op-2023-eu-warehouse'; +import * as skuP234Qw2019DefaultWarehousePresets from './sku-p-234-qw-2019-default-warehouse'; +import * as skuA789Bc2019DefaultWarehousePresets from './sku-a-789-bc-2019-default-warehouse'; +import * as skuA789Bc2015DefaultWarehousePresets from './sku-a-789-bc-2015-default-warehouse'; +import * as skuP234Qw2023UsWarehousePresets from './sku-p-234-qw-2023-us-warehouse'; +import * as skuX456Yz2019DefaultWarehousePresets from './sku-x-456-yz-2019-default-warehouse'; +import * as skuP234Qw2019EuWarehousePresets from './sku-p-234-qw-2019-eu-warehouse'; +import * as skuA789Bc2023UsWarehousePresets from './sku-a-789-bc-2023-us-warehouse'; +import * as skuS567Uv2023DefaultWarehousePresets from './sku-s-567-uv-2023-default-warehouse'; +import * as skuR123Ts2019EuWarehousePresets from './sku-r-123-ts-2019-eu-warehouse'; +import * as skuR123Ts2023UsWarehousePresets from './sku-r-123-ts-2023-us-warehouse'; +import * as skuP234Qw2015DefaultWarehousePresets from './sku-p-234-qw-2015-default-warehouse'; +import * as skuN123Qr2015UsWarehousePresets from './sku-n-123-qr-2015-us-warehouse'; +import * as skuA789Bc2023EuWarehousePresets from './sku-a-789-bc-2023-eu-warehouse'; +import * as skuA789Bc2023DefaultWarehousePresets from './sku-a-789-bc-2023-default-warehouse'; +import * as skuR123Ts2015EuWarehousePresets from './sku-r-123-ts-2015-eu-warehouse'; +import * as skuN123Qr2019DefaultWarehousePresets from './sku-n-123-qr-2019-default-warehouse'; +import * as skuR123Ts2019DefaultWarehousePresets from './sku-r-123-ts-2019-default-warehouse'; +import * as skuM890Op2019UsWarehousePresets from './sku-m-890-op-2019-us-warehouse'; +import * as skuS567Uv2023EuWarehousePresets from './sku-s-567-uv-2023-eu-warehouse'; +import * as skuN123Qr2015EuWarehousePresets from './sku-n-123-qr-2015-eu-warehouse'; +import * as skuP234Qw2019UsWarehousePresets from './sku-p-234-qw-2019-us-warehouse'; +import * as skuA789Bc2019EuWarehousePresets from './sku-a-789-bc-2019-eu-warehouse'; +import * as skuS567Uv2019EuWarehousePresets from './sku-s-567-uv-2019-eu-warehouse'; +import * as skuA789Bc2015UsWarehousePresets from './sku-a-789-bc-2015-us-warehouse'; +import * as skuS567Uv2019UsWarehousePresets from './sku-s-567-uv-2019-us-warehouse'; +import * as skuN123Qr2015DefaultWarehousePresets from './sku-n-123-qr-2015-default-warehouse'; +import * as skuX456Yz2015EuWarehousePresets from './sku-x-456-yz-2015-eu-warehouse'; +import * as skuX456Yz2019UsWarehousePresets from './sku-x-456-yz-2019-us-warehouse'; +import * as skuA789Bc2015EuWarehousePresets from './sku-a-789-bc-2015-eu-warehouse'; +import * as skuX456Yz2019EuWarehousePresets from './sku-x-456-yz-2019-eu-warehouse'; +import * as skuX456Yz2015UsWarehousePresets from './sku-x-456-yz-2015-us-warehouse'; +import * as skuM890Op2023DefaultWarehousePresets from './sku-m-890-op-2023-default-warehouse'; +import * as skuS567Uv2015UsWarehousePresets from './sku-s-567-uv-2015-us-warehouse'; +import * as skuS567Uv2023UsWarehousePresets from './sku-s-567-uv-2023-us-warehouse'; +import * as skuM890Op2019DefaultWarehousePresets from './sku-m-890-op-2019-default-warehouse'; +import * as skuP234Qw2023DefaultWarehousePresets from './sku-p-234-qw-2023-default-warehouse'; +import * as skuN123Qr2019UsWarehousePresets from './sku-n-123-qr-2019-us-warehouse'; +import * as skuR123Ts2015DefaultWarehousePresets from './sku-r-123-ts-2015-default-warehouse'; +import * as skuX456Yz2015DefaultWarehousePresets from './sku-x-456-yz-2015-default-warehouse'; +import * as skuM890Op2015EuWarehousePresets from './sku-m-890-op-2015-eu-warehouse'; +import * as skuP234Qw2015EuWarehousePresets from './sku-p-234-qw-2015-eu-warehouse'; +import * as skuP234Qw2015UsWarehousePresets from './sku-p-234-qw-2015-us-warehouse'; +import * as skuN123Qr2019EuWarehousePresets from './sku-n-123-qr-2019-eu-warehouse'; +import * as skuM890Op2015DefaultWarehousePresets from './sku-m-890-op-2015-default-warehouse'; +import * as skuX456Yz2023UsWarehousePresets from './sku-x-456-yz-2023-us-warehouse'; +import * as skuR123Ts2023EuWarehousePresets from './sku-r-123-ts-2023-eu-warehouse'; +import * as skuS567Uv2015EuWarehousePresets from './sku-s-567-uv-2015-eu-warehouse'; +import * as skuP234Qw2023EuWarehousePresets from './sku-p-234-qw-2023-eu-warehouse'; +import * as skuS567Uv2015DefaultWarehousePresets from './sku-s-567-uv-2015-default-warehouse'; +import * as skuM890Op2023UsWarehousePresets from './sku-m-890-op-2023-us-warehouse'; +import * as skuB456St2023UsWarehousePresets from './sku-b-456-st-2023-us-warehouse'; +import * as skuB456St2019DefaultWarehousePresets from './sku-b-456-st-2019-default-warehouse'; +import * as skuB456St2015DefaultWarehousePresets from './sku-b-456-st-2015-default-warehouse'; +import * as skuD234Wx2023UsWarehousePresets from './sku-d-234-wx-2023-us-warehouse'; +import * as skuC789Uv2015EuWarehousePresets from './sku-c-789-uv-2015-eu-warehouse'; +import * as skuN123Qr2023UsWarehousePresets from './sku-n-123-qr-2023-us-warehouse'; +import * as skuC789Uv2023EuWarehousePresets from './sku-c-789-uv-2023-eu-warehouse'; +import * as skuC789Uv2019EuWarehousePresets from './sku-c-789-uv-2019-eu-warehouse'; +import * as skuH456St2023UsWarehousePresets from './sku-h-456-st-2023-us-warehouse'; +import * as skuV456St2019UsWarehousePresets from './sku-v-456-st-2019-us-warehouse'; +import * as skuJ234Wx2019UsWarehousePresets from './sku-j-234-wx-2019-us-warehouse'; +import * as skuK567Yz2019DefaultWarehousePresets from './sku-k-567-yz-2019-default-warehouse'; +import * as skuE567Yz2015DefaultWarehousePresets from './sku-e-567-yz-2015-default-warehouse'; +import * as skuV456St2023EuWarehousePresets from './sku-v-456-st-2023-eu-warehouse'; +import * as skuG123Qr2023DefaultWarehousePresets from './sku-g-123-qr-2023-default-warehouse'; +import * as skuF890Op2019EuWarehousePresets from './sku-f-890-op-2019-eu-warehouse'; +import * as skuU123Qr2023UsWarehousePresets from './sku-u-123-qr-2023-us-warehouse'; +import * as skuJ234Wx2023EuWarehousePresets from './sku-j-234-wx-2023-eu-warehouse'; +import * as skuL890Op2019EuWarehousePresets from './sku-l-890-op-2019-eu-warehouse'; +import * as skuH456St2023DefaultWarehousePresets from './sku-h-456-st-2023-default-warehouse'; +import * as skuG123Qr2015DefaultWarehousePresets from './sku-g-123-qr-2015-default-warehouse'; +import * as skuK567Yz2015UsWarehousePresets from './sku-k-567-yz-2015-us-warehouse'; +import * as skuC789Uv2015UsWarehousePresets from './sku-c-789-uv-2015-us-warehouse'; +import * as skuL890Op2015DefaultWarehousePresets from './sku-l-890-op-2015-default-warehouse'; +import * as skuZ890Op2019EuWarehousePresets from './sku-z-890-op-2019-eu-warehouse'; +import * as skuX234Wx2023DefaultWarehousePresets from './sku-x-234-wx-2023-default-warehouse'; +import * as skuX234Wx2015UsWarehousePresets from './sku-x-234-wx-2015-us-warehouse'; +import * as skuCc789Uv2015DefaultWarehousePresets from './sku-cc-789-uv-2015-default-warehouse'; +import * as skuW789Uv2023UsWarehousePresets from './sku-w-789-uv-2023-us-warehouse'; +import * as skuV456St2023UsWarehousePresets from './sku-v-456-st-2023-us-warehouse'; +import * as skuW789Uv2019UsWarehousePresets from './sku-w-789-uv-2019-us-warehouse'; +import * as skuV456St2019DefaultWarehousePresets from './sku-v-456-st-2019-default-warehouse'; +import * as skuX234Wx2019DefaultWarehousePresets from './sku-x-234-wx-2019-default-warehouse'; +import * as skuEe567Yz2015UsWarehousePresets from './sku-ee-567-yz-2015-us-warehouse'; +import * as skuX234Wx2019UsWarehousePresets from './sku-x-234-wx-2019-us-warehouse'; +import * as skuEe567Yz2015EuWarehousePresets from './sku-ee-567-yz-2015-eu-warehouse'; +import * as skuJ234Wx2019DefaultWarehousePresets from './sku-j-234-wx-2019-default-warehouse'; +import * as skuDd234Wx2019EuWarehousePresets from './sku-dd-234-wx-2019-eu-warehouse'; +import * as skuW789Uv2023DefaultWarehousePresets from './sku-w-789-uv-2023-default-warehouse'; +import * as skuBb456St2023DefaultWarehousePresets from './sku-bb-456-st-2023-default-warehouse'; +import * as skuY567Yz2019UsWarehousePresets from './sku-y-567-yz-2019-us-warehouse'; +import * as skuBb456St2023UsWarehousePresets from './sku-bb-456-st-2023-us-warehouse'; +import * as skuEe567Yz2019UsWarehousePresets from './sku-ee-567-yz-2019-us-warehouse'; +import * as skuCc789Uv2015UsWarehousePresets from './sku-cc-789-uv-2015-us-warehouse'; +import * as skuEe567Yz2023DefaultWarehousePresets from './sku-ee-567-yz-2023-default-warehouse'; +import * as skuFf890Op2015UsWarehousePresets from './sku-ff-890-op-2015-us-warehouse'; +import * as skuW789Uv2023EuWarehousePresets from './sku-w-789-uv-2023-eu-warehouse'; +import * as skuEe567Yz2023EuWarehousePresets from './sku-ee-567-yz-2023-eu-warehouse'; +import * as skuV456St2015EuWarehousePresets from './sku-v-456-st-2015-eu-warehouse'; +import * as skuCc789Uv2015EuWarehousePresets from './sku-cc-789-uv-2015-eu-warehouse'; +import * as skuCc789Uv2019EuWarehousePresets from './sku-cc-789-uv-2019-eu-warehouse'; +import * as skuY567Yz2015EuWarehousePresets from './sku-y-567-yz-2015-eu-warehouse'; +import * as skuIi789Uv2019UsWarehousePresets from './sku-ii-789-uv-2019-us-warehouse'; +import * as skuCc789Uv2023UsWarehousePresets from './sku-cc-789-uv-2023-us-warehouse'; +import * as skuJj234Wx2019UsWarehousePresets from './sku-jj-234-wx-2019-us-warehouse'; +import * as skuEe567Yz2019EuWarehousePresets from './sku-ee-567-yz-2019-eu-warehouse'; +import * as skuNn456St2019EuWarehousePresets from './sku-nn-456-st-2019-eu-warehouse'; +import * as skuX234Wx2015EuWarehousePresets from './sku-x-234-wx-2015-eu-warehouse'; +import * as skuFf890Op2019DefaultWarehousePresets from './sku-ff-890-op-2019-default-warehouse'; +import * as skuCc789Uv2019DefaultWarehousePresets from './sku-cc-789-uv-2019-default-warehouse'; +import * as skuH456St2023EuWarehousePresets from './sku-h-456-st-2023-eu-warehouse'; +import * as skuGg123Qr2023DefaultWarehousePresets from './sku-gg-123-qr-2023-default-warehouse'; +import * as skuU123Qr2023EuWarehousePresets from './sku-u-123-qr-2023-eu-warehouse'; +import * as skuKk567Yz2015EuWarehousePresets from './sku-kk-567-yz-2015-eu-warehouse'; +import * as skuEe567Yz2023UsWarehousePresets from './sku-ee-567-yz-2023-us-warehouse'; +import * as skuEe567Yz2019DefaultWarehousePresets from './sku-ee-567-yz-2019-default-warehouse'; +import * as skuIi789Uv2019DefaultWarehousePresets from './sku-ii-789-uv-2019-default-warehouse'; +import * as skuMm123Qr2019EuWarehousePresets from './sku-mm-123-qr-2019-eu-warehouse'; +import * as skuJj234Wx2015EuWarehousePresets from './sku-jj-234-wx-2015-eu-warehouse'; +import * as skuOo789Uv2015UsWarehousePresets from './sku-oo-789-uv-2015-us-warehouse'; +import * as skuIi789Uv2023UsWarehousePresets from './sku-ii-789-uv-2023-us-warehouse'; +import * as skuIi789Uv2019EuWarehousePresets from './sku-ii-789-uv-2019-eu-warehouse'; +import * as skuY567Yz2023EuWarehousePresets from './sku-y-567-yz-2023-eu-warehouse'; +import * as skuUu789UvBlueUsWarehousePresets from './sku-uu-789-uv-blue-us-warehouse'; +import * as skuPp234Wx2023UsWarehousePresets from './sku-pp-234-wx-2023-us-warehouse'; +import * as skuIi789Uv2015DefaultWarehousePresets from './sku-ii-789-uv-2015-default-warehouse'; +import * as skuQq567Yz2019EuWarehousePresets from './sku-qq-567-yz-2019-eu-warehouse'; +import * as skuUu789UvGreenDefaultWarehousePresets from './sku-uu-789-uv-green-default-warehouse'; +import * as skuQq567Yz2015DefaultWarehousePresets from './sku-qq-567-yz-2015-default-warehouse'; +import * as skuSs123QrBlueDefaultWarehousePresets from './sku-ss-123-qr-blue-default-warehouse'; +import * as skuJj234Wx2019DefaultWarehousePresets from './sku-jj-234-wx-2019-default-warehouse'; +import * as skuOo789Uv2023EuWarehousePresets from './sku-oo-789-uv-2023-eu-warehouse'; +import * as skuSs123QrGreenUsWarehousePresets from './sku-ss-123-qr-green-us-warehouse'; +import * as skuDdd890OpRedDefaultWarehousePresets from './sku-ddd-890-op-red-default-warehouse'; +import * as skuUu789UvGreenUsWarehousePresets from './sku-uu-789-uv-green-us-warehouse'; +import * as skuDdd890OpBlueDefaultWarehousePresets from './sku-ddd-890-op-blue-default-warehouse'; +import * as skuZ890Op2015UsWarehousePresets from './sku-z-890-op-2015-us-warehouse'; +import * as skuPp234Wx2019DefaultWarehousePresets from './sku-pp-234-wx-2019-default-warehouse'; +import * as skuPp234Wx2023DefaultWarehousePresets from './sku-pp-234-wx-2023-default-warehouse'; +import * as skuWw567YzGreenUsWarehousePresets from './sku-ww-567-yz-green-us-warehouse'; +import * as skuAaa789UvRedUsWarehousePresets from './sku-aaa-789-uv-red-us-warehouse'; +import * as skuAaa789UvBlueEuWarehousePresets from './sku-aaa-789-uv-blue-eu-warehouse'; +import * as skuCcc567YzRedEuWarehousePresets from './sku-ccc-567-yz-red-eu-warehouse'; +import * as skuCcc567YzGreenEuWarehousePresets from './sku-ccc-567-yz-green-eu-warehouse'; +import * as skuCc789Uv2019UsWarehousePresets from './sku-cc-789-uv-2019-us-warehouse'; +import * as skuU123Qr2019DefaultWarehousePresets from './sku-u-123-qr-2019-default-warehouse'; +import * as skuYy123QrBlueEuWarehousePresets from './sku-yy-123-qr-blue-eu-warehouse'; +import * as skuBbb234WxRedDefaultWarehousePresets from './sku-bbb-234-wx-red-default-warehouse'; +import * as skuEee123QrGreenUsWarehousePresets from './sku-eee-123-qr-green-us-warehouse'; +import * as skuFuelFilterUsWarehousePresets from './sku-fuel-filter-us-warehouse'; +import * as skuZz456StRedDefaultWarehousePresets from './sku-zz-456-st-red-default-warehouse'; +import * as skuCcc567YzGreenUsWarehousePresets from './sku-ccc-567-yz-green-us-warehouse'; +import * as skuMm123Qr2015DefaultWarehousePresets from './sku-mm-123-qr-2015-default-warehouse'; +import * as skuBrakePadSetDefaultWarehousePresets from './sku-brake-pad-set-default-warehouse'; +import * as skuHhh234WxGreenDefaultWarehousePresets from './sku-hhh-234-wx-green-default-warehouse'; +import * as skuHhh234WxGreenUsWarehousePresets from './sku-hhh-234-wx-green-us-warehouse'; +import * as skuHhh234WxRedUsWarehousePresets from './sku-hhh-234-wx-red-us-warehouse'; +import * as skuY567Yz2015DefaultWarehousePresets from './sku-y-567-yz-2015-default-warehouse'; +import * as skuHydraulicHoseEuWarehousePresets from './sku-hydraulic-hose-eu-warehouse'; +import * as skuHhh234WxBlueEuWarehousePresets from './sku-hhh-234-wx-blue-eu-warehouse'; +import * as skuHhh234WxBlueUsWarehousePresets from './sku-hhh-234-wx-blue-us-warehouse'; +import * as skuJjj890OpRedDefaultWarehousePresets from './sku-jjj-890-op-red-default-warehouse'; +import * as skuPp234Wx2015DefaultWarehousePresets from './sku-pp-234-wx-2015-default-warehouse'; +import * as skuIi789Uv2023DefaultWarehousePresets from './sku-ii-789-uv-2023-default-warehouse'; +import * as skuJjj890OpBlueDefaultWarehousePresets from './sku-jjj-890-op-blue-default-warehouse'; +import * as skuHhh234WxRedEuWarehousePresets from './sku-hhh-234-wx-red-eu-warehouse'; +import * as skuCcc567YzGreenDefaultWarehousePresets from './sku-ccc-567-yz-green-default-warehouse'; +import * as skuJjj890OpGreenEuWarehousePresets from './sku-jjj-890-op-green-eu-warehouse'; +import * as skuFf890Op2015EuWarehousePresets from './sku-ff-890-op-2015-eu-warehouse'; +import * as skuFff456StGreenDefaultWarehousePresets from './sku-fff-456-st-green-default-warehouse'; +import * as skuJj234Wx2015UsWarehousePresets from './sku-jj-234-wx-2015-us-warehouse'; +import * as skuFuelFilterEuWarehousePresets from './sku-fuel-filter-eu-warehouse'; +import * as skuHydraulicHoseDefaultWarehousePresets from './sku-hydraulic-hose-default-warehouse'; +import * as skuNn456St2023EuWarehousePresets from './sku-nn-456-st-2023-eu-warehouse'; +import * as skuNn456St2023UsWarehousePresets from './sku-nn-456-st-2023-us-warehouse'; +import * as skuPneumaticTireUsWarehousePresets from './sku-pneumatic-tire-us-warehouse'; +import * as skuGgg789UvGreenEuWarehousePresets from './sku-ggg-789-uv-green-eu-warehouse'; +import * as skuYy123QrGreenDefaultWarehousePresets from './sku-yy-123-qr-green-default-warehouse'; +import * as skuJjj890OpRedUsWarehousePresets from './sku-jjj-890-op-red-us-warehouse'; +import * as skuPneumaticTireEuWarehousePresets from './sku-pneumatic-tire-eu-warehouse'; +import * as skuStarterMotorEuWarehousePresets from './sku-starter-motor-eu-warehouse'; +import * as skuPistonRingSetDefaultWarehousePresets from './sku-piston-ring-set-default-warehouse'; +import * as skuAlternatorEuWarehousePresets from './sku-alternator-eu-warehouse'; +import * as skuAlternatorDefaultWarehousePresets from './sku-alternator-default-warehouse'; +import * as skuXx890OpBlueEuWarehousePresets from './sku-xx-890-op-blue-eu-warehouse'; +import * as skuPistonRingSetEuWarehousePresets from './sku-piston-ring-set-eu-warehouse'; +import * as skuFff456StBlueEuWarehousePresets from './sku-fff-456-st-blue-eu-warehouse'; +import * as skuEee123QrGreenDefaultWarehousePresets from './sku-eee-123-qr-green-default-warehouse'; +import * as skuYy123QrBlueUsWarehousePresets from './sku-yy-123-qr-blue-us-warehouse'; +import * as skuGgg789UvBlueUsWarehousePresets from './sku-ggg-789-uv-blue-us-warehouse'; +import * as skuCcc567YzBlueUsWarehousePresets from './sku-ccc-567-yz-blue-us-warehouse'; +import * as skuHhh234WxBlueDefaultWarehousePresets from './sku-hhh-234-wx-blue-default-warehouse'; +import * as skuAirFilterUsWarehousePresets from './sku-air-filter-us-warehouse'; +import * as skuCcc567YzBlueEuWarehousePresets from './sku-ccc-567-yz-blue-eu-warehouse'; +import * as skuPistonRingSetUsWarehousePresets from './sku-piston-ring-set-us-warehouse'; +import * as skuXx890OpRedDefaultWarehousePresets from './sku-xx-890-op-red-default-warehouse'; +import * as skuSs123QrRedEuWarehousePresets from './sku-ss-123-qr-red-eu-warehouse'; +import * as skuIii567YzGreenDefaultWarehousePresets from './sku-iii-567-yz-green-default-warehouse'; +import * as skuAirFilterDefaultWarehousePresets from './sku-air-filter-default-warehouse'; +import * as skuBrakePadSetEuWarehousePresets from './sku-brake-pad-set-eu-warehouse'; +import * as skuBbb234WxRedUsWarehousePresets from './sku-bbb-234-wx-red-us-warehouse'; +import * as skuIii567YzRedUsWarehousePresets from './sku-iii-567-yz-red-us-warehouse'; +import * as skuBbb234WxGreenDefaultWarehousePresets from './sku-bbb-234-wx-green-default-warehouse'; +import * as skuDd234Wx2023DefaultWarehousePresets from './sku-dd-234-wx-2023-default-warehouse'; +import * as skuOilFilterUsWarehousePresets from './sku-oil-filter-us-warehouse'; +import * as skuFff456StRedUsWarehousePresets from './sku-fff-456-st-red-us-warehouse'; +import * as skuPneumaticTireDefaultWarehousePresets from './sku-pneumatic-tire-default-warehouse'; +import * as skuStarterMotorUsWarehousePresets from './sku-starter-motor-us-warehouse'; +import * as skuHhh234WxRedDefaultWarehousePresets from './sku-hhh-234-wx-red-default-warehouse'; +import * as skuW789Uv2019DefaultWarehousePresets from './sku-w-789-uv-2019-default-warehouse'; +import * as skuE567Yz2015UsWarehousePresets from './sku-e-567-yz-2015-us-warehouse'; +import * as skuC789Uv2023DefaultWarehousePresets from './sku-c-789-uv-2023-default-warehouse'; +import * as skuB456St2015UsWarehousePresets from './sku-b-456-st-2015-us-warehouse'; +import * as skuJ234Wx2015DefaultWarehousePresets from './sku-j-234-wx-2015-default-warehouse'; +import * as skuG123Qr2019UsWarehousePresets from './sku-g-123-qr-2019-us-warehouse'; +import * as skuC789Uv2023UsWarehousePresets from './sku-c-789-uv-2023-us-warehouse'; +import * as skuD234Wx2019DefaultWarehousePresets from './sku-d-234-wx-2019-default-warehouse'; +import * as skuB456St2019EuWarehousePresets from './sku-b-456-st-2019-eu-warehouse'; +import * as skuI789Uv2015UsWarehousePresets from './sku-i-789-uv-2015-us-warehouse'; +import * as skuB456St2015EuWarehousePresets from './sku-b-456-st-2015-eu-warehouse'; +import * as skuG123Qr2019DefaultWarehousePresets from './sku-g-123-qr-2019-default-warehouse'; +import * as skuJ234Wx2023DefaultWarehousePresets from './sku-j-234-wx-2023-default-warehouse'; +import * as skuC789Uv2015DefaultWarehousePresets from './sku-c-789-uv-2015-default-warehouse'; +import * as skuF890Op2019DefaultWarehousePresets from './sku-f-890-op-2019-default-warehouse'; +import * as skuF890Op2015EuWarehousePresets from './sku-f-890-op-2015-eu-warehouse'; +import * as skuE567Yz2023DefaultWarehousePresets from './sku-e-567-yz-2023-default-warehouse'; +import * as skuH456St2019EuWarehousePresets from './sku-h-456-st-2019-eu-warehouse'; +import * as skuF890Op2023UsWarehousePresets from './sku-f-890-op-2023-us-warehouse'; +import * as skuV456St2019EuWarehousePresets from './sku-v-456-st-2019-eu-warehouse'; +import * as skuC789Uv2019DefaultWarehousePresets from './sku-c-789-uv-2019-default-warehouse'; +import * as skuG123Qr2015EuWarehousePresets from './sku-g-123-qr-2015-eu-warehouse'; +import * as skuB456St2023EuWarehousePresets from './sku-b-456-st-2023-eu-warehouse'; +import * as skuC789Uv2019UsWarehousePresets from './sku-c-789-uv-2019-us-warehouse'; +import * as skuE567Yz2023EuWarehousePresets from './sku-e-567-yz-2023-eu-warehouse'; +import * as skuD234Wx2015UsWarehousePresets from './sku-d-234-wx-2015-us-warehouse'; +import * as skuL890Op2023EuWarehousePresets from './sku-l-890-op-2023-eu-warehouse'; +import * as skuH456St2015UsWarehousePresets from './sku-h-456-st-2015-us-warehouse'; +import * as skuI789Uv2023UsWarehousePresets from './sku-i-789-uv-2023-us-warehouse'; +import * as skuN123Qr2023DefaultWarehousePresets from './sku-n-123-qr-2023-default-warehouse'; +import * as skuD234Wx2019EuWarehousePresets from './sku-d-234-wx-2019-eu-warehouse'; +import * as skuW789Uv2015DefaultWarehousePresets from './sku-w-789-uv-2015-default-warehouse'; +import * as skuL890Op2019DefaultWarehousePresets from './sku-l-890-op-2019-default-warehouse'; +import * as skuI789Uv2019DefaultWarehousePresets from './sku-i-789-uv-2019-default-warehouse'; +import * as skuK567Yz2019UsWarehousePresets from './sku-k-567-yz-2019-us-warehouse'; +import * as skuL890Op2015EuWarehousePresets from './sku-l-890-op-2015-eu-warehouse'; +import * as skuF890Op2019UsWarehousePresets from './sku-f-890-op-2019-us-warehouse'; +import * as skuI789Uv2015DefaultWarehousePresets from './sku-i-789-uv-2015-default-warehouse'; +import * as skuY567Yz2015UsWarehousePresets from './sku-y-567-yz-2015-us-warehouse'; +import * as skuH456St2015EuWarehousePresets from './sku-h-456-st-2015-eu-warehouse'; +import * as skuW789Uv2019EuWarehousePresets from './sku-w-789-uv-2019-eu-warehouse'; +import * as skuI789Uv2015EuWarehousePresets from './sku-i-789-uv-2015-eu-warehouse'; +import * as skuV456St2015DefaultWarehousePresets from './sku-v-456-st-2015-default-warehouse'; +import * as skuF890Op2015UsWarehousePresets from './sku-f-890-op-2015-us-warehouse'; +import * as skuB456St2019UsWarehousePresets from './sku-b-456-st-2019-us-warehouse'; +import * as skuV456St2015UsWarehousePresets from './sku-v-456-st-2015-us-warehouse'; +import * as skuD234Wx2023EuWarehousePresets from './sku-d-234-wx-2023-eu-warehouse'; +import * as skuN123Qr2023EuWarehousePresets from './sku-n-123-qr-2023-eu-warehouse'; +import * as skuK567Yz2015DefaultWarehousePresets from './sku-k-567-yz-2015-default-warehouse'; +import * as skuF890Op2023DefaultWarehousePresets from './sku-f-890-op-2023-default-warehouse'; +import * as skuY567Yz2019EuWarehousePresets from './sku-y-567-yz-2019-eu-warehouse'; +import * as skuL890Op2023DefaultWarehousePresets from './sku-l-890-op-2023-default-warehouse'; +import * as skuX234Wx2023UsWarehousePresets from './sku-x-234-wx-2023-us-warehouse'; +import * as skuAa123Qr2015DefaultWarehousePresets from './sku-aa-123-qr-2015-default-warehouse'; +import * as skuZ890Op2015EuWarehousePresets from './sku-z-890-op-2015-eu-warehouse'; +import * as skuU123Qr2023DefaultWarehousePresets from './sku-u-123-qr-2023-default-warehouse'; +import * as skuX234Wx2015DefaultWarehousePresets from './sku-x-234-wx-2015-default-warehouse'; +import * as skuBb456St2015EuWarehousePresets from './sku-bb-456-st-2015-eu-warehouse'; +import * as skuWw567YzBlueDefaultWarehousePresets from './sku-ww-567-yz-blue-default-warehouse'; +import * as skuAa123Qr2023UsWarehousePresets from './sku-aa-123-qr-2023-us-warehouse'; +import * as skuB456St2023DefaultWarehousePresets from './sku-b-456-st-2023-default-warehouse'; +import * as skuH456St2019UsWarehousePresets from './sku-h-456-st-2019-us-warehouse'; +import * as skuG123Qr2019EuWarehousePresets from './sku-g-123-qr-2019-eu-warehouse'; +import * as skuY567Yz2019DefaultWarehousePresets from './sku-y-567-yz-2019-default-warehouse'; +import * as skuV456St2023DefaultWarehousePresets from './sku-v-456-st-2023-default-warehouse'; +import * as skuBb456St2019UsWarehousePresets from './sku-bb-456-st-2019-us-warehouse'; +import * as skuZ890Op2015DefaultWarehousePresets from './sku-z-890-op-2015-default-warehouse'; +import * as skuBb456St2019EuWarehousePresets from './sku-bb-456-st-2019-eu-warehouse'; +import * as skuY567Yz2023DefaultWarehousePresets from './sku-y-567-yz-2023-default-warehouse'; +import * as skuU123Qr2015EuWarehousePresets from './sku-u-123-qr-2015-eu-warehouse'; +import * as skuAa123Qr2019UsWarehousePresets from './sku-aa-123-qr-2019-us-warehouse'; +import * as skuZ890Op2019UsWarehousePresets from './sku-z-890-op-2019-us-warehouse'; +import * as skuK567Yz2023EuWarehousePresets from './sku-k-567-yz-2023-eu-warehouse'; +import * as skuZ890Op2023DefaultWarehousePresets from './sku-z-890-op-2023-default-warehouse'; +import * as skuG123Qr2023UsWarehousePresets from './sku-g-123-qr-2023-us-warehouse'; +import * as skuX234Wx2023EuWarehousePresets from './sku-x-234-wx-2023-eu-warehouse'; +import * as skuY567Yz2023UsWarehousePresets from './sku-y-567-yz-2023-us-warehouse'; +import * as skuAa123Qr2023DefaultWarehousePresets from './sku-aa-123-qr-2023-default-warehouse'; +import * as skuZ890Op2019DefaultWarehousePresets from './sku-z-890-op-2019-default-warehouse'; +import * as skuZ890Op2023EuWarehousePresets from './sku-z-890-op-2023-eu-warehouse'; +import * as skuAa123Qr2015EuWarehousePresets from './sku-aa-123-qr-2015-eu-warehouse'; +import * as skuBb456St2015UsWarehousePresets from './sku-bb-456-st-2015-us-warehouse'; +import * as skuAa123Qr2015UsWarehousePresets from './sku-aa-123-qr-2015-us-warehouse'; +import * as skuFf890Op2019UsWarehousePresets from './sku-ff-890-op-2019-us-warehouse'; +import * as skuBb456St2015DefaultWarehousePresets from './sku-bb-456-st-2015-default-warehouse'; +import * as skuAa123Qr2019EuWarehousePresets from './sku-aa-123-qr-2019-eu-warehouse'; +import * as skuGg123Qr2015UsWarehousePresets from './sku-gg-123-qr-2015-us-warehouse'; +import * as skuDd234Wx2023EuWarehousePresets from './sku-dd-234-wx-2023-eu-warehouse'; +import * as skuIi789Uv2015EuWarehousePresets from './sku-ii-789-uv-2015-eu-warehouse'; +import * as skuDd234Wx2015UsWarehousePresets from './sku-dd-234-wx-2015-us-warehouse'; +import * as skuHh456St2019EuWarehousePresets from './sku-hh-456-st-2019-eu-warehouse'; +import * as skuIi789Uv2015UsWarehousePresets from './sku-ii-789-uv-2015-us-warehouse'; +import * as skuCc789Uv2023EuWarehousePresets from './sku-cc-789-uv-2023-eu-warehouse'; +import * as skuGg123Qr2019UsWarehousePresets from './sku-gg-123-qr-2019-us-warehouse'; +import * as skuGg123Qr2019DefaultWarehousePresets from './sku-gg-123-qr-2019-default-warehouse'; +import * as skuDd234Wx2019UsWarehousePresets from './sku-dd-234-wx-2019-us-warehouse'; +import * as skuZ890Op2023UsWarehousePresets from './sku-z-890-op-2023-us-warehouse'; +import * as skuHh456St2015DefaultWarehousePresets from './sku-hh-456-st-2015-default-warehouse'; +import * as skuGg123Qr2015EuWarehousePresets from './sku-gg-123-qr-2015-eu-warehouse'; +import * as skuFf890Op2015DefaultWarehousePresets from './sku-ff-890-op-2015-default-warehouse'; +import * as skuCc789Uv2023DefaultWarehousePresets from './sku-cc-789-uv-2023-default-warehouse'; +import * as skuHh456St2015EuWarehousePresets from './sku-hh-456-st-2015-eu-warehouse'; +import * as skuHh456St2019UsWarehousePresets from './sku-hh-456-st-2019-us-warehouse'; +import * as skuW789Uv2015EuWarehousePresets from './sku-w-789-uv-2015-eu-warehouse'; +import * as skuFf890Op2023EuWarehousePresets from './sku-ff-890-op-2023-eu-warehouse'; +import * as skuDd234Wx2023UsWarehousePresets from './sku-dd-234-wx-2023-us-warehouse'; +import * as skuEe567Yz2015DefaultWarehousePresets from './sku-ee-567-yz-2015-default-warehouse'; +import * as skuHh456St2019DefaultWarehousePresets from './sku-hh-456-st-2019-default-warehouse'; +import * as skuBb456St2019DefaultWarehousePresets from './sku-bb-456-st-2019-default-warehouse'; +import * as skuAa123Qr2019DefaultWarehousePresets from './sku-aa-123-qr-2019-default-warehouse'; +import * as skuGg123Qr2023EuWarehousePresets from './sku-gg-123-qr-2023-eu-warehouse'; +import * as skuHh456St2023DefaultWarehousePresets from './sku-hh-456-st-2023-default-warehouse'; +import * as skuDd234Wx2015EuWarehousePresets from './sku-dd-234-wx-2015-eu-warehouse'; +import * as skuFf890Op2023UsWarehousePresets from './sku-ff-890-op-2023-us-warehouse'; +import * as skuFf890Op2023DefaultWarehousePresets from './sku-ff-890-op-2023-default-warehouse'; +import * as skuGg123Qr2019EuWarehousePresets from './sku-gg-123-qr-2019-eu-warehouse'; +import * as skuJj234Wx2019EuWarehousePresets from './sku-jj-234-wx-2019-eu-warehouse'; +import * as skuJj234Wx2015DefaultWarehousePresets from './sku-jj-234-wx-2015-default-warehouse'; +import * as skuHh456St2023UsWarehousePresets from './sku-hh-456-st-2023-us-warehouse'; +import * as skuGg123Qr2023UsWarehousePresets from './sku-gg-123-qr-2023-us-warehouse'; +import * as skuGg123Qr2015DefaultWarehousePresets from './sku-gg-123-qr-2015-default-warehouse'; +import * as skuIi789Uv2023EuWarehousePresets from './sku-ii-789-uv-2023-eu-warehouse'; +import * as skuNn456St2019UsWarehousePresets from './sku-nn-456-st-2019-us-warehouse'; +import * as skuMm123Qr2015EuWarehousePresets from './sku-mm-123-qr-2015-eu-warehouse'; +import * as skuKk567Yz2023EuWarehousePresets from './sku-kk-567-yz-2023-eu-warehouse'; +import * as skuLl890Op2023UsWarehousePresets from './sku-ll-890-op-2023-us-warehouse'; +import * as skuKk567Yz2015DefaultWarehousePresets from './sku-kk-567-yz-2015-default-warehouse'; +import * as skuPp234Wx2015EuWarehousePresets from './sku-pp-234-wx-2015-eu-warehouse'; +import * as skuKk567Yz2023UsWarehousePresets from './sku-kk-567-yz-2023-us-warehouse'; +import * as skuKk567Yz2019DefaultWarehousePresets from './sku-kk-567-yz-2019-default-warehouse'; +import * as skuKk567Yz2023DefaultWarehousePresets from './sku-kk-567-yz-2023-default-warehouse'; +import * as skuLl890Op2023EuWarehousePresets from './sku-ll-890-op-2023-eu-warehouse'; +import * as skuLl890Op2015EuWarehousePresets from './sku-ll-890-op-2015-eu-warehouse'; +import * as skuJj234Wx2023EuWarehousePresets from './sku-jj-234-wx-2023-eu-warehouse'; +import * as skuPp234Wx2015UsWarehousePresets from './sku-pp-234-wx-2015-us-warehouse'; +import * as skuMm123Qr2015UsWarehousePresets from './sku-mm-123-qr-2015-us-warehouse'; +import * as skuLl890Op2019EuWarehousePresets from './sku-ll-890-op-2019-eu-warehouse'; +import * as skuLl890Op2019DefaultWarehousePresets from './sku-ll-890-op-2019-default-warehouse'; +import * as skuPp234Wx2019EuWarehousePresets from './sku-pp-234-wx-2019-eu-warehouse'; +import * as skuJj234Wx2023DefaultWarehousePresets from './sku-jj-234-wx-2023-default-warehouse'; +import * as skuLl890Op2015UsWarehousePresets from './sku-ll-890-op-2015-us-warehouse'; +import * as skuDd234Wx2015DefaultWarehousePresets from './sku-dd-234-wx-2015-default-warehouse'; +import * as skuNn456St2015UsWarehousePresets from './sku-nn-456-st-2015-us-warehouse'; +import * as skuKk567Yz2019EuWarehousePresets from './sku-kk-567-yz-2019-eu-warehouse'; +import * as skuKk567Yz2019UsWarehousePresets from './sku-kk-567-yz-2019-us-warehouse'; +import * as skuKk567Yz2015UsWarehousePresets from './sku-kk-567-yz-2015-us-warehouse'; +import * as skuLl890Op2023DefaultWarehousePresets from './sku-ll-890-op-2023-default-warehouse'; +import * as skuNn456St2019DefaultWarehousePresets from './sku-nn-456-st-2019-default-warehouse'; +import * as skuLl890Op2019UsWarehousePresets from './sku-ll-890-op-2019-us-warehouse'; +import * as skuSs123QrBlueEuWarehousePresets from './sku-ss-123-qr-blue-eu-warehouse'; +import * as skuBb456St2023EuWarehousePresets from './sku-bb-456-st-2023-eu-warehouse'; +import * as skuDd234Wx2019DefaultWarehousePresets from './sku-dd-234-wx-2019-default-warehouse'; +import * as skuNn456St2015EuWarehousePresets from './sku-nn-456-st-2015-eu-warehouse'; +import * as skuSs123QrRedUsWarehousePresets from './sku-ss-123-qr-red-us-warehouse'; +import * as skuU123Qr2019EuWarehousePresets from './sku-u-123-qr-2019-eu-warehouse'; +import * as skuHh456St2023EuWarehousePresets from './sku-hh-456-st-2023-eu-warehouse'; +import * as skuQq567Yz2019UsWarehousePresets from './sku-qq-567-yz-2019-us-warehouse'; +import * as skuQq567Yz2019DefaultWarehousePresets from './sku-qq-567-yz-2019-default-warehouse'; +import * as skuSs123QrRedDefaultWarehousePresets from './sku-ss-123-qr-red-default-warehouse'; +import * as skuW789Uv2015UsWarehousePresets from './sku-w-789-uv-2015-us-warehouse'; +import * as skuOo789Uv2015EuWarehousePresets from './sku-oo-789-uv-2015-eu-warehouse'; +import * as skuTt456StGreenEuWarehousePresets from './sku-tt-456-st-green-eu-warehouse'; +import * as skuOo789Uv2019EuWarehousePresets from './sku-oo-789-uv-2019-eu-warehouse'; +import * as skuQq567Yz2023EuWarehousePresets from './sku-qq-567-yz-2023-eu-warehouse'; +import * as skuFf890Op2019EuWarehousePresets from './sku-ff-890-op-2019-eu-warehouse'; +import * as skuAa123Qr2023EuWarehousePresets from './sku-aa-123-qr-2023-eu-warehouse'; +import * as skuHh456St2015UsWarehousePresets from './sku-hh-456-st-2015-us-warehouse'; +import * as skuVv234WxGreenEuWarehousePresets from './sku-vv-234-wx-green-eu-warehouse'; +import * as skuWw567YzGreenDefaultWarehousePresets from './sku-ww-567-yz-green-default-warehouse'; +import * as skuRr890Op2023EuWarehousePresets from './sku-rr-890-op-2023-eu-warehouse'; +import * as skuQq567Yz2023DefaultWarehousePresets from './sku-qq-567-yz-2023-default-warehouse'; +import * as skuRr890Op2023UsWarehousePresets from './sku-rr-890-op-2023-us-warehouse'; +import * as skuRr890Op2019EuWarehousePresets from './sku-rr-890-op-2019-eu-warehouse'; +import * as skuRr890Op2015UsWarehousePresets from './sku-rr-890-op-2015-us-warehouse'; +import * as skuQq567Yz2023UsWarehousePresets from './sku-qq-567-yz-2023-us-warehouse'; +import * as skuRr890Op2023DefaultWarehousePresets from './sku-rr-890-op-2023-default-warehouse'; +import * as skuRr890Op2015DefaultWarehousePresets from './sku-rr-890-op-2015-default-warehouse'; +import * as skuUu789UvRedDefaultWarehousePresets from './sku-uu-789-uv-red-default-warehouse'; +import * as skuRr890Op2019UsWarehousePresets from './sku-rr-890-op-2019-us-warehouse'; +import * as skuRr890Op2015EuWarehousePresets from './sku-rr-890-op-2015-eu-warehouse'; +import * as skuXx890OpGreenEuWarehousePresets from './sku-xx-890-op-green-eu-warehouse'; +import * as skuD234Wx2015EuWarehousePresets from './sku-d-234-wx-2015-eu-warehouse'; +import * as skuXx890OpBlueDefaultWarehousePresets from './sku-xx-890-op-blue-default-warehouse'; +import * as skuVv234WxBlueUsWarehousePresets from './sku-vv-234-wx-blue-us-warehouse'; +import * as skuXx890OpBlueUsWarehousePresets from './sku-xx-890-op-blue-us-warehouse'; +import * as skuUu789UvRedUsWarehousePresets from './sku-uu-789-uv-red-us-warehouse'; +import * as skuUu789UvRedEuWarehousePresets from './sku-uu-789-uv-red-eu-warehouse'; +import * as skuWw567YzRedUsWarehousePresets from './sku-ww-567-yz-red-us-warehouse'; +import * as skuTt456StGreenDefaultWarehousePresets from './sku-tt-456-st-green-default-warehouse'; +import * as skuVv234WxRedUsWarehousePresets from './sku-vv-234-wx-red-us-warehouse'; +import * as skuVv234WxRedDefaultWarehousePresets from './sku-vv-234-wx-red-default-warehouse'; +import * as skuWw567YzRedDefaultWarehousePresets from './sku-ww-567-yz-red-default-warehouse'; +import * as skuYy123QrRedUsWarehousePresets from './sku-yy-123-qr-red-us-warehouse'; +import * as skuTt456StBlueEuWarehousePresets from './sku-tt-456-st-blue-eu-warehouse'; +import * as skuWw567YzRedEuWarehousePresets from './sku-ww-567-yz-red-eu-warehouse'; +import * as skuVv234WxRedEuWarehousePresets from './sku-vv-234-wx-red-eu-warehouse'; +import * as skuTt456StRedDefaultWarehousePresets from './sku-tt-456-st-red-default-warehouse'; +import * as skuVv234WxBlueDefaultWarehousePresets from './sku-vv-234-wx-blue-default-warehouse'; +import * as skuLl890Op2015DefaultWarehousePresets from './sku-ll-890-op-2015-default-warehouse'; +import * as skuWw567YzBlueUsWarehousePresets from './sku-ww-567-yz-blue-us-warehouse'; +import * as skuTt456StBlueUsWarehousePresets from './sku-tt-456-st-blue-us-warehouse'; +import * as skuTt456StRedEuWarehousePresets from './sku-tt-456-st-red-eu-warehouse'; +import * as skuNn456St2015DefaultWarehousePresets from './sku-nn-456-st-2015-default-warehouse'; +import * as skuWw567YzGreenEuWarehousePresets from './sku-ww-567-yz-green-eu-warehouse'; +import * as skuVv234WxBlueEuWarehousePresets from './sku-vv-234-wx-blue-eu-warehouse'; +import * as skuBbb234WxGreenUsWarehousePresets from './sku-bbb-234-wx-green-us-warehouse'; +import * as skuBbb234WxBlueDefaultWarehousePresets from './sku-bbb-234-wx-blue-default-warehouse'; +import * as skuBbb234WxBlueUsWarehousePresets from './sku-bbb-234-wx-blue-us-warehouse'; +import * as skuBbb234WxGreenEuWarehousePresets from './sku-bbb-234-wx-green-eu-warehouse'; +import * as skuFff456StGreenUsWarehousePresets from './sku-fff-456-st-green-us-warehouse'; +import * as skuZz456StGreenEuWarehousePresets from './sku-zz-456-st-green-eu-warehouse'; +import * as skuBbb234WxBlueEuWarehousePresets from './sku-bbb-234-wx-blue-eu-warehouse'; +import * as skuZz456StGreenUsWarehousePresets from './sku-zz-456-st-green-us-warehouse'; +import * as skuAaa789UvGreenUsWarehousePresets from './sku-aaa-789-uv-green-us-warehouse'; +import * as skuAaa789UvBlueUsWarehousePresets from './sku-aaa-789-uv-blue-us-warehouse'; +import * as skuFff456StGreenEuWarehousePresets from './sku-fff-456-st-green-eu-warehouse'; +import * as skuAaa789UvGreenEuWarehousePresets from './sku-aaa-789-uv-green-eu-warehouse'; +import * as skuHydraulicHoseUsWarehousePresets from './sku-hydraulic-hose-us-warehouse'; +import * as skuTaperedRollerBearingUsWarehousePresets from './sku-tapered-roller-bearing-us-warehouse'; +import * as skuHhh234WxGreenEuWarehousePresets from './sku-hhh-234-wx-green-eu-warehouse'; +import * as skuFff456StBlueDefaultWarehousePresets from './sku-fff-456-st-blue-default-warehouse'; +import * as skuIii567YzBlueEuWarehousePresets from './sku-iii-567-yz-blue-eu-warehouse'; +import * as skuGgg789UvRedUsWarehousePresets from './sku-ggg-789-uv-red-us-warehouse'; +import * as skuFff456StBlueUsWarehousePresets from './sku-fff-456-st-blue-us-warehouse'; +import * as skuEee123QrRedDefaultWarehousePresets from './sku-eee-123-qr-red-default-warehouse'; +import * as skuDdd890OpGreenEuWarehousePresets from './sku-ddd-890-op-green-eu-warehouse'; +import * as skuPinAndBushingKitEuWarehousePresets from './sku-pin-and-bushing-kit-eu-warehouse'; +import * as skuAaa789UvRedEuWarehousePresets from './sku-aaa-789-uv-red-eu-warehouse'; +import * as skuIii567YzRedDefaultWarehousePresets from './sku-iii-567-yz-red-default-warehouse'; +import * as skuEee123QrBlueDefaultWarehousePresets from './sku-eee-123-qr-blue-default-warehouse'; +import * as skuEee123QrRedUsWarehousePresets from './sku-eee-123-qr-red-us-warehouse'; +import * as skuEee123QrGreenEuWarehousePresets from './sku-eee-123-qr-green-eu-warehouse'; +import * as skuJjj890OpBlueEuWarehousePresets from './sku-jjj-890-op-blue-eu-warehouse'; +import * as skuZz456StBlueDefaultWarehousePresets from './sku-zz-456-st-blue-default-warehouse'; +import * as skuTaperedRollerBearingEuWarehousePresets from './sku-tapered-roller-bearing-eu-warehouse'; +import * as skuJjj890OpGreenDefaultWarehousePresets from './sku-jjj-890-op-green-default-warehouse'; +import * as skuDdd890OpGreenUsWarehousePresets from './sku-ddd-890-op-green-us-warehouse'; +import * as skuEee123QrBlueEuWarehousePresets from './sku-eee-123-qr-blue-eu-warehouse'; +import * as skuDdd890OpGreenDefaultWarehousePresets from './sku-ddd-890-op-green-default-warehouse'; +import * as skuIii567YzBlueDefaultWarehousePresets from './sku-iii-567-yz-blue-default-warehouse'; +import * as skuGgg789UvRedEuWarehousePresets from './sku-ggg-789-uv-red-eu-warehouse'; +import * as skuFff456StRedDefaultWarehousePresets from './sku-fff-456-st-red-default-warehouse'; +import * as skuAlternatorUsWarehousePresets from './sku-alternator-us-warehouse'; +import * as skuLedWorkLightEuWarehousePresets from './sku-led-work-light-eu-warehouse'; +import * as skuZz456StGreenDefaultWarehousePresets from './sku-zz-456-st-green-default-warehouse'; +import * as skuLedWorkLightDefaultWarehousePresets from './sku-led-work-light-default-warehouse'; +import * as skuDdd890OpRedUsWarehousePresets from './sku-ddd-890-op-red-us-warehouse'; +import * as skuIii567YzBlueUsWarehousePresets from './sku-iii-567-yz-blue-us-warehouse'; +import * as skuFff456StRedEuWarehousePresets from './sku-fff-456-st-red-eu-warehouse'; +import * as skuPinAndBushingKitUsWarehousePresets from './sku-pin-and-bushing-kit-us-warehouse'; +import * as skuFuelFilterDefaultWarehousePresets from './sku-fuel-filter-default-warehouse'; +import * as skuEee123QrRedEuWarehousePresets from './sku-eee-123-qr-red-eu-warehouse'; +import * as skuTaperedRollerBearingDefaultWarehousePresets from './sku-tapered-roller-bearing-default-warehouse'; +import * as skuGgg789UvRedDefaultWarehousePresets from './sku-ggg-789-uv-red-default-warehouse'; +import * as skuPinAndBushingKitDefaultWarehousePresets from './sku-pin-and-bushing-kit-default-warehouse'; +import * as skuDdd890OpRedEuWarehousePresets from './sku-ddd-890-op-red-eu-warehouse'; +import * as skuLedWorkLightUsWarehousePresets from './sku-led-work-light-us-warehouse'; +import * as skuMm123Qr2023UsWarehousePresets from './sku-mm-123-qr-2023-us-warehouse'; +import * as skuVv234WxGreenDefaultWarehousePresets from './sku-vv-234-wx-green-default-warehouse'; +import * as skuYy123QrBlueDefaultWarehousePresets from './sku-yy-123-qr-blue-default-warehouse'; +import * as skuOo789Uv2023UsWarehousePresets from './sku-oo-789-uv-2023-us-warehouse'; +import * as skuOo789Uv2019DefaultWarehousePresets from './sku-oo-789-uv-2019-default-warehouse'; +import * as skuPp234Wx2023EuWarehousePresets from './sku-pp-234-wx-2023-eu-warehouse'; +import * as skuD234Wx2023DefaultWarehousePresets from './sku-d-234-wx-2023-default-warehouse'; +import * as skuUu789UvBlueEuWarehousePresets from './sku-uu-789-uv-blue-eu-warehouse'; +import * as skuIii567YzRedEuWarehousePresets from './sku-iii-567-yz-red-eu-warehouse'; +import * as skuMm123Qr2019DefaultWarehousePresets from './sku-mm-123-qr-2019-default-warehouse'; +import * as skuZz456StBlueUsWarehousePresets from './sku-zz-456-st-blue-us-warehouse'; +import * as skuJj234Wx2023UsWarehousePresets from './sku-jj-234-wx-2023-us-warehouse'; +import * as skuQq567Yz2015EuWarehousePresets from './sku-qq-567-yz-2015-eu-warehouse'; +import * as skuBrakePadSetUsWarehousePresets from './sku-brake-pad-set-us-warehouse'; +import * as skuGgg789UvBlueEuWarehousePresets from './sku-ggg-789-uv-blue-eu-warehouse'; +import * as skuGgg789UvGreenDefaultWarehousePresets from './sku-ggg-789-uv-green-default-warehouse'; +import * as skuStarterMotorDefaultWarehousePresets from './sku-starter-motor-default-warehouse'; +import * as skuZz456StRedUsWarehousePresets from './sku-zz-456-st-red-us-warehouse'; +import * as skuE567Yz2015EuWarehousePresets from './sku-e-567-yz-2015-eu-warehouse'; +import * as skuQq567Yz2015UsWarehousePresets from './sku-qq-567-yz-2015-us-warehouse'; +import * as skuRr890Op2019DefaultWarehousePresets from './sku-rr-890-op-2019-default-warehouse'; +import * as skuJjj890OpBlueUsWarehousePresets from './sku-jjj-890-op-blue-us-warehouse'; +import * as skuBbb234WxRedEuWarehousePresets from './sku-bbb-234-wx-red-eu-warehouse'; +import * as skuDdd890OpBlueEuWarehousePresets from './sku-ddd-890-op-blue-eu-warehouse'; +import * as skuYy123QrRedEuWarehousePresets from './sku-yy-123-qr-red-eu-warehouse'; +import * as skuSs123QrGreenDefaultWarehousePresets from './sku-ss-123-qr-green-default-warehouse'; +import * as skuOilFilterDefaultWarehousePresets from './sku-oil-filter-default-warehouse'; +import * as skuSs123QrBlueUsWarehousePresets from './sku-ss-123-qr-blue-us-warehouse'; +import * as skuAaa789UvRedDefaultWarehousePresets from './sku-aaa-789-uv-red-default-warehouse'; +import * as skuPp234Wx2019UsWarehousePresets from './sku-pp-234-wx-2019-us-warehouse'; +import * as skuMm123Qr2023DefaultWarehousePresets from './sku-mm-123-qr-2023-default-warehouse'; +import * as skuJjj890OpGreenUsWarehousePresets from './sku-jjj-890-op-green-us-warehouse'; +import * as skuMm123Qr2019UsWarehousePresets from './sku-mm-123-qr-2019-us-warehouse'; +import * as skuXx890OpGreenDefaultWarehousePresets from './sku-xx-890-op-green-default-warehouse'; +import * as skuEee123QrBlueUsWarehousePresets from './sku-eee-123-qr-blue-us-warehouse'; +import * as skuNn456St2023DefaultWarehousePresets from './sku-nn-456-st-2023-default-warehouse'; +import * as skuZz456StBlueEuWarehousePresets from './sku-zz-456-st-blue-eu-warehouse'; +import * as skuMm123Qr2023EuWarehousePresets from './sku-mm-123-qr-2023-eu-warehouse'; +import * as skuAaa789UvBlueDefaultWarehousePresets from './sku-aaa-789-uv-blue-default-warehouse'; +import * as skuWw567YzBlueEuWarehousePresets from './sku-ww-567-yz-blue-eu-warehouse'; +import * as skuIii567YzGreenUsWarehousePresets from './sku-iii-567-yz-green-us-warehouse'; +import * as skuUu789UvBlueDefaultWarehousePresets from './sku-uu-789-uv-blue-default-warehouse'; +import * as skuYy123QrGreenEuWarehousePresets from './sku-yy-123-qr-green-eu-warehouse'; +import * as skuSs123QrGreenEuWarehousePresets from './sku-ss-123-qr-green-eu-warehouse'; +import * as skuDdd890OpBlueUsWarehousePresets from './sku-ddd-890-op-blue-us-warehouse'; +import * as skuXx890OpRedUsWarehousePresets from './sku-xx-890-op-red-us-warehouse'; +import * as skuGgg789UvBlueDefaultWarehousePresets from './sku-ggg-789-uv-blue-default-warehouse'; +import * as skuZz456StRedEuWarehousePresets from './sku-zz-456-st-red-eu-warehouse'; +import * as skuJjj890OpRedEuWarehousePresets from './sku-jjj-890-op-red-eu-warehouse'; +import * as skuGgg789UvGreenUsWarehousePresets from './sku-ggg-789-uv-green-us-warehouse'; +import * as skuTt456StBlueDefaultWarehousePresets from './sku-tt-456-st-blue-default-warehouse'; +import * as skuTt456StRedUsWarehousePresets from './sku-tt-456-st-red-us-warehouse'; +import * as skuOo789Uv2023DefaultWarehousePresets from './sku-oo-789-uv-2023-default-warehouse'; +import * as skuOo789Uv2015DefaultWarehousePresets from './sku-oo-789-uv-2015-default-warehouse'; +import * as skuAirFilterEuWarehousePresets from './sku-air-filter-eu-warehouse'; +import * as skuTt456StGreenUsWarehousePresets from './sku-tt-456-st-green-us-warehouse'; +import * as skuIii567YzGreenEuWarehousePresets from './sku-iii-567-yz-green-eu-warehouse'; +import * as skuOo789Uv2019UsWarehousePresets from './sku-oo-789-uv-2019-us-warehouse'; +import * as skuUu789UvGreenEuWarehousePresets from './sku-uu-789-uv-green-eu-warehouse'; +import * as skuAaa789UvGreenDefaultWarehousePresets from './sku-aaa-789-uv-green-default-warehouse'; +import * as skuXx890OpRedEuWarehousePresets from './sku-xx-890-op-red-eu-warehouse'; +import * as skuXx890OpGreenUsWarehousePresets from './sku-xx-890-op-green-us-warehouse'; +import * as skuYy123QrGreenUsWarehousePresets from './sku-yy-123-qr-green-us-warehouse'; +import * as skuCcc567YzBlueDefaultWarehousePresets from './sku-ccc-567-yz-blue-default-warehouse'; +import * as skuOilFilterEuWarehousePresets from './sku-oil-filter-eu-warehouse'; +import * as skuCcc567YzRedDefaultWarehousePresets from './sku-ccc-567-yz-red-default-warehouse'; +import * as skuCcc567YzRedUsWarehousePresets from './sku-ccc-567-yz-red-us-warehouse'; +import * as skuYy123QrRedDefaultWarehousePresets from './sku-yy-123-qr-red-default-warehouse'; +import * as skuVv234WxGreenUsWarehousePresets from './sku-vv-234-wx-green-us-warehouse'; +import * as skuX234Wx2019EuWarehousePresets from './sku-x-234-wx-2019-eu-warehouse'; +import * as skuU123Qr2019UsWarehousePresets from './sku-u-123-qr-2019-us-warehouse'; +import * as skuJ234Wx2015EuWarehousePresets from './sku-j-234-wx-2015-eu-warehouse'; +import * as skuE567Yz2023UsWarehousePresets from './sku-e-567-yz-2023-us-warehouse'; +import * as skuL890Op2015UsWarehousePresets from './sku-l-890-op-2015-us-warehouse'; +import * as skuL890Op2019UsWarehousePresets from './sku-l-890-op-2019-us-warehouse'; +import * as skuE567Yz2019DefaultWarehousePresets from './sku-e-567-yz-2019-default-warehouse'; +import * as skuG123Qr2023EuWarehousePresets from './sku-g-123-qr-2023-eu-warehouse'; +import * as skuI789Uv2023DefaultWarehousePresets from './sku-i-789-uv-2023-default-warehouse'; +import * as skuE567Yz2019UsWarehousePresets from './sku-e-567-yz-2019-us-warehouse'; +import * as skuL890Op2023UsWarehousePresets from './sku-l-890-op-2023-us-warehouse'; +import * as skuI789Uv2019EuWarehousePresets from './sku-i-789-uv-2019-eu-warehouse'; +import * as skuI789Uv2019UsWarehousePresets from './sku-i-789-uv-2019-us-warehouse'; +import * as skuU123Qr2015UsWarehousePresets from './sku-u-123-qr-2015-us-warehouse'; +import * as skuK567Yz2023DefaultWarehousePresets from './sku-k-567-yz-2023-default-warehouse'; +import * as skuH456St2019DefaultWarehousePresets from './sku-h-456-st-2019-default-warehouse'; +import * as skuG123Qr2015UsWarehousePresets from './sku-g-123-qr-2015-us-warehouse'; +import * as skuJ234Wx2023UsWarehousePresets from './sku-j-234-wx-2023-us-warehouse'; +import * as skuE567Yz2019EuWarehousePresets from './sku-e-567-yz-2019-eu-warehouse'; +import * as skuJ234Wx2015UsWarehousePresets from './sku-j-234-wx-2015-us-warehouse'; +import * as skuI789Uv2023EuWarehousePresets from './sku-i-789-uv-2023-eu-warehouse'; +import * as skuD234Wx2019UsWarehousePresets from './sku-d-234-wx-2019-us-warehouse'; +import * as skuF890Op2015DefaultWarehousePresets from './sku-f-890-op-2015-default-warehouse'; +import * as skuD234Wx2015DefaultWarehousePresets from './sku-d-234-wx-2015-default-warehouse'; +import * as skuK567Yz2015EuWarehousePresets from './sku-k-567-yz-2015-eu-warehouse'; +import * as skuU123Qr2015DefaultWarehousePresets from './sku-u-123-qr-2015-default-warehouse'; +import * as skuF890Op2023EuWarehousePresets from './sku-f-890-op-2023-eu-warehouse'; +import * as skuH456St2015DefaultWarehousePresets from './sku-h-456-st-2015-default-warehouse'; +import * as skuJ234Wx2019EuWarehousePresets from './sku-j-234-wx-2019-eu-warehouse'; +import * as skuK567Yz2019EuWarehousePresets from './sku-k-567-yz-2019-eu-warehouse'; +import * as skuK567Yz2023UsWarehousePresets from './sku-k-567-yz-2023-us-warehouse'; -const presets = { - skuA789Bc2015Default, - skuA789Bc2015Eu, - skuA789Bc2015Us, - skuA789Bc2019Default, - skuA789Bc2019Eu, - skuA789Bc2019Us, - skuA789Bc2023Default, - skuA789Bc2023Eu, - skuA789Bc2023Us, - skuAa123Qr2015Default, - skuAa123Qr2015Eu, - skuAa123Qr2015Us, - skuAa123Qr2019Default, - skuAa123Qr2019Eu, - skuAa123Qr2019Us, - skuAa123Qr2023Default, - skuAa123Qr2023Eu, - skuAa123Qr2023Us, - skuAaa789UvBlueDefault, - skuAaa789UvBlueEu, - skuAaa789UvBlueUs, - skuAaa789UvGreenDefault, - skuAaa789UvGreenEu, - skuAaa789UvGreenUs, - skuAaa789UvRedDefault, - skuAaa789UvRedEu, - skuAaa789UvRedUs, - skuAirFilterDefault, - skuAirFilterEu, - skuAirFilterUs, - skuAlternatorDefault, - skuAlternatorEu, - skuAlternatorUs, - skuB456St2015Default, - skuB456St2015Eu, - skuB456St2015Us, - skuB456St2019Default, - skuB456St2019Eu, - skuB456St2019Us, - skuB456St2023Default, - skuB456St2023Eu, - skuB456St2023Us, - skuBb456St2015Default, - skuBb456St2015Eu, - skuBb456St2015Us, - skuBb456St2019Default, - skuBb456St2019Eu, - skuBb456St2019Us, - skuBb456St2023Default, - skuBb456St2023Eu, - skuBb456St2023Us, - skuBbb234WxBlueDefault, - skuBbb234WxBlueEu, - skuBbb234WxBlueUs, - skuBbb234WxGreenDefault, - skuBbb234WxGreenEu, - skuBbb234WxGreenUs, - skuBbb234WxRedDefault, - skuBbb234WxRedEu, - skuBbb234WxRedUs, - skuBrakePadSetDefault, - skuBrakePadSetEu, - skuBrakePadSetUs, - skuC789Uv2015Default, - skuC789Uv2015Eu, - skuC789Uv2015Us, - skuC789Uv2019Default, - skuC789Uv2019Eu, - skuC789Uv2019Us, - skuC789Uv2023Default, - skuC789Uv2023Eu, - skuC789Uv2023Us, - skuCc789Uv2015Default, - skuCc789Uv2015Eu, - skuCc789Uv2015Us, - skuCc789Uv2019Default, - skuCc789Uv2019Eu, - skuCc789Uv2019Us, - skuCc789Uv2023Default, - skuCc789Uv2023Eu, - skuCc789Uv2023Us, - skuCcc567YzBlueDefault, - skuCcc567YzBlueEu, - skuCcc567YzBlueUs, - skuCcc567YzGreenDefault, - skuCcc567YzGreenEu, - skuCcc567YzGreenUs, - skuCcc567YzRedDefault, - skuCcc567YzRedEu, - skuCcc567YzRedUs, - skuD234Wx2015Default, - skuD234Wx2015Eu, - skuD234Wx2015Us, - skuD234Wx2019Default, - skuD234Wx2019Eu, - skuD234Wx2019Us, - skuD234Wx2023Default, - skuD234Wx2023Eu, - skuD234Wx2023Us, - skuDd234Wx2015Default, - skuDd234Wx2015Eu, - skuDd234Wx2015Us, - skuDd234Wx2019Default, - skuDd234Wx2019Eu, - skuDd234Wx2019Us, - skuDd234Wx2023Default, - skuDd234Wx2023Eu, - skuDd234Wx2023Us, - skuDdd890OpBlueDefault, - skuDdd890OpBlueEu, - skuDdd890OpBlueUs, - skuDdd890OpGreenDefault, - skuDdd890OpGreenEu, - skuDdd890OpGreenUs, - skuDdd890OpRedDefault, - skuDdd890OpRedEu, - skuDdd890OpRedUs, - skuE567Yz2015Default, - skuE567Yz2015Eu, - skuE567Yz2015Us, - skuE567Yz2019Default, - skuE567Yz2019Eu, - skuE567Yz2019Us, - skuE567Yz2023Default, - skuE567Yz2023Eu, - skuE567Yz2023Us, - skuEe567Yz2015Default, - skuEe567Yz2015Eu, - skuEe567Yz2015Us, - skuEe567Yz2019Default, - skuEe567Yz2019Eu, - skuEe567Yz2019Us, - skuEe567Yz2023Default, - skuEe567Yz2023Eu, - skuEe567Yz2023Us, - skuEee123QrBlueDefault, - skuEee123QrBlueEu, - skuEee123QrBlueUs, - skuEee123QrGreenDefault, - skuEee123QrGreenEu, - skuEee123QrGreenUs, - skuEee123QrRedDefault, - skuEee123QrRedEu, - skuEee123QrRedUs, - skuF890Op2015Default, - skuF890Op2015Eu, - skuF890Op2015Us, - skuF890Op2019Default, - skuF890Op2019Eu, - skuF890Op2019Us, - skuF890Op2023Default, - skuF890Op2023Eu, - skuF890Op2023Us, - skuFf890Op2015Default, - skuFf890Op2015Eu, - skuFf890Op2015Us, - skuFf890Op2019Default, - skuFf890Op2019Eu, - skuFf890Op2019Us, - skuFf890Op2023Default, - skuFf890Op2023Eu, - skuFf890Op2023Us, - skuFff456StBlueDefault, - skuFff456StBlueEu, - skuFff456StBlueUs, - skuFff456StGreenDefault, - skuFff456StGreenEu, - skuFff456StGreenUs, - skuFff456StRedDefault, - skuFff456StRedEu, - skuFff456StRedUs, - skuFuelFilterDefault, - skuFuelFilterEu, - skuFuelFilterUs, - skuG123Qr2015Default, - skuG123Qr2015Eu, - skuG123Qr2015Us, - skuG123Qr2019Default, - skuG123Qr2019Eu, - skuG123Qr2019Us, - skuG123Qr2023Default, - skuG123Qr2023Eu, - skuG123Qr2023Us, - skuGg123Qr2015Default, - skuGg123Qr2015Eu, - skuGg123Qr2015Us, - skuGg123Qr2019Default, - skuGg123Qr2019Eu, - skuGg123Qr2019Us, - skuGg123Qr2023Default, - skuGg123Qr2023Eu, - skuGg123Qr2023Us, - skuGgg789UvBlueDefault, - skuGgg789UvBlueEu, - skuGgg789UvBlueUs, - skuGgg789UvGreenDefault, - skuGgg789UvGreenEu, - skuGgg789UvGreenUs, - skuGgg789UvRedDefault, - skuGgg789UvRedEu, - skuGgg789UvRedUs, - skuH456St2015Default, - skuH456St2015Eu, - skuH456St2015Us, - skuH456St2019Default, - skuH456St2019Eu, - skuH456St2019Us, - skuH456St2023Default, - skuH456St2023Eu, - skuH456St2023Us, - skuHh456St2015Default, - skuHh456St2015Eu, - skuHh456St2015Us, - skuHh456St2019Default, - skuHh456St2019Eu, - skuHh456St2019Us, - skuHh456St2023Default, - skuHh456St2023Eu, - skuHh456St2023Us, - skuHhh234WxBlueDefault, - skuHhh234WxBlueEu, - skuHhh234WxBlueUs, - skuHhh234WxGreenDefault, - skuHhh234WxGreenEu, - skuHhh234WxGreenUs, - skuHhh234WxRedDefault, - skuHhh234WxRedEu, - skuHhh234WxRedUs, - skuHydraulicHoseDefault, - skuHydraulicHoseEu, - skuHydraulicHoseUs, - skuI789Uv2015Default, - skuI789Uv2015Eu, - skuI789Uv2015Us, - skuI789Uv2019Default, - skuI789Uv2019Eu, - skuI789Uv2019Us, - skuI789Uv2023Default, - skuI789Uv2023Eu, - skuI789Uv2023Us, - skuIi789Uv2015Default, - skuIi789Uv2015Eu, - skuIi789Uv2015Us, - skuIi789Uv2019Default, - skuIi789Uv2019Eu, - skuIi789Uv2019Us, - skuIi789Uv2023Default, - skuIi789Uv2023Eu, - skuIi789Uv2023Us, - skuIii567YzBlueDefault, - skuIii567YzBlueEu, - skuIii567YzBlueUs, - skuIii567YzGreenDefault, - skuIii567YzGreenEu, - skuIii567YzGreenUs, - skuIii567YzRedDefault, - skuIii567YzRedEu, - skuIii567YzRedUs, - skuJ234Wx2015Default, - skuJ234Wx2015Eu, - skuJ234Wx2015Us, - skuJ234Wx2019Default, - skuJ234Wx2019Eu, - skuJ234Wx2019Us, - skuJ234Wx2023Default, - skuJ234Wx2023Eu, - skuJ234Wx2023Us, - skuJj234Wx2015Default, - skuJj234Wx2015Eu, - skuJj234Wx2015Us, - skuJj234Wx2019Default, - skuJj234Wx2019Eu, - skuJj234Wx2019Us, - skuJj234Wx2023Default, - skuJj234Wx2023Eu, - skuJj234Wx2023Us, - skuJjj890OpBlueDefault, - skuJjj890OpBlueEu, - skuJjj890OpBlueUs, - skuJjj890OpGreenDefault, - skuJjj890OpGreenEu, - skuJjj890OpGreenUs, - skuJjj890OpRedDefault, - skuJjj890OpRedEu, - skuJjj890OpRedUs, - skuK567Yz2015Default, - skuK567Yz2015Eu, - skuK567Yz2015Us, - skuK567Yz2019Default, - skuK567Yz2019Eu, - skuK567Yz2019Us, - skuK567Yz2023Default, - skuK567Yz2023Eu, - skuK567Yz2023Us, - skuKk567Yz2015Default, - skuKk567Yz2015Eu, - skuKk567Yz2015Us, - skuKk567Yz2019Default, - skuKk567Yz2019Eu, - skuKk567Yz2019Us, - skuKk567Yz2023Default, - skuKk567Yz2023Eu, - skuKk567Yz2023Us, - skuL890Op2015Default, - skuL890Op2015Eu, - skuL890Op2015Us, - skuL890Op2019Default, - skuL890Op2019Eu, - skuL890Op2019Us, - skuL890Op2023Default, - skuL890Op2023Eu, - skuL890Op2023Us, - skuLedWorkLightDefault, - skuLedWorkLightEu, - skuLedWorkLightUs, - skuLl890Op2015Default, - skuLl890Op2015Eu, - skuLl890Op2015Us, - skuLl890Op2019Default, - skuLl890Op2019Eu, - skuLl890Op2019Us, - skuLl890Op2023Default, - skuLl890Op2023Eu, - skuLl890Op2023Us, - skuM890Op2015Default, - skuM890Op2015Eu, - skuM890Op2015Us, - skuM890Op2019Default, - skuM890Op2019Eu, - skuM890Op2019Us, - skuM890Op2023Default, - skuM890Op2023Eu, - skuM890Op2023Us, - skuMm123Qr2015Default, - skuMm123Qr2015Eu, - skuMm123Qr2015Us, - skuMm123Qr2019Default, - skuMm123Qr2019Eu, - skuMm123Qr2019Us, - skuMm123Qr2023Default, - skuMm123Qr2023Eu, - skuMm123Qr2023Us, - skuN123Qr2015Default, - skuN123Qr2015Eu, - skuN123Qr2015Us, - skuN123Qr2019Default, - skuN123Qr2019Eu, - skuN123Qr2019Us, - skuN123Qr2023Default, - skuN123Qr2023Eu, - skuN123Qr2023Us, - skuNn456St2015Default, - skuNn456St2015Eu, - skuNn456St2015Us, - skuNn456St2019Default, - skuNn456St2019Eu, - skuNn456St2019Us, - skuNn456St2023Default, - skuNn456St2023Eu, - skuNn456St2023Us, - skuOilFilterDefault, - skuOilFilterEu, - skuOilFilterUs, - skuOo789Uv2015Default, - skuOo789Uv2015Eu, - skuOo789Uv2015Us, - skuOo789Uv2019Default, - skuOo789Uv2019Eu, - skuOo789Uv2019Us, - skuOo789Uv2023Default, - skuOo789Uv2023Eu, - skuOo789Uv2023Us, - skuP234Qw2015Default, - skuP234Qw2015Eu, - skuP234Qw2015Us, - skuP234Qw2019Default, - skuP234Qw2019Eu, - skuP234Qw2019Us, - skuP234Qw2023Default, - skuP234Qw2023Eu, - skuP234Qw2023Us, - skuPinAndBushingKitDefault, - skuPinAndBushingKitEu, - skuPinAndBushingKitUs, - skuPistonRingSetDefault, - skuPistonRingSetEu, - skuPistonRingSetUs, - skuPneumaticTireDefault, - skuPneumaticTireEu, - skuPneumaticTireUs, - skuPp234Wx2015Default, - skuPp234Wx2015Eu, - skuPp234Wx2015Us, - skuPp234Wx2019Default, - skuPp234Wx2019Eu, - skuPp234Wx2019Us, - skuPp234Wx2023Default, - skuPp234Wx2023Eu, - skuPp234Wx2023Us, - skuQq567Yz2015Default, - skuQq567Yz2015Eu, - skuQq567Yz2015Us, - skuQq567Yz2019Default, - skuQq567Yz2019Eu, - skuQq567Yz2019Us, - skuQq567Yz2023Default, - skuQq567Yz2023Eu, - skuQq567Yz2023Us, - skuR123Ts2015Default, - skuR123Ts2015Eu, - skuR123Ts2015Us, - skuR123Ts2019Default, - skuR123Ts2019Eu, - skuR123Ts2019Us, - skuR123Ts2023Default, - skuR123Ts2023Eu, - skuR123Ts2023Us, - skuRr890Op2015Default, - skuRr890Op2015Eu, - skuRr890Op2015Us, - skuRr890Op2019Default, - skuRr890Op2019Eu, - skuRr890Op2019Us, - skuRr890Op2023Default, - skuRr890Op2023Eu, - skuRr890Op2023Us, - skuS567Uv2015Default, - skuS567Uv2015Eu, - skuS567Uv2015Us, - skuS567Uv2019Default, - skuS567Uv2019Eu, - skuS567Uv2019Us, - skuS567Uv2023Default, - skuS567Uv2023Eu, - skuS567Uv2023Us, - skuSs123QrBlueDefault, - skuSs123QrBlueEu, - skuSs123QrBlueUs, - skuSs123QrGreenDefault, - skuSs123QrGreenEu, - skuSs123QrGreenUs, - skuSs123QrRedDefault, - skuSs123QrRedEu, - skuSs123QrRedUs, - skuStarterMotorDefault, - skuStarterMotorEu, - skuStarterMotorUs, - skuTaperedRollerBearingDefault, - skuTaperedRollerBearingEu, - skuTaperedRollerBearingUs, - skuTt456StBlueDefault, - skuTt456StBlueEu, - skuTt456StBlueUs, - skuTt456StGreenDefault, - skuTt456StGreenEu, - skuTt456StGreenUs, - skuTt456StRedDefault, - skuTt456StRedEu, - skuTt456StRedUs, - skuU123Qr2015Default, - skuU123Qr2015Eu, - skuU123Qr2015Us, - skuU123Qr2019Default, - skuU123Qr2019Eu, - skuU123Qr2019Us, - skuU123Qr2023Default, - skuU123Qr2023Eu, - skuU123Qr2023Us, - skuUu789UvBlueDefault, - skuUu789UvBlueEu, - skuUu789UvBlueUs, - skuUu789UvGreenDefault, - skuUu789UvGreenEu, - skuUu789UvGreenUs, - skuUu789UvRedDefault, - skuUu789UvRedEu, - skuUu789UvRedUs, - skuV456St2015Default, - skuV456St2015Eu, - skuV456St2015Us, - skuV456St2019Default, - skuV456St2019Eu, - skuV456St2019Us, - skuV456St2023Default, - skuV456St2023Eu, - skuV456St2023Us, - skuVv234WxBlueDefault, - skuVv234WxBlueEu, - skuVv234WxBlueUs, - skuVv234WxGreenDefault, - skuVv234WxGreenEu, - skuVv234WxGreenUs, - skuVv234WxRedDefault, - skuVv234WxRedEu, - skuVv234WxRedUs, - skuW789Uv2015Default, - skuW789Uv2015Eu, - skuW789Uv2015Us, - skuW789Uv2019Default, - skuW789Uv2019Eu, - skuW789Uv2019Us, - skuW789Uv2023Default, - skuW789Uv2023Eu, - skuW789Uv2023Us, - skuWw567YzBlueDefault, - skuWw567YzBlueEu, - skuWw567YzBlueUs, - skuWw567YzGreenDefault, - skuWw567YzGreenEu, - skuWw567YzGreenUs, - skuWw567YzRedDefault, - skuWw567YzRedEu, - skuWw567YzRedUs, - skuX234Wx2015Default, - skuX234Wx2015Eu, - skuX234Wx2015Us, - skuX234Wx2019Default, - skuX234Wx2019Eu, - skuX234Wx2019Us, - skuX234Wx2023Default, - skuX234Wx2023Eu, - skuX234Wx2023Us, - skuX456Yz2015Default, - skuX456Yz2015Eu, - skuX456Yz2015Us, - skuX456Yz2019Default, - skuX456Yz2019Eu, - skuX456Yz2019Us, - skuX456Yz2023Default, - skuX456Yz2023Eu, - skuX456Yz2023Us, - skuXx890OpBlueDefault, - skuXx890OpBlueEu, - skuXx890OpBlueUs, - skuXx890OpGreenDefault, - skuXx890OpGreenEu, - skuXx890OpGreenUs, - skuXx890OpRedDefault, - skuXx890OpRedEu, - skuXx890OpRedUs, - skuY567Yz2015Default, - skuY567Yz2015Eu, - skuY567Yz2015Us, - skuY567Yz2019Default, - skuY567Yz2019Eu, - skuY567Yz2019Us, - skuY567Yz2023Default, - skuY567Yz2023Eu, - skuY567Yz2023Us, - skuYy123QrBlueDefault, - skuYy123QrBlueEu, - skuYy123QrBlueUs, - skuYy123QrGreenDefault, - skuYy123QrGreenEu, - skuYy123QrGreenUs, - skuYy123QrRedDefault, - skuYy123QrRedEu, - skuYy123QrRedUs, - skuZ890Op2015Default, - skuZ890Op2015Eu, - skuZ890Op2015Us, - skuZ890Op2019Default, - skuZ890Op2019Eu, - skuZ890Op2019Us, - skuZ890Op2023Default, - skuZ890Op2023Eu, - skuZ890Op2023Us, - skuZz456StBlueDefault, - skuZz456StBlueEu, - skuZz456StBlueUs, - skuZz456StGreenDefault, - skuZz456StGreenEu, - skuZz456StGreenUs, - skuZz456StRedDefault, - skuZz456StRedEu, - skuZz456StRedUs, +export const restPresets = { + skuA789Bc2019UsWarehouse: skuA789Bc2019UsWarehousePresets.restPreset, + skuX456Yz2023EuWarehouse: skuX456Yz2023EuWarehousePresets.restPreset, + skuX456Yz2023DefaultWarehouse: + skuX456Yz2023DefaultWarehousePresets.restPreset, + skuR123Ts2015UsWarehouse: skuR123Ts2015UsWarehousePresets.restPreset, + skuM890Op2019EuWarehouse: skuM890Op2019EuWarehousePresets.restPreset, + skuM890Op2015UsWarehouse: skuM890Op2015UsWarehousePresets.restPreset, + skuS567Uv2019DefaultWarehouse: + skuS567Uv2019DefaultWarehousePresets.restPreset, + skuR123Ts2019UsWarehouse: skuR123Ts2019UsWarehousePresets.restPreset, + skuR123Ts2023DefaultWarehouse: + skuR123Ts2023DefaultWarehousePresets.restPreset, + skuM890Op2023EuWarehouse: skuM890Op2023EuWarehousePresets.restPreset, + skuP234Qw2019DefaultWarehouse: + skuP234Qw2019DefaultWarehousePresets.restPreset, + skuA789Bc2019DefaultWarehouse: + skuA789Bc2019DefaultWarehousePresets.restPreset, + skuA789Bc2015DefaultWarehouse: + skuA789Bc2015DefaultWarehousePresets.restPreset, + skuP234Qw2023UsWarehouse: skuP234Qw2023UsWarehousePresets.restPreset, + skuX456Yz2019DefaultWarehouse: + skuX456Yz2019DefaultWarehousePresets.restPreset, + skuP234Qw2019EuWarehouse: skuP234Qw2019EuWarehousePresets.restPreset, + skuA789Bc2023UsWarehouse: skuA789Bc2023UsWarehousePresets.restPreset, + skuS567Uv2023DefaultWarehouse: + skuS567Uv2023DefaultWarehousePresets.restPreset, + skuR123Ts2019EuWarehouse: skuR123Ts2019EuWarehousePresets.restPreset, + skuR123Ts2023UsWarehouse: skuR123Ts2023UsWarehousePresets.restPreset, + skuP234Qw2015DefaultWarehouse: + skuP234Qw2015DefaultWarehousePresets.restPreset, + skuN123Qr2015UsWarehouse: skuN123Qr2015UsWarehousePresets.restPreset, + skuA789Bc2023EuWarehouse: skuA789Bc2023EuWarehousePresets.restPreset, + skuA789Bc2023DefaultWarehouse: + skuA789Bc2023DefaultWarehousePresets.restPreset, + skuR123Ts2015EuWarehouse: skuR123Ts2015EuWarehousePresets.restPreset, + skuN123Qr2019DefaultWarehouse: + skuN123Qr2019DefaultWarehousePresets.restPreset, + skuR123Ts2019DefaultWarehouse: + skuR123Ts2019DefaultWarehousePresets.restPreset, + skuM890Op2019UsWarehouse: skuM890Op2019UsWarehousePresets.restPreset, + skuS567Uv2023EuWarehouse: skuS567Uv2023EuWarehousePresets.restPreset, + skuN123Qr2015EuWarehouse: skuN123Qr2015EuWarehousePresets.restPreset, + skuP234Qw2019UsWarehouse: skuP234Qw2019UsWarehousePresets.restPreset, + skuA789Bc2019EuWarehouse: skuA789Bc2019EuWarehousePresets.restPreset, + skuS567Uv2019EuWarehouse: skuS567Uv2019EuWarehousePresets.restPreset, + skuA789Bc2015UsWarehouse: skuA789Bc2015UsWarehousePresets.restPreset, + skuS567Uv2019UsWarehouse: skuS567Uv2019UsWarehousePresets.restPreset, + skuN123Qr2015DefaultWarehouse: + skuN123Qr2015DefaultWarehousePresets.restPreset, + skuX456Yz2015EuWarehouse: skuX456Yz2015EuWarehousePresets.restPreset, + skuX456Yz2019UsWarehouse: skuX456Yz2019UsWarehousePresets.restPreset, + skuA789Bc2015EuWarehouse: skuA789Bc2015EuWarehousePresets.restPreset, + skuX456Yz2019EuWarehouse: skuX456Yz2019EuWarehousePresets.restPreset, + skuX456Yz2015UsWarehouse: skuX456Yz2015UsWarehousePresets.restPreset, + skuM890Op2023DefaultWarehouse: + skuM890Op2023DefaultWarehousePresets.restPreset, + skuS567Uv2015UsWarehouse: skuS567Uv2015UsWarehousePresets.restPreset, + skuS567Uv2023UsWarehouse: skuS567Uv2023UsWarehousePresets.restPreset, + skuM890Op2019DefaultWarehouse: + skuM890Op2019DefaultWarehousePresets.restPreset, + skuP234Qw2023DefaultWarehouse: + skuP234Qw2023DefaultWarehousePresets.restPreset, + skuN123Qr2019UsWarehouse: skuN123Qr2019UsWarehousePresets.restPreset, + skuR123Ts2015DefaultWarehouse: + skuR123Ts2015DefaultWarehousePresets.restPreset, + skuX456Yz2015DefaultWarehouse: + skuX456Yz2015DefaultWarehousePresets.restPreset, + skuM890Op2015EuWarehouse: skuM890Op2015EuWarehousePresets.restPreset, + skuP234Qw2015EuWarehouse: skuP234Qw2015EuWarehousePresets.restPreset, + skuP234Qw2015UsWarehouse: skuP234Qw2015UsWarehousePresets.restPreset, + skuN123Qr2019EuWarehouse: skuN123Qr2019EuWarehousePresets.restPreset, + skuM890Op2015DefaultWarehouse: + skuM890Op2015DefaultWarehousePresets.restPreset, + skuX456Yz2023UsWarehouse: skuX456Yz2023UsWarehousePresets.restPreset, + skuR123Ts2023EuWarehouse: skuR123Ts2023EuWarehousePresets.restPreset, + skuS567Uv2015EuWarehouse: skuS567Uv2015EuWarehousePresets.restPreset, + skuP234Qw2023EuWarehouse: skuP234Qw2023EuWarehousePresets.restPreset, + skuS567Uv2015DefaultWarehouse: + skuS567Uv2015DefaultWarehousePresets.restPreset, + skuM890Op2023UsWarehouse: skuM890Op2023UsWarehousePresets.restPreset, + skuB456St2023UsWarehouse: skuB456St2023UsWarehousePresets.restPreset, + skuB456St2019DefaultWarehouse: + skuB456St2019DefaultWarehousePresets.restPreset, + skuB456St2015DefaultWarehouse: + skuB456St2015DefaultWarehousePresets.restPreset, + skuD234Wx2023UsWarehouse: skuD234Wx2023UsWarehousePresets.restPreset, + skuC789Uv2015EuWarehouse: skuC789Uv2015EuWarehousePresets.restPreset, + skuN123Qr2023UsWarehouse: skuN123Qr2023UsWarehousePresets.restPreset, + skuC789Uv2023EuWarehouse: skuC789Uv2023EuWarehousePresets.restPreset, + skuC789Uv2019EuWarehouse: skuC789Uv2019EuWarehousePresets.restPreset, + skuH456St2023UsWarehouse: skuH456St2023UsWarehousePresets.restPreset, + skuV456St2019UsWarehouse: skuV456St2019UsWarehousePresets.restPreset, + skuJ234Wx2019UsWarehouse: skuJ234Wx2019UsWarehousePresets.restPreset, + skuK567Yz2019DefaultWarehouse: + skuK567Yz2019DefaultWarehousePresets.restPreset, + skuE567Yz2015DefaultWarehouse: + skuE567Yz2015DefaultWarehousePresets.restPreset, + skuV456St2023EuWarehouse: skuV456St2023EuWarehousePresets.restPreset, + skuG123Qr2023DefaultWarehouse: + skuG123Qr2023DefaultWarehousePresets.restPreset, + skuF890Op2019EuWarehouse: skuF890Op2019EuWarehousePresets.restPreset, + skuU123Qr2023UsWarehouse: skuU123Qr2023UsWarehousePresets.restPreset, + skuJ234Wx2023EuWarehouse: skuJ234Wx2023EuWarehousePresets.restPreset, + skuL890Op2019EuWarehouse: skuL890Op2019EuWarehousePresets.restPreset, + skuH456St2023DefaultWarehouse: + skuH456St2023DefaultWarehousePresets.restPreset, + skuG123Qr2015DefaultWarehouse: + skuG123Qr2015DefaultWarehousePresets.restPreset, + skuK567Yz2015UsWarehouse: skuK567Yz2015UsWarehousePresets.restPreset, + skuC789Uv2015UsWarehouse: skuC789Uv2015UsWarehousePresets.restPreset, + skuL890Op2015DefaultWarehouse: + skuL890Op2015DefaultWarehousePresets.restPreset, + skuZ890Op2019EuWarehouse: skuZ890Op2019EuWarehousePresets.restPreset, + skuX234Wx2023DefaultWarehouse: + skuX234Wx2023DefaultWarehousePresets.restPreset, + skuX234Wx2015UsWarehouse: skuX234Wx2015UsWarehousePresets.restPreset, + skuCc789Uv2015DefaultWarehouse: + skuCc789Uv2015DefaultWarehousePresets.restPreset, + skuW789Uv2023UsWarehouse: skuW789Uv2023UsWarehousePresets.restPreset, + skuV456St2023UsWarehouse: skuV456St2023UsWarehousePresets.restPreset, + skuW789Uv2019UsWarehouse: skuW789Uv2019UsWarehousePresets.restPreset, + skuV456St2019DefaultWarehouse: + skuV456St2019DefaultWarehousePresets.restPreset, + skuX234Wx2019DefaultWarehouse: + skuX234Wx2019DefaultWarehousePresets.restPreset, + skuEe567Yz2015UsWarehouse: skuEe567Yz2015UsWarehousePresets.restPreset, + skuX234Wx2019UsWarehouse: skuX234Wx2019UsWarehousePresets.restPreset, + skuEe567Yz2015EuWarehouse: skuEe567Yz2015EuWarehousePresets.restPreset, + skuJ234Wx2019DefaultWarehouse: + skuJ234Wx2019DefaultWarehousePresets.restPreset, + skuDd234Wx2019EuWarehouse: skuDd234Wx2019EuWarehousePresets.restPreset, + skuW789Uv2023DefaultWarehouse: + skuW789Uv2023DefaultWarehousePresets.restPreset, + skuBb456St2023DefaultWarehouse: + skuBb456St2023DefaultWarehousePresets.restPreset, + skuY567Yz2019UsWarehouse: skuY567Yz2019UsWarehousePresets.restPreset, + skuBb456St2023UsWarehouse: skuBb456St2023UsWarehousePresets.restPreset, + skuEe567Yz2019UsWarehouse: skuEe567Yz2019UsWarehousePresets.restPreset, + skuCc789Uv2015UsWarehouse: skuCc789Uv2015UsWarehousePresets.restPreset, + skuEe567Yz2023DefaultWarehouse: + skuEe567Yz2023DefaultWarehousePresets.restPreset, + skuFf890Op2015UsWarehouse: skuFf890Op2015UsWarehousePresets.restPreset, + skuW789Uv2023EuWarehouse: skuW789Uv2023EuWarehousePresets.restPreset, + skuEe567Yz2023EuWarehouse: skuEe567Yz2023EuWarehousePresets.restPreset, + skuV456St2015EuWarehouse: skuV456St2015EuWarehousePresets.restPreset, + skuCc789Uv2015EuWarehouse: skuCc789Uv2015EuWarehousePresets.restPreset, + skuCc789Uv2019EuWarehouse: skuCc789Uv2019EuWarehousePresets.restPreset, + skuY567Yz2015EuWarehouse: skuY567Yz2015EuWarehousePresets.restPreset, + skuIi789Uv2019UsWarehouse: skuIi789Uv2019UsWarehousePresets.restPreset, + skuCc789Uv2023UsWarehouse: skuCc789Uv2023UsWarehousePresets.restPreset, + skuJj234Wx2019UsWarehouse: skuJj234Wx2019UsWarehousePresets.restPreset, + skuEe567Yz2019EuWarehouse: skuEe567Yz2019EuWarehousePresets.restPreset, + skuNn456St2019EuWarehouse: skuNn456St2019EuWarehousePresets.restPreset, + skuX234Wx2015EuWarehouse: skuX234Wx2015EuWarehousePresets.restPreset, + skuFf890Op2019DefaultWarehouse: + skuFf890Op2019DefaultWarehousePresets.restPreset, + skuCc789Uv2019DefaultWarehouse: + skuCc789Uv2019DefaultWarehousePresets.restPreset, + skuH456St2023EuWarehouse: skuH456St2023EuWarehousePresets.restPreset, + skuGg123Qr2023DefaultWarehouse: + skuGg123Qr2023DefaultWarehousePresets.restPreset, + skuU123Qr2023EuWarehouse: skuU123Qr2023EuWarehousePresets.restPreset, + skuKk567Yz2015EuWarehouse: skuKk567Yz2015EuWarehousePresets.restPreset, + skuEe567Yz2023UsWarehouse: skuEe567Yz2023UsWarehousePresets.restPreset, + skuEe567Yz2019DefaultWarehouse: + skuEe567Yz2019DefaultWarehousePresets.restPreset, + skuIi789Uv2019DefaultWarehouse: + skuIi789Uv2019DefaultWarehousePresets.restPreset, + skuMm123Qr2019EuWarehouse: skuMm123Qr2019EuWarehousePresets.restPreset, + skuJj234Wx2015EuWarehouse: skuJj234Wx2015EuWarehousePresets.restPreset, + skuOo789Uv2015UsWarehouse: skuOo789Uv2015UsWarehousePresets.restPreset, + skuIi789Uv2023UsWarehouse: skuIi789Uv2023UsWarehousePresets.restPreset, + skuIi789Uv2019EuWarehouse: skuIi789Uv2019EuWarehousePresets.restPreset, + skuY567Yz2023EuWarehouse: skuY567Yz2023EuWarehousePresets.restPreset, + skuUu789UvBlueUsWarehouse: skuUu789UvBlueUsWarehousePresets.restPreset, + skuPp234Wx2023UsWarehouse: skuPp234Wx2023UsWarehousePresets.restPreset, + skuIi789Uv2015DefaultWarehouse: + skuIi789Uv2015DefaultWarehousePresets.restPreset, + skuQq567Yz2019EuWarehouse: skuQq567Yz2019EuWarehousePresets.restPreset, + skuUu789UvGreenDefaultWarehouse: + skuUu789UvGreenDefaultWarehousePresets.restPreset, + skuQq567Yz2015DefaultWarehouse: + skuQq567Yz2015DefaultWarehousePresets.restPreset, + skuSs123QrBlueDefaultWarehouse: + skuSs123QrBlueDefaultWarehousePresets.restPreset, + skuJj234Wx2019DefaultWarehouse: + skuJj234Wx2019DefaultWarehousePresets.restPreset, + skuOo789Uv2023EuWarehouse: skuOo789Uv2023EuWarehousePresets.restPreset, + skuSs123QrGreenUsWarehouse: skuSs123QrGreenUsWarehousePresets.restPreset, + skuDdd890OpRedDefaultWarehouse: + skuDdd890OpRedDefaultWarehousePresets.restPreset, + skuUu789UvGreenUsWarehouse: skuUu789UvGreenUsWarehousePresets.restPreset, + skuDdd890OpBlueDefaultWarehouse: + skuDdd890OpBlueDefaultWarehousePresets.restPreset, + skuZ890Op2015UsWarehouse: skuZ890Op2015UsWarehousePresets.restPreset, + skuPp234Wx2019DefaultWarehouse: + skuPp234Wx2019DefaultWarehousePresets.restPreset, + skuPp234Wx2023DefaultWarehouse: + skuPp234Wx2023DefaultWarehousePresets.restPreset, + skuWw567YzGreenUsWarehouse: skuWw567YzGreenUsWarehousePresets.restPreset, + skuAaa789UvRedUsWarehouse: skuAaa789UvRedUsWarehousePresets.restPreset, + skuAaa789UvBlueEuWarehouse: skuAaa789UvBlueEuWarehousePresets.restPreset, + skuCcc567YzRedEuWarehouse: skuCcc567YzRedEuWarehousePresets.restPreset, + skuCcc567YzGreenEuWarehouse: skuCcc567YzGreenEuWarehousePresets.restPreset, + skuCc789Uv2019UsWarehouse: skuCc789Uv2019UsWarehousePresets.restPreset, + skuU123Qr2019DefaultWarehouse: + skuU123Qr2019DefaultWarehousePresets.restPreset, + skuYy123QrBlueEuWarehouse: skuYy123QrBlueEuWarehousePresets.restPreset, + skuBbb234WxRedDefaultWarehouse: + skuBbb234WxRedDefaultWarehousePresets.restPreset, + skuEee123QrGreenUsWarehouse: skuEee123QrGreenUsWarehousePresets.restPreset, + skuFuelFilterUsWarehouse: skuFuelFilterUsWarehousePresets.restPreset, + skuZz456StRedDefaultWarehouse: + skuZz456StRedDefaultWarehousePresets.restPreset, + skuCcc567YzGreenUsWarehouse: skuCcc567YzGreenUsWarehousePresets.restPreset, + skuMm123Qr2015DefaultWarehouse: + skuMm123Qr2015DefaultWarehousePresets.restPreset, + skuBrakePadSetDefaultWarehouse: + skuBrakePadSetDefaultWarehousePresets.restPreset, + skuHhh234WxGreenDefaultWarehouse: + skuHhh234WxGreenDefaultWarehousePresets.restPreset, + skuHhh234WxGreenUsWarehouse: skuHhh234WxGreenUsWarehousePresets.restPreset, + skuHhh234WxRedUsWarehouse: skuHhh234WxRedUsWarehousePresets.restPreset, + skuY567Yz2015DefaultWarehouse: + skuY567Yz2015DefaultWarehousePresets.restPreset, + skuHydraulicHoseEuWarehouse: skuHydraulicHoseEuWarehousePresets.restPreset, + skuHhh234WxBlueEuWarehouse: skuHhh234WxBlueEuWarehousePresets.restPreset, + skuHhh234WxBlueUsWarehouse: skuHhh234WxBlueUsWarehousePresets.restPreset, + skuJjj890OpRedDefaultWarehouse: + skuJjj890OpRedDefaultWarehousePresets.restPreset, + skuPp234Wx2015DefaultWarehouse: + skuPp234Wx2015DefaultWarehousePresets.restPreset, + skuIi789Uv2023DefaultWarehouse: + skuIi789Uv2023DefaultWarehousePresets.restPreset, + skuJjj890OpBlueDefaultWarehouse: + skuJjj890OpBlueDefaultWarehousePresets.restPreset, + skuHhh234WxRedEuWarehouse: skuHhh234WxRedEuWarehousePresets.restPreset, + skuCcc567YzGreenDefaultWarehouse: + skuCcc567YzGreenDefaultWarehousePresets.restPreset, + skuJjj890OpGreenEuWarehouse: skuJjj890OpGreenEuWarehousePresets.restPreset, + skuFf890Op2015EuWarehouse: skuFf890Op2015EuWarehousePresets.restPreset, + skuFff456StGreenDefaultWarehouse: + skuFff456StGreenDefaultWarehousePresets.restPreset, + skuJj234Wx2015UsWarehouse: skuJj234Wx2015UsWarehousePresets.restPreset, + skuFuelFilterEuWarehouse: skuFuelFilterEuWarehousePresets.restPreset, + skuHydraulicHoseDefaultWarehouse: + skuHydraulicHoseDefaultWarehousePresets.restPreset, + skuNn456St2023EuWarehouse: skuNn456St2023EuWarehousePresets.restPreset, + skuNn456St2023UsWarehouse: skuNn456St2023UsWarehousePresets.restPreset, + skuPneumaticTireUsWarehouse: skuPneumaticTireUsWarehousePresets.restPreset, + skuGgg789UvGreenEuWarehouse: skuGgg789UvGreenEuWarehousePresets.restPreset, + skuYy123QrGreenDefaultWarehouse: + skuYy123QrGreenDefaultWarehousePresets.restPreset, + skuJjj890OpRedUsWarehouse: skuJjj890OpRedUsWarehousePresets.restPreset, + skuPneumaticTireEuWarehouse: skuPneumaticTireEuWarehousePresets.restPreset, + skuStarterMotorEuWarehouse: skuStarterMotorEuWarehousePresets.restPreset, + skuPistonRingSetDefaultWarehouse: + skuPistonRingSetDefaultWarehousePresets.restPreset, + skuAlternatorEuWarehouse: skuAlternatorEuWarehousePresets.restPreset, + skuAlternatorDefaultWarehouse: + skuAlternatorDefaultWarehousePresets.restPreset, + skuXx890OpBlueEuWarehouse: skuXx890OpBlueEuWarehousePresets.restPreset, + skuPistonRingSetEuWarehouse: skuPistonRingSetEuWarehousePresets.restPreset, + skuFff456StBlueEuWarehouse: skuFff456StBlueEuWarehousePresets.restPreset, + skuEee123QrGreenDefaultWarehouse: + skuEee123QrGreenDefaultWarehousePresets.restPreset, + skuYy123QrBlueUsWarehouse: skuYy123QrBlueUsWarehousePresets.restPreset, + skuGgg789UvBlueUsWarehouse: skuGgg789UvBlueUsWarehousePresets.restPreset, + skuCcc567YzBlueUsWarehouse: skuCcc567YzBlueUsWarehousePresets.restPreset, + skuHhh234WxBlueDefaultWarehouse: + skuHhh234WxBlueDefaultWarehousePresets.restPreset, + skuAirFilterUsWarehouse: skuAirFilterUsWarehousePresets.restPreset, + skuCcc567YzBlueEuWarehouse: skuCcc567YzBlueEuWarehousePresets.restPreset, + skuPistonRingSetUsWarehouse: skuPistonRingSetUsWarehousePresets.restPreset, + skuXx890OpRedDefaultWarehouse: + skuXx890OpRedDefaultWarehousePresets.restPreset, + skuSs123QrRedEuWarehouse: skuSs123QrRedEuWarehousePresets.restPreset, + skuIii567YzGreenDefaultWarehouse: + skuIii567YzGreenDefaultWarehousePresets.restPreset, + skuAirFilterDefaultWarehouse: skuAirFilterDefaultWarehousePresets.restPreset, + skuBrakePadSetEuWarehouse: skuBrakePadSetEuWarehousePresets.restPreset, + skuBbb234WxRedUsWarehouse: skuBbb234WxRedUsWarehousePresets.restPreset, + skuIii567YzRedUsWarehouse: skuIii567YzRedUsWarehousePresets.restPreset, + skuBbb234WxGreenDefaultWarehouse: + skuBbb234WxGreenDefaultWarehousePresets.restPreset, + skuDd234Wx2023DefaultWarehouse: + skuDd234Wx2023DefaultWarehousePresets.restPreset, + skuOilFilterUsWarehouse: skuOilFilterUsWarehousePresets.restPreset, + skuFff456StRedUsWarehouse: skuFff456StRedUsWarehousePresets.restPreset, + skuPneumaticTireDefaultWarehouse: + skuPneumaticTireDefaultWarehousePresets.restPreset, + skuStarterMotorUsWarehouse: skuStarterMotorUsWarehousePresets.restPreset, + skuHhh234WxRedDefaultWarehouse: + skuHhh234WxRedDefaultWarehousePresets.restPreset, + skuW789Uv2019DefaultWarehouse: + skuW789Uv2019DefaultWarehousePresets.restPreset, + skuE567Yz2015UsWarehouse: skuE567Yz2015UsWarehousePresets.restPreset, + skuC789Uv2023DefaultWarehouse: + skuC789Uv2023DefaultWarehousePresets.restPreset, + skuB456St2015UsWarehouse: skuB456St2015UsWarehousePresets.restPreset, + skuJ234Wx2015DefaultWarehouse: + skuJ234Wx2015DefaultWarehousePresets.restPreset, + skuG123Qr2019UsWarehouse: skuG123Qr2019UsWarehousePresets.restPreset, + skuC789Uv2023UsWarehouse: skuC789Uv2023UsWarehousePresets.restPreset, + skuD234Wx2019DefaultWarehouse: + skuD234Wx2019DefaultWarehousePresets.restPreset, + skuB456St2019EuWarehouse: skuB456St2019EuWarehousePresets.restPreset, + skuI789Uv2015UsWarehouse: skuI789Uv2015UsWarehousePresets.restPreset, + skuB456St2015EuWarehouse: skuB456St2015EuWarehousePresets.restPreset, + skuG123Qr2019DefaultWarehouse: + skuG123Qr2019DefaultWarehousePresets.restPreset, + skuJ234Wx2023DefaultWarehouse: + skuJ234Wx2023DefaultWarehousePresets.restPreset, + skuC789Uv2015DefaultWarehouse: + skuC789Uv2015DefaultWarehousePresets.restPreset, + skuF890Op2019DefaultWarehouse: + skuF890Op2019DefaultWarehousePresets.restPreset, + skuF890Op2015EuWarehouse: skuF890Op2015EuWarehousePresets.restPreset, + skuE567Yz2023DefaultWarehouse: + skuE567Yz2023DefaultWarehousePresets.restPreset, + skuH456St2019EuWarehouse: skuH456St2019EuWarehousePresets.restPreset, + skuF890Op2023UsWarehouse: skuF890Op2023UsWarehousePresets.restPreset, + skuV456St2019EuWarehouse: skuV456St2019EuWarehousePresets.restPreset, + skuC789Uv2019DefaultWarehouse: + skuC789Uv2019DefaultWarehousePresets.restPreset, + skuG123Qr2015EuWarehouse: skuG123Qr2015EuWarehousePresets.restPreset, + skuB456St2023EuWarehouse: skuB456St2023EuWarehousePresets.restPreset, + skuC789Uv2019UsWarehouse: skuC789Uv2019UsWarehousePresets.restPreset, + skuE567Yz2023EuWarehouse: skuE567Yz2023EuWarehousePresets.restPreset, + skuD234Wx2015UsWarehouse: skuD234Wx2015UsWarehousePresets.restPreset, + skuL890Op2023EuWarehouse: skuL890Op2023EuWarehousePresets.restPreset, + skuH456St2015UsWarehouse: skuH456St2015UsWarehousePresets.restPreset, + skuI789Uv2023UsWarehouse: skuI789Uv2023UsWarehousePresets.restPreset, + skuN123Qr2023DefaultWarehouse: + skuN123Qr2023DefaultWarehousePresets.restPreset, + skuD234Wx2019EuWarehouse: skuD234Wx2019EuWarehousePresets.restPreset, + skuW789Uv2015DefaultWarehouse: + skuW789Uv2015DefaultWarehousePresets.restPreset, + skuL890Op2019DefaultWarehouse: + skuL890Op2019DefaultWarehousePresets.restPreset, + skuI789Uv2019DefaultWarehouse: + skuI789Uv2019DefaultWarehousePresets.restPreset, + skuK567Yz2019UsWarehouse: skuK567Yz2019UsWarehousePresets.restPreset, + skuL890Op2015EuWarehouse: skuL890Op2015EuWarehousePresets.restPreset, + skuF890Op2019UsWarehouse: skuF890Op2019UsWarehousePresets.restPreset, + skuI789Uv2015DefaultWarehouse: + skuI789Uv2015DefaultWarehousePresets.restPreset, + skuY567Yz2015UsWarehouse: skuY567Yz2015UsWarehousePresets.restPreset, + skuH456St2015EuWarehouse: skuH456St2015EuWarehousePresets.restPreset, + skuW789Uv2019EuWarehouse: skuW789Uv2019EuWarehousePresets.restPreset, + skuI789Uv2015EuWarehouse: skuI789Uv2015EuWarehousePresets.restPreset, + skuV456St2015DefaultWarehouse: + skuV456St2015DefaultWarehousePresets.restPreset, + skuF890Op2015UsWarehouse: skuF890Op2015UsWarehousePresets.restPreset, + skuB456St2019UsWarehouse: skuB456St2019UsWarehousePresets.restPreset, + skuV456St2015UsWarehouse: skuV456St2015UsWarehousePresets.restPreset, + skuD234Wx2023EuWarehouse: skuD234Wx2023EuWarehousePresets.restPreset, + skuN123Qr2023EuWarehouse: skuN123Qr2023EuWarehousePresets.restPreset, + skuK567Yz2015DefaultWarehouse: + skuK567Yz2015DefaultWarehousePresets.restPreset, + skuF890Op2023DefaultWarehouse: + skuF890Op2023DefaultWarehousePresets.restPreset, + skuY567Yz2019EuWarehouse: skuY567Yz2019EuWarehousePresets.restPreset, + skuL890Op2023DefaultWarehouse: + skuL890Op2023DefaultWarehousePresets.restPreset, + skuX234Wx2023UsWarehouse: skuX234Wx2023UsWarehousePresets.restPreset, + skuAa123Qr2015DefaultWarehouse: + skuAa123Qr2015DefaultWarehousePresets.restPreset, + skuZ890Op2015EuWarehouse: skuZ890Op2015EuWarehousePresets.restPreset, + skuU123Qr2023DefaultWarehouse: + skuU123Qr2023DefaultWarehousePresets.restPreset, + skuX234Wx2015DefaultWarehouse: + skuX234Wx2015DefaultWarehousePresets.restPreset, + skuBb456St2015EuWarehouse: skuBb456St2015EuWarehousePresets.restPreset, + skuWw567YzBlueDefaultWarehouse: + skuWw567YzBlueDefaultWarehousePresets.restPreset, + skuAa123Qr2023UsWarehouse: skuAa123Qr2023UsWarehousePresets.restPreset, + skuB456St2023DefaultWarehouse: + skuB456St2023DefaultWarehousePresets.restPreset, + skuH456St2019UsWarehouse: skuH456St2019UsWarehousePresets.restPreset, + skuG123Qr2019EuWarehouse: skuG123Qr2019EuWarehousePresets.restPreset, + skuY567Yz2019DefaultWarehouse: + skuY567Yz2019DefaultWarehousePresets.restPreset, + skuV456St2023DefaultWarehouse: + skuV456St2023DefaultWarehousePresets.restPreset, + skuBb456St2019UsWarehouse: skuBb456St2019UsWarehousePresets.restPreset, + skuZ890Op2015DefaultWarehouse: + skuZ890Op2015DefaultWarehousePresets.restPreset, + skuBb456St2019EuWarehouse: skuBb456St2019EuWarehousePresets.restPreset, + skuY567Yz2023DefaultWarehouse: + skuY567Yz2023DefaultWarehousePresets.restPreset, + skuU123Qr2015EuWarehouse: skuU123Qr2015EuWarehousePresets.restPreset, + skuAa123Qr2019UsWarehouse: skuAa123Qr2019UsWarehousePresets.restPreset, + skuZ890Op2019UsWarehouse: skuZ890Op2019UsWarehousePresets.restPreset, + skuK567Yz2023EuWarehouse: skuK567Yz2023EuWarehousePresets.restPreset, + skuZ890Op2023DefaultWarehouse: + skuZ890Op2023DefaultWarehousePresets.restPreset, + skuG123Qr2023UsWarehouse: skuG123Qr2023UsWarehousePresets.restPreset, + skuX234Wx2023EuWarehouse: skuX234Wx2023EuWarehousePresets.restPreset, + skuY567Yz2023UsWarehouse: skuY567Yz2023UsWarehousePresets.restPreset, + skuAa123Qr2023DefaultWarehouse: + skuAa123Qr2023DefaultWarehousePresets.restPreset, + skuZ890Op2019DefaultWarehouse: + skuZ890Op2019DefaultWarehousePresets.restPreset, + skuZ890Op2023EuWarehouse: skuZ890Op2023EuWarehousePresets.restPreset, + skuAa123Qr2015EuWarehouse: skuAa123Qr2015EuWarehousePresets.restPreset, + skuBb456St2015UsWarehouse: skuBb456St2015UsWarehousePresets.restPreset, + skuAa123Qr2015UsWarehouse: skuAa123Qr2015UsWarehousePresets.restPreset, + skuFf890Op2019UsWarehouse: skuFf890Op2019UsWarehousePresets.restPreset, + skuBb456St2015DefaultWarehouse: + skuBb456St2015DefaultWarehousePresets.restPreset, + skuAa123Qr2019EuWarehouse: skuAa123Qr2019EuWarehousePresets.restPreset, + skuGg123Qr2015UsWarehouse: skuGg123Qr2015UsWarehousePresets.restPreset, + skuDd234Wx2023EuWarehouse: skuDd234Wx2023EuWarehousePresets.restPreset, + skuIi789Uv2015EuWarehouse: skuIi789Uv2015EuWarehousePresets.restPreset, + skuDd234Wx2015UsWarehouse: skuDd234Wx2015UsWarehousePresets.restPreset, + skuHh456St2019EuWarehouse: skuHh456St2019EuWarehousePresets.restPreset, + skuIi789Uv2015UsWarehouse: skuIi789Uv2015UsWarehousePresets.restPreset, + skuCc789Uv2023EuWarehouse: skuCc789Uv2023EuWarehousePresets.restPreset, + skuGg123Qr2019UsWarehouse: skuGg123Qr2019UsWarehousePresets.restPreset, + skuGg123Qr2019DefaultWarehouse: + skuGg123Qr2019DefaultWarehousePresets.restPreset, + skuDd234Wx2019UsWarehouse: skuDd234Wx2019UsWarehousePresets.restPreset, + skuZ890Op2023UsWarehouse: skuZ890Op2023UsWarehousePresets.restPreset, + skuHh456St2015DefaultWarehouse: + skuHh456St2015DefaultWarehousePresets.restPreset, + skuGg123Qr2015EuWarehouse: skuGg123Qr2015EuWarehousePresets.restPreset, + skuFf890Op2015DefaultWarehouse: + skuFf890Op2015DefaultWarehousePresets.restPreset, + skuCc789Uv2023DefaultWarehouse: + skuCc789Uv2023DefaultWarehousePresets.restPreset, + skuHh456St2015EuWarehouse: skuHh456St2015EuWarehousePresets.restPreset, + skuHh456St2019UsWarehouse: skuHh456St2019UsWarehousePresets.restPreset, + skuW789Uv2015EuWarehouse: skuW789Uv2015EuWarehousePresets.restPreset, + skuFf890Op2023EuWarehouse: skuFf890Op2023EuWarehousePresets.restPreset, + skuDd234Wx2023UsWarehouse: skuDd234Wx2023UsWarehousePresets.restPreset, + skuEe567Yz2015DefaultWarehouse: + skuEe567Yz2015DefaultWarehousePresets.restPreset, + skuHh456St2019DefaultWarehouse: + skuHh456St2019DefaultWarehousePresets.restPreset, + skuBb456St2019DefaultWarehouse: + skuBb456St2019DefaultWarehousePresets.restPreset, + skuAa123Qr2019DefaultWarehouse: + skuAa123Qr2019DefaultWarehousePresets.restPreset, + skuGg123Qr2023EuWarehouse: skuGg123Qr2023EuWarehousePresets.restPreset, + skuHh456St2023DefaultWarehouse: + skuHh456St2023DefaultWarehousePresets.restPreset, + skuDd234Wx2015EuWarehouse: skuDd234Wx2015EuWarehousePresets.restPreset, + skuFf890Op2023UsWarehouse: skuFf890Op2023UsWarehousePresets.restPreset, + skuFf890Op2023DefaultWarehouse: + skuFf890Op2023DefaultWarehousePresets.restPreset, + skuGg123Qr2019EuWarehouse: skuGg123Qr2019EuWarehousePresets.restPreset, + skuJj234Wx2019EuWarehouse: skuJj234Wx2019EuWarehousePresets.restPreset, + skuJj234Wx2015DefaultWarehouse: + skuJj234Wx2015DefaultWarehousePresets.restPreset, + skuHh456St2023UsWarehouse: skuHh456St2023UsWarehousePresets.restPreset, + skuGg123Qr2023UsWarehouse: skuGg123Qr2023UsWarehousePresets.restPreset, + skuGg123Qr2015DefaultWarehouse: + skuGg123Qr2015DefaultWarehousePresets.restPreset, + skuIi789Uv2023EuWarehouse: skuIi789Uv2023EuWarehousePresets.restPreset, + skuNn456St2019UsWarehouse: skuNn456St2019UsWarehousePresets.restPreset, + skuMm123Qr2015EuWarehouse: skuMm123Qr2015EuWarehousePresets.restPreset, + skuKk567Yz2023EuWarehouse: skuKk567Yz2023EuWarehousePresets.restPreset, + skuLl890Op2023UsWarehouse: skuLl890Op2023UsWarehousePresets.restPreset, + skuKk567Yz2015DefaultWarehouse: + skuKk567Yz2015DefaultWarehousePresets.restPreset, + skuPp234Wx2015EuWarehouse: skuPp234Wx2015EuWarehousePresets.restPreset, + skuKk567Yz2023UsWarehouse: skuKk567Yz2023UsWarehousePresets.restPreset, + skuKk567Yz2019DefaultWarehouse: + skuKk567Yz2019DefaultWarehousePresets.restPreset, + skuKk567Yz2023DefaultWarehouse: + skuKk567Yz2023DefaultWarehousePresets.restPreset, + skuLl890Op2023EuWarehouse: skuLl890Op2023EuWarehousePresets.restPreset, + skuLl890Op2015EuWarehouse: skuLl890Op2015EuWarehousePresets.restPreset, + skuJj234Wx2023EuWarehouse: skuJj234Wx2023EuWarehousePresets.restPreset, + skuPp234Wx2015UsWarehouse: skuPp234Wx2015UsWarehousePresets.restPreset, + skuMm123Qr2015UsWarehouse: skuMm123Qr2015UsWarehousePresets.restPreset, + skuLl890Op2019EuWarehouse: skuLl890Op2019EuWarehousePresets.restPreset, + skuLl890Op2019DefaultWarehouse: + skuLl890Op2019DefaultWarehousePresets.restPreset, + skuPp234Wx2019EuWarehouse: skuPp234Wx2019EuWarehousePresets.restPreset, + skuJj234Wx2023DefaultWarehouse: + skuJj234Wx2023DefaultWarehousePresets.restPreset, + skuLl890Op2015UsWarehouse: skuLl890Op2015UsWarehousePresets.restPreset, + skuDd234Wx2015DefaultWarehouse: + skuDd234Wx2015DefaultWarehousePresets.restPreset, + skuNn456St2015UsWarehouse: skuNn456St2015UsWarehousePresets.restPreset, + skuKk567Yz2019EuWarehouse: skuKk567Yz2019EuWarehousePresets.restPreset, + skuKk567Yz2019UsWarehouse: skuKk567Yz2019UsWarehousePresets.restPreset, + skuKk567Yz2015UsWarehouse: skuKk567Yz2015UsWarehousePresets.restPreset, + skuLl890Op2023DefaultWarehouse: + skuLl890Op2023DefaultWarehousePresets.restPreset, + skuNn456St2019DefaultWarehouse: + skuNn456St2019DefaultWarehousePresets.restPreset, + skuLl890Op2019UsWarehouse: skuLl890Op2019UsWarehousePresets.restPreset, + skuSs123QrBlueEuWarehouse: skuSs123QrBlueEuWarehousePresets.restPreset, + skuBb456St2023EuWarehouse: skuBb456St2023EuWarehousePresets.restPreset, + skuDd234Wx2019DefaultWarehouse: + skuDd234Wx2019DefaultWarehousePresets.restPreset, + skuNn456St2015EuWarehouse: skuNn456St2015EuWarehousePresets.restPreset, + skuSs123QrRedUsWarehouse: skuSs123QrRedUsWarehousePresets.restPreset, + skuU123Qr2019EuWarehouse: skuU123Qr2019EuWarehousePresets.restPreset, + skuHh456St2023EuWarehouse: skuHh456St2023EuWarehousePresets.restPreset, + skuQq567Yz2019UsWarehouse: skuQq567Yz2019UsWarehousePresets.restPreset, + skuQq567Yz2019DefaultWarehouse: + skuQq567Yz2019DefaultWarehousePresets.restPreset, + skuSs123QrRedDefaultWarehouse: + skuSs123QrRedDefaultWarehousePresets.restPreset, + skuW789Uv2015UsWarehouse: skuW789Uv2015UsWarehousePresets.restPreset, + skuOo789Uv2015EuWarehouse: skuOo789Uv2015EuWarehousePresets.restPreset, + skuTt456StGreenEuWarehouse: skuTt456StGreenEuWarehousePresets.restPreset, + skuOo789Uv2019EuWarehouse: skuOo789Uv2019EuWarehousePresets.restPreset, + skuQq567Yz2023EuWarehouse: skuQq567Yz2023EuWarehousePresets.restPreset, + skuFf890Op2019EuWarehouse: skuFf890Op2019EuWarehousePresets.restPreset, + skuAa123Qr2023EuWarehouse: skuAa123Qr2023EuWarehousePresets.restPreset, + skuHh456St2015UsWarehouse: skuHh456St2015UsWarehousePresets.restPreset, + skuVv234WxGreenEuWarehouse: skuVv234WxGreenEuWarehousePresets.restPreset, + skuWw567YzGreenDefaultWarehouse: + skuWw567YzGreenDefaultWarehousePresets.restPreset, + skuRr890Op2023EuWarehouse: skuRr890Op2023EuWarehousePresets.restPreset, + skuQq567Yz2023DefaultWarehouse: + skuQq567Yz2023DefaultWarehousePresets.restPreset, + skuRr890Op2023UsWarehouse: skuRr890Op2023UsWarehousePresets.restPreset, + skuRr890Op2019EuWarehouse: skuRr890Op2019EuWarehousePresets.restPreset, + skuRr890Op2015UsWarehouse: skuRr890Op2015UsWarehousePresets.restPreset, + skuQq567Yz2023UsWarehouse: skuQq567Yz2023UsWarehousePresets.restPreset, + skuRr890Op2023DefaultWarehouse: + skuRr890Op2023DefaultWarehousePresets.restPreset, + skuRr890Op2015DefaultWarehouse: + skuRr890Op2015DefaultWarehousePresets.restPreset, + skuUu789UvRedDefaultWarehouse: + skuUu789UvRedDefaultWarehousePresets.restPreset, + skuRr890Op2019UsWarehouse: skuRr890Op2019UsWarehousePresets.restPreset, + skuRr890Op2015EuWarehouse: skuRr890Op2015EuWarehousePresets.restPreset, + skuXx890OpGreenEuWarehouse: skuXx890OpGreenEuWarehousePresets.restPreset, + skuD234Wx2015EuWarehouse: skuD234Wx2015EuWarehousePresets.restPreset, + skuXx890OpBlueDefaultWarehouse: + skuXx890OpBlueDefaultWarehousePresets.restPreset, + skuVv234WxBlueUsWarehouse: skuVv234WxBlueUsWarehousePresets.restPreset, + skuXx890OpBlueUsWarehouse: skuXx890OpBlueUsWarehousePresets.restPreset, + skuUu789UvRedUsWarehouse: skuUu789UvRedUsWarehousePresets.restPreset, + skuUu789UvRedEuWarehouse: skuUu789UvRedEuWarehousePresets.restPreset, + skuWw567YzRedUsWarehouse: skuWw567YzRedUsWarehousePresets.restPreset, + skuTt456StGreenDefaultWarehouse: + skuTt456StGreenDefaultWarehousePresets.restPreset, + skuVv234WxRedUsWarehouse: skuVv234WxRedUsWarehousePresets.restPreset, + skuVv234WxRedDefaultWarehouse: + skuVv234WxRedDefaultWarehousePresets.restPreset, + skuWw567YzRedDefaultWarehouse: + skuWw567YzRedDefaultWarehousePresets.restPreset, + skuYy123QrRedUsWarehouse: skuYy123QrRedUsWarehousePresets.restPreset, + skuTt456StBlueEuWarehouse: skuTt456StBlueEuWarehousePresets.restPreset, + skuWw567YzRedEuWarehouse: skuWw567YzRedEuWarehousePresets.restPreset, + skuVv234WxRedEuWarehouse: skuVv234WxRedEuWarehousePresets.restPreset, + skuTt456StRedDefaultWarehouse: + skuTt456StRedDefaultWarehousePresets.restPreset, + skuVv234WxBlueDefaultWarehouse: + skuVv234WxBlueDefaultWarehousePresets.restPreset, + skuLl890Op2015DefaultWarehouse: + skuLl890Op2015DefaultWarehousePresets.restPreset, + skuWw567YzBlueUsWarehouse: skuWw567YzBlueUsWarehousePresets.restPreset, + skuTt456StBlueUsWarehouse: skuTt456StBlueUsWarehousePresets.restPreset, + skuTt456StRedEuWarehouse: skuTt456StRedEuWarehousePresets.restPreset, + skuNn456St2015DefaultWarehouse: + skuNn456St2015DefaultWarehousePresets.restPreset, + skuWw567YzGreenEuWarehouse: skuWw567YzGreenEuWarehousePresets.restPreset, + skuVv234WxBlueEuWarehouse: skuVv234WxBlueEuWarehousePresets.restPreset, + skuBbb234WxGreenUsWarehouse: skuBbb234WxGreenUsWarehousePresets.restPreset, + skuBbb234WxBlueDefaultWarehouse: + skuBbb234WxBlueDefaultWarehousePresets.restPreset, + skuBbb234WxBlueUsWarehouse: skuBbb234WxBlueUsWarehousePresets.restPreset, + skuBbb234WxGreenEuWarehouse: skuBbb234WxGreenEuWarehousePresets.restPreset, + skuFff456StGreenUsWarehouse: skuFff456StGreenUsWarehousePresets.restPreset, + skuZz456StGreenEuWarehouse: skuZz456StGreenEuWarehousePresets.restPreset, + skuBbb234WxBlueEuWarehouse: skuBbb234WxBlueEuWarehousePresets.restPreset, + skuZz456StGreenUsWarehouse: skuZz456StGreenUsWarehousePresets.restPreset, + skuAaa789UvGreenUsWarehouse: skuAaa789UvGreenUsWarehousePresets.restPreset, + skuAaa789UvBlueUsWarehouse: skuAaa789UvBlueUsWarehousePresets.restPreset, + skuFff456StGreenEuWarehouse: skuFff456StGreenEuWarehousePresets.restPreset, + skuAaa789UvGreenEuWarehouse: skuAaa789UvGreenEuWarehousePresets.restPreset, + skuHydraulicHoseUsWarehouse: skuHydraulicHoseUsWarehousePresets.restPreset, + skuTaperedRollerBearingUsWarehouse: + skuTaperedRollerBearingUsWarehousePresets.restPreset, + skuHhh234WxGreenEuWarehouse: skuHhh234WxGreenEuWarehousePresets.restPreset, + skuFff456StBlueDefaultWarehouse: + skuFff456StBlueDefaultWarehousePresets.restPreset, + skuIii567YzBlueEuWarehouse: skuIii567YzBlueEuWarehousePresets.restPreset, + skuGgg789UvRedUsWarehouse: skuGgg789UvRedUsWarehousePresets.restPreset, + skuFff456StBlueUsWarehouse: skuFff456StBlueUsWarehousePresets.restPreset, + skuEee123QrRedDefaultWarehouse: + skuEee123QrRedDefaultWarehousePresets.restPreset, + skuDdd890OpGreenEuWarehouse: skuDdd890OpGreenEuWarehousePresets.restPreset, + skuPinAndBushingKitEuWarehouse: + skuPinAndBushingKitEuWarehousePresets.restPreset, + skuAaa789UvRedEuWarehouse: skuAaa789UvRedEuWarehousePresets.restPreset, + skuIii567YzRedDefaultWarehouse: + skuIii567YzRedDefaultWarehousePresets.restPreset, + skuEee123QrBlueDefaultWarehouse: + skuEee123QrBlueDefaultWarehousePresets.restPreset, + skuEee123QrRedUsWarehouse: skuEee123QrRedUsWarehousePresets.restPreset, + skuEee123QrGreenEuWarehouse: skuEee123QrGreenEuWarehousePresets.restPreset, + skuJjj890OpBlueEuWarehouse: skuJjj890OpBlueEuWarehousePresets.restPreset, + skuZz456StBlueDefaultWarehouse: + skuZz456StBlueDefaultWarehousePresets.restPreset, + skuTaperedRollerBearingEuWarehouse: + skuTaperedRollerBearingEuWarehousePresets.restPreset, + skuJjj890OpGreenDefaultWarehouse: + skuJjj890OpGreenDefaultWarehousePresets.restPreset, + skuDdd890OpGreenUsWarehouse: skuDdd890OpGreenUsWarehousePresets.restPreset, + skuEee123QrBlueEuWarehouse: skuEee123QrBlueEuWarehousePresets.restPreset, + skuDdd890OpGreenDefaultWarehouse: + skuDdd890OpGreenDefaultWarehousePresets.restPreset, + skuIii567YzBlueDefaultWarehouse: + skuIii567YzBlueDefaultWarehousePresets.restPreset, + skuGgg789UvRedEuWarehouse: skuGgg789UvRedEuWarehousePresets.restPreset, + skuFff456StRedDefaultWarehouse: + skuFff456StRedDefaultWarehousePresets.restPreset, + skuAlternatorUsWarehouse: skuAlternatorUsWarehousePresets.restPreset, + skuLedWorkLightEuWarehouse: skuLedWorkLightEuWarehousePresets.restPreset, + skuZz456StGreenDefaultWarehouse: + skuZz456StGreenDefaultWarehousePresets.restPreset, + skuLedWorkLightDefaultWarehouse: + skuLedWorkLightDefaultWarehousePresets.restPreset, + skuDdd890OpRedUsWarehouse: skuDdd890OpRedUsWarehousePresets.restPreset, + skuIii567YzBlueUsWarehouse: skuIii567YzBlueUsWarehousePresets.restPreset, + skuFff456StRedEuWarehouse: skuFff456StRedEuWarehousePresets.restPreset, + skuPinAndBushingKitUsWarehouse: + skuPinAndBushingKitUsWarehousePresets.restPreset, + skuFuelFilterDefaultWarehouse: + skuFuelFilterDefaultWarehousePresets.restPreset, + skuEee123QrRedEuWarehouse: skuEee123QrRedEuWarehousePresets.restPreset, + skuTaperedRollerBearingDefaultWarehouse: + skuTaperedRollerBearingDefaultWarehousePresets.restPreset, + skuGgg789UvRedDefaultWarehouse: + skuGgg789UvRedDefaultWarehousePresets.restPreset, + skuPinAndBushingKitDefaultWarehouse: + skuPinAndBushingKitDefaultWarehousePresets.restPreset, + skuDdd890OpRedEuWarehouse: skuDdd890OpRedEuWarehousePresets.restPreset, + skuLedWorkLightUsWarehouse: skuLedWorkLightUsWarehousePresets.restPreset, + skuMm123Qr2023UsWarehouse: skuMm123Qr2023UsWarehousePresets.restPreset, + skuVv234WxGreenDefaultWarehouse: + skuVv234WxGreenDefaultWarehousePresets.restPreset, + skuYy123QrBlueDefaultWarehouse: + skuYy123QrBlueDefaultWarehousePresets.restPreset, + skuOo789Uv2023UsWarehouse: skuOo789Uv2023UsWarehousePresets.restPreset, + skuOo789Uv2019DefaultWarehouse: + skuOo789Uv2019DefaultWarehousePresets.restPreset, + skuPp234Wx2023EuWarehouse: skuPp234Wx2023EuWarehousePresets.restPreset, + skuD234Wx2023DefaultWarehouse: + skuD234Wx2023DefaultWarehousePresets.restPreset, + skuUu789UvBlueEuWarehouse: skuUu789UvBlueEuWarehousePresets.restPreset, + skuIii567YzRedEuWarehouse: skuIii567YzRedEuWarehousePresets.restPreset, + skuMm123Qr2019DefaultWarehouse: + skuMm123Qr2019DefaultWarehousePresets.restPreset, + skuZz456StBlueUsWarehouse: skuZz456StBlueUsWarehousePresets.restPreset, + skuJj234Wx2023UsWarehouse: skuJj234Wx2023UsWarehousePresets.restPreset, + skuQq567Yz2015EuWarehouse: skuQq567Yz2015EuWarehousePresets.restPreset, + skuBrakePadSetUsWarehouse: skuBrakePadSetUsWarehousePresets.restPreset, + skuGgg789UvBlueEuWarehouse: skuGgg789UvBlueEuWarehousePresets.restPreset, + skuGgg789UvGreenDefaultWarehouse: + skuGgg789UvGreenDefaultWarehousePresets.restPreset, + skuStarterMotorDefaultWarehouse: + skuStarterMotorDefaultWarehousePresets.restPreset, + skuZz456StRedUsWarehouse: skuZz456StRedUsWarehousePresets.restPreset, + skuE567Yz2015EuWarehouse: skuE567Yz2015EuWarehousePresets.restPreset, + skuQq567Yz2015UsWarehouse: skuQq567Yz2015UsWarehousePresets.restPreset, + skuRr890Op2019DefaultWarehouse: + skuRr890Op2019DefaultWarehousePresets.restPreset, + skuJjj890OpBlueUsWarehouse: skuJjj890OpBlueUsWarehousePresets.restPreset, + skuBbb234WxRedEuWarehouse: skuBbb234WxRedEuWarehousePresets.restPreset, + skuDdd890OpBlueEuWarehouse: skuDdd890OpBlueEuWarehousePresets.restPreset, + skuYy123QrRedEuWarehouse: skuYy123QrRedEuWarehousePresets.restPreset, + skuSs123QrGreenDefaultWarehouse: + skuSs123QrGreenDefaultWarehousePresets.restPreset, + skuOilFilterDefaultWarehouse: skuOilFilterDefaultWarehousePresets.restPreset, + skuSs123QrBlueUsWarehouse: skuSs123QrBlueUsWarehousePresets.restPreset, + skuAaa789UvRedDefaultWarehouse: + skuAaa789UvRedDefaultWarehousePresets.restPreset, + skuPp234Wx2019UsWarehouse: skuPp234Wx2019UsWarehousePresets.restPreset, + skuMm123Qr2023DefaultWarehouse: + skuMm123Qr2023DefaultWarehousePresets.restPreset, + skuJjj890OpGreenUsWarehouse: skuJjj890OpGreenUsWarehousePresets.restPreset, + skuMm123Qr2019UsWarehouse: skuMm123Qr2019UsWarehousePresets.restPreset, + skuXx890OpGreenDefaultWarehouse: + skuXx890OpGreenDefaultWarehousePresets.restPreset, + skuEee123QrBlueUsWarehouse: skuEee123QrBlueUsWarehousePresets.restPreset, + skuNn456St2023DefaultWarehouse: + skuNn456St2023DefaultWarehousePresets.restPreset, + skuZz456StBlueEuWarehouse: skuZz456StBlueEuWarehousePresets.restPreset, + skuMm123Qr2023EuWarehouse: skuMm123Qr2023EuWarehousePresets.restPreset, + skuAaa789UvBlueDefaultWarehouse: + skuAaa789UvBlueDefaultWarehousePresets.restPreset, + skuWw567YzBlueEuWarehouse: skuWw567YzBlueEuWarehousePresets.restPreset, + skuIii567YzGreenUsWarehouse: skuIii567YzGreenUsWarehousePresets.restPreset, + skuUu789UvBlueDefaultWarehouse: + skuUu789UvBlueDefaultWarehousePresets.restPreset, + skuYy123QrGreenEuWarehouse: skuYy123QrGreenEuWarehousePresets.restPreset, + skuSs123QrGreenEuWarehouse: skuSs123QrGreenEuWarehousePresets.restPreset, + skuDdd890OpBlueUsWarehouse: skuDdd890OpBlueUsWarehousePresets.restPreset, + skuXx890OpRedUsWarehouse: skuXx890OpRedUsWarehousePresets.restPreset, + skuGgg789UvBlueDefaultWarehouse: + skuGgg789UvBlueDefaultWarehousePresets.restPreset, + skuZz456StRedEuWarehouse: skuZz456StRedEuWarehousePresets.restPreset, + skuJjj890OpRedEuWarehouse: skuJjj890OpRedEuWarehousePresets.restPreset, + skuGgg789UvGreenUsWarehouse: skuGgg789UvGreenUsWarehousePresets.restPreset, + skuTt456StBlueDefaultWarehouse: + skuTt456StBlueDefaultWarehousePresets.restPreset, + skuTt456StRedUsWarehouse: skuTt456StRedUsWarehousePresets.restPreset, + skuOo789Uv2023DefaultWarehouse: + skuOo789Uv2023DefaultWarehousePresets.restPreset, + skuOo789Uv2015DefaultWarehouse: + skuOo789Uv2015DefaultWarehousePresets.restPreset, + skuAirFilterEuWarehouse: skuAirFilterEuWarehousePresets.restPreset, + skuTt456StGreenUsWarehouse: skuTt456StGreenUsWarehousePresets.restPreset, + skuIii567YzGreenEuWarehouse: skuIii567YzGreenEuWarehousePresets.restPreset, + skuOo789Uv2019UsWarehouse: skuOo789Uv2019UsWarehousePresets.restPreset, + skuUu789UvGreenEuWarehouse: skuUu789UvGreenEuWarehousePresets.restPreset, + skuAaa789UvGreenDefaultWarehouse: + skuAaa789UvGreenDefaultWarehousePresets.restPreset, + skuXx890OpRedEuWarehouse: skuXx890OpRedEuWarehousePresets.restPreset, + skuXx890OpGreenUsWarehouse: skuXx890OpGreenUsWarehousePresets.restPreset, + skuYy123QrGreenUsWarehouse: skuYy123QrGreenUsWarehousePresets.restPreset, + skuCcc567YzBlueDefaultWarehouse: + skuCcc567YzBlueDefaultWarehousePresets.restPreset, + skuOilFilterEuWarehouse: skuOilFilterEuWarehousePresets.restPreset, + skuCcc567YzRedDefaultWarehouse: + skuCcc567YzRedDefaultWarehousePresets.restPreset, + skuCcc567YzRedUsWarehouse: skuCcc567YzRedUsWarehousePresets.restPreset, + skuYy123QrRedDefaultWarehouse: + skuYy123QrRedDefaultWarehousePresets.restPreset, + skuVv234WxGreenUsWarehouse: skuVv234WxGreenUsWarehousePresets.restPreset, + skuX234Wx2019EuWarehouse: skuX234Wx2019EuWarehousePresets.restPreset, + skuU123Qr2019UsWarehouse: skuU123Qr2019UsWarehousePresets.restPreset, + skuJ234Wx2015EuWarehouse: skuJ234Wx2015EuWarehousePresets.restPreset, + skuE567Yz2023UsWarehouse: skuE567Yz2023UsWarehousePresets.restPreset, + skuL890Op2015UsWarehouse: skuL890Op2015UsWarehousePresets.restPreset, + skuL890Op2019UsWarehouse: skuL890Op2019UsWarehousePresets.restPreset, + skuE567Yz2019DefaultWarehouse: + skuE567Yz2019DefaultWarehousePresets.restPreset, + skuG123Qr2023EuWarehouse: skuG123Qr2023EuWarehousePresets.restPreset, + skuI789Uv2023DefaultWarehouse: + skuI789Uv2023DefaultWarehousePresets.restPreset, + skuE567Yz2019UsWarehouse: skuE567Yz2019UsWarehousePresets.restPreset, + skuL890Op2023UsWarehouse: skuL890Op2023UsWarehousePresets.restPreset, + skuI789Uv2019EuWarehouse: skuI789Uv2019EuWarehousePresets.restPreset, + skuI789Uv2019UsWarehouse: skuI789Uv2019UsWarehousePresets.restPreset, + skuU123Qr2015UsWarehouse: skuU123Qr2015UsWarehousePresets.restPreset, + skuK567Yz2023DefaultWarehouse: + skuK567Yz2023DefaultWarehousePresets.restPreset, + skuH456St2019DefaultWarehouse: + skuH456St2019DefaultWarehousePresets.restPreset, + skuG123Qr2015UsWarehouse: skuG123Qr2015UsWarehousePresets.restPreset, + skuJ234Wx2023UsWarehouse: skuJ234Wx2023UsWarehousePresets.restPreset, + skuE567Yz2019EuWarehouse: skuE567Yz2019EuWarehousePresets.restPreset, + skuJ234Wx2015UsWarehouse: skuJ234Wx2015UsWarehousePresets.restPreset, + skuI789Uv2023EuWarehouse: skuI789Uv2023EuWarehousePresets.restPreset, + skuD234Wx2019UsWarehouse: skuD234Wx2019UsWarehousePresets.restPreset, + skuF890Op2015DefaultWarehouse: + skuF890Op2015DefaultWarehousePresets.restPreset, + skuD234Wx2015DefaultWarehouse: + skuD234Wx2015DefaultWarehousePresets.restPreset, + skuK567Yz2015EuWarehouse: skuK567Yz2015EuWarehousePresets.restPreset, + skuU123Qr2015DefaultWarehouse: + skuU123Qr2015DefaultWarehousePresets.restPreset, + skuF890Op2023EuWarehouse: skuF890Op2023EuWarehousePresets.restPreset, + skuH456St2015DefaultWarehouse: + skuH456St2015DefaultWarehousePresets.restPreset, + skuJ234Wx2019EuWarehouse: skuJ234Wx2019EuWarehousePresets.restPreset, + skuK567Yz2019EuWarehouse: skuK567Yz2019EuWarehousePresets.restPreset, + skuK567Yz2023UsWarehouse: skuK567Yz2023UsWarehousePresets.restPreset, }; -export default presets; +export const graphqlPresets = { + skuA789Bc2019UsWarehouse: skuA789Bc2019UsWarehousePresets.graphqlPreset, + skuX456Yz2023EuWarehouse: skuX456Yz2023EuWarehousePresets.graphqlPreset, + skuX456Yz2023DefaultWarehouse: + skuX456Yz2023DefaultWarehousePresets.graphqlPreset, + skuR123Ts2015UsWarehouse: skuR123Ts2015UsWarehousePresets.graphqlPreset, + skuM890Op2019EuWarehouse: skuM890Op2019EuWarehousePresets.graphqlPreset, + skuM890Op2015UsWarehouse: skuM890Op2015UsWarehousePresets.graphqlPreset, + skuS567Uv2019DefaultWarehouse: + skuS567Uv2019DefaultWarehousePresets.graphqlPreset, + skuR123Ts2019UsWarehouse: skuR123Ts2019UsWarehousePresets.graphqlPreset, + skuR123Ts2023DefaultWarehouse: + skuR123Ts2023DefaultWarehousePresets.graphqlPreset, + skuM890Op2023EuWarehouse: skuM890Op2023EuWarehousePresets.graphqlPreset, + skuP234Qw2019DefaultWarehouse: + skuP234Qw2019DefaultWarehousePresets.graphqlPreset, + skuA789Bc2019DefaultWarehouse: + skuA789Bc2019DefaultWarehousePresets.graphqlPreset, + skuA789Bc2015DefaultWarehouse: + skuA789Bc2015DefaultWarehousePresets.graphqlPreset, + skuP234Qw2023UsWarehouse: skuP234Qw2023UsWarehousePresets.graphqlPreset, + skuX456Yz2019DefaultWarehouse: + skuX456Yz2019DefaultWarehousePresets.graphqlPreset, + skuP234Qw2019EuWarehouse: skuP234Qw2019EuWarehousePresets.graphqlPreset, + skuA789Bc2023UsWarehouse: skuA789Bc2023UsWarehousePresets.graphqlPreset, + skuS567Uv2023DefaultWarehouse: + skuS567Uv2023DefaultWarehousePresets.graphqlPreset, + skuR123Ts2019EuWarehouse: skuR123Ts2019EuWarehousePresets.graphqlPreset, + skuR123Ts2023UsWarehouse: skuR123Ts2023UsWarehousePresets.graphqlPreset, + skuP234Qw2015DefaultWarehouse: + skuP234Qw2015DefaultWarehousePresets.graphqlPreset, + skuN123Qr2015UsWarehouse: skuN123Qr2015UsWarehousePresets.graphqlPreset, + skuA789Bc2023EuWarehouse: skuA789Bc2023EuWarehousePresets.graphqlPreset, + skuA789Bc2023DefaultWarehouse: + skuA789Bc2023DefaultWarehousePresets.graphqlPreset, + skuR123Ts2015EuWarehouse: skuR123Ts2015EuWarehousePresets.graphqlPreset, + skuN123Qr2019DefaultWarehouse: + skuN123Qr2019DefaultWarehousePresets.graphqlPreset, + skuR123Ts2019DefaultWarehouse: + skuR123Ts2019DefaultWarehousePresets.graphqlPreset, + skuM890Op2019UsWarehouse: skuM890Op2019UsWarehousePresets.graphqlPreset, + skuS567Uv2023EuWarehouse: skuS567Uv2023EuWarehousePresets.graphqlPreset, + skuN123Qr2015EuWarehouse: skuN123Qr2015EuWarehousePresets.graphqlPreset, + skuP234Qw2019UsWarehouse: skuP234Qw2019UsWarehousePresets.graphqlPreset, + skuA789Bc2019EuWarehouse: skuA789Bc2019EuWarehousePresets.graphqlPreset, + skuS567Uv2019EuWarehouse: skuS567Uv2019EuWarehousePresets.graphqlPreset, + skuA789Bc2015UsWarehouse: skuA789Bc2015UsWarehousePresets.graphqlPreset, + skuS567Uv2019UsWarehouse: skuS567Uv2019UsWarehousePresets.graphqlPreset, + skuN123Qr2015DefaultWarehouse: + skuN123Qr2015DefaultWarehousePresets.graphqlPreset, + skuX456Yz2015EuWarehouse: skuX456Yz2015EuWarehousePresets.graphqlPreset, + skuX456Yz2019UsWarehouse: skuX456Yz2019UsWarehousePresets.graphqlPreset, + skuA789Bc2015EuWarehouse: skuA789Bc2015EuWarehousePresets.graphqlPreset, + skuX456Yz2019EuWarehouse: skuX456Yz2019EuWarehousePresets.graphqlPreset, + skuX456Yz2015UsWarehouse: skuX456Yz2015UsWarehousePresets.graphqlPreset, + skuM890Op2023DefaultWarehouse: + skuM890Op2023DefaultWarehousePresets.graphqlPreset, + skuS567Uv2015UsWarehouse: skuS567Uv2015UsWarehousePresets.graphqlPreset, + skuS567Uv2023UsWarehouse: skuS567Uv2023UsWarehousePresets.graphqlPreset, + skuM890Op2019DefaultWarehouse: + skuM890Op2019DefaultWarehousePresets.graphqlPreset, + skuP234Qw2023DefaultWarehouse: + skuP234Qw2023DefaultWarehousePresets.graphqlPreset, + skuN123Qr2019UsWarehouse: skuN123Qr2019UsWarehousePresets.graphqlPreset, + skuR123Ts2015DefaultWarehouse: + skuR123Ts2015DefaultWarehousePresets.graphqlPreset, + skuX456Yz2015DefaultWarehouse: + skuX456Yz2015DefaultWarehousePresets.graphqlPreset, + skuM890Op2015EuWarehouse: skuM890Op2015EuWarehousePresets.graphqlPreset, + skuP234Qw2015EuWarehouse: skuP234Qw2015EuWarehousePresets.graphqlPreset, + skuP234Qw2015UsWarehouse: skuP234Qw2015UsWarehousePresets.graphqlPreset, + skuN123Qr2019EuWarehouse: skuN123Qr2019EuWarehousePresets.graphqlPreset, + skuM890Op2015DefaultWarehouse: + skuM890Op2015DefaultWarehousePresets.graphqlPreset, + skuX456Yz2023UsWarehouse: skuX456Yz2023UsWarehousePresets.graphqlPreset, + skuR123Ts2023EuWarehouse: skuR123Ts2023EuWarehousePresets.graphqlPreset, + skuS567Uv2015EuWarehouse: skuS567Uv2015EuWarehousePresets.graphqlPreset, + skuP234Qw2023EuWarehouse: skuP234Qw2023EuWarehousePresets.graphqlPreset, + skuS567Uv2015DefaultWarehouse: + skuS567Uv2015DefaultWarehousePresets.graphqlPreset, + skuM890Op2023UsWarehouse: skuM890Op2023UsWarehousePresets.graphqlPreset, + skuB456St2023UsWarehouse: skuB456St2023UsWarehousePresets.graphqlPreset, + skuB456St2019DefaultWarehouse: + skuB456St2019DefaultWarehousePresets.graphqlPreset, + skuB456St2015DefaultWarehouse: + skuB456St2015DefaultWarehousePresets.graphqlPreset, + skuD234Wx2023UsWarehouse: skuD234Wx2023UsWarehousePresets.graphqlPreset, + skuC789Uv2015EuWarehouse: skuC789Uv2015EuWarehousePresets.graphqlPreset, + skuN123Qr2023UsWarehouse: skuN123Qr2023UsWarehousePresets.graphqlPreset, + skuC789Uv2023EuWarehouse: skuC789Uv2023EuWarehousePresets.graphqlPreset, + skuC789Uv2019EuWarehouse: skuC789Uv2019EuWarehousePresets.graphqlPreset, + skuH456St2023UsWarehouse: skuH456St2023UsWarehousePresets.graphqlPreset, + skuV456St2019UsWarehouse: skuV456St2019UsWarehousePresets.graphqlPreset, + skuJ234Wx2019UsWarehouse: skuJ234Wx2019UsWarehousePresets.graphqlPreset, + skuK567Yz2019DefaultWarehouse: + skuK567Yz2019DefaultWarehousePresets.graphqlPreset, + skuE567Yz2015DefaultWarehouse: + skuE567Yz2015DefaultWarehousePresets.graphqlPreset, + skuV456St2023EuWarehouse: skuV456St2023EuWarehousePresets.graphqlPreset, + skuG123Qr2023DefaultWarehouse: + skuG123Qr2023DefaultWarehousePresets.graphqlPreset, + skuF890Op2019EuWarehouse: skuF890Op2019EuWarehousePresets.graphqlPreset, + skuU123Qr2023UsWarehouse: skuU123Qr2023UsWarehousePresets.graphqlPreset, + skuJ234Wx2023EuWarehouse: skuJ234Wx2023EuWarehousePresets.graphqlPreset, + skuL890Op2019EuWarehouse: skuL890Op2019EuWarehousePresets.graphqlPreset, + skuH456St2023DefaultWarehouse: + skuH456St2023DefaultWarehousePresets.graphqlPreset, + skuG123Qr2015DefaultWarehouse: + skuG123Qr2015DefaultWarehousePresets.graphqlPreset, + skuK567Yz2015UsWarehouse: skuK567Yz2015UsWarehousePresets.graphqlPreset, + skuC789Uv2015UsWarehouse: skuC789Uv2015UsWarehousePresets.graphqlPreset, + skuL890Op2015DefaultWarehouse: + skuL890Op2015DefaultWarehousePresets.graphqlPreset, + skuZ890Op2019EuWarehouse: skuZ890Op2019EuWarehousePresets.graphqlPreset, + skuX234Wx2023DefaultWarehouse: + skuX234Wx2023DefaultWarehousePresets.graphqlPreset, + skuX234Wx2015UsWarehouse: skuX234Wx2015UsWarehousePresets.graphqlPreset, + skuCc789Uv2015DefaultWarehouse: + skuCc789Uv2015DefaultWarehousePresets.graphqlPreset, + skuW789Uv2023UsWarehouse: skuW789Uv2023UsWarehousePresets.graphqlPreset, + skuV456St2023UsWarehouse: skuV456St2023UsWarehousePresets.graphqlPreset, + skuW789Uv2019UsWarehouse: skuW789Uv2019UsWarehousePresets.graphqlPreset, + skuV456St2019DefaultWarehouse: + skuV456St2019DefaultWarehousePresets.graphqlPreset, + skuX234Wx2019DefaultWarehouse: + skuX234Wx2019DefaultWarehousePresets.graphqlPreset, + skuEe567Yz2015UsWarehouse: skuEe567Yz2015UsWarehousePresets.graphqlPreset, + skuX234Wx2019UsWarehouse: skuX234Wx2019UsWarehousePresets.graphqlPreset, + skuEe567Yz2015EuWarehouse: skuEe567Yz2015EuWarehousePresets.graphqlPreset, + skuJ234Wx2019DefaultWarehouse: + skuJ234Wx2019DefaultWarehousePresets.graphqlPreset, + skuDd234Wx2019EuWarehouse: skuDd234Wx2019EuWarehousePresets.graphqlPreset, + skuW789Uv2023DefaultWarehouse: + skuW789Uv2023DefaultWarehousePresets.graphqlPreset, + skuBb456St2023DefaultWarehouse: + skuBb456St2023DefaultWarehousePresets.graphqlPreset, + skuY567Yz2019UsWarehouse: skuY567Yz2019UsWarehousePresets.graphqlPreset, + skuBb456St2023UsWarehouse: skuBb456St2023UsWarehousePresets.graphqlPreset, + skuEe567Yz2019UsWarehouse: skuEe567Yz2019UsWarehousePresets.graphqlPreset, + skuCc789Uv2015UsWarehouse: skuCc789Uv2015UsWarehousePresets.graphqlPreset, + skuEe567Yz2023DefaultWarehouse: + skuEe567Yz2023DefaultWarehousePresets.graphqlPreset, + skuFf890Op2015UsWarehouse: skuFf890Op2015UsWarehousePresets.graphqlPreset, + skuW789Uv2023EuWarehouse: skuW789Uv2023EuWarehousePresets.graphqlPreset, + skuEe567Yz2023EuWarehouse: skuEe567Yz2023EuWarehousePresets.graphqlPreset, + skuV456St2015EuWarehouse: skuV456St2015EuWarehousePresets.graphqlPreset, + skuCc789Uv2015EuWarehouse: skuCc789Uv2015EuWarehousePresets.graphqlPreset, + skuCc789Uv2019EuWarehouse: skuCc789Uv2019EuWarehousePresets.graphqlPreset, + skuY567Yz2015EuWarehouse: skuY567Yz2015EuWarehousePresets.graphqlPreset, + skuIi789Uv2019UsWarehouse: skuIi789Uv2019UsWarehousePresets.graphqlPreset, + skuCc789Uv2023UsWarehouse: skuCc789Uv2023UsWarehousePresets.graphqlPreset, + skuJj234Wx2019UsWarehouse: skuJj234Wx2019UsWarehousePresets.graphqlPreset, + skuEe567Yz2019EuWarehouse: skuEe567Yz2019EuWarehousePresets.graphqlPreset, + skuNn456St2019EuWarehouse: skuNn456St2019EuWarehousePresets.graphqlPreset, + skuX234Wx2015EuWarehouse: skuX234Wx2015EuWarehousePresets.graphqlPreset, + skuFf890Op2019DefaultWarehouse: + skuFf890Op2019DefaultWarehousePresets.graphqlPreset, + skuCc789Uv2019DefaultWarehouse: + skuCc789Uv2019DefaultWarehousePresets.graphqlPreset, + skuH456St2023EuWarehouse: skuH456St2023EuWarehousePresets.graphqlPreset, + skuGg123Qr2023DefaultWarehouse: + skuGg123Qr2023DefaultWarehousePresets.graphqlPreset, + skuU123Qr2023EuWarehouse: skuU123Qr2023EuWarehousePresets.graphqlPreset, + skuKk567Yz2015EuWarehouse: skuKk567Yz2015EuWarehousePresets.graphqlPreset, + skuEe567Yz2023UsWarehouse: skuEe567Yz2023UsWarehousePresets.graphqlPreset, + skuEe567Yz2019DefaultWarehouse: + skuEe567Yz2019DefaultWarehousePresets.graphqlPreset, + skuIi789Uv2019DefaultWarehouse: + skuIi789Uv2019DefaultWarehousePresets.graphqlPreset, + skuMm123Qr2019EuWarehouse: skuMm123Qr2019EuWarehousePresets.graphqlPreset, + skuJj234Wx2015EuWarehouse: skuJj234Wx2015EuWarehousePresets.graphqlPreset, + skuOo789Uv2015UsWarehouse: skuOo789Uv2015UsWarehousePresets.graphqlPreset, + skuIi789Uv2023UsWarehouse: skuIi789Uv2023UsWarehousePresets.graphqlPreset, + skuIi789Uv2019EuWarehouse: skuIi789Uv2019EuWarehousePresets.graphqlPreset, + skuY567Yz2023EuWarehouse: skuY567Yz2023EuWarehousePresets.graphqlPreset, + skuUu789UvBlueUsWarehouse: skuUu789UvBlueUsWarehousePresets.graphqlPreset, + skuPp234Wx2023UsWarehouse: skuPp234Wx2023UsWarehousePresets.graphqlPreset, + skuIi789Uv2015DefaultWarehouse: + skuIi789Uv2015DefaultWarehousePresets.graphqlPreset, + skuQq567Yz2019EuWarehouse: skuQq567Yz2019EuWarehousePresets.graphqlPreset, + skuUu789UvGreenDefaultWarehouse: + skuUu789UvGreenDefaultWarehousePresets.graphqlPreset, + skuQq567Yz2015DefaultWarehouse: + skuQq567Yz2015DefaultWarehousePresets.graphqlPreset, + skuSs123QrBlueDefaultWarehouse: + skuSs123QrBlueDefaultWarehousePresets.graphqlPreset, + skuJj234Wx2019DefaultWarehouse: + skuJj234Wx2019DefaultWarehousePresets.graphqlPreset, + skuOo789Uv2023EuWarehouse: skuOo789Uv2023EuWarehousePresets.graphqlPreset, + skuSs123QrGreenUsWarehouse: skuSs123QrGreenUsWarehousePresets.graphqlPreset, + skuDdd890OpRedDefaultWarehouse: + skuDdd890OpRedDefaultWarehousePresets.graphqlPreset, + skuUu789UvGreenUsWarehouse: skuUu789UvGreenUsWarehousePresets.graphqlPreset, + skuDdd890OpBlueDefaultWarehouse: + skuDdd890OpBlueDefaultWarehousePresets.graphqlPreset, + skuZ890Op2015UsWarehouse: skuZ890Op2015UsWarehousePresets.graphqlPreset, + skuPp234Wx2019DefaultWarehouse: + skuPp234Wx2019DefaultWarehousePresets.graphqlPreset, + skuPp234Wx2023DefaultWarehouse: + skuPp234Wx2023DefaultWarehousePresets.graphqlPreset, + skuWw567YzGreenUsWarehouse: skuWw567YzGreenUsWarehousePresets.graphqlPreset, + skuAaa789UvRedUsWarehouse: skuAaa789UvRedUsWarehousePresets.graphqlPreset, + skuAaa789UvBlueEuWarehouse: skuAaa789UvBlueEuWarehousePresets.graphqlPreset, + skuCcc567YzRedEuWarehouse: skuCcc567YzRedEuWarehousePresets.graphqlPreset, + skuCcc567YzGreenEuWarehouse: skuCcc567YzGreenEuWarehousePresets.graphqlPreset, + skuCc789Uv2019UsWarehouse: skuCc789Uv2019UsWarehousePresets.graphqlPreset, + skuU123Qr2019DefaultWarehouse: + skuU123Qr2019DefaultWarehousePresets.graphqlPreset, + skuYy123QrBlueEuWarehouse: skuYy123QrBlueEuWarehousePresets.graphqlPreset, + skuBbb234WxRedDefaultWarehouse: + skuBbb234WxRedDefaultWarehousePresets.graphqlPreset, + skuEee123QrGreenUsWarehouse: skuEee123QrGreenUsWarehousePresets.graphqlPreset, + skuFuelFilterUsWarehouse: skuFuelFilterUsWarehousePresets.graphqlPreset, + skuZz456StRedDefaultWarehouse: + skuZz456StRedDefaultWarehousePresets.graphqlPreset, + skuCcc567YzGreenUsWarehouse: skuCcc567YzGreenUsWarehousePresets.graphqlPreset, + skuMm123Qr2015DefaultWarehouse: + skuMm123Qr2015DefaultWarehousePresets.graphqlPreset, + skuBrakePadSetDefaultWarehouse: + skuBrakePadSetDefaultWarehousePresets.graphqlPreset, + skuHhh234WxGreenDefaultWarehouse: + skuHhh234WxGreenDefaultWarehousePresets.graphqlPreset, + skuHhh234WxGreenUsWarehouse: skuHhh234WxGreenUsWarehousePresets.graphqlPreset, + skuHhh234WxRedUsWarehouse: skuHhh234WxRedUsWarehousePresets.graphqlPreset, + skuY567Yz2015DefaultWarehouse: + skuY567Yz2015DefaultWarehousePresets.graphqlPreset, + skuHydraulicHoseEuWarehouse: skuHydraulicHoseEuWarehousePresets.graphqlPreset, + skuHhh234WxBlueEuWarehouse: skuHhh234WxBlueEuWarehousePresets.graphqlPreset, + skuHhh234WxBlueUsWarehouse: skuHhh234WxBlueUsWarehousePresets.graphqlPreset, + skuJjj890OpRedDefaultWarehouse: + skuJjj890OpRedDefaultWarehousePresets.graphqlPreset, + skuPp234Wx2015DefaultWarehouse: + skuPp234Wx2015DefaultWarehousePresets.graphqlPreset, + skuIi789Uv2023DefaultWarehouse: + skuIi789Uv2023DefaultWarehousePresets.graphqlPreset, + skuJjj890OpBlueDefaultWarehouse: + skuJjj890OpBlueDefaultWarehousePresets.graphqlPreset, + skuHhh234WxRedEuWarehouse: skuHhh234WxRedEuWarehousePresets.graphqlPreset, + skuCcc567YzGreenDefaultWarehouse: + skuCcc567YzGreenDefaultWarehousePresets.graphqlPreset, + skuJjj890OpGreenEuWarehouse: skuJjj890OpGreenEuWarehousePresets.graphqlPreset, + skuFf890Op2015EuWarehouse: skuFf890Op2015EuWarehousePresets.graphqlPreset, + skuFff456StGreenDefaultWarehouse: + skuFff456StGreenDefaultWarehousePresets.graphqlPreset, + skuJj234Wx2015UsWarehouse: skuJj234Wx2015UsWarehousePresets.graphqlPreset, + skuFuelFilterEuWarehouse: skuFuelFilterEuWarehousePresets.graphqlPreset, + skuHydraulicHoseDefaultWarehouse: + skuHydraulicHoseDefaultWarehousePresets.graphqlPreset, + skuNn456St2023EuWarehouse: skuNn456St2023EuWarehousePresets.graphqlPreset, + skuNn456St2023UsWarehouse: skuNn456St2023UsWarehousePresets.graphqlPreset, + skuPneumaticTireUsWarehouse: skuPneumaticTireUsWarehousePresets.graphqlPreset, + skuGgg789UvGreenEuWarehouse: skuGgg789UvGreenEuWarehousePresets.graphqlPreset, + skuYy123QrGreenDefaultWarehouse: + skuYy123QrGreenDefaultWarehousePresets.graphqlPreset, + skuJjj890OpRedUsWarehouse: skuJjj890OpRedUsWarehousePresets.graphqlPreset, + skuPneumaticTireEuWarehouse: skuPneumaticTireEuWarehousePresets.graphqlPreset, + skuStarterMotorEuWarehouse: skuStarterMotorEuWarehousePresets.graphqlPreset, + skuPistonRingSetDefaultWarehouse: + skuPistonRingSetDefaultWarehousePresets.graphqlPreset, + skuAlternatorEuWarehouse: skuAlternatorEuWarehousePresets.graphqlPreset, + skuAlternatorDefaultWarehouse: + skuAlternatorDefaultWarehousePresets.graphqlPreset, + skuXx890OpBlueEuWarehouse: skuXx890OpBlueEuWarehousePresets.graphqlPreset, + skuPistonRingSetEuWarehouse: skuPistonRingSetEuWarehousePresets.graphqlPreset, + skuFff456StBlueEuWarehouse: skuFff456StBlueEuWarehousePresets.graphqlPreset, + skuEee123QrGreenDefaultWarehouse: + skuEee123QrGreenDefaultWarehousePresets.graphqlPreset, + skuYy123QrBlueUsWarehouse: skuYy123QrBlueUsWarehousePresets.graphqlPreset, + skuGgg789UvBlueUsWarehouse: skuGgg789UvBlueUsWarehousePresets.graphqlPreset, + skuCcc567YzBlueUsWarehouse: skuCcc567YzBlueUsWarehousePresets.graphqlPreset, + skuHhh234WxBlueDefaultWarehouse: + skuHhh234WxBlueDefaultWarehousePresets.graphqlPreset, + skuAirFilterUsWarehouse: skuAirFilterUsWarehousePresets.graphqlPreset, + skuCcc567YzBlueEuWarehouse: skuCcc567YzBlueEuWarehousePresets.graphqlPreset, + skuPistonRingSetUsWarehouse: skuPistonRingSetUsWarehousePresets.graphqlPreset, + skuXx890OpRedDefaultWarehouse: + skuXx890OpRedDefaultWarehousePresets.graphqlPreset, + skuSs123QrRedEuWarehouse: skuSs123QrRedEuWarehousePresets.graphqlPreset, + skuIii567YzGreenDefaultWarehouse: + skuIii567YzGreenDefaultWarehousePresets.graphqlPreset, + skuAirFilterDefaultWarehouse: + skuAirFilterDefaultWarehousePresets.graphqlPreset, + skuBrakePadSetEuWarehouse: skuBrakePadSetEuWarehousePresets.graphqlPreset, + skuBbb234WxRedUsWarehouse: skuBbb234WxRedUsWarehousePresets.graphqlPreset, + skuIii567YzRedUsWarehouse: skuIii567YzRedUsWarehousePresets.graphqlPreset, + skuBbb234WxGreenDefaultWarehouse: + skuBbb234WxGreenDefaultWarehousePresets.graphqlPreset, + skuDd234Wx2023DefaultWarehouse: + skuDd234Wx2023DefaultWarehousePresets.graphqlPreset, + skuOilFilterUsWarehouse: skuOilFilterUsWarehousePresets.graphqlPreset, + skuFff456StRedUsWarehouse: skuFff456StRedUsWarehousePresets.graphqlPreset, + skuPneumaticTireDefaultWarehouse: + skuPneumaticTireDefaultWarehousePresets.graphqlPreset, + skuStarterMotorUsWarehouse: skuStarterMotorUsWarehousePresets.graphqlPreset, + skuHhh234WxRedDefaultWarehouse: + skuHhh234WxRedDefaultWarehousePresets.graphqlPreset, + skuW789Uv2019DefaultWarehouse: + skuW789Uv2019DefaultWarehousePresets.graphqlPreset, + skuE567Yz2015UsWarehouse: skuE567Yz2015UsWarehousePresets.graphqlPreset, + skuC789Uv2023DefaultWarehouse: + skuC789Uv2023DefaultWarehousePresets.graphqlPreset, + skuB456St2015UsWarehouse: skuB456St2015UsWarehousePresets.graphqlPreset, + skuJ234Wx2015DefaultWarehouse: + skuJ234Wx2015DefaultWarehousePresets.graphqlPreset, + skuG123Qr2019UsWarehouse: skuG123Qr2019UsWarehousePresets.graphqlPreset, + skuC789Uv2023UsWarehouse: skuC789Uv2023UsWarehousePresets.graphqlPreset, + skuD234Wx2019DefaultWarehouse: + skuD234Wx2019DefaultWarehousePresets.graphqlPreset, + skuB456St2019EuWarehouse: skuB456St2019EuWarehousePresets.graphqlPreset, + skuI789Uv2015UsWarehouse: skuI789Uv2015UsWarehousePresets.graphqlPreset, + skuB456St2015EuWarehouse: skuB456St2015EuWarehousePresets.graphqlPreset, + skuG123Qr2019DefaultWarehouse: + skuG123Qr2019DefaultWarehousePresets.graphqlPreset, + skuJ234Wx2023DefaultWarehouse: + skuJ234Wx2023DefaultWarehousePresets.graphqlPreset, + skuC789Uv2015DefaultWarehouse: + skuC789Uv2015DefaultWarehousePresets.graphqlPreset, + skuF890Op2019DefaultWarehouse: + skuF890Op2019DefaultWarehousePresets.graphqlPreset, + skuF890Op2015EuWarehouse: skuF890Op2015EuWarehousePresets.graphqlPreset, + skuE567Yz2023DefaultWarehouse: + skuE567Yz2023DefaultWarehousePresets.graphqlPreset, + skuH456St2019EuWarehouse: skuH456St2019EuWarehousePresets.graphqlPreset, + skuF890Op2023UsWarehouse: skuF890Op2023UsWarehousePresets.graphqlPreset, + skuV456St2019EuWarehouse: skuV456St2019EuWarehousePresets.graphqlPreset, + skuC789Uv2019DefaultWarehouse: + skuC789Uv2019DefaultWarehousePresets.graphqlPreset, + skuG123Qr2015EuWarehouse: skuG123Qr2015EuWarehousePresets.graphqlPreset, + skuB456St2023EuWarehouse: skuB456St2023EuWarehousePresets.graphqlPreset, + skuC789Uv2019UsWarehouse: skuC789Uv2019UsWarehousePresets.graphqlPreset, + skuE567Yz2023EuWarehouse: skuE567Yz2023EuWarehousePresets.graphqlPreset, + skuD234Wx2015UsWarehouse: skuD234Wx2015UsWarehousePresets.graphqlPreset, + skuL890Op2023EuWarehouse: skuL890Op2023EuWarehousePresets.graphqlPreset, + skuH456St2015UsWarehouse: skuH456St2015UsWarehousePresets.graphqlPreset, + skuI789Uv2023UsWarehouse: skuI789Uv2023UsWarehousePresets.graphqlPreset, + skuN123Qr2023DefaultWarehouse: + skuN123Qr2023DefaultWarehousePresets.graphqlPreset, + skuD234Wx2019EuWarehouse: skuD234Wx2019EuWarehousePresets.graphqlPreset, + skuW789Uv2015DefaultWarehouse: + skuW789Uv2015DefaultWarehousePresets.graphqlPreset, + skuL890Op2019DefaultWarehouse: + skuL890Op2019DefaultWarehousePresets.graphqlPreset, + skuI789Uv2019DefaultWarehouse: + skuI789Uv2019DefaultWarehousePresets.graphqlPreset, + skuK567Yz2019UsWarehouse: skuK567Yz2019UsWarehousePresets.graphqlPreset, + skuL890Op2015EuWarehouse: skuL890Op2015EuWarehousePresets.graphqlPreset, + skuF890Op2019UsWarehouse: skuF890Op2019UsWarehousePresets.graphqlPreset, + skuI789Uv2015DefaultWarehouse: + skuI789Uv2015DefaultWarehousePresets.graphqlPreset, + skuY567Yz2015UsWarehouse: skuY567Yz2015UsWarehousePresets.graphqlPreset, + skuH456St2015EuWarehouse: skuH456St2015EuWarehousePresets.graphqlPreset, + skuW789Uv2019EuWarehouse: skuW789Uv2019EuWarehousePresets.graphqlPreset, + skuI789Uv2015EuWarehouse: skuI789Uv2015EuWarehousePresets.graphqlPreset, + skuV456St2015DefaultWarehouse: + skuV456St2015DefaultWarehousePresets.graphqlPreset, + skuF890Op2015UsWarehouse: skuF890Op2015UsWarehousePresets.graphqlPreset, + skuB456St2019UsWarehouse: skuB456St2019UsWarehousePresets.graphqlPreset, + skuV456St2015UsWarehouse: skuV456St2015UsWarehousePresets.graphqlPreset, + skuD234Wx2023EuWarehouse: skuD234Wx2023EuWarehousePresets.graphqlPreset, + skuN123Qr2023EuWarehouse: skuN123Qr2023EuWarehousePresets.graphqlPreset, + skuK567Yz2015DefaultWarehouse: + skuK567Yz2015DefaultWarehousePresets.graphqlPreset, + skuF890Op2023DefaultWarehouse: + skuF890Op2023DefaultWarehousePresets.graphqlPreset, + skuY567Yz2019EuWarehouse: skuY567Yz2019EuWarehousePresets.graphqlPreset, + skuL890Op2023DefaultWarehouse: + skuL890Op2023DefaultWarehousePresets.graphqlPreset, + skuX234Wx2023UsWarehouse: skuX234Wx2023UsWarehousePresets.graphqlPreset, + skuAa123Qr2015DefaultWarehouse: + skuAa123Qr2015DefaultWarehousePresets.graphqlPreset, + skuZ890Op2015EuWarehouse: skuZ890Op2015EuWarehousePresets.graphqlPreset, + skuU123Qr2023DefaultWarehouse: + skuU123Qr2023DefaultWarehousePresets.graphqlPreset, + skuX234Wx2015DefaultWarehouse: + skuX234Wx2015DefaultWarehousePresets.graphqlPreset, + skuBb456St2015EuWarehouse: skuBb456St2015EuWarehousePresets.graphqlPreset, + skuWw567YzBlueDefaultWarehouse: + skuWw567YzBlueDefaultWarehousePresets.graphqlPreset, + skuAa123Qr2023UsWarehouse: skuAa123Qr2023UsWarehousePresets.graphqlPreset, + skuB456St2023DefaultWarehouse: + skuB456St2023DefaultWarehousePresets.graphqlPreset, + skuH456St2019UsWarehouse: skuH456St2019UsWarehousePresets.graphqlPreset, + skuG123Qr2019EuWarehouse: skuG123Qr2019EuWarehousePresets.graphqlPreset, + skuY567Yz2019DefaultWarehouse: + skuY567Yz2019DefaultWarehousePresets.graphqlPreset, + skuV456St2023DefaultWarehouse: + skuV456St2023DefaultWarehousePresets.graphqlPreset, + skuBb456St2019UsWarehouse: skuBb456St2019UsWarehousePresets.graphqlPreset, + skuZ890Op2015DefaultWarehouse: + skuZ890Op2015DefaultWarehousePresets.graphqlPreset, + skuBb456St2019EuWarehouse: skuBb456St2019EuWarehousePresets.graphqlPreset, + skuY567Yz2023DefaultWarehouse: + skuY567Yz2023DefaultWarehousePresets.graphqlPreset, + skuU123Qr2015EuWarehouse: skuU123Qr2015EuWarehousePresets.graphqlPreset, + skuAa123Qr2019UsWarehouse: skuAa123Qr2019UsWarehousePresets.graphqlPreset, + skuZ890Op2019UsWarehouse: skuZ890Op2019UsWarehousePresets.graphqlPreset, + skuK567Yz2023EuWarehouse: skuK567Yz2023EuWarehousePresets.graphqlPreset, + skuZ890Op2023DefaultWarehouse: + skuZ890Op2023DefaultWarehousePresets.graphqlPreset, + skuG123Qr2023UsWarehouse: skuG123Qr2023UsWarehousePresets.graphqlPreset, + skuX234Wx2023EuWarehouse: skuX234Wx2023EuWarehousePresets.graphqlPreset, + skuY567Yz2023UsWarehouse: skuY567Yz2023UsWarehousePresets.graphqlPreset, + skuAa123Qr2023DefaultWarehouse: + skuAa123Qr2023DefaultWarehousePresets.graphqlPreset, + skuZ890Op2019DefaultWarehouse: + skuZ890Op2019DefaultWarehousePresets.graphqlPreset, + skuZ890Op2023EuWarehouse: skuZ890Op2023EuWarehousePresets.graphqlPreset, + skuAa123Qr2015EuWarehouse: skuAa123Qr2015EuWarehousePresets.graphqlPreset, + skuBb456St2015UsWarehouse: skuBb456St2015UsWarehousePresets.graphqlPreset, + skuAa123Qr2015UsWarehouse: skuAa123Qr2015UsWarehousePresets.graphqlPreset, + skuFf890Op2019UsWarehouse: skuFf890Op2019UsWarehousePresets.graphqlPreset, + skuBb456St2015DefaultWarehouse: + skuBb456St2015DefaultWarehousePresets.graphqlPreset, + skuAa123Qr2019EuWarehouse: skuAa123Qr2019EuWarehousePresets.graphqlPreset, + skuGg123Qr2015UsWarehouse: skuGg123Qr2015UsWarehousePresets.graphqlPreset, + skuDd234Wx2023EuWarehouse: skuDd234Wx2023EuWarehousePresets.graphqlPreset, + skuIi789Uv2015EuWarehouse: skuIi789Uv2015EuWarehousePresets.graphqlPreset, + skuDd234Wx2015UsWarehouse: skuDd234Wx2015UsWarehousePresets.graphqlPreset, + skuHh456St2019EuWarehouse: skuHh456St2019EuWarehousePresets.graphqlPreset, + skuIi789Uv2015UsWarehouse: skuIi789Uv2015UsWarehousePresets.graphqlPreset, + skuCc789Uv2023EuWarehouse: skuCc789Uv2023EuWarehousePresets.graphqlPreset, + skuGg123Qr2019UsWarehouse: skuGg123Qr2019UsWarehousePresets.graphqlPreset, + skuGg123Qr2019DefaultWarehouse: + skuGg123Qr2019DefaultWarehousePresets.graphqlPreset, + skuDd234Wx2019UsWarehouse: skuDd234Wx2019UsWarehousePresets.graphqlPreset, + skuZ890Op2023UsWarehouse: skuZ890Op2023UsWarehousePresets.graphqlPreset, + skuHh456St2015DefaultWarehouse: + skuHh456St2015DefaultWarehousePresets.graphqlPreset, + skuGg123Qr2015EuWarehouse: skuGg123Qr2015EuWarehousePresets.graphqlPreset, + skuFf890Op2015DefaultWarehouse: + skuFf890Op2015DefaultWarehousePresets.graphqlPreset, + skuCc789Uv2023DefaultWarehouse: + skuCc789Uv2023DefaultWarehousePresets.graphqlPreset, + skuHh456St2015EuWarehouse: skuHh456St2015EuWarehousePresets.graphqlPreset, + skuHh456St2019UsWarehouse: skuHh456St2019UsWarehousePresets.graphqlPreset, + skuW789Uv2015EuWarehouse: skuW789Uv2015EuWarehousePresets.graphqlPreset, + skuFf890Op2023EuWarehouse: skuFf890Op2023EuWarehousePresets.graphqlPreset, + skuDd234Wx2023UsWarehouse: skuDd234Wx2023UsWarehousePresets.graphqlPreset, + skuEe567Yz2015DefaultWarehouse: + skuEe567Yz2015DefaultWarehousePresets.graphqlPreset, + skuHh456St2019DefaultWarehouse: + skuHh456St2019DefaultWarehousePresets.graphqlPreset, + skuBb456St2019DefaultWarehouse: + skuBb456St2019DefaultWarehousePresets.graphqlPreset, + skuAa123Qr2019DefaultWarehouse: + skuAa123Qr2019DefaultWarehousePresets.graphqlPreset, + skuGg123Qr2023EuWarehouse: skuGg123Qr2023EuWarehousePresets.graphqlPreset, + skuHh456St2023DefaultWarehouse: + skuHh456St2023DefaultWarehousePresets.graphqlPreset, + skuDd234Wx2015EuWarehouse: skuDd234Wx2015EuWarehousePresets.graphqlPreset, + skuFf890Op2023UsWarehouse: skuFf890Op2023UsWarehousePresets.graphqlPreset, + skuFf890Op2023DefaultWarehouse: + skuFf890Op2023DefaultWarehousePresets.graphqlPreset, + skuGg123Qr2019EuWarehouse: skuGg123Qr2019EuWarehousePresets.graphqlPreset, + skuJj234Wx2019EuWarehouse: skuJj234Wx2019EuWarehousePresets.graphqlPreset, + skuJj234Wx2015DefaultWarehouse: + skuJj234Wx2015DefaultWarehousePresets.graphqlPreset, + skuHh456St2023UsWarehouse: skuHh456St2023UsWarehousePresets.graphqlPreset, + skuGg123Qr2023UsWarehouse: skuGg123Qr2023UsWarehousePresets.graphqlPreset, + skuGg123Qr2015DefaultWarehouse: + skuGg123Qr2015DefaultWarehousePresets.graphqlPreset, + skuIi789Uv2023EuWarehouse: skuIi789Uv2023EuWarehousePresets.graphqlPreset, + skuNn456St2019UsWarehouse: skuNn456St2019UsWarehousePresets.graphqlPreset, + skuMm123Qr2015EuWarehouse: skuMm123Qr2015EuWarehousePresets.graphqlPreset, + skuKk567Yz2023EuWarehouse: skuKk567Yz2023EuWarehousePresets.graphqlPreset, + skuLl890Op2023UsWarehouse: skuLl890Op2023UsWarehousePresets.graphqlPreset, + skuKk567Yz2015DefaultWarehouse: + skuKk567Yz2015DefaultWarehousePresets.graphqlPreset, + skuPp234Wx2015EuWarehouse: skuPp234Wx2015EuWarehousePresets.graphqlPreset, + skuKk567Yz2023UsWarehouse: skuKk567Yz2023UsWarehousePresets.graphqlPreset, + skuKk567Yz2019DefaultWarehouse: + skuKk567Yz2019DefaultWarehousePresets.graphqlPreset, + skuKk567Yz2023DefaultWarehouse: + skuKk567Yz2023DefaultWarehousePresets.graphqlPreset, + skuLl890Op2023EuWarehouse: skuLl890Op2023EuWarehousePresets.graphqlPreset, + skuLl890Op2015EuWarehouse: skuLl890Op2015EuWarehousePresets.graphqlPreset, + skuJj234Wx2023EuWarehouse: skuJj234Wx2023EuWarehousePresets.graphqlPreset, + skuPp234Wx2015UsWarehouse: skuPp234Wx2015UsWarehousePresets.graphqlPreset, + skuMm123Qr2015UsWarehouse: skuMm123Qr2015UsWarehousePresets.graphqlPreset, + skuLl890Op2019EuWarehouse: skuLl890Op2019EuWarehousePresets.graphqlPreset, + skuLl890Op2019DefaultWarehouse: + skuLl890Op2019DefaultWarehousePresets.graphqlPreset, + skuPp234Wx2019EuWarehouse: skuPp234Wx2019EuWarehousePresets.graphqlPreset, + skuJj234Wx2023DefaultWarehouse: + skuJj234Wx2023DefaultWarehousePresets.graphqlPreset, + skuLl890Op2015UsWarehouse: skuLl890Op2015UsWarehousePresets.graphqlPreset, + skuDd234Wx2015DefaultWarehouse: + skuDd234Wx2015DefaultWarehousePresets.graphqlPreset, + skuNn456St2015UsWarehouse: skuNn456St2015UsWarehousePresets.graphqlPreset, + skuKk567Yz2019EuWarehouse: skuKk567Yz2019EuWarehousePresets.graphqlPreset, + skuKk567Yz2019UsWarehouse: skuKk567Yz2019UsWarehousePresets.graphqlPreset, + skuKk567Yz2015UsWarehouse: skuKk567Yz2015UsWarehousePresets.graphqlPreset, + skuLl890Op2023DefaultWarehouse: + skuLl890Op2023DefaultWarehousePresets.graphqlPreset, + skuNn456St2019DefaultWarehouse: + skuNn456St2019DefaultWarehousePresets.graphqlPreset, + skuLl890Op2019UsWarehouse: skuLl890Op2019UsWarehousePresets.graphqlPreset, + skuSs123QrBlueEuWarehouse: skuSs123QrBlueEuWarehousePresets.graphqlPreset, + skuBb456St2023EuWarehouse: skuBb456St2023EuWarehousePresets.graphqlPreset, + skuDd234Wx2019DefaultWarehouse: + skuDd234Wx2019DefaultWarehousePresets.graphqlPreset, + skuNn456St2015EuWarehouse: skuNn456St2015EuWarehousePresets.graphqlPreset, + skuSs123QrRedUsWarehouse: skuSs123QrRedUsWarehousePresets.graphqlPreset, + skuU123Qr2019EuWarehouse: skuU123Qr2019EuWarehousePresets.graphqlPreset, + skuHh456St2023EuWarehouse: skuHh456St2023EuWarehousePresets.graphqlPreset, + skuQq567Yz2019UsWarehouse: skuQq567Yz2019UsWarehousePresets.graphqlPreset, + skuQq567Yz2019DefaultWarehouse: + skuQq567Yz2019DefaultWarehousePresets.graphqlPreset, + skuSs123QrRedDefaultWarehouse: + skuSs123QrRedDefaultWarehousePresets.graphqlPreset, + skuW789Uv2015UsWarehouse: skuW789Uv2015UsWarehousePresets.graphqlPreset, + skuOo789Uv2015EuWarehouse: skuOo789Uv2015EuWarehousePresets.graphqlPreset, + skuTt456StGreenEuWarehouse: skuTt456StGreenEuWarehousePresets.graphqlPreset, + skuOo789Uv2019EuWarehouse: skuOo789Uv2019EuWarehousePresets.graphqlPreset, + skuQq567Yz2023EuWarehouse: skuQq567Yz2023EuWarehousePresets.graphqlPreset, + skuFf890Op2019EuWarehouse: skuFf890Op2019EuWarehousePresets.graphqlPreset, + skuAa123Qr2023EuWarehouse: skuAa123Qr2023EuWarehousePresets.graphqlPreset, + skuHh456St2015UsWarehouse: skuHh456St2015UsWarehousePresets.graphqlPreset, + skuVv234WxGreenEuWarehouse: skuVv234WxGreenEuWarehousePresets.graphqlPreset, + skuWw567YzGreenDefaultWarehouse: + skuWw567YzGreenDefaultWarehousePresets.graphqlPreset, + skuRr890Op2023EuWarehouse: skuRr890Op2023EuWarehousePresets.graphqlPreset, + skuQq567Yz2023DefaultWarehouse: + skuQq567Yz2023DefaultWarehousePresets.graphqlPreset, + skuRr890Op2023UsWarehouse: skuRr890Op2023UsWarehousePresets.graphqlPreset, + skuRr890Op2019EuWarehouse: skuRr890Op2019EuWarehousePresets.graphqlPreset, + skuRr890Op2015UsWarehouse: skuRr890Op2015UsWarehousePresets.graphqlPreset, + skuQq567Yz2023UsWarehouse: skuQq567Yz2023UsWarehousePresets.graphqlPreset, + skuRr890Op2023DefaultWarehouse: + skuRr890Op2023DefaultWarehousePresets.graphqlPreset, + skuRr890Op2015DefaultWarehouse: + skuRr890Op2015DefaultWarehousePresets.graphqlPreset, + skuUu789UvRedDefaultWarehouse: + skuUu789UvRedDefaultWarehousePresets.graphqlPreset, + skuRr890Op2019UsWarehouse: skuRr890Op2019UsWarehousePresets.graphqlPreset, + skuRr890Op2015EuWarehouse: skuRr890Op2015EuWarehousePresets.graphqlPreset, + skuXx890OpGreenEuWarehouse: skuXx890OpGreenEuWarehousePresets.graphqlPreset, + skuD234Wx2015EuWarehouse: skuD234Wx2015EuWarehousePresets.graphqlPreset, + skuXx890OpBlueDefaultWarehouse: + skuXx890OpBlueDefaultWarehousePresets.graphqlPreset, + skuVv234WxBlueUsWarehouse: skuVv234WxBlueUsWarehousePresets.graphqlPreset, + skuXx890OpBlueUsWarehouse: skuXx890OpBlueUsWarehousePresets.graphqlPreset, + skuUu789UvRedUsWarehouse: skuUu789UvRedUsWarehousePresets.graphqlPreset, + skuUu789UvRedEuWarehouse: skuUu789UvRedEuWarehousePresets.graphqlPreset, + skuWw567YzRedUsWarehouse: skuWw567YzRedUsWarehousePresets.graphqlPreset, + skuTt456StGreenDefaultWarehouse: + skuTt456StGreenDefaultWarehousePresets.graphqlPreset, + skuVv234WxRedUsWarehouse: skuVv234WxRedUsWarehousePresets.graphqlPreset, + skuVv234WxRedDefaultWarehouse: + skuVv234WxRedDefaultWarehousePresets.graphqlPreset, + skuWw567YzRedDefaultWarehouse: + skuWw567YzRedDefaultWarehousePresets.graphqlPreset, + skuYy123QrRedUsWarehouse: skuYy123QrRedUsWarehousePresets.graphqlPreset, + skuTt456StBlueEuWarehouse: skuTt456StBlueEuWarehousePresets.graphqlPreset, + skuWw567YzRedEuWarehouse: skuWw567YzRedEuWarehousePresets.graphqlPreset, + skuVv234WxRedEuWarehouse: skuVv234WxRedEuWarehousePresets.graphqlPreset, + skuTt456StRedDefaultWarehouse: + skuTt456StRedDefaultWarehousePresets.graphqlPreset, + skuVv234WxBlueDefaultWarehouse: + skuVv234WxBlueDefaultWarehousePresets.graphqlPreset, + skuLl890Op2015DefaultWarehouse: + skuLl890Op2015DefaultWarehousePresets.graphqlPreset, + skuWw567YzBlueUsWarehouse: skuWw567YzBlueUsWarehousePresets.graphqlPreset, + skuTt456StBlueUsWarehouse: skuTt456StBlueUsWarehousePresets.graphqlPreset, + skuTt456StRedEuWarehouse: skuTt456StRedEuWarehousePresets.graphqlPreset, + skuNn456St2015DefaultWarehouse: + skuNn456St2015DefaultWarehousePresets.graphqlPreset, + skuWw567YzGreenEuWarehouse: skuWw567YzGreenEuWarehousePresets.graphqlPreset, + skuVv234WxBlueEuWarehouse: skuVv234WxBlueEuWarehousePresets.graphqlPreset, + skuBbb234WxGreenUsWarehouse: skuBbb234WxGreenUsWarehousePresets.graphqlPreset, + skuBbb234WxBlueDefaultWarehouse: + skuBbb234WxBlueDefaultWarehousePresets.graphqlPreset, + skuBbb234WxBlueUsWarehouse: skuBbb234WxBlueUsWarehousePresets.graphqlPreset, + skuBbb234WxGreenEuWarehouse: skuBbb234WxGreenEuWarehousePresets.graphqlPreset, + skuFff456StGreenUsWarehouse: skuFff456StGreenUsWarehousePresets.graphqlPreset, + skuZz456StGreenEuWarehouse: skuZz456StGreenEuWarehousePresets.graphqlPreset, + skuBbb234WxBlueEuWarehouse: skuBbb234WxBlueEuWarehousePresets.graphqlPreset, + skuZz456StGreenUsWarehouse: skuZz456StGreenUsWarehousePresets.graphqlPreset, + skuAaa789UvGreenUsWarehouse: skuAaa789UvGreenUsWarehousePresets.graphqlPreset, + skuAaa789UvBlueUsWarehouse: skuAaa789UvBlueUsWarehousePresets.graphqlPreset, + skuFff456StGreenEuWarehouse: skuFff456StGreenEuWarehousePresets.graphqlPreset, + skuAaa789UvGreenEuWarehouse: skuAaa789UvGreenEuWarehousePresets.graphqlPreset, + skuHydraulicHoseUsWarehouse: skuHydraulicHoseUsWarehousePresets.graphqlPreset, + skuTaperedRollerBearingUsWarehouse: + skuTaperedRollerBearingUsWarehousePresets.graphqlPreset, + skuHhh234WxGreenEuWarehouse: skuHhh234WxGreenEuWarehousePresets.graphqlPreset, + skuFff456StBlueDefaultWarehouse: + skuFff456StBlueDefaultWarehousePresets.graphqlPreset, + skuIii567YzBlueEuWarehouse: skuIii567YzBlueEuWarehousePresets.graphqlPreset, + skuGgg789UvRedUsWarehouse: skuGgg789UvRedUsWarehousePresets.graphqlPreset, + skuFff456StBlueUsWarehouse: skuFff456StBlueUsWarehousePresets.graphqlPreset, + skuEee123QrRedDefaultWarehouse: + skuEee123QrRedDefaultWarehousePresets.graphqlPreset, + skuDdd890OpGreenEuWarehouse: skuDdd890OpGreenEuWarehousePresets.graphqlPreset, + skuPinAndBushingKitEuWarehouse: + skuPinAndBushingKitEuWarehousePresets.graphqlPreset, + skuAaa789UvRedEuWarehouse: skuAaa789UvRedEuWarehousePresets.graphqlPreset, + skuIii567YzRedDefaultWarehouse: + skuIii567YzRedDefaultWarehousePresets.graphqlPreset, + skuEee123QrBlueDefaultWarehouse: + skuEee123QrBlueDefaultWarehousePresets.graphqlPreset, + skuEee123QrRedUsWarehouse: skuEee123QrRedUsWarehousePresets.graphqlPreset, + skuEee123QrGreenEuWarehouse: skuEee123QrGreenEuWarehousePresets.graphqlPreset, + skuJjj890OpBlueEuWarehouse: skuJjj890OpBlueEuWarehousePresets.graphqlPreset, + skuZz456StBlueDefaultWarehouse: + skuZz456StBlueDefaultWarehousePresets.graphqlPreset, + skuTaperedRollerBearingEuWarehouse: + skuTaperedRollerBearingEuWarehousePresets.graphqlPreset, + skuJjj890OpGreenDefaultWarehouse: + skuJjj890OpGreenDefaultWarehousePresets.graphqlPreset, + skuDdd890OpGreenUsWarehouse: skuDdd890OpGreenUsWarehousePresets.graphqlPreset, + skuEee123QrBlueEuWarehouse: skuEee123QrBlueEuWarehousePresets.graphqlPreset, + skuDdd890OpGreenDefaultWarehouse: + skuDdd890OpGreenDefaultWarehousePresets.graphqlPreset, + skuIii567YzBlueDefaultWarehouse: + skuIii567YzBlueDefaultWarehousePresets.graphqlPreset, + skuGgg789UvRedEuWarehouse: skuGgg789UvRedEuWarehousePresets.graphqlPreset, + skuFff456StRedDefaultWarehouse: + skuFff456StRedDefaultWarehousePresets.graphqlPreset, + skuAlternatorUsWarehouse: skuAlternatorUsWarehousePresets.graphqlPreset, + skuLedWorkLightEuWarehouse: skuLedWorkLightEuWarehousePresets.graphqlPreset, + skuZz456StGreenDefaultWarehouse: + skuZz456StGreenDefaultWarehousePresets.graphqlPreset, + skuLedWorkLightDefaultWarehouse: + skuLedWorkLightDefaultWarehousePresets.graphqlPreset, + skuDdd890OpRedUsWarehouse: skuDdd890OpRedUsWarehousePresets.graphqlPreset, + skuIii567YzBlueUsWarehouse: skuIii567YzBlueUsWarehousePresets.graphqlPreset, + skuFff456StRedEuWarehouse: skuFff456StRedEuWarehousePresets.graphqlPreset, + skuPinAndBushingKitUsWarehouse: + skuPinAndBushingKitUsWarehousePresets.graphqlPreset, + skuFuelFilterDefaultWarehouse: + skuFuelFilterDefaultWarehousePresets.graphqlPreset, + skuEee123QrRedEuWarehouse: skuEee123QrRedEuWarehousePresets.graphqlPreset, + skuTaperedRollerBearingDefaultWarehouse: + skuTaperedRollerBearingDefaultWarehousePresets.graphqlPreset, + skuGgg789UvRedDefaultWarehouse: + skuGgg789UvRedDefaultWarehousePresets.graphqlPreset, + skuPinAndBushingKitDefaultWarehouse: + skuPinAndBushingKitDefaultWarehousePresets.graphqlPreset, + skuDdd890OpRedEuWarehouse: skuDdd890OpRedEuWarehousePresets.graphqlPreset, + skuLedWorkLightUsWarehouse: skuLedWorkLightUsWarehousePresets.graphqlPreset, + skuMm123Qr2023UsWarehouse: skuMm123Qr2023UsWarehousePresets.graphqlPreset, + skuVv234WxGreenDefaultWarehouse: + skuVv234WxGreenDefaultWarehousePresets.graphqlPreset, + skuYy123QrBlueDefaultWarehouse: + skuYy123QrBlueDefaultWarehousePresets.graphqlPreset, + skuOo789Uv2023UsWarehouse: skuOo789Uv2023UsWarehousePresets.graphqlPreset, + skuOo789Uv2019DefaultWarehouse: + skuOo789Uv2019DefaultWarehousePresets.graphqlPreset, + skuPp234Wx2023EuWarehouse: skuPp234Wx2023EuWarehousePresets.graphqlPreset, + skuD234Wx2023DefaultWarehouse: + skuD234Wx2023DefaultWarehousePresets.graphqlPreset, + skuUu789UvBlueEuWarehouse: skuUu789UvBlueEuWarehousePresets.graphqlPreset, + skuIii567YzRedEuWarehouse: skuIii567YzRedEuWarehousePresets.graphqlPreset, + skuMm123Qr2019DefaultWarehouse: + skuMm123Qr2019DefaultWarehousePresets.graphqlPreset, + skuZz456StBlueUsWarehouse: skuZz456StBlueUsWarehousePresets.graphqlPreset, + skuJj234Wx2023UsWarehouse: skuJj234Wx2023UsWarehousePresets.graphqlPreset, + skuQq567Yz2015EuWarehouse: skuQq567Yz2015EuWarehousePresets.graphqlPreset, + skuBrakePadSetUsWarehouse: skuBrakePadSetUsWarehousePresets.graphqlPreset, + skuGgg789UvBlueEuWarehouse: skuGgg789UvBlueEuWarehousePresets.graphqlPreset, + skuGgg789UvGreenDefaultWarehouse: + skuGgg789UvGreenDefaultWarehousePresets.graphqlPreset, + skuStarterMotorDefaultWarehouse: + skuStarterMotorDefaultWarehousePresets.graphqlPreset, + skuZz456StRedUsWarehouse: skuZz456StRedUsWarehousePresets.graphqlPreset, + skuE567Yz2015EuWarehouse: skuE567Yz2015EuWarehousePresets.graphqlPreset, + skuQq567Yz2015UsWarehouse: skuQq567Yz2015UsWarehousePresets.graphqlPreset, + skuRr890Op2019DefaultWarehouse: + skuRr890Op2019DefaultWarehousePresets.graphqlPreset, + skuJjj890OpBlueUsWarehouse: skuJjj890OpBlueUsWarehousePresets.graphqlPreset, + skuBbb234WxRedEuWarehouse: skuBbb234WxRedEuWarehousePresets.graphqlPreset, + skuDdd890OpBlueEuWarehouse: skuDdd890OpBlueEuWarehousePresets.graphqlPreset, + skuYy123QrRedEuWarehouse: skuYy123QrRedEuWarehousePresets.graphqlPreset, + skuSs123QrGreenDefaultWarehouse: + skuSs123QrGreenDefaultWarehousePresets.graphqlPreset, + skuOilFilterDefaultWarehouse: + skuOilFilterDefaultWarehousePresets.graphqlPreset, + skuSs123QrBlueUsWarehouse: skuSs123QrBlueUsWarehousePresets.graphqlPreset, + skuAaa789UvRedDefaultWarehouse: + skuAaa789UvRedDefaultWarehousePresets.graphqlPreset, + skuPp234Wx2019UsWarehouse: skuPp234Wx2019UsWarehousePresets.graphqlPreset, + skuMm123Qr2023DefaultWarehouse: + skuMm123Qr2023DefaultWarehousePresets.graphqlPreset, + skuJjj890OpGreenUsWarehouse: skuJjj890OpGreenUsWarehousePresets.graphqlPreset, + skuMm123Qr2019UsWarehouse: skuMm123Qr2019UsWarehousePresets.graphqlPreset, + skuXx890OpGreenDefaultWarehouse: + skuXx890OpGreenDefaultWarehousePresets.graphqlPreset, + skuEee123QrBlueUsWarehouse: skuEee123QrBlueUsWarehousePresets.graphqlPreset, + skuNn456St2023DefaultWarehouse: + skuNn456St2023DefaultWarehousePresets.graphqlPreset, + skuZz456StBlueEuWarehouse: skuZz456StBlueEuWarehousePresets.graphqlPreset, + skuMm123Qr2023EuWarehouse: skuMm123Qr2023EuWarehousePresets.graphqlPreset, + skuAaa789UvBlueDefaultWarehouse: + skuAaa789UvBlueDefaultWarehousePresets.graphqlPreset, + skuWw567YzBlueEuWarehouse: skuWw567YzBlueEuWarehousePresets.graphqlPreset, + skuIii567YzGreenUsWarehouse: skuIii567YzGreenUsWarehousePresets.graphqlPreset, + skuUu789UvBlueDefaultWarehouse: + skuUu789UvBlueDefaultWarehousePresets.graphqlPreset, + skuYy123QrGreenEuWarehouse: skuYy123QrGreenEuWarehousePresets.graphqlPreset, + skuSs123QrGreenEuWarehouse: skuSs123QrGreenEuWarehousePresets.graphqlPreset, + skuDdd890OpBlueUsWarehouse: skuDdd890OpBlueUsWarehousePresets.graphqlPreset, + skuXx890OpRedUsWarehouse: skuXx890OpRedUsWarehousePresets.graphqlPreset, + skuGgg789UvBlueDefaultWarehouse: + skuGgg789UvBlueDefaultWarehousePresets.graphqlPreset, + skuZz456StRedEuWarehouse: skuZz456StRedEuWarehousePresets.graphqlPreset, + skuJjj890OpRedEuWarehouse: skuJjj890OpRedEuWarehousePresets.graphqlPreset, + skuGgg789UvGreenUsWarehouse: skuGgg789UvGreenUsWarehousePresets.graphqlPreset, + skuTt456StBlueDefaultWarehouse: + skuTt456StBlueDefaultWarehousePresets.graphqlPreset, + skuTt456StRedUsWarehouse: skuTt456StRedUsWarehousePresets.graphqlPreset, + skuOo789Uv2023DefaultWarehouse: + skuOo789Uv2023DefaultWarehousePresets.graphqlPreset, + skuOo789Uv2015DefaultWarehouse: + skuOo789Uv2015DefaultWarehousePresets.graphqlPreset, + skuAirFilterEuWarehouse: skuAirFilterEuWarehousePresets.graphqlPreset, + skuTt456StGreenUsWarehouse: skuTt456StGreenUsWarehousePresets.graphqlPreset, + skuIii567YzGreenEuWarehouse: skuIii567YzGreenEuWarehousePresets.graphqlPreset, + skuOo789Uv2019UsWarehouse: skuOo789Uv2019UsWarehousePresets.graphqlPreset, + skuUu789UvGreenEuWarehouse: skuUu789UvGreenEuWarehousePresets.graphqlPreset, + skuAaa789UvGreenDefaultWarehouse: + skuAaa789UvGreenDefaultWarehousePresets.graphqlPreset, + skuXx890OpRedEuWarehouse: skuXx890OpRedEuWarehousePresets.graphqlPreset, + skuXx890OpGreenUsWarehouse: skuXx890OpGreenUsWarehousePresets.graphqlPreset, + skuYy123QrGreenUsWarehouse: skuYy123QrGreenUsWarehousePresets.graphqlPreset, + skuCcc567YzBlueDefaultWarehouse: + skuCcc567YzBlueDefaultWarehousePresets.graphqlPreset, + skuOilFilterEuWarehouse: skuOilFilterEuWarehousePresets.graphqlPreset, + skuCcc567YzRedDefaultWarehouse: + skuCcc567YzRedDefaultWarehousePresets.graphqlPreset, + skuCcc567YzRedUsWarehouse: skuCcc567YzRedUsWarehousePresets.graphqlPreset, + skuYy123QrRedDefaultWarehouse: + skuYy123QrRedDefaultWarehousePresets.graphqlPreset, + skuVv234WxGreenUsWarehouse: skuVv234WxGreenUsWarehousePresets.graphqlPreset, + skuX234Wx2019EuWarehouse: skuX234Wx2019EuWarehousePresets.graphqlPreset, + skuU123Qr2019UsWarehouse: skuU123Qr2019UsWarehousePresets.graphqlPreset, + skuJ234Wx2015EuWarehouse: skuJ234Wx2015EuWarehousePresets.graphqlPreset, + skuE567Yz2023UsWarehouse: skuE567Yz2023UsWarehousePresets.graphqlPreset, + skuL890Op2015UsWarehouse: skuL890Op2015UsWarehousePresets.graphqlPreset, + skuL890Op2019UsWarehouse: skuL890Op2019UsWarehousePresets.graphqlPreset, + skuE567Yz2019DefaultWarehouse: + skuE567Yz2019DefaultWarehousePresets.graphqlPreset, + skuG123Qr2023EuWarehouse: skuG123Qr2023EuWarehousePresets.graphqlPreset, + skuI789Uv2023DefaultWarehouse: + skuI789Uv2023DefaultWarehousePresets.graphqlPreset, + skuE567Yz2019UsWarehouse: skuE567Yz2019UsWarehousePresets.graphqlPreset, + skuL890Op2023UsWarehouse: skuL890Op2023UsWarehousePresets.graphqlPreset, + skuI789Uv2019EuWarehouse: skuI789Uv2019EuWarehousePresets.graphqlPreset, + skuI789Uv2019UsWarehouse: skuI789Uv2019UsWarehousePresets.graphqlPreset, + skuU123Qr2015UsWarehouse: skuU123Qr2015UsWarehousePresets.graphqlPreset, + skuK567Yz2023DefaultWarehouse: + skuK567Yz2023DefaultWarehousePresets.graphqlPreset, + skuH456St2019DefaultWarehouse: + skuH456St2019DefaultWarehousePresets.graphqlPreset, + skuG123Qr2015UsWarehouse: skuG123Qr2015UsWarehousePresets.graphqlPreset, + skuJ234Wx2023UsWarehouse: skuJ234Wx2023UsWarehousePresets.graphqlPreset, + skuE567Yz2019EuWarehouse: skuE567Yz2019EuWarehousePresets.graphqlPreset, + skuJ234Wx2015UsWarehouse: skuJ234Wx2015UsWarehousePresets.graphqlPreset, + skuI789Uv2023EuWarehouse: skuI789Uv2023EuWarehousePresets.graphqlPreset, + skuD234Wx2019UsWarehouse: skuD234Wx2019UsWarehousePresets.graphqlPreset, + skuF890Op2015DefaultWarehouse: + skuF890Op2015DefaultWarehousePresets.graphqlPreset, + skuD234Wx2015DefaultWarehouse: + skuD234Wx2015DefaultWarehousePresets.graphqlPreset, + skuK567Yz2015EuWarehouse: skuK567Yz2015EuWarehousePresets.graphqlPreset, + skuU123Qr2015DefaultWarehouse: + skuU123Qr2015DefaultWarehousePresets.graphqlPreset, + skuF890Op2023EuWarehouse: skuF890Op2023EuWarehousePresets.graphqlPreset, + skuH456St2015DefaultWarehouse: + skuH456St2015DefaultWarehousePresets.graphqlPreset, + skuJ234Wx2019EuWarehouse: skuJ234Wx2019EuWarehousePresets.graphqlPreset, + skuK567Yz2019EuWarehouse: skuK567Yz2019EuWarehousePresets.graphqlPreset, + skuK567Yz2023UsWarehouse: skuK567Yz2023UsWarehousePresets.graphqlPreset, +}; + +export const compatPresets = { + skuA789Bc2019UsWarehouse: skuA789Bc2019UsWarehousePresets.compatPreset, + skuX456Yz2023EuWarehouse: skuX456Yz2023EuWarehousePresets.compatPreset, + skuX456Yz2023DefaultWarehouse: + skuX456Yz2023DefaultWarehousePresets.compatPreset, + skuR123Ts2015UsWarehouse: skuR123Ts2015UsWarehousePresets.compatPreset, + skuM890Op2019EuWarehouse: skuM890Op2019EuWarehousePresets.compatPreset, + skuM890Op2015UsWarehouse: skuM890Op2015UsWarehousePresets.compatPreset, + skuS567Uv2019DefaultWarehouse: + skuS567Uv2019DefaultWarehousePresets.compatPreset, + skuR123Ts2019UsWarehouse: skuR123Ts2019UsWarehousePresets.compatPreset, + skuR123Ts2023DefaultWarehouse: + skuR123Ts2023DefaultWarehousePresets.compatPreset, + skuM890Op2023EuWarehouse: skuM890Op2023EuWarehousePresets.compatPreset, + skuP234Qw2019DefaultWarehouse: + skuP234Qw2019DefaultWarehousePresets.compatPreset, + skuA789Bc2019DefaultWarehouse: + skuA789Bc2019DefaultWarehousePresets.compatPreset, + skuA789Bc2015DefaultWarehouse: + skuA789Bc2015DefaultWarehousePresets.compatPreset, + skuP234Qw2023UsWarehouse: skuP234Qw2023UsWarehousePresets.compatPreset, + skuX456Yz2019DefaultWarehouse: + skuX456Yz2019DefaultWarehousePresets.compatPreset, + skuP234Qw2019EuWarehouse: skuP234Qw2019EuWarehousePresets.compatPreset, + skuA789Bc2023UsWarehouse: skuA789Bc2023UsWarehousePresets.compatPreset, + skuS567Uv2023DefaultWarehouse: + skuS567Uv2023DefaultWarehousePresets.compatPreset, + skuR123Ts2019EuWarehouse: skuR123Ts2019EuWarehousePresets.compatPreset, + skuR123Ts2023UsWarehouse: skuR123Ts2023UsWarehousePresets.compatPreset, + skuP234Qw2015DefaultWarehouse: + skuP234Qw2015DefaultWarehousePresets.compatPreset, + skuN123Qr2015UsWarehouse: skuN123Qr2015UsWarehousePresets.compatPreset, + skuA789Bc2023EuWarehouse: skuA789Bc2023EuWarehousePresets.compatPreset, + skuA789Bc2023DefaultWarehouse: + skuA789Bc2023DefaultWarehousePresets.compatPreset, + skuR123Ts2015EuWarehouse: skuR123Ts2015EuWarehousePresets.compatPreset, + skuN123Qr2019DefaultWarehouse: + skuN123Qr2019DefaultWarehousePresets.compatPreset, + skuR123Ts2019DefaultWarehouse: + skuR123Ts2019DefaultWarehousePresets.compatPreset, + skuM890Op2019UsWarehouse: skuM890Op2019UsWarehousePresets.compatPreset, + skuS567Uv2023EuWarehouse: skuS567Uv2023EuWarehousePresets.compatPreset, + skuN123Qr2015EuWarehouse: skuN123Qr2015EuWarehousePresets.compatPreset, + skuP234Qw2019UsWarehouse: skuP234Qw2019UsWarehousePresets.compatPreset, + skuA789Bc2019EuWarehouse: skuA789Bc2019EuWarehousePresets.compatPreset, + skuS567Uv2019EuWarehouse: skuS567Uv2019EuWarehousePresets.compatPreset, + skuA789Bc2015UsWarehouse: skuA789Bc2015UsWarehousePresets.compatPreset, + skuS567Uv2019UsWarehouse: skuS567Uv2019UsWarehousePresets.compatPreset, + skuN123Qr2015DefaultWarehouse: + skuN123Qr2015DefaultWarehousePresets.compatPreset, + skuX456Yz2015EuWarehouse: skuX456Yz2015EuWarehousePresets.compatPreset, + skuX456Yz2019UsWarehouse: skuX456Yz2019UsWarehousePresets.compatPreset, + skuA789Bc2015EuWarehouse: skuA789Bc2015EuWarehousePresets.compatPreset, + skuX456Yz2019EuWarehouse: skuX456Yz2019EuWarehousePresets.compatPreset, + skuX456Yz2015UsWarehouse: skuX456Yz2015UsWarehousePresets.compatPreset, + skuM890Op2023DefaultWarehouse: + skuM890Op2023DefaultWarehousePresets.compatPreset, + skuS567Uv2015UsWarehouse: skuS567Uv2015UsWarehousePresets.compatPreset, + skuS567Uv2023UsWarehouse: skuS567Uv2023UsWarehousePresets.compatPreset, + skuM890Op2019DefaultWarehouse: + skuM890Op2019DefaultWarehousePresets.compatPreset, + skuP234Qw2023DefaultWarehouse: + skuP234Qw2023DefaultWarehousePresets.compatPreset, + skuN123Qr2019UsWarehouse: skuN123Qr2019UsWarehousePresets.compatPreset, + skuR123Ts2015DefaultWarehouse: + skuR123Ts2015DefaultWarehousePresets.compatPreset, + skuX456Yz2015DefaultWarehouse: + skuX456Yz2015DefaultWarehousePresets.compatPreset, + skuM890Op2015EuWarehouse: skuM890Op2015EuWarehousePresets.compatPreset, + skuP234Qw2015EuWarehouse: skuP234Qw2015EuWarehousePresets.compatPreset, + skuP234Qw2015UsWarehouse: skuP234Qw2015UsWarehousePresets.compatPreset, + skuN123Qr2019EuWarehouse: skuN123Qr2019EuWarehousePresets.compatPreset, + skuM890Op2015DefaultWarehouse: + skuM890Op2015DefaultWarehousePresets.compatPreset, + skuX456Yz2023UsWarehouse: skuX456Yz2023UsWarehousePresets.compatPreset, + skuR123Ts2023EuWarehouse: skuR123Ts2023EuWarehousePresets.compatPreset, + skuS567Uv2015EuWarehouse: skuS567Uv2015EuWarehousePresets.compatPreset, + skuP234Qw2023EuWarehouse: skuP234Qw2023EuWarehousePresets.compatPreset, + skuS567Uv2015DefaultWarehouse: + skuS567Uv2015DefaultWarehousePresets.compatPreset, + skuM890Op2023UsWarehouse: skuM890Op2023UsWarehousePresets.compatPreset, + skuB456St2023UsWarehouse: skuB456St2023UsWarehousePresets.compatPreset, + skuB456St2019DefaultWarehouse: + skuB456St2019DefaultWarehousePresets.compatPreset, + skuB456St2015DefaultWarehouse: + skuB456St2015DefaultWarehousePresets.compatPreset, + skuD234Wx2023UsWarehouse: skuD234Wx2023UsWarehousePresets.compatPreset, + skuC789Uv2015EuWarehouse: skuC789Uv2015EuWarehousePresets.compatPreset, + skuN123Qr2023UsWarehouse: skuN123Qr2023UsWarehousePresets.compatPreset, + skuC789Uv2023EuWarehouse: skuC789Uv2023EuWarehousePresets.compatPreset, + skuC789Uv2019EuWarehouse: skuC789Uv2019EuWarehousePresets.compatPreset, + skuH456St2023UsWarehouse: skuH456St2023UsWarehousePresets.compatPreset, + skuV456St2019UsWarehouse: skuV456St2019UsWarehousePresets.compatPreset, + skuJ234Wx2019UsWarehouse: skuJ234Wx2019UsWarehousePresets.compatPreset, + skuK567Yz2019DefaultWarehouse: + skuK567Yz2019DefaultWarehousePresets.compatPreset, + skuE567Yz2015DefaultWarehouse: + skuE567Yz2015DefaultWarehousePresets.compatPreset, + skuV456St2023EuWarehouse: skuV456St2023EuWarehousePresets.compatPreset, + skuG123Qr2023DefaultWarehouse: + skuG123Qr2023DefaultWarehousePresets.compatPreset, + skuF890Op2019EuWarehouse: skuF890Op2019EuWarehousePresets.compatPreset, + skuU123Qr2023UsWarehouse: skuU123Qr2023UsWarehousePresets.compatPreset, + skuJ234Wx2023EuWarehouse: skuJ234Wx2023EuWarehousePresets.compatPreset, + skuL890Op2019EuWarehouse: skuL890Op2019EuWarehousePresets.compatPreset, + skuH456St2023DefaultWarehouse: + skuH456St2023DefaultWarehousePresets.compatPreset, + skuG123Qr2015DefaultWarehouse: + skuG123Qr2015DefaultWarehousePresets.compatPreset, + skuK567Yz2015UsWarehouse: skuK567Yz2015UsWarehousePresets.compatPreset, + skuC789Uv2015UsWarehouse: skuC789Uv2015UsWarehousePresets.compatPreset, + skuL890Op2015DefaultWarehouse: + skuL890Op2015DefaultWarehousePresets.compatPreset, + skuZ890Op2019EuWarehouse: skuZ890Op2019EuWarehousePresets.compatPreset, + skuX234Wx2023DefaultWarehouse: + skuX234Wx2023DefaultWarehousePresets.compatPreset, + skuX234Wx2015UsWarehouse: skuX234Wx2015UsWarehousePresets.compatPreset, + skuCc789Uv2015DefaultWarehouse: + skuCc789Uv2015DefaultWarehousePresets.compatPreset, + skuW789Uv2023UsWarehouse: skuW789Uv2023UsWarehousePresets.compatPreset, + skuV456St2023UsWarehouse: skuV456St2023UsWarehousePresets.compatPreset, + skuW789Uv2019UsWarehouse: skuW789Uv2019UsWarehousePresets.compatPreset, + skuV456St2019DefaultWarehouse: + skuV456St2019DefaultWarehousePresets.compatPreset, + skuX234Wx2019DefaultWarehouse: + skuX234Wx2019DefaultWarehousePresets.compatPreset, + skuEe567Yz2015UsWarehouse: skuEe567Yz2015UsWarehousePresets.compatPreset, + skuX234Wx2019UsWarehouse: skuX234Wx2019UsWarehousePresets.compatPreset, + skuEe567Yz2015EuWarehouse: skuEe567Yz2015EuWarehousePresets.compatPreset, + skuJ234Wx2019DefaultWarehouse: + skuJ234Wx2019DefaultWarehousePresets.compatPreset, + skuDd234Wx2019EuWarehouse: skuDd234Wx2019EuWarehousePresets.compatPreset, + skuW789Uv2023DefaultWarehouse: + skuW789Uv2023DefaultWarehousePresets.compatPreset, + skuBb456St2023DefaultWarehouse: + skuBb456St2023DefaultWarehousePresets.compatPreset, + skuY567Yz2019UsWarehouse: skuY567Yz2019UsWarehousePresets.compatPreset, + skuBb456St2023UsWarehouse: skuBb456St2023UsWarehousePresets.compatPreset, + skuEe567Yz2019UsWarehouse: skuEe567Yz2019UsWarehousePresets.compatPreset, + skuCc789Uv2015UsWarehouse: skuCc789Uv2015UsWarehousePresets.compatPreset, + skuEe567Yz2023DefaultWarehouse: + skuEe567Yz2023DefaultWarehousePresets.compatPreset, + skuFf890Op2015UsWarehouse: skuFf890Op2015UsWarehousePresets.compatPreset, + skuW789Uv2023EuWarehouse: skuW789Uv2023EuWarehousePresets.compatPreset, + skuEe567Yz2023EuWarehouse: skuEe567Yz2023EuWarehousePresets.compatPreset, + skuV456St2015EuWarehouse: skuV456St2015EuWarehousePresets.compatPreset, + skuCc789Uv2015EuWarehouse: skuCc789Uv2015EuWarehousePresets.compatPreset, + skuCc789Uv2019EuWarehouse: skuCc789Uv2019EuWarehousePresets.compatPreset, + skuY567Yz2015EuWarehouse: skuY567Yz2015EuWarehousePresets.compatPreset, + skuIi789Uv2019UsWarehouse: skuIi789Uv2019UsWarehousePresets.compatPreset, + skuCc789Uv2023UsWarehouse: skuCc789Uv2023UsWarehousePresets.compatPreset, + skuJj234Wx2019UsWarehouse: skuJj234Wx2019UsWarehousePresets.compatPreset, + skuEe567Yz2019EuWarehouse: skuEe567Yz2019EuWarehousePresets.compatPreset, + skuNn456St2019EuWarehouse: skuNn456St2019EuWarehousePresets.compatPreset, + skuX234Wx2015EuWarehouse: skuX234Wx2015EuWarehousePresets.compatPreset, + skuFf890Op2019DefaultWarehouse: + skuFf890Op2019DefaultWarehousePresets.compatPreset, + skuCc789Uv2019DefaultWarehouse: + skuCc789Uv2019DefaultWarehousePresets.compatPreset, + skuH456St2023EuWarehouse: skuH456St2023EuWarehousePresets.compatPreset, + skuGg123Qr2023DefaultWarehouse: + skuGg123Qr2023DefaultWarehousePresets.compatPreset, + skuU123Qr2023EuWarehouse: skuU123Qr2023EuWarehousePresets.compatPreset, + skuKk567Yz2015EuWarehouse: skuKk567Yz2015EuWarehousePresets.compatPreset, + skuEe567Yz2023UsWarehouse: skuEe567Yz2023UsWarehousePresets.compatPreset, + skuEe567Yz2019DefaultWarehouse: + skuEe567Yz2019DefaultWarehousePresets.compatPreset, + skuIi789Uv2019DefaultWarehouse: + skuIi789Uv2019DefaultWarehousePresets.compatPreset, + skuMm123Qr2019EuWarehouse: skuMm123Qr2019EuWarehousePresets.compatPreset, + skuJj234Wx2015EuWarehouse: skuJj234Wx2015EuWarehousePresets.compatPreset, + skuOo789Uv2015UsWarehouse: skuOo789Uv2015UsWarehousePresets.compatPreset, + skuIi789Uv2023UsWarehouse: skuIi789Uv2023UsWarehousePresets.compatPreset, + skuIi789Uv2019EuWarehouse: skuIi789Uv2019EuWarehousePresets.compatPreset, + skuY567Yz2023EuWarehouse: skuY567Yz2023EuWarehousePresets.compatPreset, + skuUu789UvBlueUsWarehouse: skuUu789UvBlueUsWarehousePresets.compatPreset, + skuPp234Wx2023UsWarehouse: skuPp234Wx2023UsWarehousePresets.compatPreset, + skuIi789Uv2015DefaultWarehouse: + skuIi789Uv2015DefaultWarehousePresets.compatPreset, + skuQq567Yz2019EuWarehouse: skuQq567Yz2019EuWarehousePresets.compatPreset, + skuUu789UvGreenDefaultWarehouse: + skuUu789UvGreenDefaultWarehousePresets.compatPreset, + skuQq567Yz2015DefaultWarehouse: + skuQq567Yz2015DefaultWarehousePresets.compatPreset, + skuSs123QrBlueDefaultWarehouse: + skuSs123QrBlueDefaultWarehousePresets.compatPreset, + skuJj234Wx2019DefaultWarehouse: + skuJj234Wx2019DefaultWarehousePresets.compatPreset, + skuOo789Uv2023EuWarehouse: skuOo789Uv2023EuWarehousePresets.compatPreset, + skuSs123QrGreenUsWarehouse: skuSs123QrGreenUsWarehousePresets.compatPreset, + skuDdd890OpRedDefaultWarehouse: + skuDdd890OpRedDefaultWarehousePresets.compatPreset, + skuUu789UvGreenUsWarehouse: skuUu789UvGreenUsWarehousePresets.compatPreset, + skuDdd890OpBlueDefaultWarehouse: + skuDdd890OpBlueDefaultWarehousePresets.compatPreset, + skuZ890Op2015UsWarehouse: skuZ890Op2015UsWarehousePresets.compatPreset, + skuPp234Wx2019DefaultWarehouse: + skuPp234Wx2019DefaultWarehousePresets.compatPreset, + skuPp234Wx2023DefaultWarehouse: + skuPp234Wx2023DefaultWarehousePresets.compatPreset, + skuWw567YzGreenUsWarehouse: skuWw567YzGreenUsWarehousePresets.compatPreset, + skuAaa789UvRedUsWarehouse: skuAaa789UvRedUsWarehousePresets.compatPreset, + skuAaa789UvBlueEuWarehouse: skuAaa789UvBlueEuWarehousePresets.compatPreset, + skuCcc567YzRedEuWarehouse: skuCcc567YzRedEuWarehousePresets.compatPreset, + skuCcc567YzGreenEuWarehouse: skuCcc567YzGreenEuWarehousePresets.compatPreset, + skuCc789Uv2019UsWarehouse: skuCc789Uv2019UsWarehousePresets.compatPreset, + skuU123Qr2019DefaultWarehouse: + skuU123Qr2019DefaultWarehousePresets.compatPreset, + skuYy123QrBlueEuWarehouse: skuYy123QrBlueEuWarehousePresets.compatPreset, + skuBbb234WxRedDefaultWarehouse: + skuBbb234WxRedDefaultWarehousePresets.compatPreset, + skuEee123QrGreenUsWarehouse: skuEee123QrGreenUsWarehousePresets.compatPreset, + skuFuelFilterUsWarehouse: skuFuelFilterUsWarehousePresets.compatPreset, + skuZz456StRedDefaultWarehouse: + skuZz456StRedDefaultWarehousePresets.compatPreset, + skuCcc567YzGreenUsWarehouse: skuCcc567YzGreenUsWarehousePresets.compatPreset, + skuMm123Qr2015DefaultWarehouse: + skuMm123Qr2015DefaultWarehousePresets.compatPreset, + skuBrakePadSetDefaultWarehouse: + skuBrakePadSetDefaultWarehousePresets.compatPreset, + skuHhh234WxGreenDefaultWarehouse: + skuHhh234WxGreenDefaultWarehousePresets.compatPreset, + skuHhh234WxGreenUsWarehouse: skuHhh234WxGreenUsWarehousePresets.compatPreset, + skuHhh234WxRedUsWarehouse: skuHhh234WxRedUsWarehousePresets.compatPreset, + skuY567Yz2015DefaultWarehouse: + skuY567Yz2015DefaultWarehousePresets.compatPreset, + skuHydraulicHoseEuWarehouse: skuHydraulicHoseEuWarehousePresets.compatPreset, + skuHhh234WxBlueEuWarehouse: skuHhh234WxBlueEuWarehousePresets.compatPreset, + skuHhh234WxBlueUsWarehouse: skuHhh234WxBlueUsWarehousePresets.compatPreset, + skuJjj890OpRedDefaultWarehouse: + skuJjj890OpRedDefaultWarehousePresets.compatPreset, + skuPp234Wx2015DefaultWarehouse: + skuPp234Wx2015DefaultWarehousePresets.compatPreset, + skuIi789Uv2023DefaultWarehouse: + skuIi789Uv2023DefaultWarehousePresets.compatPreset, + skuJjj890OpBlueDefaultWarehouse: + skuJjj890OpBlueDefaultWarehousePresets.compatPreset, + skuHhh234WxRedEuWarehouse: skuHhh234WxRedEuWarehousePresets.compatPreset, + skuCcc567YzGreenDefaultWarehouse: + skuCcc567YzGreenDefaultWarehousePresets.compatPreset, + skuJjj890OpGreenEuWarehouse: skuJjj890OpGreenEuWarehousePresets.compatPreset, + skuFf890Op2015EuWarehouse: skuFf890Op2015EuWarehousePresets.compatPreset, + skuFff456StGreenDefaultWarehouse: + skuFff456StGreenDefaultWarehousePresets.compatPreset, + skuJj234Wx2015UsWarehouse: skuJj234Wx2015UsWarehousePresets.compatPreset, + skuFuelFilterEuWarehouse: skuFuelFilterEuWarehousePresets.compatPreset, + skuHydraulicHoseDefaultWarehouse: + skuHydraulicHoseDefaultWarehousePresets.compatPreset, + skuNn456St2023EuWarehouse: skuNn456St2023EuWarehousePresets.compatPreset, + skuNn456St2023UsWarehouse: skuNn456St2023UsWarehousePresets.compatPreset, + skuPneumaticTireUsWarehouse: skuPneumaticTireUsWarehousePresets.compatPreset, + skuGgg789UvGreenEuWarehouse: skuGgg789UvGreenEuWarehousePresets.compatPreset, + skuYy123QrGreenDefaultWarehouse: + skuYy123QrGreenDefaultWarehousePresets.compatPreset, + skuJjj890OpRedUsWarehouse: skuJjj890OpRedUsWarehousePresets.compatPreset, + skuPneumaticTireEuWarehouse: skuPneumaticTireEuWarehousePresets.compatPreset, + skuStarterMotorEuWarehouse: skuStarterMotorEuWarehousePresets.compatPreset, + skuPistonRingSetDefaultWarehouse: + skuPistonRingSetDefaultWarehousePresets.compatPreset, + skuAlternatorEuWarehouse: skuAlternatorEuWarehousePresets.compatPreset, + skuAlternatorDefaultWarehouse: + skuAlternatorDefaultWarehousePresets.compatPreset, + skuXx890OpBlueEuWarehouse: skuXx890OpBlueEuWarehousePresets.compatPreset, + skuPistonRingSetEuWarehouse: skuPistonRingSetEuWarehousePresets.compatPreset, + skuFff456StBlueEuWarehouse: skuFff456StBlueEuWarehousePresets.compatPreset, + skuEee123QrGreenDefaultWarehouse: + skuEee123QrGreenDefaultWarehousePresets.compatPreset, + skuYy123QrBlueUsWarehouse: skuYy123QrBlueUsWarehousePresets.compatPreset, + skuGgg789UvBlueUsWarehouse: skuGgg789UvBlueUsWarehousePresets.compatPreset, + skuCcc567YzBlueUsWarehouse: skuCcc567YzBlueUsWarehousePresets.compatPreset, + skuHhh234WxBlueDefaultWarehouse: + skuHhh234WxBlueDefaultWarehousePresets.compatPreset, + skuAirFilterUsWarehouse: skuAirFilterUsWarehousePresets.compatPreset, + skuCcc567YzBlueEuWarehouse: skuCcc567YzBlueEuWarehousePresets.compatPreset, + skuPistonRingSetUsWarehouse: skuPistonRingSetUsWarehousePresets.compatPreset, + skuXx890OpRedDefaultWarehouse: + skuXx890OpRedDefaultWarehousePresets.compatPreset, + skuSs123QrRedEuWarehouse: skuSs123QrRedEuWarehousePresets.compatPreset, + skuIii567YzGreenDefaultWarehouse: + skuIii567YzGreenDefaultWarehousePresets.compatPreset, + skuAirFilterDefaultWarehouse: + skuAirFilterDefaultWarehousePresets.compatPreset, + skuBrakePadSetEuWarehouse: skuBrakePadSetEuWarehousePresets.compatPreset, + skuBbb234WxRedUsWarehouse: skuBbb234WxRedUsWarehousePresets.compatPreset, + skuIii567YzRedUsWarehouse: skuIii567YzRedUsWarehousePresets.compatPreset, + skuBbb234WxGreenDefaultWarehouse: + skuBbb234WxGreenDefaultWarehousePresets.compatPreset, + skuDd234Wx2023DefaultWarehouse: + skuDd234Wx2023DefaultWarehousePresets.compatPreset, + skuOilFilterUsWarehouse: skuOilFilterUsWarehousePresets.compatPreset, + skuFff456StRedUsWarehouse: skuFff456StRedUsWarehousePresets.compatPreset, + skuPneumaticTireDefaultWarehouse: + skuPneumaticTireDefaultWarehousePresets.compatPreset, + skuStarterMotorUsWarehouse: skuStarterMotorUsWarehousePresets.compatPreset, + skuHhh234WxRedDefaultWarehouse: + skuHhh234WxRedDefaultWarehousePresets.compatPreset, + skuW789Uv2019DefaultWarehouse: + skuW789Uv2019DefaultWarehousePresets.compatPreset, + skuE567Yz2015UsWarehouse: skuE567Yz2015UsWarehousePresets.compatPreset, + skuC789Uv2023DefaultWarehouse: + skuC789Uv2023DefaultWarehousePresets.compatPreset, + skuB456St2015UsWarehouse: skuB456St2015UsWarehousePresets.compatPreset, + skuJ234Wx2015DefaultWarehouse: + skuJ234Wx2015DefaultWarehousePresets.compatPreset, + skuG123Qr2019UsWarehouse: skuG123Qr2019UsWarehousePresets.compatPreset, + skuC789Uv2023UsWarehouse: skuC789Uv2023UsWarehousePresets.compatPreset, + skuD234Wx2019DefaultWarehouse: + skuD234Wx2019DefaultWarehousePresets.compatPreset, + skuB456St2019EuWarehouse: skuB456St2019EuWarehousePresets.compatPreset, + skuI789Uv2015UsWarehouse: skuI789Uv2015UsWarehousePresets.compatPreset, + skuB456St2015EuWarehouse: skuB456St2015EuWarehousePresets.compatPreset, + skuG123Qr2019DefaultWarehouse: + skuG123Qr2019DefaultWarehousePresets.compatPreset, + skuJ234Wx2023DefaultWarehouse: + skuJ234Wx2023DefaultWarehousePresets.compatPreset, + skuC789Uv2015DefaultWarehouse: + skuC789Uv2015DefaultWarehousePresets.compatPreset, + skuF890Op2019DefaultWarehouse: + skuF890Op2019DefaultWarehousePresets.compatPreset, + skuF890Op2015EuWarehouse: skuF890Op2015EuWarehousePresets.compatPreset, + skuE567Yz2023DefaultWarehouse: + skuE567Yz2023DefaultWarehousePresets.compatPreset, + skuH456St2019EuWarehouse: skuH456St2019EuWarehousePresets.compatPreset, + skuF890Op2023UsWarehouse: skuF890Op2023UsWarehousePresets.compatPreset, + skuV456St2019EuWarehouse: skuV456St2019EuWarehousePresets.compatPreset, + skuC789Uv2019DefaultWarehouse: + skuC789Uv2019DefaultWarehousePresets.compatPreset, + skuG123Qr2015EuWarehouse: skuG123Qr2015EuWarehousePresets.compatPreset, + skuB456St2023EuWarehouse: skuB456St2023EuWarehousePresets.compatPreset, + skuC789Uv2019UsWarehouse: skuC789Uv2019UsWarehousePresets.compatPreset, + skuE567Yz2023EuWarehouse: skuE567Yz2023EuWarehousePresets.compatPreset, + skuD234Wx2015UsWarehouse: skuD234Wx2015UsWarehousePresets.compatPreset, + skuL890Op2023EuWarehouse: skuL890Op2023EuWarehousePresets.compatPreset, + skuH456St2015UsWarehouse: skuH456St2015UsWarehousePresets.compatPreset, + skuI789Uv2023UsWarehouse: skuI789Uv2023UsWarehousePresets.compatPreset, + skuN123Qr2023DefaultWarehouse: + skuN123Qr2023DefaultWarehousePresets.compatPreset, + skuD234Wx2019EuWarehouse: skuD234Wx2019EuWarehousePresets.compatPreset, + skuW789Uv2015DefaultWarehouse: + skuW789Uv2015DefaultWarehousePresets.compatPreset, + skuL890Op2019DefaultWarehouse: + skuL890Op2019DefaultWarehousePresets.compatPreset, + skuI789Uv2019DefaultWarehouse: + skuI789Uv2019DefaultWarehousePresets.compatPreset, + skuK567Yz2019UsWarehouse: skuK567Yz2019UsWarehousePresets.compatPreset, + skuL890Op2015EuWarehouse: skuL890Op2015EuWarehousePresets.compatPreset, + skuF890Op2019UsWarehouse: skuF890Op2019UsWarehousePresets.compatPreset, + skuI789Uv2015DefaultWarehouse: + skuI789Uv2015DefaultWarehousePresets.compatPreset, + skuY567Yz2015UsWarehouse: skuY567Yz2015UsWarehousePresets.compatPreset, + skuH456St2015EuWarehouse: skuH456St2015EuWarehousePresets.compatPreset, + skuW789Uv2019EuWarehouse: skuW789Uv2019EuWarehousePresets.compatPreset, + skuI789Uv2015EuWarehouse: skuI789Uv2015EuWarehousePresets.compatPreset, + skuV456St2015DefaultWarehouse: + skuV456St2015DefaultWarehousePresets.compatPreset, + skuF890Op2015UsWarehouse: skuF890Op2015UsWarehousePresets.compatPreset, + skuB456St2019UsWarehouse: skuB456St2019UsWarehousePresets.compatPreset, + skuV456St2015UsWarehouse: skuV456St2015UsWarehousePresets.compatPreset, + skuD234Wx2023EuWarehouse: skuD234Wx2023EuWarehousePresets.compatPreset, + skuN123Qr2023EuWarehouse: skuN123Qr2023EuWarehousePresets.compatPreset, + skuK567Yz2015DefaultWarehouse: + skuK567Yz2015DefaultWarehousePresets.compatPreset, + skuF890Op2023DefaultWarehouse: + skuF890Op2023DefaultWarehousePresets.compatPreset, + skuY567Yz2019EuWarehouse: skuY567Yz2019EuWarehousePresets.compatPreset, + skuL890Op2023DefaultWarehouse: + skuL890Op2023DefaultWarehousePresets.compatPreset, + skuX234Wx2023UsWarehouse: skuX234Wx2023UsWarehousePresets.compatPreset, + skuAa123Qr2015DefaultWarehouse: + skuAa123Qr2015DefaultWarehousePresets.compatPreset, + skuZ890Op2015EuWarehouse: skuZ890Op2015EuWarehousePresets.compatPreset, + skuU123Qr2023DefaultWarehouse: + skuU123Qr2023DefaultWarehousePresets.compatPreset, + skuX234Wx2015DefaultWarehouse: + skuX234Wx2015DefaultWarehousePresets.compatPreset, + skuBb456St2015EuWarehouse: skuBb456St2015EuWarehousePresets.compatPreset, + skuWw567YzBlueDefaultWarehouse: + skuWw567YzBlueDefaultWarehousePresets.compatPreset, + skuAa123Qr2023UsWarehouse: skuAa123Qr2023UsWarehousePresets.compatPreset, + skuB456St2023DefaultWarehouse: + skuB456St2023DefaultWarehousePresets.compatPreset, + skuH456St2019UsWarehouse: skuH456St2019UsWarehousePresets.compatPreset, + skuG123Qr2019EuWarehouse: skuG123Qr2019EuWarehousePresets.compatPreset, + skuY567Yz2019DefaultWarehouse: + skuY567Yz2019DefaultWarehousePresets.compatPreset, + skuV456St2023DefaultWarehouse: + skuV456St2023DefaultWarehousePresets.compatPreset, + skuBb456St2019UsWarehouse: skuBb456St2019UsWarehousePresets.compatPreset, + skuZ890Op2015DefaultWarehouse: + skuZ890Op2015DefaultWarehousePresets.compatPreset, + skuBb456St2019EuWarehouse: skuBb456St2019EuWarehousePresets.compatPreset, + skuY567Yz2023DefaultWarehouse: + skuY567Yz2023DefaultWarehousePresets.compatPreset, + skuU123Qr2015EuWarehouse: skuU123Qr2015EuWarehousePresets.compatPreset, + skuAa123Qr2019UsWarehouse: skuAa123Qr2019UsWarehousePresets.compatPreset, + skuZ890Op2019UsWarehouse: skuZ890Op2019UsWarehousePresets.compatPreset, + skuK567Yz2023EuWarehouse: skuK567Yz2023EuWarehousePresets.compatPreset, + skuZ890Op2023DefaultWarehouse: + skuZ890Op2023DefaultWarehousePresets.compatPreset, + skuG123Qr2023UsWarehouse: skuG123Qr2023UsWarehousePresets.compatPreset, + skuX234Wx2023EuWarehouse: skuX234Wx2023EuWarehousePresets.compatPreset, + skuY567Yz2023UsWarehouse: skuY567Yz2023UsWarehousePresets.compatPreset, + skuAa123Qr2023DefaultWarehouse: + skuAa123Qr2023DefaultWarehousePresets.compatPreset, + skuZ890Op2019DefaultWarehouse: + skuZ890Op2019DefaultWarehousePresets.compatPreset, + skuZ890Op2023EuWarehouse: skuZ890Op2023EuWarehousePresets.compatPreset, + skuAa123Qr2015EuWarehouse: skuAa123Qr2015EuWarehousePresets.compatPreset, + skuBb456St2015UsWarehouse: skuBb456St2015UsWarehousePresets.compatPreset, + skuAa123Qr2015UsWarehouse: skuAa123Qr2015UsWarehousePresets.compatPreset, + skuFf890Op2019UsWarehouse: skuFf890Op2019UsWarehousePresets.compatPreset, + skuBb456St2015DefaultWarehouse: + skuBb456St2015DefaultWarehousePresets.compatPreset, + skuAa123Qr2019EuWarehouse: skuAa123Qr2019EuWarehousePresets.compatPreset, + skuGg123Qr2015UsWarehouse: skuGg123Qr2015UsWarehousePresets.compatPreset, + skuDd234Wx2023EuWarehouse: skuDd234Wx2023EuWarehousePresets.compatPreset, + skuIi789Uv2015EuWarehouse: skuIi789Uv2015EuWarehousePresets.compatPreset, + skuDd234Wx2015UsWarehouse: skuDd234Wx2015UsWarehousePresets.compatPreset, + skuHh456St2019EuWarehouse: skuHh456St2019EuWarehousePresets.compatPreset, + skuIi789Uv2015UsWarehouse: skuIi789Uv2015UsWarehousePresets.compatPreset, + skuCc789Uv2023EuWarehouse: skuCc789Uv2023EuWarehousePresets.compatPreset, + skuGg123Qr2019UsWarehouse: skuGg123Qr2019UsWarehousePresets.compatPreset, + skuGg123Qr2019DefaultWarehouse: + skuGg123Qr2019DefaultWarehousePresets.compatPreset, + skuDd234Wx2019UsWarehouse: skuDd234Wx2019UsWarehousePresets.compatPreset, + skuZ890Op2023UsWarehouse: skuZ890Op2023UsWarehousePresets.compatPreset, + skuHh456St2015DefaultWarehouse: + skuHh456St2015DefaultWarehousePresets.compatPreset, + skuGg123Qr2015EuWarehouse: skuGg123Qr2015EuWarehousePresets.compatPreset, + skuFf890Op2015DefaultWarehouse: + skuFf890Op2015DefaultWarehousePresets.compatPreset, + skuCc789Uv2023DefaultWarehouse: + skuCc789Uv2023DefaultWarehousePresets.compatPreset, + skuHh456St2015EuWarehouse: skuHh456St2015EuWarehousePresets.compatPreset, + skuHh456St2019UsWarehouse: skuHh456St2019UsWarehousePresets.compatPreset, + skuW789Uv2015EuWarehouse: skuW789Uv2015EuWarehousePresets.compatPreset, + skuFf890Op2023EuWarehouse: skuFf890Op2023EuWarehousePresets.compatPreset, + skuDd234Wx2023UsWarehouse: skuDd234Wx2023UsWarehousePresets.compatPreset, + skuEe567Yz2015DefaultWarehouse: + skuEe567Yz2015DefaultWarehousePresets.compatPreset, + skuHh456St2019DefaultWarehouse: + skuHh456St2019DefaultWarehousePresets.compatPreset, + skuBb456St2019DefaultWarehouse: + skuBb456St2019DefaultWarehousePresets.compatPreset, + skuAa123Qr2019DefaultWarehouse: + skuAa123Qr2019DefaultWarehousePresets.compatPreset, + skuGg123Qr2023EuWarehouse: skuGg123Qr2023EuWarehousePresets.compatPreset, + skuHh456St2023DefaultWarehouse: + skuHh456St2023DefaultWarehousePresets.compatPreset, + skuDd234Wx2015EuWarehouse: skuDd234Wx2015EuWarehousePresets.compatPreset, + skuFf890Op2023UsWarehouse: skuFf890Op2023UsWarehousePresets.compatPreset, + skuFf890Op2023DefaultWarehouse: + skuFf890Op2023DefaultWarehousePresets.compatPreset, + skuGg123Qr2019EuWarehouse: skuGg123Qr2019EuWarehousePresets.compatPreset, + skuJj234Wx2019EuWarehouse: skuJj234Wx2019EuWarehousePresets.compatPreset, + skuJj234Wx2015DefaultWarehouse: + skuJj234Wx2015DefaultWarehousePresets.compatPreset, + skuHh456St2023UsWarehouse: skuHh456St2023UsWarehousePresets.compatPreset, + skuGg123Qr2023UsWarehouse: skuGg123Qr2023UsWarehousePresets.compatPreset, + skuGg123Qr2015DefaultWarehouse: + skuGg123Qr2015DefaultWarehousePresets.compatPreset, + skuIi789Uv2023EuWarehouse: skuIi789Uv2023EuWarehousePresets.compatPreset, + skuNn456St2019UsWarehouse: skuNn456St2019UsWarehousePresets.compatPreset, + skuMm123Qr2015EuWarehouse: skuMm123Qr2015EuWarehousePresets.compatPreset, + skuKk567Yz2023EuWarehouse: skuKk567Yz2023EuWarehousePresets.compatPreset, + skuLl890Op2023UsWarehouse: skuLl890Op2023UsWarehousePresets.compatPreset, + skuKk567Yz2015DefaultWarehouse: + skuKk567Yz2015DefaultWarehousePresets.compatPreset, + skuPp234Wx2015EuWarehouse: skuPp234Wx2015EuWarehousePresets.compatPreset, + skuKk567Yz2023UsWarehouse: skuKk567Yz2023UsWarehousePresets.compatPreset, + skuKk567Yz2019DefaultWarehouse: + skuKk567Yz2019DefaultWarehousePresets.compatPreset, + skuKk567Yz2023DefaultWarehouse: + skuKk567Yz2023DefaultWarehousePresets.compatPreset, + skuLl890Op2023EuWarehouse: skuLl890Op2023EuWarehousePresets.compatPreset, + skuLl890Op2015EuWarehouse: skuLl890Op2015EuWarehousePresets.compatPreset, + skuJj234Wx2023EuWarehouse: skuJj234Wx2023EuWarehousePresets.compatPreset, + skuPp234Wx2015UsWarehouse: skuPp234Wx2015UsWarehousePresets.compatPreset, + skuMm123Qr2015UsWarehouse: skuMm123Qr2015UsWarehousePresets.compatPreset, + skuLl890Op2019EuWarehouse: skuLl890Op2019EuWarehousePresets.compatPreset, + skuLl890Op2019DefaultWarehouse: + skuLl890Op2019DefaultWarehousePresets.compatPreset, + skuPp234Wx2019EuWarehouse: skuPp234Wx2019EuWarehousePresets.compatPreset, + skuJj234Wx2023DefaultWarehouse: + skuJj234Wx2023DefaultWarehousePresets.compatPreset, + skuLl890Op2015UsWarehouse: skuLl890Op2015UsWarehousePresets.compatPreset, + skuDd234Wx2015DefaultWarehouse: + skuDd234Wx2015DefaultWarehousePresets.compatPreset, + skuNn456St2015UsWarehouse: skuNn456St2015UsWarehousePresets.compatPreset, + skuKk567Yz2019EuWarehouse: skuKk567Yz2019EuWarehousePresets.compatPreset, + skuKk567Yz2019UsWarehouse: skuKk567Yz2019UsWarehousePresets.compatPreset, + skuKk567Yz2015UsWarehouse: skuKk567Yz2015UsWarehousePresets.compatPreset, + skuLl890Op2023DefaultWarehouse: + skuLl890Op2023DefaultWarehousePresets.compatPreset, + skuNn456St2019DefaultWarehouse: + skuNn456St2019DefaultWarehousePresets.compatPreset, + skuLl890Op2019UsWarehouse: skuLl890Op2019UsWarehousePresets.compatPreset, + skuSs123QrBlueEuWarehouse: skuSs123QrBlueEuWarehousePresets.compatPreset, + skuBb456St2023EuWarehouse: skuBb456St2023EuWarehousePresets.compatPreset, + skuDd234Wx2019DefaultWarehouse: + skuDd234Wx2019DefaultWarehousePresets.compatPreset, + skuNn456St2015EuWarehouse: skuNn456St2015EuWarehousePresets.compatPreset, + skuSs123QrRedUsWarehouse: skuSs123QrRedUsWarehousePresets.compatPreset, + skuU123Qr2019EuWarehouse: skuU123Qr2019EuWarehousePresets.compatPreset, + skuHh456St2023EuWarehouse: skuHh456St2023EuWarehousePresets.compatPreset, + skuQq567Yz2019UsWarehouse: skuQq567Yz2019UsWarehousePresets.compatPreset, + skuQq567Yz2019DefaultWarehouse: + skuQq567Yz2019DefaultWarehousePresets.compatPreset, + skuSs123QrRedDefaultWarehouse: + skuSs123QrRedDefaultWarehousePresets.compatPreset, + skuW789Uv2015UsWarehouse: skuW789Uv2015UsWarehousePresets.compatPreset, + skuOo789Uv2015EuWarehouse: skuOo789Uv2015EuWarehousePresets.compatPreset, + skuTt456StGreenEuWarehouse: skuTt456StGreenEuWarehousePresets.compatPreset, + skuOo789Uv2019EuWarehouse: skuOo789Uv2019EuWarehousePresets.compatPreset, + skuQq567Yz2023EuWarehouse: skuQq567Yz2023EuWarehousePresets.compatPreset, + skuFf890Op2019EuWarehouse: skuFf890Op2019EuWarehousePresets.compatPreset, + skuAa123Qr2023EuWarehouse: skuAa123Qr2023EuWarehousePresets.compatPreset, + skuHh456St2015UsWarehouse: skuHh456St2015UsWarehousePresets.compatPreset, + skuVv234WxGreenEuWarehouse: skuVv234WxGreenEuWarehousePresets.compatPreset, + skuWw567YzGreenDefaultWarehouse: + skuWw567YzGreenDefaultWarehousePresets.compatPreset, + skuRr890Op2023EuWarehouse: skuRr890Op2023EuWarehousePresets.compatPreset, + skuQq567Yz2023DefaultWarehouse: + skuQq567Yz2023DefaultWarehousePresets.compatPreset, + skuRr890Op2023UsWarehouse: skuRr890Op2023UsWarehousePresets.compatPreset, + skuRr890Op2019EuWarehouse: skuRr890Op2019EuWarehousePresets.compatPreset, + skuRr890Op2015UsWarehouse: skuRr890Op2015UsWarehousePresets.compatPreset, + skuQq567Yz2023UsWarehouse: skuQq567Yz2023UsWarehousePresets.compatPreset, + skuRr890Op2023DefaultWarehouse: + skuRr890Op2023DefaultWarehousePresets.compatPreset, + skuRr890Op2015DefaultWarehouse: + skuRr890Op2015DefaultWarehousePresets.compatPreset, + skuUu789UvRedDefaultWarehouse: + skuUu789UvRedDefaultWarehousePresets.compatPreset, + skuRr890Op2019UsWarehouse: skuRr890Op2019UsWarehousePresets.compatPreset, + skuRr890Op2015EuWarehouse: skuRr890Op2015EuWarehousePresets.compatPreset, + skuXx890OpGreenEuWarehouse: skuXx890OpGreenEuWarehousePresets.compatPreset, + skuD234Wx2015EuWarehouse: skuD234Wx2015EuWarehousePresets.compatPreset, + skuXx890OpBlueDefaultWarehouse: + skuXx890OpBlueDefaultWarehousePresets.compatPreset, + skuVv234WxBlueUsWarehouse: skuVv234WxBlueUsWarehousePresets.compatPreset, + skuXx890OpBlueUsWarehouse: skuXx890OpBlueUsWarehousePresets.compatPreset, + skuUu789UvRedUsWarehouse: skuUu789UvRedUsWarehousePresets.compatPreset, + skuUu789UvRedEuWarehouse: skuUu789UvRedEuWarehousePresets.compatPreset, + skuWw567YzRedUsWarehouse: skuWw567YzRedUsWarehousePresets.compatPreset, + skuTt456StGreenDefaultWarehouse: + skuTt456StGreenDefaultWarehousePresets.compatPreset, + skuVv234WxRedUsWarehouse: skuVv234WxRedUsWarehousePresets.compatPreset, + skuVv234WxRedDefaultWarehouse: + skuVv234WxRedDefaultWarehousePresets.compatPreset, + skuWw567YzRedDefaultWarehouse: + skuWw567YzRedDefaultWarehousePresets.compatPreset, + skuYy123QrRedUsWarehouse: skuYy123QrRedUsWarehousePresets.compatPreset, + skuTt456StBlueEuWarehouse: skuTt456StBlueEuWarehousePresets.compatPreset, + skuWw567YzRedEuWarehouse: skuWw567YzRedEuWarehousePresets.compatPreset, + skuVv234WxRedEuWarehouse: skuVv234WxRedEuWarehousePresets.compatPreset, + skuTt456StRedDefaultWarehouse: + skuTt456StRedDefaultWarehousePresets.compatPreset, + skuVv234WxBlueDefaultWarehouse: + skuVv234WxBlueDefaultWarehousePresets.compatPreset, + skuLl890Op2015DefaultWarehouse: + skuLl890Op2015DefaultWarehousePresets.compatPreset, + skuWw567YzBlueUsWarehouse: skuWw567YzBlueUsWarehousePresets.compatPreset, + skuTt456StBlueUsWarehouse: skuTt456StBlueUsWarehousePresets.compatPreset, + skuTt456StRedEuWarehouse: skuTt456StRedEuWarehousePresets.compatPreset, + skuNn456St2015DefaultWarehouse: + skuNn456St2015DefaultWarehousePresets.compatPreset, + skuWw567YzGreenEuWarehouse: skuWw567YzGreenEuWarehousePresets.compatPreset, + skuVv234WxBlueEuWarehouse: skuVv234WxBlueEuWarehousePresets.compatPreset, + skuBbb234WxGreenUsWarehouse: skuBbb234WxGreenUsWarehousePresets.compatPreset, + skuBbb234WxBlueDefaultWarehouse: + skuBbb234WxBlueDefaultWarehousePresets.compatPreset, + skuBbb234WxBlueUsWarehouse: skuBbb234WxBlueUsWarehousePresets.compatPreset, + skuBbb234WxGreenEuWarehouse: skuBbb234WxGreenEuWarehousePresets.compatPreset, + skuFff456StGreenUsWarehouse: skuFff456StGreenUsWarehousePresets.compatPreset, + skuZz456StGreenEuWarehouse: skuZz456StGreenEuWarehousePresets.compatPreset, + skuBbb234WxBlueEuWarehouse: skuBbb234WxBlueEuWarehousePresets.compatPreset, + skuZz456StGreenUsWarehouse: skuZz456StGreenUsWarehousePresets.compatPreset, + skuAaa789UvGreenUsWarehouse: skuAaa789UvGreenUsWarehousePresets.compatPreset, + skuAaa789UvBlueUsWarehouse: skuAaa789UvBlueUsWarehousePresets.compatPreset, + skuFff456StGreenEuWarehouse: skuFff456StGreenEuWarehousePresets.compatPreset, + skuAaa789UvGreenEuWarehouse: skuAaa789UvGreenEuWarehousePresets.compatPreset, + skuHydraulicHoseUsWarehouse: skuHydraulicHoseUsWarehousePresets.compatPreset, + skuTaperedRollerBearingUsWarehouse: + skuTaperedRollerBearingUsWarehousePresets.compatPreset, + skuHhh234WxGreenEuWarehouse: skuHhh234WxGreenEuWarehousePresets.compatPreset, + skuFff456StBlueDefaultWarehouse: + skuFff456StBlueDefaultWarehousePresets.compatPreset, + skuIii567YzBlueEuWarehouse: skuIii567YzBlueEuWarehousePresets.compatPreset, + skuGgg789UvRedUsWarehouse: skuGgg789UvRedUsWarehousePresets.compatPreset, + skuFff456StBlueUsWarehouse: skuFff456StBlueUsWarehousePresets.compatPreset, + skuEee123QrRedDefaultWarehouse: + skuEee123QrRedDefaultWarehousePresets.compatPreset, + skuDdd890OpGreenEuWarehouse: skuDdd890OpGreenEuWarehousePresets.compatPreset, + skuPinAndBushingKitEuWarehouse: + skuPinAndBushingKitEuWarehousePresets.compatPreset, + skuAaa789UvRedEuWarehouse: skuAaa789UvRedEuWarehousePresets.compatPreset, + skuIii567YzRedDefaultWarehouse: + skuIii567YzRedDefaultWarehousePresets.compatPreset, + skuEee123QrBlueDefaultWarehouse: + skuEee123QrBlueDefaultWarehousePresets.compatPreset, + skuEee123QrRedUsWarehouse: skuEee123QrRedUsWarehousePresets.compatPreset, + skuEee123QrGreenEuWarehouse: skuEee123QrGreenEuWarehousePresets.compatPreset, + skuJjj890OpBlueEuWarehouse: skuJjj890OpBlueEuWarehousePresets.compatPreset, + skuZz456StBlueDefaultWarehouse: + skuZz456StBlueDefaultWarehousePresets.compatPreset, + skuTaperedRollerBearingEuWarehouse: + skuTaperedRollerBearingEuWarehousePresets.compatPreset, + skuJjj890OpGreenDefaultWarehouse: + skuJjj890OpGreenDefaultWarehousePresets.compatPreset, + skuDdd890OpGreenUsWarehouse: skuDdd890OpGreenUsWarehousePresets.compatPreset, + skuEee123QrBlueEuWarehouse: skuEee123QrBlueEuWarehousePresets.compatPreset, + skuDdd890OpGreenDefaultWarehouse: + skuDdd890OpGreenDefaultWarehousePresets.compatPreset, + skuIii567YzBlueDefaultWarehouse: + skuIii567YzBlueDefaultWarehousePresets.compatPreset, + skuGgg789UvRedEuWarehouse: skuGgg789UvRedEuWarehousePresets.compatPreset, + skuFff456StRedDefaultWarehouse: + skuFff456StRedDefaultWarehousePresets.compatPreset, + skuAlternatorUsWarehouse: skuAlternatorUsWarehousePresets.compatPreset, + skuLedWorkLightEuWarehouse: skuLedWorkLightEuWarehousePresets.compatPreset, + skuZz456StGreenDefaultWarehouse: + skuZz456StGreenDefaultWarehousePresets.compatPreset, + skuLedWorkLightDefaultWarehouse: + skuLedWorkLightDefaultWarehousePresets.compatPreset, + skuDdd890OpRedUsWarehouse: skuDdd890OpRedUsWarehousePresets.compatPreset, + skuIii567YzBlueUsWarehouse: skuIii567YzBlueUsWarehousePresets.compatPreset, + skuFff456StRedEuWarehouse: skuFff456StRedEuWarehousePresets.compatPreset, + skuPinAndBushingKitUsWarehouse: + skuPinAndBushingKitUsWarehousePresets.compatPreset, + skuFuelFilterDefaultWarehouse: + skuFuelFilterDefaultWarehousePresets.compatPreset, + skuEee123QrRedEuWarehouse: skuEee123QrRedEuWarehousePresets.compatPreset, + skuTaperedRollerBearingDefaultWarehouse: + skuTaperedRollerBearingDefaultWarehousePresets.compatPreset, + skuGgg789UvRedDefaultWarehouse: + skuGgg789UvRedDefaultWarehousePresets.compatPreset, + skuPinAndBushingKitDefaultWarehouse: + skuPinAndBushingKitDefaultWarehousePresets.compatPreset, + skuDdd890OpRedEuWarehouse: skuDdd890OpRedEuWarehousePresets.compatPreset, + skuLedWorkLightUsWarehouse: skuLedWorkLightUsWarehousePresets.compatPreset, + skuMm123Qr2023UsWarehouse: skuMm123Qr2023UsWarehousePresets.compatPreset, + skuVv234WxGreenDefaultWarehouse: + skuVv234WxGreenDefaultWarehousePresets.compatPreset, + skuYy123QrBlueDefaultWarehouse: + skuYy123QrBlueDefaultWarehousePresets.compatPreset, + skuOo789Uv2023UsWarehouse: skuOo789Uv2023UsWarehousePresets.compatPreset, + skuOo789Uv2019DefaultWarehouse: + skuOo789Uv2019DefaultWarehousePresets.compatPreset, + skuPp234Wx2023EuWarehouse: skuPp234Wx2023EuWarehousePresets.compatPreset, + skuD234Wx2023DefaultWarehouse: + skuD234Wx2023DefaultWarehousePresets.compatPreset, + skuUu789UvBlueEuWarehouse: skuUu789UvBlueEuWarehousePresets.compatPreset, + skuIii567YzRedEuWarehouse: skuIii567YzRedEuWarehousePresets.compatPreset, + skuMm123Qr2019DefaultWarehouse: + skuMm123Qr2019DefaultWarehousePresets.compatPreset, + skuZz456StBlueUsWarehouse: skuZz456StBlueUsWarehousePresets.compatPreset, + skuJj234Wx2023UsWarehouse: skuJj234Wx2023UsWarehousePresets.compatPreset, + skuQq567Yz2015EuWarehouse: skuQq567Yz2015EuWarehousePresets.compatPreset, + skuBrakePadSetUsWarehouse: skuBrakePadSetUsWarehousePresets.compatPreset, + skuGgg789UvBlueEuWarehouse: skuGgg789UvBlueEuWarehousePresets.compatPreset, + skuGgg789UvGreenDefaultWarehouse: + skuGgg789UvGreenDefaultWarehousePresets.compatPreset, + skuStarterMotorDefaultWarehouse: + skuStarterMotorDefaultWarehousePresets.compatPreset, + skuZz456StRedUsWarehouse: skuZz456StRedUsWarehousePresets.compatPreset, + skuE567Yz2015EuWarehouse: skuE567Yz2015EuWarehousePresets.compatPreset, + skuQq567Yz2015UsWarehouse: skuQq567Yz2015UsWarehousePresets.compatPreset, + skuRr890Op2019DefaultWarehouse: + skuRr890Op2019DefaultWarehousePresets.compatPreset, + skuJjj890OpBlueUsWarehouse: skuJjj890OpBlueUsWarehousePresets.compatPreset, + skuBbb234WxRedEuWarehouse: skuBbb234WxRedEuWarehousePresets.compatPreset, + skuDdd890OpBlueEuWarehouse: skuDdd890OpBlueEuWarehousePresets.compatPreset, + skuYy123QrRedEuWarehouse: skuYy123QrRedEuWarehousePresets.compatPreset, + skuSs123QrGreenDefaultWarehouse: + skuSs123QrGreenDefaultWarehousePresets.compatPreset, + skuOilFilterDefaultWarehouse: + skuOilFilterDefaultWarehousePresets.compatPreset, + skuSs123QrBlueUsWarehouse: skuSs123QrBlueUsWarehousePresets.compatPreset, + skuAaa789UvRedDefaultWarehouse: + skuAaa789UvRedDefaultWarehousePresets.compatPreset, + skuPp234Wx2019UsWarehouse: skuPp234Wx2019UsWarehousePresets.compatPreset, + skuMm123Qr2023DefaultWarehouse: + skuMm123Qr2023DefaultWarehousePresets.compatPreset, + skuJjj890OpGreenUsWarehouse: skuJjj890OpGreenUsWarehousePresets.compatPreset, + skuMm123Qr2019UsWarehouse: skuMm123Qr2019UsWarehousePresets.compatPreset, + skuXx890OpGreenDefaultWarehouse: + skuXx890OpGreenDefaultWarehousePresets.compatPreset, + skuEee123QrBlueUsWarehouse: skuEee123QrBlueUsWarehousePresets.compatPreset, + skuNn456St2023DefaultWarehouse: + skuNn456St2023DefaultWarehousePresets.compatPreset, + skuZz456StBlueEuWarehouse: skuZz456StBlueEuWarehousePresets.compatPreset, + skuMm123Qr2023EuWarehouse: skuMm123Qr2023EuWarehousePresets.compatPreset, + skuAaa789UvBlueDefaultWarehouse: + skuAaa789UvBlueDefaultWarehousePresets.compatPreset, + skuWw567YzBlueEuWarehouse: skuWw567YzBlueEuWarehousePresets.compatPreset, + skuIii567YzGreenUsWarehouse: skuIii567YzGreenUsWarehousePresets.compatPreset, + skuUu789UvBlueDefaultWarehouse: + skuUu789UvBlueDefaultWarehousePresets.compatPreset, + skuYy123QrGreenEuWarehouse: skuYy123QrGreenEuWarehousePresets.compatPreset, + skuSs123QrGreenEuWarehouse: skuSs123QrGreenEuWarehousePresets.compatPreset, + skuDdd890OpBlueUsWarehouse: skuDdd890OpBlueUsWarehousePresets.compatPreset, + skuXx890OpRedUsWarehouse: skuXx890OpRedUsWarehousePresets.compatPreset, + skuGgg789UvBlueDefaultWarehouse: + skuGgg789UvBlueDefaultWarehousePresets.compatPreset, + skuZz456StRedEuWarehouse: skuZz456StRedEuWarehousePresets.compatPreset, + skuJjj890OpRedEuWarehouse: skuJjj890OpRedEuWarehousePresets.compatPreset, + skuGgg789UvGreenUsWarehouse: skuGgg789UvGreenUsWarehousePresets.compatPreset, + skuTt456StBlueDefaultWarehouse: + skuTt456StBlueDefaultWarehousePresets.compatPreset, + skuTt456StRedUsWarehouse: skuTt456StRedUsWarehousePresets.compatPreset, + skuOo789Uv2023DefaultWarehouse: + skuOo789Uv2023DefaultWarehousePresets.compatPreset, + skuOo789Uv2015DefaultWarehouse: + skuOo789Uv2015DefaultWarehousePresets.compatPreset, + skuAirFilterEuWarehouse: skuAirFilterEuWarehousePresets.compatPreset, + skuTt456StGreenUsWarehouse: skuTt456StGreenUsWarehousePresets.compatPreset, + skuIii567YzGreenEuWarehouse: skuIii567YzGreenEuWarehousePresets.compatPreset, + skuOo789Uv2019UsWarehouse: skuOo789Uv2019UsWarehousePresets.compatPreset, + skuUu789UvGreenEuWarehouse: skuUu789UvGreenEuWarehousePresets.compatPreset, + skuAaa789UvGreenDefaultWarehouse: + skuAaa789UvGreenDefaultWarehousePresets.compatPreset, + skuXx890OpRedEuWarehouse: skuXx890OpRedEuWarehousePresets.compatPreset, + skuXx890OpGreenUsWarehouse: skuXx890OpGreenUsWarehousePresets.compatPreset, + skuYy123QrGreenUsWarehouse: skuYy123QrGreenUsWarehousePresets.compatPreset, + skuCcc567YzBlueDefaultWarehouse: + skuCcc567YzBlueDefaultWarehousePresets.compatPreset, + skuOilFilterEuWarehouse: skuOilFilterEuWarehousePresets.compatPreset, + skuCcc567YzRedDefaultWarehouse: + skuCcc567YzRedDefaultWarehousePresets.compatPreset, + skuCcc567YzRedUsWarehouse: skuCcc567YzRedUsWarehousePresets.compatPreset, + skuYy123QrRedDefaultWarehouse: + skuYy123QrRedDefaultWarehousePresets.compatPreset, + skuVv234WxGreenUsWarehouse: skuVv234WxGreenUsWarehousePresets.compatPreset, + skuX234Wx2019EuWarehouse: skuX234Wx2019EuWarehousePresets.compatPreset, + skuU123Qr2019UsWarehouse: skuU123Qr2019UsWarehousePresets.compatPreset, + skuJ234Wx2015EuWarehouse: skuJ234Wx2015EuWarehousePresets.compatPreset, + skuE567Yz2023UsWarehouse: skuE567Yz2023UsWarehousePresets.compatPreset, + skuL890Op2015UsWarehouse: skuL890Op2015UsWarehousePresets.compatPreset, + skuL890Op2019UsWarehouse: skuL890Op2019UsWarehousePresets.compatPreset, + skuE567Yz2019DefaultWarehouse: + skuE567Yz2019DefaultWarehousePresets.compatPreset, + skuG123Qr2023EuWarehouse: skuG123Qr2023EuWarehousePresets.compatPreset, + skuI789Uv2023DefaultWarehouse: + skuI789Uv2023DefaultWarehousePresets.compatPreset, + skuE567Yz2019UsWarehouse: skuE567Yz2019UsWarehousePresets.compatPreset, + skuL890Op2023UsWarehouse: skuL890Op2023UsWarehousePresets.compatPreset, + skuI789Uv2019EuWarehouse: skuI789Uv2019EuWarehousePresets.compatPreset, + skuI789Uv2019UsWarehouse: skuI789Uv2019UsWarehousePresets.compatPreset, + skuU123Qr2015UsWarehouse: skuU123Qr2015UsWarehousePresets.compatPreset, + skuK567Yz2023DefaultWarehouse: + skuK567Yz2023DefaultWarehousePresets.compatPreset, + skuH456St2019DefaultWarehouse: + skuH456St2019DefaultWarehousePresets.compatPreset, + skuG123Qr2015UsWarehouse: skuG123Qr2015UsWarehousePresets.compatPreset, + skuJ234Wx2023UsWarehouse: skuJ234Wx2023UsWarehousePresets.compatPreset, + skuE567Yz2019EuWarehouse: skuE567Yz2019EuWarehousePresets.compatPreset, + skuJ234Wx2015UsWarehouse: skuJ234Wx2015UsWarehousePresets.compatPreset, + skuI789Uv2023EuWarehouse: skuI789Uv2023EuWarehousePresets.compatPreset, + skuD234Wx2019UsWarehouse: skuD234Wx2019UsWarehousePresets.compatPreset, + skuF890Op2015DefaultWarehouse: + skuF890Op2015DefaultWarehousePresets.compatPreset, + skuD234Wx2015DefaultWarehouse: + skuD234Wx2015DefaultWarehousePresets.compatPreset, + skuK567Yz2015EuWarehouse: skuK567Yz2015EuWarehousePresets.compatPreset, + skuU123Qr2015DefaultWarehouse: + skuU123Qr2015DefaultWarehousePresets.compatPreset, + skuF890Op2023EuWarehouse: skuF890Op2023EuWarehousePresets.compatPreset, + skuH456St2015DefaultWarehouse: + skuH456St2015DefaultWarehousePresets.compatPreset, + skuJ234Wx2019EuWarehouse: skuJ234Wx2019EuWarehousePresets.compatPreset, + skuK567Yz2019EuWarehouse: skuK567Yz2019EuWarehousePresets.compatPreset, + skuK567Yz2023UsWarehouse: skuK567Yz2023UsWarehousePresets.compatPreset, +}; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-a-789-bc-2015-default-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-a-789-bc-2015-default-warehouse.spec.ts new file mode 100644 index 000000000..feaa9b590 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-a-789-bc-2015-default-warehouse.spec.ts @@ -0,0 +1,40 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuA789Bc2015DefaultWarehouse preset`, () => { + it(`should return a skuA789Bc2015DefaultWarehouse preset when built for rest`, () => { + const skuA789Bc2015DefaultWarehousePreset = InventoryEntryDraftRest.presets + .skuA789Bc2015DefaultWarehouse() + .build(); + expect(skuA789Bc2015DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuA789Bc2015DefaultWarehouse preset when built for graphql`, () => { + const skuA789Bc2015DefaultWarehousePreset = + InventoryEntryDraftGraphql.presets + .skuA789Bc2015DefaultWarehouse() + .build(); + expect(skuA789Bc2015DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuA789Bc2015DefaultWarehouse preset when built for legacy rest`, () => { + const skuA789Bc2015DefaultWarehousePreset = InventoryEntryDraft.presets + .skuA789Bc2015DefaultWarehouse() + .buildRest(); + expect(skuA789Bc2015DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuA789Bc2015DefaultWarehouse preset when built for legacy graphql`, () => { + const skuA789Bc2015DefaultWarehousePreset = InventoryEntryDraft.presets + .skuA789Bc2015DefaultWarehouse() + .buildGraphql(); + expect(skuA789Bc2015DefaultWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-a-789-bc-2015-default-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-a-789-bc-2015-default-warehouse.ts new file mode 100644 index 000000000..f8a5a2d6d --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-a-789-bc-2015-default-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .defaultWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .a789Bc01() + .build(); + +const skuA789Bc2015DefaultWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('a789-bc-2015-default-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuA789Bc2015DefaultWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-a-789-bc-2015-eu-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-a-789-bc-2015-eu-warehouse.spec.ts new file mode 100644 index 000000000..977f79bbe --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-a-789-bc-2015-eu-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuA789Bc2015EuWarehouse preset`, () => { + it(`should return a skuA789Bc2015EuWarehouse preset when built for rest`, () => { + const skuA789Bc2015EuWarehousePreset = InventoryEntryDraftRest.presets + .skuA789Bc2015EuWarehouse() + .build(); + expect(skuA789Bc2015EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuA789Bc2015EuWarehouse preset when built for graphql`, () => { + const skuA789Bc2015EuWarehousePreset = InventoryEntryDraftGraphql.presets + .skuA789Bc2015EuWarehouse() + .build(); + expect(skuA789Bc2015EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuA789Bc2015EuWarehouse preset when built for legacy rest`, () => { + const skuA789Bc2015EuWarehousePreset = InventoryEntryDraft.presets + .skuA789Bc2015EuWarehouse() + .buildRest(); + expect(skuA789Bc2015EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuA789Bc2015EuWarehouse preset when built for legacy graphql`, () => { + const skuA789Bc2015EuWarehousePreset = InventoryEntryDraft.presets + .skuA789Bc2015EuWarehouse() + .buildGraphql(); + expect(skuA789Bc2015EuWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-a-789-bc-2015-eu-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-a-789-bc-2015-eu-warehouse.ts new file mode 100644 index 000000000..0a64ee946 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-a-789-bc-2015-eu-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .euWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .a789Bc01() + .build(); + +const skuA789Bc2015EuWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('a789-bc-2015-eu-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuA789Bc2015EuWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-a-789-bc-2015-us-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-a-789-bc-2015-us-warehouse.spec.ts new file mode 100644 index 000000000..e6ca90f04 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-a-789-bc-2015-us-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuA789Bc2015UsWarehouse preset`, () => { + it(`should return a skuA789Bc2015UsWarehouse preset when built for rest`, () => { + const skuA789Bc2015UsWarehousePreset = InventoryEntryDraftRest.presets + .skuA789Bc2015UsWarehouse() + .build(); + expect(skuA789Bc2015UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuA789Bc2015UsWarehouse preset when built for graphql`, () => { + const skuA789Bc2015UsWarehousePreset = InventoryEntryDraftGraphql.presets + .skuA789Bc2015UsWarehouse() + .build(); + expect(skuA789Bc2015UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuA789Bc2015UsWarehouse preset when built for legacy rest`, () => { + const skuA789Bc2015UsWarehousePreset = InventoryEntryDraft.presets + .skuA789Bc2015UsWarehouse() + .buildRest(); + expect(skuA789Bc2015UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuA789Bc2015UsWarehouse preset when built for legacy graphql`, () => { + const skuA789Bc2015UsWarehousePreset = InventoryEntryDraft.presets + .skuA789Bc2015UsWarehouse() + .buildGraphql(); + expect(skuA789Bc2015UsWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-a-789-bc-2015-us-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-a-789-bc-2015-us-warehouse.ts new file mode 100644 index 000000000..a3e5dc7e6 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-a-789-bc-2015-us-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .usWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .a789Bc01() + .build(); + +const skuA789Bc2015UsWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('a789-bc-2015-us-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuA789Bc2015UsWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-a-789-bc-2019-default-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-a-789-bc-2019-default-warehouse.spec.ts new file mode 100644 index 000000000..a8aa51f84 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-a-789-bc-2019-default-warehouse.spec.ts @@ -0,0 +1,40 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuA789Bc2019DefaultWarehouse preset`, () => { + it(`should return a skuA789Bc2019DefaultWarehouse preset when built for rest`, () => { + const skuA789Bc2019DefaultWarehousePreset = InventoryEntryDraftRest.presets + .skuA789Bc2019DefaultWarehouse() + .build(); + expect(skuA789Bc2019DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuA789Bc2019DefaultWarehouse preset when built for graphql`, () => { + const skuA789Bc2019DefaultWarehousePreset = + InventoryEntryDraftGraphql.presets + .skuA789Bc2019DefaultWarehouse() + .build(); + expect(skuA789Bc2019DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuA789Bc2019DefaultWarehouse preset when built for legacy rest`, () => { + const skuA789Bc2019DefaultWarehousePreset = InventoryEntryDraft.presets + .skuA789Bc2019DefaultWarehouse() + .buildRest(); + expect(skuA789Bc2019DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuA789Bc2019DefaultWarehouse preset when built for legacy graphql`, () => { + const skuA789Bc2019DefaultWarehousePreset = InventoryEntryDraft.presets + .skuA789Bc2019DefaultWarehouse() + .buildGraphql(); + expect(skuA789Bc2019DefaultWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-a-789-bc-2019-default-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-a-789-bc-2019-default-warehouse.ts new file mode 100644 index 000000000..a931a1a49 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-a-789-bc-2019-default-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .defaultWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .a789Bc02() + .build(); + +const skuA789Bc2019DefaultWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('a789-bc-2019-default-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuA789Bc2019DefaultWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-a-789-bc-2019-eu-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-a-789-bc-2019-eu-warehouse.spec.ts new file mode 100644 index 000000000..7ad92b192 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-a-789-bc-2019-eu-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuA789Bc2019EuWarehouse preset`, () => { + it(`should return a skuA789Bc2019EuWarehouse preset when built for rest`, () => { + const skuA789Bc2019EuWarehousePreset = InventoryEntryDraftRest.presets + .skuA789Bc2019EuWarehouse() + .build(); + expect(skuA789Bc2019EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuA789Bc2019EuWarehouse preset when built for graphql`, () => { + const skuA789Bc2019EuWarehousePreset = InventoryEntryDraftGraphql.presets + .skuA789Bc2019EuWarehouse() + .build(); + expect(skuA789Bc2019EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuA789Bc2019EuWarehouse preset when built for legacy rest`, () => { + const skuA789Bc2019EuWarehousePreset = InventoryEntryDraft.presets + .skuA789Bc2019EuWarehouse() + .buildRest(); + expect(skuA789Bc2019EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuA789Bc2019EuWarehouse preset when built for legacy graphql`, () => { + const skuA789Bc2019EuWarehousePreset = InventoryEntryDraft.presets + .skuA789Bc2019EuWarehouse() + .buildGraphql(); + expect(skuA789Bc2019EuWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-a-789-bc-2019-eu-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-a-789-bc-2019-eu-warehouse.ts new file mode 100644 index 000000000..3cf0485fb --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-a-789-bc-2019-eu-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .euWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .a789Bc02() + .build(); + +const skuA789Bc2019EuWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('a789-bc-2019-eu-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuA789Bc2019EuWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-a-789-bc-2019-us-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-a-789-bc-2019-us-warehouse.spec.ts new file mode 100644 index 000000000..17f64dc9e --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-a-789-bc-2019-us-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuA789Bc2019UsWarehouse preset`, () => { + it(`should return a skuA789Bc2019UsWarehouse preset when built for rest`, () => { + const skuA789Bc2019UsWarehousePreset = InventoryEntryDraftRest.presets + .skuA789Bc2019UsWarehouse() + .build(); + expect(skuA789Bc2019UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuA789Bc2019UsWarehouse preset when built for graphql`, () => { + const skuA789Bc2019UsWarehousePreset = InventoryEntryDraftGraphql.presets + .skuA789Bc2019UsWarehouse() + .build(); + expect(skuA789Bc2019UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuA789Bc2019UsWarehouse preset when built for legacy rest`, () => { + const skuA789Bc2019UsWarehousePreset = InventoryEntryDraft.presets + .skuA789Bc2019UsWarehouse() + .buildRest(); + expect(skuA789Bc2019UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuA789Bc2019UsWarehouse preset when built for legacy graphql`, () => { + const skuA789Bc2019UsWarehousePreset = InventoryEntryDraft.presets + .skuA789Bc2019UsWarehouse() + .buildGraphql(); + expect(skuA789Bc2019UsWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-a-789-bc-2019-us-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-a-789-bc-2019-us-warehouse.ts new file mode 100644 index 000000000..b87a62feb --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-a-789-bc-2019-us-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .usWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .a789Bc02() + .build(); + +const skuA789Bc2019UsWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('a789-bc-2019-us-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuA789Bc2019UsWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-a-789-bc-2023-default-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-a-789-bc-2023-default-warehouse.spec.ts new file mode 100644 index 000000000..23ce52a6a --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-a-789-bc-2023-default-warehouse.spec.ts @@ -0,0 +1,40 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuA789Bc2023DefaultWarehouse preset`, () => { + it(`should return a skuA789Bc2023DefaultWarehouse preset when built for rest`, () => { + const skuA789Bc2023DefaultWarehousePreset = InventoryEntryDraftRest.presets + .skuA789Bc2023DefaultWarehouse() + .build(); + expect(skuA789Bc2023DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuA789Bc2023DefaultWarehouse preset when built for graphql`, () => { + const skuA789Bc2023DefaultWarehousePreset = + InventoryEntryDraftGraphql.presets + .skuA789Bc2023DefaultWarehouse() + .build(); + expect(skuA789Bc2023DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuA789Bc2023DefaultWarehouse preset when built for legacy rest`, () => { + const skuA789Bc2023DefaultWarehousePreset = InventoryEntryDraft.presets + .skuA789Bc2023DefaultWarehouse() + .buildRest(); + expect(skuA789Bc2023DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuA789Bc2023DefaultWarehouse preset when built for legacy graphql`, () => { + const skuA789Bc2023DefaultWarehousePreset = InventoryEntryDraft.presets + .skuA789Bc2023DefaultWarehouse() + .buildGraphql(); + expect(skuA789Bc2023DefaultWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-a-789-bc-2023-default-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-a-789-bc-2023-default-warehouse.ts new file mode 100644 index 000000000..048f04cf4 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-a-789-bc-2023-default-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .defaultWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .a789Bc03() + .build(); + +const skuA789Bc2023DefaultWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('a789-bc-2023-default-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuA789Bc2023DefaultWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-a-789-bc-2023-eu-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-a-789-bc-2023-eu-warehouse.spec.ts new file mode 100644 index 000000000..0c9fc7595 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-a-789-bc-2023-eu-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuA789Bc2023EuWarehouse preset`, () => { + it(`should return a skuA789Bc2023EuWarehouse preset when built for rest`, () => { + const skuA789Bc2023EuWarehousePreset = InventoryEntryDraftRest.presets + .skuA789Bc2023EuWarehouse() + .build(); + expect(skuA789Bc2023EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuA789Bc2023EuWarehouse preset when built for graphql`, () => { + const skuA789Bc2023EuWarehousePreset = InventoryEntryDraftGraphql.presets + .skuA789Bc2023EuWarehouse() + .build(); + expect(skuA789Bc2023EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuA789Bc2023EuWarehouse preset when built for legacy rest`, () => { + const skuA789Bc2023EuWarehousePreset = InventoryEntryDraft.presets + .skuA789Bc2023EuWarehouse() + .buildRest(); + expect(skuA789Bc2023EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuA789Bc2023EuWarehouse preset when built for legacy graphql`, () => { + const skuA789Bc2023EuWarehousePreset = InventoryEntryDraft.presets + .skuA789Bc2023EuWarehouse() + .buildGraphql(); + expect(skuA789Bc2023EuWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-a-789-bc-2023-eu-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-a-789-bc-2023-eu-warehouse.ts new file mode 100644 index 000000000..cd7ab7698 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-a-789-bc-2023-eu-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .euWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .a789Bc03() + .build(); + +const skuA789Bc2023EuWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('a789-bc-2023-eu-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuA789Bc2023EuWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-a-789-bc-2023-us-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-a-789-bc-2023-us-warehouse.spec.ts new file mode 100644 index 000000000..bab9b7958 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-a-789-bc-2023-us-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuA789Bc2023UsWarehouse preset`, () => { + it(`should return a skuA789Bc2023UsWarehouse preset when built for rest`, () => { + const skuA789Bc2023UsWarehousePreset = InventoryEntryDraftRest.presets + .skuA789Bc2023UsWarehouse() + .build(); + expect(skuA789Bc2023UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuA789Bc2023UsWarehouse preset when built for graphql`, () => { + const skuA789Bc2023UsWarehousePreset = InventoryEntryDraftGraphql.presets + .skuA789Bc2023UsWarehouse() + .build(); + expect(skuA789Bc2023UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuA789Bc2023UsWarehouse preset when built for legacy rest`, () => { + const skuA789Bc2023UsWarehousePreset = InventoryEntryDraft.presets + .skuA789Bc2023UsWarehouse() + .buildRest(); + expect(skuA789Bc2023UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuA789Bc2023UsWarehouse preset when built for legacy graphql`, () => { + const skuA789Bc2023UsWarehousePreset = InventoryEntryDraft.presets + .skuA789Bc2023UsWarehouse() + .buildGraphql(); + expect(skuA789Bc2023UsWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-a-789-bc-2023-us-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-a-789-bc-2023-us-warehouse.ts new file mode 100644 index 000000000..5a442ca33 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-a-789-bc-2023-us-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .usWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .a789Bc03() + .build(); + +const skuA789Bc2023UsWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('a789-bc-2023-us-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuA789Bc2023UsWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-a789-bc-2015-default.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-a789-bc-2015-default.spec.ts deleted file mode 100644 index dd147aea8..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-a789-bc-2015-default.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuA789Bc2015Default from './sku-a789-bc-2015-default'; - -describe(`with skuA789Bc2015Default preset and default-warehouse channel`, () => { - it(`should return a skuA789Bc2015Default preset`, () => { - const skuA789Bc2015DefaultPreset = - skuA789Bc2015Default().build(); - expect(skuA789Bc2015DefaultPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "a789-bc-2015-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "a789-bc-2015", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuA789Bc2015Default preset when built for graphql`, () => { - const skuA789Bc2015DefaultPresetGraphql = - skuA789Bc2015Default().buildGraphql(); - expect(skuA789Bc2015DefaultPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "a789-bc-2015-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "a789-bc-2015", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-a789-bc-2015-default.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-a789-bc-2015-default.ts deleted file mode 100644 index 0c4dcf866..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-a789-bc-2015-default.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const defaultWarehouse = ChannelDraft.presets.sampleDataB2B - .defaultWarehouse() - .build(); - -const a789Bc01 = ProductVariantDraft.presets.sampleDataB2B - .a789Bc01() - .build(); - -const skuA789Bc2015Default = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${a789Bc01.sku}-${defaultWarehouse.key}`) - .sku(a789Bc01.sku!) - .quantityOnStock(1000) - .supplyChannel( - KeyReferenceDraft.presets.channel().key(defaultWarehouse.key) - ); - -export default skuA789Bc2015Default; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-a789-bc-2015-eu.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-a789-bc-2015-eu.spec.ts deleted file mode 100644 index 048a069b9..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-a789-bc-2015-eu.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuA789Bc2015Eu from './sku-a789-bc-2015-eu'; - -describe(`with skuA789Bc2015Eu preset and eu-warehouse channel`, () => { - it(`should return a skuA789Bc2015Eu preset`, () => { - const skuA789Bc2015EuPreset = - skuA789Bc2015Eu().build(); - expect(skuA789Bc2015EuPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "a789-bc-2015-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "a789-bc-2015", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuA789Bc2015Eu preset when built for graphql`, () => { - const skuA789Bc2015EuPresetGraphql = - skuA789Bc2015Eu().buildGraphql(); - expect(skuA789Bc2015EuPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "a789-bc-2015-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "a789-bc-2015", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-a789-bc-2015-eu.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-a789-bc-2015-eu.ts deleted file mode 100644 index d3be5b9dd..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-a789-bc-2015-eu.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const euWarehouse = ChannelDraft.presets.sampleDataB2B - .euWarehouse() - .build(); - -const a789Bc01 = ProductVariantDraft.presets.sampleDataB2B - .a789Bc01() - .build(); - -const skuA789Bc2015Eu = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${a789Bc01.sku}-${euWarehouse.key}`) - .sku(a789Bc01.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(euWarehouse.key)); - -export default skuA789Bc2015Eu; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-a789-bc-2015-us.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-a789-bc-2015-us.spec.ts deleted file mode 100644 index 6a99a040d..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-a789-bc-2015-us.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuA789Bc2015Us from './sku-a789-bc-2015-us'; - -describe(`with skuA789Bc2015Us preset and us-warehouse channel`, () => { - it(`should return a skuA789Bc2015Us preset`, () => { - const skuA789Bc2015UsPreset = - skuA789Bc2015Us().build(); - expect(skuA789Bc2015UsPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "a789-bc-2015-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "a789-bc-2015", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuA789Bc2015Us preset when built for graphql`, () => { - const skuA789Bc2015UsPresetGraphql = - skuA789Bc2015Us().buildGraphql(); - expect(skuA789Bc2015UsPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "a789-bc-2015-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "a789-bc-2015", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-a789-bc-2015-us.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-a789-bc-2015-us.ts deleted file mode 100644 index e99572584..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-a789-bc-2015-us.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const usWarehouse = ChannelDraft.presets.sampleDataB2B - .usWarehouse() - .build(); - -const a789Bc01 = ProductVariantDraft.presets.sampleDataB2B - .a789Bc01() - .build(); - -const skuA789Bc2015Us = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${a789Bc01.sku}-${usWarehouse.key}`) - .sku(a789Bc01.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(usWarehouse.key)); - -export default skuA789Bc2015Us; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-a789-bc-2019-default.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-a789-bc-2019-default.spec.ts deleted file mode 100644 index 94470961a..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-a789-bc-2019-default.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuA789Bc2019Default from './sku-a789-bc-2019-default'; - -describe(`with skuA789Bc2019Default preset and default-warehouse channel`, () => { - it(`should return a skuA789Bc2019Default preset`, () => { - const skuA789Bc2019DefaultPreset = - skuA789Bc2019Default().build(); - expect(skuA789Bc2019DefaultPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "a789-bc-2019-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "a789-bc-2019", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuA789Bc2019Default preset when built for graphql`, () => { - const skuA789Bc2019DefaultPresetGraphql = - skuA789Bc2019Default().buildGraphql(); - expect(skuA789Bc2019DefaultPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "a789-bc-2019-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "a789-bc-2019", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-a789-bc-2019-default.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-a789-bc-2019-default.ts deleted file mode 100644 index d1a9ae797..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-a789-bc-2019-default.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const defaultWarehouse = ChannelDraft.presets.sampleDataB2B - .defaultWarehouse() - .build(); - -const a789Bc02 = ProductVariantDraft.presets.sampleDataB2B - .a789Bc02() - .build(); - -const skuA789Bc2019Default = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${a789Bc02.sku}-${defaultWarehouse.key}`) - .sku(a789Bc02.sku!) - .quantityOnStock(1000) - .supplyChannel( - KeyReferenceDraft.presets.channel().key(defaultWarehouse.key) - ); - -export default skuA789Bc2019Default; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-a789-bc-2019-eu.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-a789-bc-2019-eu.spec.ts deleted file mode 100644 index 06c5c36e8..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-a789-bc-2019-eu.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuA789Bc2019Eu from './sku-a789-bc-2019-eu'; - -describe(`with skuA789Bc2019Eu preset and eu-warehouse channel`, () => { - it(`should return a skuA789Bc2019Eu preset`, () => { - const skuA789Bc2019EuPreset = - skuA789Bc2019Eu().build(); - expect(skuA789Bc2019EuPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "a789-bc-2019-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "a789-bc-2019", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuA789Bc2019Eu preset when built for graphql`, () => { - const skuA789Bc2019EuPresetGraphql = - skuA789Bc2019Eu().buildGraphql(); - expect(skuA789Bc2019EuPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "a789-bc-2019-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "a789-bc-2019", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-a789-bc-2019-eu.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-a789-bc-2019-eu.ts deleted file mode 100644 index f1ad7a5f9..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-a789-bc-2019-eu.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const euWarehouse = ChannelDraft.presets.sampleDataB2B - .euWarehouse() - .build(); - -const a789Bc02 = ProductVariantDraft.presets.sampleDataB2B - .a789Bc02() - .build(); - -const skuA789Bc2019Eu = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${a789Bc02.sku}-${euWarehouse.key}`) - .sku(a789Bc02.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(euWarehouse.key)); - -export default skuA789Bc2019Eu; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-a789-bc-2019-us.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-a789-bc-2019-us.spec.ts deleted file mode 100644 index b9eef1b89..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-a789-bc-2019-us.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuA789Bc2019Us from './sku-a789-bc-2019-us'; - -describe(`with skuA789Bc2019Us preset and us-warehouse channel`, () => { - it(`should return a skuA789Bc2019Us preset`, () => { - const skuA789Bc2019UsPreset = - skuA789Bc2019Us().build(); - expect(skuA789Bc2019UsPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "a789-bc-2019-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "a789-bc-2019", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuA789Bc2019Us preset when built for graphql`, () => { - const skuA789Bc2019UsPresetGraphql = - skuA789Bc2019Us().buildGraphql(); - expect(skuA789Bc2019UsPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "a789-bc-2019-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "a789-bc-2019", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-a789-bc-2019-us.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-a789-bc-2019-us.ts deleted file mode 100644 index 8bd401c51..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-a789-bc-2019-us.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const usWarehouse = ChannelDraft.presets.sampleDataB2B - .usWarehouse() - .build(); - -const a789Bc02 = ProductVariantDraft.presets.sampleDataB2B - .a789Bc02() - .build(); - -const skuA789Bc2019Us = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${a789Bc02.sku}-${usWarehouse.key}`) - .sku(a789Bc02.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(usWarehouse.key)); - -export default skuA789Bc2019Us; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-a789-bc-2023-default.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-a789-bc-2023-default.spec.ts deleted file mode 100644 index 127f25a0e..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-a789-bc-2023-default.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuA789Bc2023Default from './sku-a789-bc-2023-default'; - -describe(`with skuA789Bc2023Default preset and default-warehouse channel`, () => { - it(`should return a skuA789Bc2023Default preset`, () => { - const skuA789Bc2023DefaultPreset = - skuA789Bc2023Default().build(); - expect(skuA789Bc2023DefaultPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "a789-bc-2023-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "a789-bc-2023", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuA789Bc2023Default preset when built for graphql`, () => { - const skuA789Bc2023DefaultPresetGraphql = - skuA789Bc2023Default().buildGraphql(); - expect(skuA789Bc2023DefaultPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "a789-bc-2023-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "a789-bc-2023", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-a789-bc-2023-default.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-a789-bc-2023-default.ts deleted file mode 100644 index 8a5ccc00c..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-a789-bc-2023-default.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const defaultWarehouse = ChannelDraft.presets.sampleDataB2B - .defaultWarehouse() - .build(); - -const a789Bc03 = ProductVariantDraft.presets.sampleDataB2B - .a789Bc03() - .build(); - -const skuA789Bc2023Default = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${a789Bc03.sku}-${defaultWarehouse.key}`) - .sku(a789Bc03.sku!) - .quantityOnStock(1000) - .supplyChannel( - KeyReferenceDraft.presets.channel().key(defaultWarehouse.key) - ); - -export default skuA789Bc2023Default; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-a789-bc-2023-eu.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-a789-bc-2023-eu.spec.ts deleted file mode 100644 index 3bfd63b4b..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-a789-bc-2023-eu.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuA789Bc2023Eu from './sku-a789-bc-2023-eu'; - -describe(`with skuA789Bc2023Eu preset and eu-warehouse channel`, () => { - it(`should return a skuA789Bc2023Eu preset`, () => { - const skuA789Bc2023EuPreset = - skuA789Bc2023Eu().build(); - expect(skuA789Bc2023EuPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "a789-bc-2023-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "a789-bc-2023", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuA789Bc2023Eu preset when built for graphql`, () => { - const skuA789Bc2023EuPresetGraphql = - skuA789Bc2023Eu().buildGraphql(); - expect(skuA789Bc2023EuPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "a789-bc-2023-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "a789-bc-2023", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-a789-bc-2023-eu.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-a789-bc-2023-eu.ts deleted file mode 100644 index 64a84af1b..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-a789-bc-2023-eu.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const euWarehouse = ChannelDraft.presets.sampleDataB2B - .euWarehouse() - .build(); - -const a789Bc03 = ProductVariantDraft.presets.sampleDataB2B - .a789Bc03() - .build(); - -const skuA789Bc2023Eu = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${a789Bc03.sku}-${euWarehouse.key}`) - .sku(a789Bc03.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(euWarehouse.key)); - -export default skuA789Bc2023Eu; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-a789-bc-2023-us.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-a789-bc-2023-us.spec.ts deleted file mode 100644 index fc6dfaca7..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-a789-bc-2023-us.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuA789Bc2023Us from './sku-a789-bc-2023-us'; - -describe(`with skuA789Bc2023Us preset and us-warehouse channel`, () => { - it(`should return a skuA789Bc2023Us preset`, () => { - const skuA789Bc2023UsPreset = - skuA789Bc2023Us().build(); - expect(skuA789Bc2023UsPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "a789-bc-2023-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "a789-bc-2023", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuA789Bc2023Us preset when built for graphql`, () => { - const skuA789Bc2023UsPresetGraphql = - skuA789Bc2023Us().buildGraphql(); - expect(skuA789Bc2023UsPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "a789-bc-2023-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "a789-bc-2023", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-a789-bc-2023-us.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-a789-bc-2023-us.ts deleted file mode 100644 index 1e7fea4c5..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-a789-bc-2023-us.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const usWarehouse = ChannelDraft.presets.sampleDataB2B - .usWarehouse() - .build(); - -const a789Bc03 = ProductVariantDraft.presets.sampleDataB2B - .a789Bc03() - .build(); - -const skuA789Bc2023Us = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${a789Bc03.sku}-${usWarehouse.key}`) - .sku(a789Bc03.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(usWarehouse.key)); - -export default skuA789Bc2023Us; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aa-123-qr-2015-default-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aa-123-qr-2015-default-warehouse.spec.ts new file mode 100644 index 000000000..24e154389 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aa-123-qr-2015-default-warehouse.spec.ts @@ -0,0 +1,40 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuAa123Qr2015DefaultWarehouse preset`, () => { + it(`should return a skuAa123Qr2015DefaultWarehouse preset when built for rest`, () => { + const skuAa123Qr2015DefaultWarehousePreset = InventoryEntryDraftRest.presets + .skuAa123Qr2015DefaultWarehouse() + .build(); + expect(skuAa123Qr2015DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuAa123Qr2015DefaultWarehouse preset when built for graphql`, () => { + const skuAa123Qr2015DefaultWarehousePreset = + InventoryEntryDraftGraphql.presets + .skuAa123Qr2015DefaultWarehouse() + .build(); + expect(skuAa123Qr2015DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuAa123Qr2015DefaultWarehouse preset when built for legacy rest`, () => { + const skuAa123Qr2015DefaultWarehousePreset = InventoryEntryDraft.presets + .skuAa123Qr2015DefaultWarehouse() + .buildRest(); + expect(skuAa123Qr2015DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuAa123Qr2015DefaultWarehouse preset when built for legacy graphql`, () => { + const skuAa123Qr2015DefaultWarehousePreset = InventoryEntryDraft.presets + .skuAa123Qr2015DefaultWarehouse() + .buildGraphql(); + expect(skuAa123Qr2015DefaultWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aa-123-qr-2015-default-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aa-123-qr-2015-default-warehouse.ts new file mode 100644 index 000000000..46d5ca583 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aa-123-qr-2015-default-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .defaultWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .aa123Qr01() + .build(); + +const skuAa123Qr2015DefaultWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('aa123-qr-2015-default-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuAa123Qr2015DefaultWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aa-123-qr-2015-eu-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aa-123-qr-2015-eu-warehouse.spec.ts new file mode 100644 index 000000000..0ce100334 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aa-123-qr-2015-eu-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuAa123Qr2015EuWarehouse preset`, () => { + it(`should return a skuAa123Qr2015EuWarehouse preset when built for rest`, () => { + const skuAa123Qr2015EuWarehousePreset = InventoryEntryDraftRest.presets + .skuAa123Qr2015EuWarehouse() + .build(); + expect(skuAa123Qr2015EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuAa123Qr2015EuWarehouse preset when built for graphql`, () => { + const skuAa123Qr2015EuWarehousePreset = InventoryEntryDraftGraphql.presets + .skuAa123Qr2015EuWarehouse() + .build(); + expect(skuAa123Qr2015EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuAa123Qr2015EuWarehouse preset when built for legacy rest`, () => { + const skuAa123Qr2015EuWarehousePreset = InventoryEntryDraft.presets + .skuAa123Qr2015EuWarehouse() + .buildRest(); + expect(skuAa123Qr2015EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuAa123Qr2015EuWarehouse preset when built for legacy graphql`, () => { + const skuAa123Qr2015EuWarehousePreset = InventoryEntryDraft.presets + .skuAa123Qr2015EuWarehouse() + .buildGraphql(); + expect(skuAa123Qr2015EuWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aa-123-qr-2015-eu-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aa-123-qr-2015-eu-warehouse.ts new file mode 100644 index 000000000..70cd4d41b --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aa-123-qr-2015-eu-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .euWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .aa123Qr01() + .build(); + +const skuAa123Qr2015EuWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('aa123-qr-2015-eu-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuAa123Qr2015EuWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aa-123-qr-2015-us-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aa-123-qr-2015-us-warehouse.spec.ts new file mode 100644 index 000000000..a8be9622c --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aa-123-qr-2015-us-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuAa123Qr2015UsWarehouse preset`, () => { + it(`should return a skuAa123Qr2015UsWarehouse preset when built for rest`, () => { + const skuAa123Qr2015UsWarehousePreset = InventoryEntryDraftRest.presets + .skuAa123Qr2015UsWarehouse() + .build(); + expect(skuAa123Qr2015UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuAa123Qr2015UsWarehouse preset when built for graphql`, () => { + const skuAa123Qr2015UsWarehousePreset = InventoryEntryDraftGraphql.presets + .skuAa123Qr2015UsWarehouse() + .build(); + expect(skuAa123Qr2015UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuAa123Qr2015UsWarehouse preset when built for legacy rest`, () => { + const skuAa123Qr2015UsWarehousePreset = InventoryEntryDraft.presets + .skuAa123Qr2015UsWarehouse() + .buildRest(); + expect(skuAa123Qr2015UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuAa123Qr2015UsWarehouse preset when built for legacy graphql`, () => { + const skuAa123Qr2015UsWarehousePreset = InventoryEntryDraft.presets + .skuAa123Qr2015UsWarehouse() + .buildGraphql(); + expect(skuAa123Qr2015UsWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aa-123-qr-2015-us-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aa-123-qr-2015-us-warehouse.ts new file mode 100644 index 000000000..959ee3b9d --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aa-123-qr-2015-us-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .usWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .aa123Qr01() + .build(); + +const skuAa123Qr2015UsWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('aa123-qr-2015-us-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuAa123Qr2015UsWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aa-123-qr-2019-default-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aa-123-qr-2019-default-warehouse.spec.ts new file mode 100644 index 000000000..75649cbf3 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aa-123-qr-2019-default-warehouse.spec.ts @@ -0,0 +1,40 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuAa123Qr2019DefaultWarehouse preset`, () => { + it(`should return a skuAa123Qr2019DefaultWarehouse preset when built for rest`, () => { + const skuAa123Qr2019DefaultWarehousePreset = InventoryEntryDraftRest.presets + .skuAa123Qr2019DefaultWarehouse() + .build(); + expect(skuAa123Qr2019DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuAa123Qr2019DefaultWarehouse preset when built for graphql`, () => { + const skuAa123Qr2019DefaultWarehousePreset = + InventoryEntryDraftGraphql.presets + .skuAa123Qr2019DefaultWarehouse() + .build(); + expect(skuAa123Qr2019DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuAa123Qr2019DefaultWarehouse preset when built for legacy rest`, () => { + const skuAa123Qr2019DefaultWarehousePreset = InventoryEntryDraft.presets + .skuAa123Qr2019DefaultWarehouse() + .buildRest(); + expect(skuAa123Qr2019DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuAa123Qr2019DefaultWarehouse preset when built for legacy graphql`, () => { + const skuAa123Qr2019DefaultWarehousePreset = InventoryEntryDraft.presets + .skuAa123Qr2019DefaultWarehouse() + .buildGraphql(); + expect(skuAa123Qr2019DefaultWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aa-123-qr-2019-default-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aa-123-qr-2019-default-warehouse.ts new file mode 100644 index 000000000..d246e8871 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aa-123-qr-2019-default-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .defaultWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .aa123Qr02() + .build(); + +const skuAa123Qr2019DefaultWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('aa123-qr-2019-default-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuAa123Qr2019DefaultWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aa-123-qr-2019-eu-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aa-123-qr-2019-eu-warehouse.spec.ts new file mode 100644 index 000000000..46e441b57 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aa-123-qr-2019-eu-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuAa123Qr2019EuWarehouse preset`, () => { + it(`should return a skuAa123Qr2019EuWarehouse preset when built for rest`, () => { + const skuAa123Qr2019EuWarehousePreset = InventoryEntryDraftRest.presets + .skuAa123Qr2019EuWarehouse() + .build(); + expect(skuAa123Qr2019EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuAa123Qr2019EuWarehouse preset when built for graphql`, () => { + const skuAa123Qr2019EuWarehousePreset = InventoryEntryDraftGraphql.presets + .skuAa123Qr2019EuWarehouse() + .build(); + expect(skuAa123Qr2019EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuAa123Qr2019EuWarehouse preset when built for legacy rest`, () => { + const skuAa123Qr2019EuWarehousePreset = InventoryEntryDraft.presets + .skuAa123Qr2019EuWarehouse() + .buildRest(); + expect(skuAa123Qr2019EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuAa123Qr2019EuWarehouse preset when built for legacy graphql`, () => { + const skuAa123Qr2019EuWarehousePreset = InventoryEntryDraft.presets + .skuAa123Qr2019EuWarehouse() + .buildGraphql(); + expect(skuAa123Qr2019EuWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aa-123-qr-2019-eu-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aa-123-qr-2019-eu-warehouse.ts new file mode 100644 index 000000000..82dae5abb --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aa-123-qr-2019-eu-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .euWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .aa123Qr02() + .build(); + +const skuAa123Qr2019EuWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('aa123-qr-2019-eu-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuAa123Qr2019EuWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aa-123-qr-2019-us-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aa-123-qr-2019-us-warehouse.spec.ts new file mode 100644 index 000000000..d6a7b7350 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aa-123-qr-2019-us-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuAa123Qr2019UsWarehouse preset`, () => { + it(`should return a skuAa123Qr2019UsWarehouse preset when built for rest`, () => { + const skuAa123Qr2019UsWarehousePreset = InventoryEntryDraftRest.presets + .skuAa123Qr2019UsWarehouse() + .build(); + expect(skuAa123Qr2019UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuAa123Qr2019UsWarehouse preset when built for graphql`, () => { + const skuAa123Qr2019UsWarehousePreset = InventoryEntryDraftGraphql.presets + .skuAa123Qr2019UsWarehouse() + .build(); + expect(skuAa123Qr2019UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuAa123Qr2019UsWarehouse preset when built for legacy rest`, () => { + const skuAa123Qr2019UsWarehousePreset = InventoryEntryDraft.presets + .skuAa123Qr2019UsWarehouse() + .buildRest(); + expect(skuAa123Qr2019UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuAa123Qr2019UsWarehouse preset when built for legacy graphql`, () => { + const skuAa123Qr2019UsWarehousePreset = InventoryEntryDraft.presets + .skuAa123Qr2019UsWarehouse() + .buildGraphql(); + expect(skuAa123Qr2019UsWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aa-123-qr-2019-us-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aa-123-qr-2019-us-warehouse.ts new file mode 100644 index 000000000..69f7059cd --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aa-123-qr-2019-us-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .usWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .aa123Qr02() + .build(); + +const skuAa123Qr2019UsWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('aa123-qr-2019-us-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuAa123Qr2019UsWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aa-123-qr-2023-default-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aa-123-qr-2023-default-warehouse.spec.ts new file mode 100644 index 000000000..b21bc80de --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aa-123-qr-2023-default-warehouse.spec.ts @@ -0,0 +1,40 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuAa123Qr2023DefaultWarehouse preset`, () => { + it(`should return a skuAa123Qr2023DefaultWarehouse preset when built for rest`, () => { + const skuAa123Qr2023DefaultWarehousePreset = InventoryEntryDraftRest.presets + .skuAa123Qr2023DefaultWarehouse() + .build(); + expect(skuAa123Qr2023DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuAa123Qr2023DefaultWarehouse preset when built for graphql`, () => { + const skuAa123Qr2023DefaultWarehousePreset = + InventoryEntryDraftGraphql.presets + .skuAa123Qr2023DefaultWarehouse() + .build(); + expect(skuAa123Qr2023DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuAa123Qr2023DefaultWarehouse preset when built for legacy rest`, () => { + const skuAa123Qr2023DefaultWarehousePreset = InventoryEntryDraft.presets + .skuAa123Qr2023DefaultWarehouse() + .buildRest(); + expect(skuAa123Qr2023DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuAa123Qr2023DefaultWarehouse preset when built for legacy graphql`, () => { + const skuAa123Qr2023DefaultWarehousePreset = InventoryEntryDraft.presets + .skuAa123Qr2023DefaultWarehouse() + .buildGraphql(); + expect(skuAa123Qr2023DefaultWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aa-123-qr-2023-default-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aa-123-qr-2023-default-warehouse.ts new file mode 100644 index 000000000..712c75423 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aa-123-qr-2023-default-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .defaultWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .aa123Qr03() + .build(); + +const skuAa123Qr2023DefaultWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('aa123-qr-2023-default-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuAa123Qr2023DefaultWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aa-123-qr-2023-eu-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aa-123-qr-2023-eu-warehouse.spec.ts new file mode 100644 index 000000000..dbfb4143f --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aa-123-qr-2023-eu-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuAa123Qr2023EuWarehouse preset`, () => { + it(`should return a skuAa123Qr2023EuWarehouse preset when built for rest`, () => { + const skuAa123Qr2023EuWarehousePreset = InventoryEntryDraftRest.presets + .skuAa123Qr2023EuWarehouse() + .build(); + expect(skuAa123Qr2023EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuAa123Qr2023EuWarehouse preset when built for graphql`, () => { + const skuAa123Qr2023EuWarehousePreset = InventoryEntryDraftGraphql.presets + .skuAa123Qr2023EuWarehouse() + .build(); + expect(skuAa123Qr2023EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuAa123Qr2023EuWarehouse preset when built for legacy rest`, () => { + const skuAa123Qr2023EuWarehousePreset = InventoryEntryDraft.presets + .skuAa123Qr2023EuWarehouse() + .buildRest(); + expect(skuAa123Qr2023EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuAa123Qr2023EuWarehouse preset when built for legacy graphql`, () => { + const skuAa123Qr2023EuWarehousePreset = InventoryEntryDraft.presets + .skuAa123Qr2023EuWarehouse() + .buildGraphql(); + expect(skuAa123Qr2023EuWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aa-123-qr-2023-eu-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aa-123-qr-2023-eu-warehouse.ts new file mode 100644 index 000000000..7c8a130be --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aa-123-qr-2023-eu-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .euWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .aa123Qr03() + .build(); + +const skuAa123Qr2023EuWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('aa123-qr-2023-eu-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuAa123Qr2023EuWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aa-123-qr-2023-us-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aa-123-qr-2023-us-warehouse.spec.ts new file mode 100644 index 000000000..9b46c74e3 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aa-123-qr-2023-us-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuAa123Qr2023UsWarehouse preset`, () => { + it(`should return a skuAa123Qr2023UsWarehouse preset when built for rest`, () => { + const skuAa123Qr2023UsWarehousePreset = InventoryEntryDraftRest.presets + .skuAa123Qr2023UsWarehouse() + .build(); + expect(skuAa123Qr2023UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuAa123Qr2023UsWarehouse preset when built for graphql`, () => { + const skuAa123Qr2023UsWarehousePreset = InventoryEntryDraftGraphql.presets + .skuAa123Qr2023UsWarehouse() + .build(); + expect(skuAa123Qr2023UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuAa123Qr2023UsWarehouse preset when built for legacy rest`, () => { + const skuAa123Qr2023UsWarehousePreset = InventoryEntryDraft.presets + .skuAa123Qr2023UsWarehouse() + .buildRest(); + expect(skuAa123Qr2023UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuAa123Qr2023UsWarehouse preset when built for legacy graphql`, () => { + const skuAa123Qr2023UsWarehousePreset = InventoryEntryDraft.presets + .skuAa123Qr2023UsWarehouse() + .buildGraphql(); + expect(skuAa123Qr2023UsWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aa-123-qr-2023-us-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aa-123-qr-2023-us-warehouse.ts new file mode 100644 index 000000000..0cbb92e3f --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aa-123-qr-2023-us-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .usWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .aa123Qr03() + .build(); + +const skuAa123Qr2023UsWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('aa123-qr-2023-us-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuAa123Qr2023UsWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aa123-qr-2015-default.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aa123-qr-2015-default.spec.ts deleted file mode 100644 index 387974cd5..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aa123-qr-2015-default.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuAa123Qr2015Default from './sku-aa123-qr-2015-default'; - -describe(`with skuAa123Qr2015Default preset and default-warehouse channel`, () => { - it(`should return a skuAa123Qr2015Default preset`, () => { - const skuAa123Qr2015DefaultPreset = - skuAa123Qr2015Default().build(); - expect(skuAa123Qr2015DefaultPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "aa123-qr-2015-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "aa123-qr-2015", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuAa123Qr2015Default preset when built for graphql`, () => { - const skuAa123Qr2015DefaultPresetGraphql = - skuAa123Qr2015Default().buildGraphql(); - expect(skuAa123Qr2015DefaultPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "aa123-qr-2015-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "aa123-qr-2015", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aa123-qr-2015-default.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aa123-qr-2015-default.ts deleted file mode 100644 index 39e22b0fb..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aa123-qr-2015-default.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const defaultWarehouse = ChannelDraft.presets.sampleDataB2B - .defaultWarehouse() - .build(); - -const aa123Qr01 = ProductVariantDraft.presets.sampleDataB2B - .aa123Qr01() - .build(); - -const skuAa123Qr2015Default = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${aa123Qr01.sku}-${defaultWarehouse.key}`) - .sku(aa123Qr01.sku!) - .quantityOnStock(1000) - .supplyChannel( - KeyReferenceDraft.presets.channel().key(defaultWarehouse.key) - ); - -export default skuAa123Qr2015Default; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aa123-qr-2015-eu.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aa123-qr-2015-eu.spec.ts deleted file mode 100644 index b6abdb399..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aa123-qr-2015-eu.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuAa123Qr2015Eu from './sku-aa123-qr-2015-eu'; - -describe(`with skuAa123Qr2015Eu preset and eu-warehouse channel`, () => { - it(`should return a skuAa123Qr2015Eu preset`, () => { - const skuAa123Qr2015EuPreset = - skuAa123Qr2015Eu().build(); - expect(skuAa123Qr2015EuPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "aa123-qr-2015-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "aa123-qr-2015", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuAa123Qr2015Eu preset when built for graphql`, () => { - const skuAa123Qr2015EuPresetGraphql = - skuAa123Qr2015Eu().buildGraphql(); - expect(skuAa123Qr2015EuPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "aa123-qr-2015-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "aa123-qr-2015", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aa123-qr-2015-eu.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aa123-qr-2015-eu.ts deleted file mode 100644 index 430171b38..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aa123-qr-2015-eu.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const euWarehouse = ChannelDraft.presets.sampleDataB2B - .euWarehouse() - .build(); - -const aa123Qr01 = ProductVariantDraft.presets.sampleDataB2B - .aa123Qr01() - .build(); - -const skuAa123Qr2015Eu = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${aa123Qr01.sku}-${euWarehouse.key}`) - .sku(aa123Qr01.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(euWarehouse.key)); - -export default skuAa123Qr2015Eu; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aa123-qr-2015-us.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aa123-qr-2015-us.spec.ts deleted file mode 100644 index 7ca857054..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aa123-qr-2015-us.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuAa123Qr2015Us from './sku-aa123-qr-2015-us'; - -describe(`with skuAa123Qr2015Us preset and us-warehouse channel`, () => { - it(`should return a skuAa123Qr2015Us preset`, () => { - const skuAa123Qr2015UsPreset = - skuAa123Qr2015Us().build(); - expect(skuAa123Qr2015UsPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "aa123-qr-2015-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "aa123-qr-2015", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuAa123Qr2015Us preset when built for graphql`, () => { - const skuAa123Qr2015UsPresetGraphql = - skuAa123Qr2015Us().buildGraphql(); - expect(skuAa123Qr2015UsPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "aa123-qr-2015-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "aa123-qr-2015", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aa123-qr-2015-us.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aa123-qr-2015-us.ts deleted file mode 100644 index 71564e506..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aa123-qr-2015-us.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const usWarehouse = ChannelDraft.presets.sampleDataB2B - .usWarehouse() - .build(); - -const aa123Qr01 = ProductVariantDraft.presets.sampleDataB2B - .aa123Qr01() - .build(); - -const skuAa123Qr2015Us = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${aa123Qr01.sku}-${usWarehouse.key}`) - .sku(aa123Qr01.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(usWarehouse.key)); - -export default skuAa123Qr2015Us; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aa123-qr-2019-default.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aa123-qr-2019-default.spec.ts deleted file mode 100644 index 4b6ecc1c8..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aa123-qr-2019-default.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuAa123Qr2019Default from './sku-aa123-qr-2019-default'; - -describe(`with skuAa123Qr2019Default preset and default-warehouse channel`, () => { - it(`should return a skuAa123Qr2019Default preset`, () => { - const skuAa123Qr2019DefaultPreset = - skuAa123Qr2019Default().build(); - expect(skuAa123Qr2019DefaultPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "aa123-qr-2019-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "aa123-qr-2019", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuAa123Qr2019Default preset when built for graphql`, () => { - const skuAa123Qr2019DefaultPresetGraphql = - skuAa123Qr2019Default().buildGraphql(); - expect(skuAa123Qr2019DefaultPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "aa123-qr-2019-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "aa123-qr-2019", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aa123-qr-2019-default.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aa123-qr-2019-default.ts deleted file mode 100644 index bfbacb768..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aa123-qr-2019-default.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const defaultWarehouse = ChannelDraft.presets.sampleDataB2B - .defaultWarehouse() - .build(); - -const aa123Qr02 = ProductVariantDraft.presets.sampleDataB2B - .aa123Qr02() - .build(); - -const skuAa123Qr2019Default = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${aa123Qr02.sku}-${defaultWarehouse.key}`) - .sku(aa123Qr02.sku!) - .quantityOnStock(1000) - .supplyChannel( - KeyReferenceDraft.presets.channel().key(defaultWarehouse.key) - ); - -export default skuAa123Qr2019Default; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aa123-qr-2019-eu.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aa123-qr-2019-eu.spec.ts deleted file mode 100644 index 66fa9a422..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aa123-qr-2019-eu.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuAa123Qr2019Eu from './sku-aa123-qr-2019-eu'; - -describe(`with skuAa123Qr2019Eu preset and eu-warehouse channel`, () => { - it(`should return a skuAa123Qr2019Eu preset`, () => { - const skuAa123Qr2019EuPreset = - skuAa123Qr2019Eu().build(); - expect(skuAa123Qr2019EuPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "aa123-qr-2019-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "aa123-qr-2019", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuAa123Qr2019Eu preset when built for graphql`, () => { - const skuAa123Qr2019EuPresetGraphql = - skuAa123Qr2019Eu().buildGraphql(); - expect(skuAa123Qr2019EuPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "aa123-qr-2019-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "aa123-qr-2019", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aa123-qr-2019-eu.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aa123-qr-2019-eu.ts deleted file mode 100644 index 139e16192..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aa123-qr-2019-eu.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const euWarehouse = ChannelDraft.presets.sampleDataB2B - .euWarehouse() - .build(); - -const aa123Qr02 = ProductVariantDraft.presets.sampleDataB2B - .aa123Qr02() - .build(); - -const skuAa123Qr2019Eu = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${aa123Qr02.sku}-${euWarehouse.key}`) - .sku(aa123Qr02.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(euWarehouse.key)); - -export default skuAa123Qr2019Eu; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aa123-qr-2019-us.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aa123-qr-2019-us.spec.ts deleted file mode 100644 index 422d5f7b5..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aa123-qr-2019-us.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuAa123Qr2019Us from './sku-aa123-qr-2019-us'; - -describe(`with skuAa123Qr2019Us preset and us-warehouse channel`, () => { - it(`should return a skuAa123Qr2019Us preset`, () => { - const skuAa123Qr2019UsPreset = - skuAa123Qr2019Us().build(); - expect(skuAa123Qr2019UsPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "aa123-qr-2019-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "aa123-qr-2019", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuAa123Qr2019Us preset when built for graphql`, () => { - const skuAa123Qr2019UsPresetGraphql = - skuAa123Qr2019Us().buildGraphql(); - expect(skuAa123Qr2019UsPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "aa123-qr-2019-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "aa123-qr-2019", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aa123-qr-2019-us.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aa123-qr-2019-us.ts deleted file mode 100644 index d1a43659f..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aa123-qr-2019-us.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const usWarehouse = ChannelDraft.presets.sampleDataB2B - .usWarehouse() - .build(); - -const aa123Qr02 = ProductVariantDraft.presets.sampleDataB2B - .aa123Qr02() - .build(); - -const skuAa123Qr2019Us = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${aa123Qr02.sku}-${usWarehouse.key}`) - .sku(aa123Qr02.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(usWarehouse.key)); - -export default skuAa123Qr2019Us; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aa123-qr-2023-default.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aa123-qr-2023-default.spec.ts deleted file mode 100644 index 0dfcc9b11..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aa123-qr-2023-default.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuAa123Qr2023Default from './sku-aa123-qr-2023-default'; - -describe(`with skuAa123Qr2023Default preset and default-warehouse channel`, () => { - it(`should return a skuAa123Qr2023Default preset`, () => { - const skuAa123Qr2023DefaultPreset = - skuAa123Qr2023Default().build(); - expect(skuAa123Qr2023DefaultPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "aa123-qr-2023-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "aa123-qr-2023", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuAa123Qr2023Default preset when built for graphql`, () => { - const skuAa123Qr2023DefaultPresetGraphql = - skuAa123Qr2023Default().buildGraphql(); - expect(skuAa123Qr2023DefaultPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "aa123-qr-2023-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "aa123-qr-2023", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aa123-qr-2023-default.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aa123-qr-2023-default.ts deleted file mode 100644 index bc4bf0272..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aa123-qr-2023-default.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const defaultWarehouse = ChannelDraft.presets.sampleDataB2B - .defaultWarehouse() - .build(); - -const aa123Qr03 = ProductVariantDraft.presets.sampleDataB2B - .aa123Qr03() - .build(); - -const skuAa123Qr2023Default = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${aa123Qr03.sku}-${defaultWarehouse.key}`) - .sku(aa123Qr03.sku!) - .quantityOnStock(1000) - .supplyChannel( - KeyReferenceDraft.presets.channel().key(defaultWarehouse.key) - ); - -export default skuAa123Qr2023Default; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aa123-qr-2023-eu.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aa123-qr-2023-eu.spec.ts deleted file mode 100644 index 00c94852c..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aa123-qr-2023-eu.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuAa123Qr2023Eu from './sku-aa123-qr-2023-eu'; - -describe(`with skuAa123Qr2023Eu preset and eu-warehouse channel`, () => { - it(`should return a skuAa123Qr2023Eu preset`, () => { - const skuAa123Qr2023EuPreset = - skuAa123Qr2023Eu().build(); - expect(skuAa123Qr2023EuPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "aa123-qr-2023-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "aa123-qr-2023", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuAa123Qr2023Eu preset when built for graphql`, () => { - const skuAa123Qr2023EuPresetGraphql = - skuAa123Qr2023Eu().buildGraphql(); - expect(skuAa123Qr2023EuPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "aa123-qr-2023-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "aa123-qr-2023", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aa123-qr-2023-eu.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aa123-qr-2023-eu.ts deleted file mode 100644 index 18933aecd..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aa123-qr-2023-eu.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const euWarehouse = ChannelDraft.presets.sampleDataB2B - .euWarehouse() - .build(); - -const aa123Qr03 = ProductVariantDraft.presets.sampleDataB2B - .aa123Qr03() - .build(); - -const skuAa123Qr2023Eu = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${aa123Qr03.sku}-${euWarehouse.key}`) - .sku(aa123Qr03.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(euWarehouse.key)); - -export default skuAa123Qr2023Eu; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aa123-qr-2023-us.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aa123-qr-2023-us.spec.ts deleted file mode 100644 index 782692520..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aa123-qr-2023-us.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuAa123Qr2023Us from './sku-aa123-qr-2023-us'; - -describe(`with skuAa123Qr2023Us preset and us-warehouse channel`, () => { - it(`should return a skuAa123Qr2023Us preset`, () => { - const skuAa123Qr2023UsPreset = - skuAa123Qr2023Us().build(); - expect(skuAa123Qr2023UsPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "aa123-qr-2023-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "aa123-qr-2023", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuAa123Qr2023Us preset when built for graphql`, () => { - const skuAa123Qr2023UsPresetGraphql = - skuAa123Qr2023Us().buildGraphql(); - expect(skuAa123Qr2023UsPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "aa123-qr-2023-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "aa123-qr-2023", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aa123-qr-2023-us.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aa123-qr-2023-us.ts deleted file mode 100644 index e2b351f4a..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aa123-qr-2023-us.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const usWarehouse = ChannelDraft.presets.sampleDataB2B - .usWarehouse() - .build(); - -const aa123Qr03 = ProductVariantDraft.presets.sampleDataB2B - .aa123Qr03() - .build(); - -const skuAa123Qr2023Us = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${aa123Qr03.sku}-${usWarehouse.key}`) - .sku(aa123Qr03.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(usWarehouse.key)); - -export default skuAa123Qr2023Us; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aaa-789-uv-blue-default-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aaa-789-uv-blue-default-warehouse.spec.ts new file mode 100644 index 000000000..63c57cf69 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aaa-789-uv-blue-default-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuAaa789UvBlueDefaultWarehouse preset`, () => { + it(`should return a skuAaa789UvBlueDefaultWarehouse preset when built for rest`, () => { + const skuAaa789UvBlueDefaultWarehousePreset = + InventoryEntryDraftRest.presets.skuAaa789UvBlueDefaultWarehouse().build(); + expect(skuAaa789UvBlueDefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuAaa789UvBlueDefaultWarehouse preset when built for graphql`, () => { + const skuAaa789UvBlueDefaultWarehousePreset = + InventoryEntryDraftGraphql.presets + .skuAaa789UvBlueDefaultWarehouse() + .build(); + expect(skuAaa789UvBlueDefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuAaa789UvBlueDefaultWarehouse preset when built for legacy rest`, () => { + const skuAaa789UvBlueDefaultWarehousePreset = InventoryEntryDraft.presets + .skuAaa789UvBlueDefaultWarehouse() + .buildRest(); + expect(skuAaa789UvBlueDefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuAaa789UvBlueDefaultWarehouse preset when built for legacy graphql`, () => { + const skuAaa789UvBlueDefaultWarehousePreset = InventoryEntryDraft.presets + .skuAaa789UvBlueDefaultWarehouse() + .buildGraphql(); + expect(skuAaa789UvBlueDefaultWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aaa-789-uv-blue-default-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aaa-789-uv-blue-default-warehouse.ts new file mode 100644 index 000000000..2e0595c8d --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aaa-789-uv-blue-default-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .defaultWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .aaa789Uv02() + .build(); + +const skuAaa789UvBlueDefaultWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('aaa789-uv-blue-default-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuAaa789UvBlueDefaultWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aaa-789-uv-blue-eu-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aaa-789-uv-blue-eu-warehouse.spec.ts new file mode 100644 index 000000000..a92c5fa45 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aaa-789-uv-blue-eu-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuAaa789UvBlueEuWarehouse preset`, () => { + it(`should return a skuAaa789UvBlueEuWarehouse preset when built for rest`, () => { + const skuAaa789UvBlueEuWarehousePreset = InventoryEntryDraftRest.presets + .skuAaa789UvBlueEuWarehouse() + .build(); + expect(skuAaa789UvBlueEuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuAaa789UvBlueEuWarehouse preset when built for graphql`, () => { + const skuAaa789UvBlueEuWarehousePreset = InventoryEntryDraftGraphql.presets + .skuAaa789UvBlueEuWarehouse() + .build(); + expect(skuAaa789UvBlueEuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuAaa789UvBlueEuWarehouse preset when built for legacy rest`, () => { + const skuAaa789UvBlueEuWarehousePreset = InventoryEntryDraft.presets + .skuAaa789UvBlueEuWarehouse() + .buildRest(); + expect(skuAaa789UvBlueEuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuAaa789UvBlueEuWarehouse preset when built for legacy graphql`, () => { + const skuAaa789UvBlueEuWarehousePreset = InventoryEntryDraft.presets + .skuAaa789UvBlueEuWarehouse() + .buildGraphql(); + expect(skuAaa789UvBlueEuWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aaa-789-uv-blue-eu-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aaa-789-uv-blue-eu-warehouse.ts new file mode 100644 index 000000000..213120f20 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aaa-789-uv-blue-eu-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .euWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .aaa789Uv02() + .build(); + +const skuAaa789UvBlueEuWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('aaa789-uv-blue-eu-warehouse') + .sku(variant.sku!) + .quantityOnStock(999) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuAaa789UvBlueEuWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aaa-789-uv-blue-us-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aaa-789-uv-blue-us-warehouse.spec.ts new file mode 100644 index 000000000..d703e98d9 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aaa-789-uv-blue-us-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuAaa789UvBlueUsWarehouse preset`, () => { + it(`should return a skuAaa789UvBlueUsWarehouse preset when built for rest`, () => { + const skuAaa789UvBlueUsWarehousePreset = InventoryEntryDraftRest.presets + .skuAaa789UvBlueUsWarehouse() + .build(); + expect(skuAaa789UvBlueUsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuAaa789UvBlueUsWarehouse preset when built for graphql`, () => { + const skuAaa789UvBlueUsWarehousePreset = InventoryEntryDraftGraphql.presets + .skuAaa789UvBlueUsWarehouse() + .build(); + expect(skuAaa789UvBlueUsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuAaa789UvBlueUsWarehouse preset when built for legacy rest`, () => { + const skuAaa789UvBlueUsWarehousePreset = InventoryEntryDraft.presets + .skuAaa789UvBlueUsWarehouse() + .buildRest(); + expect(skuAaa789UvBlueUsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuAaa789UvBlueUsWarehouse preset when built for legacy graphql`, () => { + const skuAaa789UvBlueUsWarehousePreset = InventoryEntryDraft.presets + .skuAaa789UvBlueUsWarehouse() + .buildGraphql(); + expect(skuAaa789UvBlueUsWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aaa-789-uv-blue-us-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aaa-789-uv-blue-us-warehouse.ts new file mode 100644 index 000000000..ba29476c6 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aaa-789-uv-blue-us-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .usWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .aaa789Uv02() + .build(); + +const skuAaa789UvBlueUsWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('aaa789-uv-blue-us-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuAaa789UvBlueUsWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aaa-789-uv-green-default-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aaa-789-uv-green-default-warehouse.spec.ts new file mode 100644 index 000000000..3064b10bb --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aaa-789-uv-green-default-warehouse.spec.ts @@ -0,0 +1,41 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuAaa789UvGreenDefaultWarehouse preset`, () => { + it(`should return a skuAaa789UvGreenDefaultWarehouse preset when built for rest`, () => { + const skuAaa789UvGreenDefaultWarehousePreset = + InventoryEntryDraftRest.presets + .skuAaa789UvGreenDefaultWarehouse() + .build(); + expect(skuAaa789UvGreenDefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuAaa789UvGreenDefaultWarehouse preset when built for graphql`, () => { + const skuAaa789UvGreenDefaultWarehousePreset = + InventoryEntryDraftGraphql.presets + .skuAaa789UvGreenDefaultWarehouse() + .build(); + expect(skuAaa789UvGreenDefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuAaa789UvGreenDefaultWarehouse preset when built for legacy rest`, () => { + const skuAaa789UvGreenDefaultWarehousePreset = InventoryEntryDraft.presets + .skuAaa789UvGreenDefaultWarehouse() + .buildRest(); + expect(skuAaa789UvGreenDefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuAaa789UvGreenDefaultWarehouse preset when built for legacy graphql`, () => { + const skuAaa789UvGreenDefaultWarehousePreset = InventoryEntryDraft.presets + .skuAaa789UvGreenDefaultWarehouse() + .buildGraphql(); + expect(skuAaa789UvGreenDefaultWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aaa-789-uv-green-default-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aaa-789-uv-green-default-warehouse.ts new file mode 100644 index 000000000..e965a6f23 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aaa-789-uv-green-default-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .defaultWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .aaa789Uv03() + .build(); + +const skuAaa789UvGreenDefaultWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('aaa789-uv-green-default-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuAaa789UvGreenDefaultWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aaa-789-uv-green-eu-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aaa-789-uv-green-eu-warehouse.spec.ts new file mode 100644 index 000000000..c7b62fbb0 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aaa-789-uv-green-eu-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuAaa789UvGreenEuWarehouse preset`, () => { + it(`should return a skuAaa789UvGreenEuWarehouse preset when built for rest`, () => { + const skuAaa789UvGreenEuWarehousePreset = InventoryEntryDraftRest.presets + .skuAaa789UvGreenEuWarehouse() + .build(); + expect(skuAaa789UvGreenEuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuAaa789UvGreenEuWarehouse preset when built for graphql`, () => { + const skuAaa789UvGreenEuWarehousePreset = InventoryEntryDraftGraphql.presets + .skuAaa789UvGreenEuWarehouse() + .build(); + expect(skuAaa789UvGreenEuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuAaa789UvGreenEuWarehouse preset when built for legacy rest`, () => { + const skuAaa789UvGreenEuWarehousePreset = InventoryEntryDraft.presets + .skuAaa789UvGreenEuWarehouse() + .buildRest(); + expect(skuAaa789UvGreenEuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuAaa789UvGreenEuWarehouse preset when built for legacy graphql`, () => { + const skuAaa789UvGreenEuWarehousePreset = InventoryEntryDraft.presets + .skuAaa789UvGreenEuWarehouse() + .buildGraphql(); + expect(skuAaa789UvGreenEuWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aaa-789-uv-green-eu-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aaa-789-uv-green-eu-warehouse.ts new file mode 100644 index 000000000..4b2c676be --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aaa-789-uv-green-eu-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .euWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .aaa789Uv03() + .build(); + +const skuAaa789UvGreenEuWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('aaa789-uv-green-eu-warehouse') + .sku(variant.sku!) + .quantityOnStock(999) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuAaa789UvGreenEuWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aaa-789-uv-green-us-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aaa-789-uv-green-us-warehouse.spec.ts new file mode 100644 index 000000000..343f57913 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aaa-789-uv-green-us-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuAaa789UvGreenUsWarehouse preset`, () => { + it(`should return a skuAaa789UvGreenUsWarehouse preset when built for rest`, () => { + const skuAaa789UvGreenUsWarehousePreset = InventoryEntryDraftRest.presets + .skuAaa789UvGreenUsWarehouse() + .build(); + expect(skuAaa789UvGreenUsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuAaa789UvGreenUsWarehouse preset when built for graphql`, () => { + const skuAaa789UvGreenUsWarehousePreset = InventoryEntryDraftGraphql.presets + .skuAaa789UvGreenUsWarehouse() + .build(); + expect(skuAaa789UvGreenUsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuAaa789UvGreenUsWarehouse preset when built for legacy rest`, () => { + const skuAaa789UvGreenUsWarehousePreset = InventoryEntryDraft.presets + .skuAaa789UvGreenUsWarehouse() + .buildRest(); + expect(skuAaa789UvGreenUsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuAaa789UvGreenUsWarehouse preset when built for legacy graphql`, () => { + const skuAaa789UvGreenUsWarehousePreset = InventoryEntryDraft.presets + .skuAaa789UvGreenUsWarehouse() + .buildGraphql(); + expect(skuAaa789UvGreenUsWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aaa-789-uv-green-us-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aaa-789-uv-green-us-warehouse.ts new file mode 100644 index 000000000..c8e3d3bf7 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aaa-789-uv-green-us-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .usWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .aaa789Uv03() + .build(); + +const skuAaa789UvGreenUsWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('aaa789-uv-green-us-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuAaa789UvGreenUsWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aaa-789-uv-red-default-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aaa-789-uv-red-default-warehouse.spec.ts new file mode 100644 index 000000000..a1d1ddd61 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aaa-789-uv-red-default-warehouse.spec.ts @@ -0,0 +1,40 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuAaa789UvRedDefaultWarehouse preset`, () => { + it(`should return a skuAaa789UvRedDefaultWarehouse preset when built for rest`, () => { + const skuAaa789UvRedDefaultWarehousePreset = InventoryEntryDraftRest.presets + .skuAaa789UvRedDefaultWarehouse() + .build(); + expect(skuAaa789UvRedDefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuAaa789UvRedDefaultWarehouse preset when built for graphql`, () => { + const skuAaa789UvRedDefaultWarehousePreset = + InventoryEntryDraftGraphql.presets + .skuAaa789UvRedDefaultWarehouse() + .build(); + expect(skuAaa789UvRedDefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuAaa789UvRedDefaultWarehouse preset when built for legacy rest`, () => { + const skuAaa789UvRedDefaultWarehousePreset = InventoryEntryDraft.presets + .skuAaa789UvRedDefaultWarehouse() + .buildRest(); + expect(skuAaa789UvRedDefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuAaa789UvRedDefaultWarehouse preset when built for legacy graphql`, () => { + const skuAaa789UvRedDefaultWarehousePreset = InventoryEntryDraft.presets + .skuAaa789UvRedDefaultWarehouse() + .buildGraphql(); + expect(skuAaa789UvRedDefaultWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aaa-789-uv-red-default-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aaa-789-uv-red-default-warehouse.ts new file mode 100644 index 000000000..c36b0b6b8 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aaa-789-uv-red-default-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .defaultWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .aaa789Uv01() + .build(); + +const skuAaa789UvRedDefaultWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('aaa789-uv-red-default-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuAaa789UvRedDefaultWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aaa-789-uv-red-eu-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aaa-789-uv-red-eu-warehouse.spec.ts new file mode 100644 index 000000000..07fb6cfdd --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aaa-789-uv-red-eu-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuAaa789UvRedEuWarehouse preset`, () => { + it(`should return a skuAaa789UvRedEuWarehouse preset when built for rest`, () => { + const skuAaa789UvRedEuWarehousePreset = InventoryEntryDraftRest.presets + .skuAaa789UvRedEuWarehouse() + .build(); + expect(skuAaa789UvRedEuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuAaa789UvRedEuWarehouse preset when built for graphql`, () => { + const skuAaa789UvRedEuWarehousePreset = InventoryEntryDraftGraphql.presets + .skuAaa789UvRedEuWarehouse() + .build(); + expect(skuAaa789UvRedEuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuAaa789UvRedEuWarehouse preset when built for legacy rest`, () => { + const skuAaa789UvRedEuWarehousePreset = InventoryEntryDraft.presets + .skuAaa789UvRedEuWarehouse() + .buildRest(); + expect(skuAaa789UvRedEuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuAaa789UvRedEuWarehouse preset when built for legacy graphql`, () => { + const skuAaa789UvRedEuWarehousePreset = InventoryEntryDraft.presets + .skuAaa789UvRedEuWarehouse() + .buildGraphql(); + expect(skuAaa789UvRedEuWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aaa-789-uv-red-eu-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aaa-789-uv-red-eu-warehouse.ts new file mode 100644 index 000000000..50e872654 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aaa-789-uv-red-eu-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .euWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .aaa789Uv01() + .build(); + +const skuAaa789UvRedEuWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('aaa789-uv-red-eu-warehouse') + .sku(variant.sku!) + .quantityOnStock(999) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuAaa789UvRedEuWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aaa-789-uv-red-us-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aaa-789-uv-red-us-warehouse.spec.ts new file mode 100644 index 000000000..1574ee1be --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aaa-789-uv-red-us-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuAaa789UvRedUsWarehouse preset`, () => { + it(`should return a skuAaa789UvRedUsWarehouse preset when built for rest`, () => { + const skuAaa789UvRedUsWarehousePreset = InventoryEntryDraftRest.presets + .skuAaa789UvRedUsWarehouse() + .build(); + expect(skuAaa789UvRedUsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuAaa789UvRedUsWarehouse preset when built for graphql`, () => { + const skuAaa789UvRedUsWarehousePreset = InventoryEntryDraftGraphql.presets + .skuAaa789UvRedUsWarehouse() + .build(); + expect(skuAaa789UvRedUsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuAaa789UvRedUsWarehouse preset when built for legacy rest`, () => { + const skuAaa789UvRedUsWarehousePreset = InventoryEntryDraft.presets + .skuAaa789UvRedUsWarehouse() + .buildRest(); + expect(skuAaa789UvRedUsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuAaa789UvRedUsWarehouse preset when built for legacy graphql`, () => { + const skuAaa789UvRedUsWarehousePreset = InventoryEntryDraft.presets + .skuAaa789UvRedUsWarehouse() + .buildGraphql(); + expect(skuAaa789UvRedUsWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aaa-789-uv-red-us-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aaa-789-uv-red-us-warehouse.ts new file mode 100644 index 000000000..3b7361bf1 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aaa-789-uv-red-us-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .usWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .aaa789Uv01() + .build(); + +const skuAaa789UvRedUsWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('aaa789-uv-red-us-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuAaa789UvRedUsWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aaa789-uv-blue-default.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aaa789-uv-blue-default.spec.ts deleted file mode 100644 index cc8ad4a44..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aaa789-uv-blue-default.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuAaa789UvBlueDefault from './sku-aaa789-uv-blue-default'; - -describe(`with skuAaa789UvBlueDefault preset and default-warehouse channel`, () => { - it(`should return a skuAaa789UvBlueDefault preset`, () => { - const skuAaa789UvBlueDefaultPreset = - skuAaa789UvBlueDefault().build(); - expect(skuAaa789UvBlueDefaultPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "aaa789-uv-blue-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "aaa789-uv-blue", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuAaa789UvBlueDefault preset when built for graphql`, () => { - const skuAaa789UvBlueDefaultPresetGraphql = - skuAaa789UvBlueDefault().buildGraphql(); - expect(skuAaa789UvBlueDefaultPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "aaa789-uv-blue-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "aaa789-uv-blue", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aaa789-uv-blue-default.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aaa789-uv-blue-default.ts deleted file mode 100644 index 84683f51f..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aaa789-uv-blue-default.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const defaultWarehouse = ChannelDraft.presets.sampleDataB2B - .defaultWarehouse() - .build(); - -const aaa789Uv02 = ProductVariantDraft.presets.sampleDataB2B - .aaa789Uv02() - .build(); - -const skuAaa789UvBlueDefault = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${aaa789Uv02.sku}-${defaultWarehouse.key}`) - .sku(aaa789Uv02.sku!) - .quantityOnStock(1000) - .supplyChannel( - KeyReferenceDraft.presets.channel().key(defaultWarehouse.key) - ); - -export default skuAaa789UvBlueDefault; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aaa789-uv-blue-eu.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aaa789-uv-blue-eu.spec.ts deleted file mode 100644 index 199a5efc7..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aaa789-uv-blue-eu.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuAaa789UvBlueEu from './sku-aaa789-uv-blue-eu'; - -describe(`with skuAaa789UvBlueEu preset and eu-warehouse channel`, () => { - it(`should return a skuAaa789UvBlueEu preset`, () => { - const skuAaa789UvBlueEuPreset = - skuAaa789UvBlueEu().build(); - expect(skuAaa789UvBlueEuPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "aaa789-uv-blue-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "aaa789-uv-blue", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuAaa789UvBlueEu preset when built for graphql`, () => { - const skuAaa789UvBlueEuPresetGraphql = - skuAaa789UvBlueEu().buildGraphql(); - expect(skuAaa789UvBlueEuPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "aaa789-uv-blue-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "aaa789-uv-blue", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aaa789-uv-blue-eu.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aaa789-uv-blue-eu.ts deleted file mode 100644 index 723561b55..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aaa789-uv-blue-eu.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const euWarehouse = ChannelDraft.presets.sampleDataB2B - .euWarehouse() - .build(); - -const aaa789Uv02 = ProductVariantDraft.presets.sampleDataB2B - .aaa789Uv02() - .build(); - -const skuAaa789UvBlueEu = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${aaa789Uv02.sku}-${euWarehouse.key}`) - .sku(aaa789Uv02.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(euWarehouse.key)); - -export default skuAaa789UvBlueEu; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aaa789-uv-blue-us.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aaa789-uv-blue-us.spec.ts deleted file mode 100644 index 1d372dc00..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aaa789-uv-blue-us.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuAaa789UvBlueUs from './sku-aaa789-uv-blue-us'; - -describe(`with skuAaa789UvBlueUs preset and us-warehouse channel`, () => { - it(`should return a skuAaa789UvBlueUs preset`, () => { - const skuAaa789UvBlueUsPreset = - skuAaa789UvBlueUs().build(); - expect(skuAaa789UvBlueUsPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "aaa789-uv-blue-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "aaa789-uv-blue", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuAaa789UvBlueUs preset when built for graphql`, () => { - const skuAaa789UvBlueUsPresetGraphql = - skuAaa789UvBlueUs().buildGraphql(); - expect(skuAaa789UvBlueUsPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "aaa789-uv-blue-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "aaa789-uv-blue", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aaa789-uv-blue-us.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aaa789-uv-blue-us.ts deleted file mode 100644 index 41af231d8..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aaa789-uv-blue-us.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const usWarehouse = ChannelDraft.presets.sampleDataB2B - .usWarehouse() - .build(); - -const aaa789Uv02 = ProductVariantDraft.presets.sampleDataB2B - .aaa789Uv02() - .build(); - -const skuAaa789UvBlueUs = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${aaa789Uv02.sku}-${usWarehouse.key}`) - .sku(aaa789Uv02.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(usWarehouse.key)); - -export default skuAaa789UvBlueUs; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aaa789-uv-green-default.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aaa789-uv-green-default.spec.ts deleted file mode 100644 index eb569c206..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aaa789-uv-green-default.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuAaa789UvGreenDefault from './sku-aaa789-uv-green-default'; - -describe(`with skuAaa789UvGreenDefault preset and default-warehouse channel`, () => { - it(`should return a skuAaa789UvGreenDefault preset`, () => { - const skuAaa789UvGreenDefaultPreset = - skuAaa789UvGreenDefault().build(); - expect(skuAaa789UvGreenDefaultPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "aaa789-uv-green-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "aaa789-uv-green", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuAaa789UvGreenDefault preset when built for graphql`, () => { - const skuAaa789UvGreenDefaultPresetGraphql = - skuAaa789UvGreenDefault().buildGraphql(); - expect(skuAaa789UvGreenDefaultPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "aaa789-uv-green-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "aaa789-uv-green", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aaa789-uv-green-default.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aaa789-uv-green-default.ts deleted file mode 100644 index 14221ddef..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aaa789-uv-green-default.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const defaultWarehouse = ChannelDraft.presets.sampleDataB2B - .defaultWarehouse() - .build(); - -const aaa789Uv03 = ProductVariantDraft.presets.sampleDataB2B - .aaa789Uv03() - .build(); - -const skuAaa789UvGreenDefault = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${aaa789Uv03.sku}-${defaultWarehouse.key}`) - .sku(aaa789Uv03.sku!) - .quantityOnStock(1000) - .supplyChannel( - KeyReferenceDraft.presets.channel().key(defaultWarehouse.key) - ); - -export default skuAaa789UvGreenDefault; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aaa789-uv-green-eu.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aaa789-uv-green-eu.spec.ts deleted file mode 100644 index b78f34c67..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aaa789-uv-green-eu.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuAaa789UvGreenEu from './sku-aaa789-uv-green-eu'; - -describe(`with skuAaa789UvGreenEu preset and eu-warehouse channel`, () => { - it(`should return a skuAaa789UvGreenEu preset`, () => { - const skuAaa789UvGreenEuPreset = - skuAaa789UvGreenEu().build(); - expect(skuAaa789UvGreenEuPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "aaa789-uv-green-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "aaa789-uv-green", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuAaa789UvGreenEu preset when built for graphql`, () => { - const skuAaa789UvGreenEuPresetGraphql = - skuAaa789UvGreenEu().buildGraphql(); - expect(skuAaa789UvGreenEuPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "aaa789-uv-green-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "aaa789-uv-green", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aaa789-uv-green-eu.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aaa789-uv-green-eu.ts deleted file mode 100644 index ea2ad0ae3..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aaa789-uv-green-eu.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const euWarehouse = ChannelDraft.presets.sampleDataB2B - .euWarehouse() - .build(); - -const aaa789Uv03 = ProductVariantDraft.presets.sampleDataB2B - .aaa789Uv03() - .build(); - -const skuAaa789UvGreenEu = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${aaa789Uv03.sku}-${euWarehouse.key}`) - .sku(aaa789Uv03.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(euWarehouse.key)); - -export default skuAaa789UvGreenEu; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aaa789-uv-green-us.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aaa789-uv-green-us.spec.ts deleted file mode 100644 index b35a1db0f..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aaa789-uv-green-us.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuAaa789UvGreenUs from './sku-aaa789-uv-green-us'; - -describe(`with skuAaa789UvGreenUs preset and us-warehouse channel`, () => { - it(`should return a skuAaa789UvGreenUs preset`, () => { - const skuAaa789UvGreenUsPreset = - skuAaa789UvGreenUs().build(); - expect(skuAaa789UvGreenUsPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "aaa789-uv-green-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "aaa789-uv-green", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuAaa789UvGreenUs preset when built for graphql`, () => { - const skuAaa789UvGreenUsPresetGraphql = - skuAaa789UvGreenUs().buildGraphql(); - expect(skuAaa789UvGreenUsPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "aaa789-uv-green-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "aaa789-uv-green", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aaa789-uv-green-us.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aaa789-uv-green-us.ts deleted file mode 100644 index fc97dcc28..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aaa789-uv-green-us.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const usWarehouse = ChannelDraft.presets.sampleDataB2B - .usWarehouse() - .build(); - -const aaa789Uv03 = ProductVariantDraft.presets.sampleDataB2B - .aaa789Uv03() - .build(); - -const skuAaa789UvGreenUs = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${aaa789Uv03.sku}-${usWarehouse.key}`) - .sku(aaa789Uv03.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(usWarehouse.key)); - -export default skuAaa789UvGreenUs; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aaa789-uv-red-default.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aaa789-uv-red-default.spec.ts deleted file mode 100644 index 183df2dea..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aaa789-uv-red-default.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuAaa789UvRedDefault from './sku-aaa789-uv-red-default'; - -describe(`with skuAaa789UvRedDefault preset and default-warehouse channel`, () => { - it(`should return a skuAaa789UvRedDefault preset`, () => { - const skuAaa789UvRedDefaultPreset = - skuAaa789UvRedDefault().build(); - expect(skuAaa789UvRedDefaultPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "aaa789-uv-red-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "aaa789-uv-red", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuAaa789UvRedDefault preset when built for graphql`, () => { - const skuAaa789UvRedDefaultPresetGraphql = - skuAaa789UvRedDefault().buildGraphql(); - expect(skuAaa789UvRedDefaultPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "aaa789-uv-red-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "aaa789-uv-red", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aaa789-uv-red-default.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aaa789-uv-red-default.ts deleted file mode 100644 index a5b849620..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aaa789-uv-red-default.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const defaultWarehouse = ChannelDraft.presets.sampleDataB2B - .defaultWarehouse() - .build(); - -const aaa789Uv01 = ProductVariantDraft.presets.sampleDataB2B - .aaa789Uv01() - .build(); - -const skuAaa789UvRedDefault = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${aaa789Uv01.sku}-${defaultWarehouse.key}`) - .sku(aaa789Uv01.sku!) - .quantityOnStock(1000) - .supplyChannel( - KeyReferenceDraft.presets.channel().key(defaultWarehouse.key) - ); - -export default skuAaa789UvRedDefault; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aaa789-uv-red-eu.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aaa789-uv-red-eu.spec.ts deleted file mode 100644 index c3a2b25cd..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aaa789-uv-red-eu.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuAaa789UvRedEu from './sku-aaa789-uv-red-eu'; - -describe(`with skuAaa789UvRedEu preset and eu-warehouse channel`, () => { - it(`should return a skuAaa789UvRedEu preset`, () => { - const skuAaa789UvRedEuPreset = - skuAaa789UvRedEu().build(); - expect(skuAaa789UvRedEuPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "aaa789-uv-red-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "aaa789-uv-red", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuAaa789UvRedEu preset when built for graphql`, () => { - const skuAaa789UvRedEuPresetGraphql = - skuAaa789UvRedEu().buildGraphql(); - expect(skuAaa789UvRedEuPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "aaa789-uv-red-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "aaa789-uv-red", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aaa789-uv-red-eu.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aaa789-uv-red-eu.ts deleted file mode 100644 index 69a389422..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aaa789-uv-red-eu.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const euWarehouse = ChannelDraft.presets.sampleDataB2B - .euWarehouse() - .build(); - -const aaa789Uv01 = ProductVariantDraft.presets.sampleDataB2B - .aaa789Uv01() - .build(); - -const skuAaa789UvRedEu = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${aaa789Uv01.sku}-${euWarehouse.key}`) - .sku(aaa789Uv01.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(euWarehouse.key)); - -export default skuAaa789UvRedEu; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aaa789-uv-red-us.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aaa789-uv-red-us.spec.ts deleted file mode 100644 index 32c9633ef..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aaa789-uv-red-us.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuAaa789UvRedUs from './sku-aaa789-uv-red-us'; - -describe(`with skuAaa789UvRedUs preset and us-warehouse channel`, () => { - it(`should return a skuAaa789UvRedUs preset`, () => { - const skuAaa789UvRedUsPreset = - skuAaa789UvRedUs().build(); - expect(skuAaa789UvRedUsPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "aaa789-uv-red-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "aaa789-uv-red", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuAaa789UvRedUs preset when built for graphql`, () => { - const skuAaa789UvRedUsPresetGraphql = - skuAaa789UvRedUs().buildGraphql(); - expect(skuAaa789UvRedUsPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "aaa789-uv-red-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "aaa789-uv-red", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aaa789-uv-red-us.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aaa789-uv-red-us.ts deleted file mode 100644 index 6d8704a39..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-aaa789-uv-red-us.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const usWarehouse = ChannelDraft.presets.sampleDataB2B - .usWarehouse() - .build(); - -const aaa789Uv01 = ProductVariantDraft.presets.sampleDataB2B - .aaa789Uv01() - .build(); - -const skuAaa789UvRedUs = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${aaa789Uv01.sku}-${usWarehouse.key}`) - .sku(aaa789Uv01.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(usWarehouse.key)); - -export default skuAaa789UvRedUs; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-air-filter-default-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-air-filter-default-warehouse.spec.ts new file mode 100644 index 000000000..d72d4ff5f --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-air-filter-default-warehouse.spec.ts @@ -0,0 +1,38 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuAirFilterDefaultWarehouse preset`, () => { + it(`should return a skuAirFilterDefaultWarehouse preset when built for rest`, () => { + const skuAirFilterDefaultWarehousePreset = InventoryEntryDraftRest.presets + .skuAirFilterDefaultWarehouse() + .build(); + expect(skuAirFilterDefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuAirFilterDefaultWarehouse preset when built for graphql`, () => { + const skuAirFilterDefaultWarehousePreset = + InventoryEntryDraftGraphql.presets.skuAirFilterDefaultWarehouse().build(); + expect(skuAirFilterDefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuAirFilterDefaultWarehouse preset when built for legacy rest`, () => { + const skuAirFilterDefaultWarehousePreset = InventoryEntryDraft.presets + .skuAirFilterDefaultWarehouse() + .buildRest(); + expect(skuAirFilterDefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuAirFilterDefaultWarehouse preset when built for legacy graphql`, () => { + const skuAirFilterDefaultWarehousePreset = InventoryEntryDraft.presets + .skuAirFilterDefaultWarehouse() + .buildGraphql(); + expect(skuAirFilterDefaultWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-air-filter-default-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-air-filter-default-warehouse.ts new file mode 100644 index 000000000..fd1d82898 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-air-filter-default-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .defaultWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .airFilter01() + .build(); + +const skuAirFilterDefaultWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('air-filter-default-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuAirFilterDefaultWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-air-filter-default.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-air-filter-default.spec.ts deleted file mode 100644 index d9e10f459..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-air-filter-default.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuAirFilterDefault from './sku-air-filter-default'; - -describe(`with skuAirFilterDefault preset and default-warehouse channel`, () => { - it(`should return a skuAirFilterDefault preset`, () => { - const skuAirFilterDefaultPreset = - skuAirFilterDefault().build(); - expect(skuAirFilterDefaultPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "air-filter-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "air-filter", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuAirFilterDefault preset when built for graphql`, () => { - const skuAirFilterDefaultPresetGraphql = - skuAirFilterDefault().buildGraphql(); - expect(skuAirFilterDefaultPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "air-filter-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "air-filter", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-air-filter-default.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-air-filter-default.ts deleted file mode 100644 index b3bdb9631..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-air-filter-default.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const defaultWarehouse = ChannelDraft.presets.sampleDataB2B - .defaultWarehouse() - .build(); - -const airFilter01 = ProductVariantDraft.presets.sampleDataB2B - .airFilter01() - .build(); - -const skuAirFilterDefault = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${airFilter01.sku}-${defaultWarehouse.key}`) - .sku(airFilter01.sku!) - .quantityOnStock(1000) - .supplyChannel( - KeyReferenceDraft.presets.channel().key(defaultWarehouse.key) - ); - -export default skuAirFilterDefault; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-air-filter-eu-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-air-filter-eu-warehouse.spec.ts new file mode 100644 index 000000000..220bde3dc --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-air-filter-eu-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuAirFilterEuWarehouse preset`, () => { + it(`should return a skuAirFilterEuWarehouse preset when built for rest`, () => { + const skuAirFilterEuWarehousePreset = InventoryEntryDraftRest.presets + .skuAirFilterEuWarehouse() + .build(); + expect(skuAirFilterEuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuAirFilterEuWarehouse preset when built for graphql`, () => { + const skuAirFilterEuWarehousePreset = InventoryEntryDraftGraphql.presets + .skuAirFilterEuWarehouse() + .build(); + expect(skuAirFilterEuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuAirFilterEuWarehouse preset when built for legacy rest`, () => { + const skuAirFilterEuWarehousePreset = InventoryEntryDraft.presets + .skuAirFilterEuWarehouse() + .buildRest(); + expect(skuAirFilterEuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuAirFilterEuWarehouse preset when built for legacy graphql`, () => { + const skuAirFilterEuWarehousePreset = InventoryEntryDraft.presets + .skuAirFilterEuWarehouse() + .buildGraphql(); + expect(skuAirFilterEuWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-air-filter-eu-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-air-filter-eu-warehouse.ts new file mode 100644 index 000000000..e1eb3d335 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-air-filter-eu-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .euWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .airFilter01() + .build(); + +const skuAirFilterEuWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('air-filter-eu-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuAirFilterEuWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-air-filter-eu.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-air-filter-eu.spec.ts deleted file mode 100644 index 99177b865..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-air-filter-eu.spec.ts +++ /dev/null @@ -1,41 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuAirFilterEu from './sku-air-filter-eu'; - -describe(`with skuAirFilterEu preset and eu-warehouse channel`, () => { - it(`should return a skuAirFilterEu preset`, () => { - const skuAirFilterEuPreset = skuAirFilterEu().build(); - expect(skuAirFilterEuPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "air-filter-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "air-filter", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuAirFilterEu preset when built for graphql`, () => { - const skuAirFilterEuPresetGraphql = - skuAirFilterEu().buildGraphql(); - expect(skuAirFilterEuPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "air-filter-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "air-filter", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-air-filter-eu.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-air-filter-eu.ts deleted file mode 100644 index 27cd81438..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-air-filter-eu.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const euWarehouse = ChannelDraft.presets.sampleDataB2B - .euWarehouse() - .build(); - -const airFilter01 = ProductVariantDraft.presets.sampleDataB2B - .airFilter01() - .build(); - -const skuAirFilterEu = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${airFilter01.sku}-${euWarehouse.key}`) - .sku(airFilter01.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(euWarehouse.key)); - -export default skuAirFilterEu; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-air-filter-us-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-air-filter-us-warehouse.spec.ts new file mode 100644 index 000000000..ec745720a --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-air-filter-us-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuAirFilterUsWarehouse preset`, () => { + it(`should return a skuAirFilterUsWarehouse preset when built for rest`, () => { + const skuAirFilterUsWarehousePreset = InventoryEntryDraftRest.presets + .skuAirFilterUsWarehouse() + .build(); + expect(skuAirFilterUsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuAirFilterUsWarehouse preset when built for graphql`, () => { + const skuAirFilterUsWarehousePreset = InventoryEntryDraftGraphql.presets + .skuAirFilterUsWarehouse() + .build(); + expect(skuAirFilterUsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuAirFilterUsWarehouse preset when built for legacy rest`, () => { + const skuAirFilterUsWarehousePreset = InventoryEntryDraft.presets + .skuAirFilterUsWarehouse() + .buildRest(); + expect(skuAirFilterUsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuAirFilterUsWarehouse preset when built for legacy graphql`, () => { + const skuAirFilterUsWarehousePreset = InventoryEntryDraft.presets + .skuAirFilterUsWarehouse() + .buildGraphql(); + expect(skuAirFilterUsWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-air-filter-us-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-air-filter-us-warehouse.ts new file mode 100644 index 000000000..79550ce38 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-air-filter-us-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .usWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .airFilter01() + .build(); + +const skuAirFilterUsWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('air-filter-us-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuAirFilterUsWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-air-filter-us.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-air-filter-us.spec.ts deleted file mode 100644 index 61bec7b6f..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-air-filter-us.spec.ts +++ /dev/null @@ -1,41 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuAirFilterUs from './sku-air-filter-us'; - -describe(`with skuAirFilterUs preset and us-warehouse channel`, () => { - it(`should return a skuAirFilterUs preset`, () => { - const skuAirFilterUsPreset = skuAirFilterUs().build(); - expect(skuAirFilterUsPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "air-filter-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "air-filter", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuAirFilterUs preset when built for graphql`, () => { - const skuAirFilterUsPresetGraphql = - skuAirFilterUs().buildGraphql(); - expect(skuAirFilterUsPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "air-filter-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "air-filter", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-air-filter-us.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-air-filter-us.ts deleted file mode 100644 index 24283a416..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-air-filter-us.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const usWarehouse = ChannelDraft.presets.sampleDataB2B - .usWarehouse() - .build(); - -const airFilter01 = ProductVariantDraft.presets.sampleDataB2B - .airFilter01() - .build(); - -const skuAirFilterUs = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${airFilter01.sku}-${usWarehouse.key}`) - .sku(airFilter01.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(usWarehouse.key)); - -export default skuAirFilterUs; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-alternator-default-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-alternator-default-warehouse.spec.ts new file mode 100644 index 000000000..fe1fd78df --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-alternator-default-warehouse.spec.ts @@ -0,0 +1,40 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuAlternatorDefaultWarehouse preset`, () => { + it(`should return a skuAlternatorDefaultWarehouse preset when built for rest`, () => { + const skuAlternatorDefaultWarehousePreset = InventoryEntryDraftRest.presets + .skuAlternatorDefaultWarehouse() + .build(); + expect(skuAlternatorDefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuAlternatorDefaultWarehouse preset when built for graphql`, () => { + const skuAlternatorDefaultWarehousePreset = + InventoryEntryDraftGraphql.presets + .skuAlternatorDefaultWarehouse() + .build(); + expect(skuAlternatorDefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuAlternatorDefaultWarehouse preset when built for legacy rest`, () => { + const skuAlternatorDefaultWarehousePreset = InventoryEntryDraft.presets + .skuAlternatorDefaultWarehouse() + .buildRest(); + expect(skuAlternatorDefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuAlternatorDefaultWarehouse preset when built for legacy graphql`, () => { + const skuAlternatorDefaultWarehousePreset = InventoryEntryDraft.presets + .skuAlternatorDefaultWarehouse() + .buildGraphql(); + expect(skuAlternatorDefaultWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-alternator-default-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-alternator-default-warehouse.ts new file mode 100644 index 000000000..195b65b33 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-alternator-default-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .defaultWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .alternator01() + .build(); + +const skuAlternatorDefaultWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('alternator-default-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuAlternatorDefaultWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-alternator-default.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-alternator-default.spec.ts deleted file mode 100644 index 75012711a..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-alternator-default.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuAlternatorDefault from './sku-alternator-default'; - -describe(`with skuAlternatorDefault preset and default-warehouse channel`, () => { - it(`should return a skuAlternatorDefault preset`, () => { - const skuAlternatorDefaultPreset = - skuAlternatorDefault().build(); - expect(skuAlternatorDefaultPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "alternator-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "alternator", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuAlternatorDefault preset when built for graphql`, () => { - const skuAlternatorDefaultPresetGraphql = - skuAlternatorDefault().buildGraphql(); - expect(skuAlternatorDefaultPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "alternator-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "alternator", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-alternator-default.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-alternator-default.ts deleted file mode 100644 index 48a02a380..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-alternator-default.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const defaultWarehouse = ChannelDraft.presets.sampleDataB2B - .defaultWarehouse() - .build(); - -const alternator01 = ProductVariantDraft.presets.sampleDataB2B - .alternator01() - .build(); - -const skuAlternatorDefault = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${alternator01.sku}-${defaultWarehouse.key}`) - .sku(alternator01.sku!) - .quantityOnStock(1000) - .supplyChannel( - KeyReferenceDraft.presets.channel().key(defaultWarehouse.key) - ); - -export default skuAlternatorDefault; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-alternator-eu-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-alternator-eu-warehouse.spec.ts new file mode 100644 index 000000000..2cb72bc29 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-alternator-eu-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuAlternatorEuWarehouse preset`, () => { + it(`should return a skuAlternatorEuWarehouse preset when built for rest`, () => { + const skuAlternatorEuWarehousePreset = InventoryEntryDraftRest.presets + .skuAlternatorEuWarehouse() + .build(); + expect(skuAlternatorEuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuAlternatorEuWarehouse preset when built for graphql`, () => { + const skuAlternatorEuWarehousePreset = InventoryEntryDraftGraphql.presets + .skuAlternatorEuWarehouse() + .build(); + expect(skuAlternatorEuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuAlternatorEuWarehouse preset when built for legacy rest`, () => { + const skuAlternatorEuWarehousePreset = InventoryEntryDraft.presets + .skuAlternatorEuWarehouse() + .buildRest(); + expect(skuAlternatorEuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuAlternatorEuWarehouse preset when built for legacy graphql`, () => { + const skuAlternatorEuWarehousePreset = InventoryEntryDraft.presets + .skuAlternatorEuWarehouse() + .buildGraphql(); + expect(skuAlternatorEuWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-alternator-eu-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-alternator-eu-warehouse.ts new file mode 100644 index 000000000..25435d66a --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-alternator-eu-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .euWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .alternator01() + .build(); + +const skuAlternatorEuWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('alternator-eu-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuAlternatorEuWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-alternator-eu.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-alternator-eu.spec.ts deleted file mode 100644 index 1e727c75a..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-alternator-eu.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuAlternatorEu from './sku-alternator-eu'; - -describe(`with skuAlternatorEu preset and eu-warehouse channel`, () => { - it(`should return a skuAlternatorEu preset`, () => { - const skuAlternatorEuPreset = - skuAlternatorEu().build(); - expect(skuAlternatorEuPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "alternator-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "alternator", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuAlternatorEu preset when built for graphql`, () => { - const skuAlternatorEuPresetGraphql = - skuAlternatorEu().buildGraphql(); - expect(skuAlternatorEuPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "alternator-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "alternator", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-alternator-eu.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-alternator-eu.ts deleted file mode 100644 index c774cfb06..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-alternator-eu.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const euWarehouse = ChannelDraft.presets.sampleDataB2B - .euWarehouse() - .build(); - -const alternator01 = ProductVariantDraft.presets.sampleDataB2B - .alternator01() - .build(); - -const skuAlternatorEu = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${alternator01.sku}-${euWarehouse.key}`) - .sku(alternator01.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(euWarehouse.key)); - -export default skuAlternatorEu; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-alternator-us-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-alternator-us-warehouse.spec.ts new file mode 100644 index 000000000..cb5fe283d --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-alternator-us-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuAlternatorUsWarehouse preset`, () => { + it(`should return a skuAlternatorUsWarehouse preset when built for rest`, () => { + const skuAlternatorUsWarehousePreset = InventoryEntryDraftRest.presets + .skuAlternatorUsWarehouse() + .build(); + expect(skuAlternatorUsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuAlternatorUsWarehouse preset when built for graphql`, () => { + const skuAlternatorUsWarehousePreset = InventoryEntryDraftGraphql.presets + .skuAlternatorUsWarehouse() + .build(); + expect(skuAlternatorUsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuAlternatorUsWarehouse preset when built for legacy rest`, () => { + const skuAlternatorUsWarehousePreset = InventoryEntryDraft.presets + .skuAlternatorUsWarehouse() + .buildRest(); + expect(skuAlternatorUsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuAlternatorUsWarehouse preset when built for legacy graphql`, () => { + const skuAlternatorUsWarehousePreset = InventoryEntryDraft.presets + .skuAlternatorUsWarehouse() + .buildGraphql(); + expect(skuAlternatorUsWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-alternator-us-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-alternator-us-warehouse.ts new file mode 100644 index 000000000..4ed046ffb --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-alternator-us-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .usWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .alternator01() + .build(); + +const skuAlternatorUsWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('alternator-us-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuAlternatorUsWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-alternator-us.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-alternator-us.spec.ts deleted file mode 100644 index 7e008286a..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-alternator-us.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuAlternatorUs from './sku-alternator-us'; - -describe(`with skuAlternatorUs preset and us-warehouse channel`, () => { - it(`should return a skuAlternatorUs preset`, () => { - const skuAlternatorUsPreset = - skuAlternatorUs().build(); - expect(skuAlternatorUsPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "alternator-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "alternator", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuAlternatorUs preset when built for graphql`, () => { - const skuAlternatorUsPresetGraphql = - skuAlternatorUs().buildGraphql(); - expect(skuAlternatorUsPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "alternator-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "alternator", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-alternator-us.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-alternator-us.ts deleted file mode 100644 index 0511fcf17..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-alternator-us.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const usWarehouse = ChannelDraft.presets.sampleDataB2B - .usWarehouse() - .build(); - -const alternator01 = ProductVariantDraft.presets.sampleDataB2B - .alternator01() - .build(); - -const skuAlternatorUs = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${alternator01.sku}-${usWarehouse.key}`) - .sku(alternator01.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(usWarehouse.key)); - -export default skuAlternatorUs; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-b-456-st-2015-default-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-b-456-st-2015-default-warehouse.spec.ts new file mode 100644 index 000000000..ef81e4dd2 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-b-456-st-2015-default-warehouse.spec.ts @@ -0,0 +1,40 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuB456St2015DefaultWarehouse preset`, () => { + it(`should return a skuB456St2015DefaultWarehouse preset when built for rest`, () => { + const skuB456St2015DefaultWarehousePreset = InventoryEntryDraftRest.presets + .skuB456St2015DefaultWarehouse() + .build(); + expect(skuB456St2015DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuB456St2015DefaultWarehouse preset when built for graphql`, () => { + const skuB456St2015DefaultWarehousePreset = + InventoryEntryDraftGraphql.presets + .skuB456St2015DefaultWarehouse() + .build(); + expect(skuB456St2015DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuB456St2015DefaultWarehouse preset when built for legacy rest`, () => { + const skuB456St2015DefaultWarehousePreset = InventoryEntryDraft.presets + .skuB456St2015DefaultWarehouse() + .buildRest(); + expect(skuB456St2015DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuB456St2015DefaultWarehouse preset when built for legacy graphql`, () => { + const skuB456St2015DefaultWarehousePreset = InventoryEntryDraft.presets + .skuB456St2015DefaultWarehouse() + .buildGraphql(); + expect(skuB456St2015DefaultWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-b-456-st-2015-default-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-b-456-st-2015-default-warehouse.ts new file mode 100644 index 000000000..9a1e79ea5 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-b-456-st-2015-default-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .defaultWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .b456St01() + .build(); + +const skuB456St2015DefaultWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('b456-st-2015-default-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuB456St2015DefaultWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-b-456-st-2015-eu-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-b-456-st-2015-eu-warehouse.spec.ts new file mode 100644 index 000000000..a0aee0276 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-b-456-st-2015-eu-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuB456St2015EuWarehouse preset`, () => { + it(`should return a skuB456St2015EuWarehouse preset when built for rest`, () => { + const skuB456St2015EuWarehousePreset = InventoryEntryDraftRest.presets + .skuB456St2015EuWarehouse() + .build(); + expect(skuB456St2015EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuB456St2015EuWarehouse preset when built for graphql`, () => { + const skuB456St2015EuWarehousePreset = InventoryEntryDraftGraphql.presets + .skuB456St2015EuWarehouse() + .build(); + expect(skuB456St2015EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuB456St2015EuWarehouse preset when built for legacy rest`, () => { + const skuB456St2015EuWarehousePreset = InventoryEntryDraft.presets + .skuB456St2015EuWarehouse() + .buildRest(); + expect(skuB456St2015EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuB456St2015EuWarehouse preset when built for legacy graphql`, () => { + const skuB456St2015EuWarehousePreset = InventoryEntryDraft.presets + .skuB456St2015EuWarehouse() + .buildGraphql(); + expect(skuB456St2015EuWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-b-456-st-2015-eu-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-b-456-st-2015-eu-warehouse.ts new file mode 100644 index 000000000..df1f0c3bc --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-b-456-st-2015-eu-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .euWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .b456St01() + .build(); + +const skuB456St2015EuWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('b456-st-2015-eu-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuB456St2015EuWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-b-456-st-2015-us-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-b-456-st-2015-us-warehouse.spec.ts new file mode 100644 index 000000000..68d77dd26 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-b-456-st-2015-us-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuB456St2015UsWarehouse preset`, () => { + it(`should return a skuB456St2015UsWarehouse preset when built for rest`, () => { + const skuB456St2015UsWarehousePreset = InventoryEntryDraftRest.presets + .skuB456St2015UsWarehouse() + .build(); + expect(skuB456St2015UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuB456St2015UsWarehouse preset when built for graphql`, () => { + const skuB456St2015UsWarehousePreset = InventoryEntryDraftGraphql.presets + .skuB456St2015UsWarehouse() + .build(); + expect(skuB456St2015UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuB456St2015UsWarehouse preset when built for legacy rest`, () => { + const skuB456St2015UsWarehousePreset = InventoryEntryDraft.presets + .skuB456St2015UsWarehouse() + .buildRest(); + expect(skuB456St2015UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuB456St2015UsWarehouse preset when built for legacy graphql`, () => { + const skuB456St2015UsWarehousePreset = InventoryEntryDraft.presets + .skuB456St2015UsWarehouse() + .buildGraphql(); + expect(skuB456St2015UsWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-b-456-st-2015-us-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-b-456-st-2015-us-warehouse.ts new file mode 100644 index 000000000..a76958e42 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-b-456-st-2015-us-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .usWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .b456St01() + .build(); + +const skuB456St2015UsWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('b456-st-2015-us-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuB456St2015UsWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-b-456-st-2019-default-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-b-456-st-2019-default-warehouse.spec.ts new file mode 100644 index 000000000..d5775bb5c --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-b-456-st-2019-default-warehouse.spec.ts @@ -0,0 +1,40 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuB456St2019DefaultWarehouse preset`, () => { + it(`should return a skuB456St2019DefaultWarehouse preset when built for rest`, () => { + const skuB456St2019DefaultWarehousePreset = InventoryEntryDraftRest.presets + .skuB456St2019DefaultWarehouse() + .build(); + expect(skuB456St2019DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuB456St2019DefaultWarehouse preset when built for graphql`, () => { + const skuB456St2019DefaultWarehousePreset = + InventoryEntryDraftGraphql.presets + .skuB456St2019DefaultWarehouse() + .build(); + expect(skuB456St2019DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuB456St2019DefaultWarehouse preset when built for legacy rest`, () => { + const skuB456St2019DefaultWarehousePreset = InventoryEntryDraft.presets + .skuB456St2019DefaultWarehouse() + .buildRest(); + expect(skuB456St2019DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuB456St2019DefaultWarehouse preset when built for legacy graphql`, () => { + const skuB456St2019DefaultWarehousePreset = InventoryEntryDraft.presets + .skuB456St2019DefaultWarehouse() + .buildGraphql(); + expect(skuB456St2019DefaultWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-b-456-st-2019-default-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-b-456-st-2019-default-warehouse.ts new file mode 100644 index 000000000..a21be98e9 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-b-456-st-2019-default-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .defaultWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .b456St02() + .build(); + +const skuB456St2019DefaultWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('b456-st-2019-default-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuB456St2019DefaultWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-b-456-st-2019-eu-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-b-456-st-2019-eu-warehouse.spec.ts new file mode 100644 index 000000000..1a0f32d2a --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-b-456-st-2019-eu-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuB456St2019EuWarehouse preset`, () => { + it(`should return a skuB456St2019EuWarehouse preset when built for rest`, () => { + const skuB456St2019EuWarehousePreset = InventoryEntryDraftRest.presets + .skuB456St2019EuWarehouse() + .build(); + expect(skuB456St2019EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuB456St2019EuWarehouse preset when built for graphql`, () => { + const skuB456St2019EuWarehousePreset = InventoryEntryDraftGraphql.presets + .skuB456St2019EuWarehouse() + .build(); + expect(skuB456St2019EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuB456St2019EuWarehouse preset when built for legacy rest`, () => { + const skuB456St2019EuWarehousePreset = InventoryEntryDraft.presets + .skuB456St2019EuWarehouse() + .buildRest(); + expect(skuB456St2019EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuB456St2019EuWarehouse preset when built for legacy graphql`, () => { + const skuB456St2019EuWarehousePreset = InventoryEntryDraft.presets + .skuB456St2019EuWarehouse() + .buildGraphql(); + expect(skuB456St2019EuWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-b-456-st-2019-eu-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-b-456-st-2019-eu-warehouse.ts new file mode 100644 index 000000000..c5507073b --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-b-456-st-2019-eu-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .euWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .b456St02() + .build(); + +const skuB456St2019EuWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('b456-st-2019-eu-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuB456St2019EuWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-b-456-st-2019-us-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-b-456-st-2019-us-warehouse.spec.ts new file mode 100644 index 000000000..fe35d4136 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-b-456-st-2019-us-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuB456St2019UsWarehouse preset`, () => { + it(`should return a skuB456St2019UsWarehouse preset when built for rest`, () => { + const skuB456St2019UsWarehousePreset = InventoryEntryDraftRest.presets + .skuB456St2019UsWarehouse() + .build(); + expect(skuB456St2019UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuB456St2019UsWarehouse preset when built for graphql`, () => { + const skuB456St2019UsWarehousePreset = InventoryEntryDraftGraphql.presets + .skuB456St2019UsWarehouse() + .build(); + expect(skuB456St2019UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuB456St2019UsWarehouse preset when built for legacy rest`, () => { + const skuB456St2019UsWarehousePreset = InventoryEntryDraft.presets + .skuB456St2019UsWarehouse() + .buildRest(); + expect(skuB456St2019UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuB456St2019UsWarehouse preset when built for legacy graphql`, () => { + const skuB456St2019UsWarehousePreset = InventoryEntryDraft.presets + .skuB456St2019UsWarehouse() + .buildGraphql(); + expect(skuB456St2019UsWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-b-456-st-2019-us-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-b-456-st-2019-us-warehouse.ts new file mode 100644 index 000000000..5ad70fc0c --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-b-456-st-2019-us-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .usWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .b456St02() + .build(); + +const skuB456St2019UsWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('b456-st-2019-us-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuB456St2019UsWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-b-456-st-2023-default-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-b-456-st-2023-default-warehouse.spec.ts new file mode 100644 index 000000000..87dec49cc --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-b-456-st-2023-default-warehouse.spec.ts @@ -0,0 +1,40 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuB456St2023DefaultWarehouse preset`, () => { + it(`should return a skuB456St2023DefaultWarehouse preset when built for rest`, () => { + const skuB456St2023DefaultWarehousePreset = InventoryEntryDraftRest.presets + .skuB456St2023DefaultWarehouse() + .build(); + expect(skuB456St2023DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuB456St2023DefaultWarehouse preset when built for graphql`, () => { + const skuB456St2023DefaultWarehousePreset = + InventoryEntryDraftGraphql.presets + .skuB456St2023DefaultWarehouse() + .build(); + expect(skuB456St2023DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuB456St2023DefaultWarehouse preset when built for legacy rest`, () => { + const skuB456St2023DefaultWarehousePreset = InventoryEntryDraft.presets + .skuB456St2023DefaultWarehouse() + .buildRest(); + expect(skuB456St2023DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuB456St2023DefaultWarehouse preset when built for legacy graphql`, () => { + const skuB456St2023DefaultWarehousePreset = InventoryEntryDraft.presets + .skuB456St2023DefaultWarehouse() + .buildGraphql(); + expect(skuB456St2023DefaultWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-b-456-st-2023-default-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-b-456-st-2023-default-warehouse.ts new file mode 100644 index 000000000..a92a0f999 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-b-456-st-2023-default-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .defaultWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .b456St03() + .build(); + +const skuB456St2023DefaultWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('b456-st-2023-default-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuB456St2023DefaultWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-b-456-st-2023-eu-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-b-456-st-2023-eu-warehouse.spec.ts new file mode 100644 index 000000000..f619d71d3 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-b-456-st-2023-eu-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuB456St2023EuWarehouse preset`, () => { + it(`should return a skuB456St2023EuWarehouse preset when built for rest`, () => { + const skuB456St2023EuWarehousePreset = InventoryEntryDraftRest.presets + .skuB456St2023EuWarehouse() + .build(); + expect(skuB456St2023EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuB456St2023EuWarehouse preset when built for graphql`, () => { + const skuB456St2023EuWarehousePreset = InventoryEntryDraftGraphql.presets + .skuB456St2023EuWarehouse() + .build(); + expect(skuB456St2023EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuB456St2023EuWarehouse preset when built for legacy rest`, () => { + const skuB456St2023EuWarehousePreset = InventoryEntryDraft.presets + .skuB456St2023EuWarehouse() + .buildRest(); + expect(skuB456St2023EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuB456St2023EuWarehouse preset when built for legacy graphql`, () => { + const skuB456St2023EuWarehousePreset = InventoryEntryDraft.presets + .skuB456St2023EuWarehouse() + .buildGraphql(); + expect(skuB456St2023EuWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-b-456-st-2023-eu-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-b-456-st-2023-eu-warehouse.ts new file mode 100644 index 000000000..c6f376752 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-b-456-st-2023-eu-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .euWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .b456St03() + .build(); + +const skuB456St2023EuWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('b456-st-2023-eu-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuB456St2023EuWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-b-456-st-2023-us-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-b-456-st-2023-us-warehouse.spec.ts new file mode 100644 index 000000000..a838cc6bc --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-b-456-st-2023-us-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuB456St2023UsWarehouse preset`, () => { + it(`should return a skuB456St2023UsWarehouse preset when built for rest`, () => { + const skuB456St2023UsWarehousePreset = InventoryEntryDraftRest.presets + .skuB456St2023UsWarehouse() + .build(); + expect(skuB456St2023UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuB456St2023UsWarehouse preset when built for graphql`, () => { + const skuB456St2023UsWarehousePreset = InventoryEntryDraftGraphql.presets + .skuB456St2023UsWarehouse() + .build(); + expect(skuB456St2023UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuB456St2023UsWarehouse preset when built for legacy rest`, () => { + const skuB456St2023UsWarehousePreset = InventoryEntryDraft.presets + .skuB456St2023UsWarehouse() + .buildRest(); + expect(skuB456St2023UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuB456St2023UsWarehouse preset when built for legacy graphql`, () => { + const skuB456St2023UsWarehousePreset = InventoryEntryDraft.presets + .skuB456St2023UsWarehouse() + .buildGraphql(); + expect(skuB456St2023UsWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-b-456-st-2023-us-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-b-456-st-2023-us-warehouse.ts new file mode 100644 index 000000000..38a576f68 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-b-456-st-2023-us-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .usWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .b456St03() + .build(); + +const skuB456St2023UsWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('b456-st-2023-us-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuB456St2023UsWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-b456-st-2015-default.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-b456-st-2015-default.spec.ts deleted file mode 100644 index 325d85548..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-b456-st-2015-default.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuB456St2015Default from './sku-b456-st-2015-default'; - -describe(`with skuB456St2015Default preset and default-warehouse channel`, () => { - it(`should return a skuB456St2015Default preset`, () => { - const skuB456St2015DefaultPreset = - skuB456St2015Default().build(); - expect(skuB456St2015DefaultPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "b456-st-2015-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "b456-st-2015", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuB456St2015Default preset when built for graphql`, () => { - const skuB456St2015DefaultPresetGraphql = - skuB456St2015Default().buildGraphql(); - expect(skuB456St2015DefaultPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "b456-st-2015-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "b456-st-2015", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-b456-st-2015-default.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-b456-st-2015-default.ts deleted file mode 100644 index 28a2a8043..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-b456-st-2015-default.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const defaultWarehouse = ChannelDraft.presets.sampleDataB2B - .defaultWarehouse() - .build(); - -const b456St01 = ProductVariantDraft.presets.sampleDataB2B - .b456St01() - .build(); - -const skuB456St2015Default = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${b456St01.sku}-${defaultWarehouse.key}`) - .sku(b456St01.sku!) - .quantityOnStock(1000) - .supplyChannel( - KeyReferenceDraft.presets.channel().key(defaultWarehouse.key) - ); - -export default skuB456St2015Default; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-b456-st-2015-eu.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-b456-st-2015-eu.spec.ts deleted file mode 100644 index dd68eaf1f..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-b456-st-2015-eu.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuB456St2015Eu from './sku-b456-st-2015-eu'; - -describe(`with skuB456St2015Eu preset and eu-warehouse channel`, () => { - it(`should return a skuB456St2015Eu preset`, () => { - const skuB456St2015EuPreset = - skuB456St2015Eu().build(); - expect(skuB456St2015EuPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "b456-st-2015-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "b456-st-2015", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuB456St2015Eu preset when built for graphql`, () => { - const skuB456St2015EuPresetGraphql = - skuB456St2015Eu().buildGraphql(); - expect(skuB456St2015EuPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "b456-st-2015-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "b456-st-2015", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-b456-st-2015-eu.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-b456-st-2015-eu.ts deleted file mode 100644 index acc251058..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-b456-st-2015-eu.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const euWarehouse = ChannelDraft.presets.sampleDataB2B - .euWarehouse() - .build(); - -const b456St01 = ProductVariantDraft.presets.sampleDataB2B - .b456St01() - .build(); - -const skuB456St2015Eu = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${b456St01.sku}-${euWarehouse.key}`) - .sku(b456St01.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(euWarehouse.key)); - -export default skuB456St2015Eu; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-b456-st-2015-us.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-b456-st-2015-us.spec.ts deleted file mode 100644 index 49d337eb3..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-b456-st-2015-us.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuB456St2015Us from './sku-b456-st-2015-us'; - -describe(`with skuB456St2015Us preset and us-warehouse channel`, () => { - it(`should return a skuB456St2015Us preset`, () => { - const skuB456St2015UsPreset = - skuB456St2015Us().build(); - expect(skuB456St2015UsPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "b456-st-2015-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "b456-st-2015", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuB456St2015Us preset when built for graphql`, () => { - const skuB456St2015UsPresetGraphql = - skuB456St2015Us().buildGraphql(); - expect(skuB456St2015UsPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "b456-st-2015-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "b456-st-2015", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-b456-st-2015-us.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-b456-st-2015-us.ts deleted file mode 100644 index 52a082ed4..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-b456-st-2015-us.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const usWarehouse = ChannelDraft.presets.sampleDataB2B - .usWarehouse() - .build(); - -const b456St01 = ProductVariantDraft.presets.sampleDataB2B - .b456St01() - .build(); - -const skuB456St2015Us = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${b456St01.sku}-${usWarehouse.key}`) - .sku(b456St01.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(usWarehouse.key)); - -export default skuB456St2015Us; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-b456-st-2019-default.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-b456-st-2019-default.spec.ts deleted file mode 100644 index 1a39c5d96..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-b456-st-2019-default.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuB456St2019Default from './sku-b456-st-2019-default'; - -describe(`with skuB456St2019Default preset and default-warehouse channel`, () => { - it(`should return a skuB456St2019Default preset`, () => { - const skuB456St2019DefaultPreset = - skuB456St2019Default().build(); - expect(skuB456St2019DefaultPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "b456-st-2019-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "b456-st-2019", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuB456St2019Default preset when built for graphql`, () => { - const skuB456St2019DefaultPresetGraphql = - skuB456St2019Default().buildGraphql(); - expect(skuB456St2019DefaultPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "b456-st-2019-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "b456-st-2019", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-b456-st-2019-default.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-b456-st-2019-default.ts deleted file mode 100644 index da94f7c13..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-b456-st-2019-default.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const defaultWarehouse = ChannelDraft.presets.sampleDataB2B - .defaultWarehouse() - .build(); - -const b456St02 = ProductVariantDraft.presets.sampleDataB2B - .b456St02() - .build(); - -const skuB456St2019Default = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${b456St02.sku}-${defaultWarehouse.key}`) - .sku(b456St02.sku!) - .quantityOnStock(1000) - .supplyChannel( - KeyReferenceDraft.presets.channel().key(defaultWarehouse.key) - ); - -export default skuB456St2019Default; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-b456-st-2019-eu.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-b456-st-2019-eu.spec.ts deleted file mode 100644 index 45a97ac8c..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-b456-st-2019-eu.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuB456St2019Eu from './sku-b456-st-2019-eu'; - -describe(`with skuB456St2019Eu preset and eu-warehouse channel`, () => { - it(`should return a skuB456St2019Eu preset`, () => { - const skuB456St2019EuPreset = - skuB456St2019Eu().build(); - expect(skuB456St2019EuPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "b456-st-2019-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "b456-st-2019", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuB456St2019Eu preset when built for graphql`, () => { - const skuB456St2019EuPresetGraphql = - skuB456St2019Eu().buildGraphql(); - expect(skuB456St2019EuPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "b456-st-2019-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "b456-st-2019", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-b456-st-2019-eu.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-b456-st-2019-eu.ts deleted file mode 100644 index 6a5b76729..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-b456-st-2019-eu.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const euWarehouse = ChannelDraft.presets.sampleDataB2B - .euWarehouse() - .build(); - -const b456St02 = ProductVariantDraft.presets.sampleDataB2B - .b456St02() - .build(); - -const skuB456St2019Eu = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${b456St02.sku}-${euWarehouse.key}`) - .sku(b456St02.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(euWarehouse.key)); - -export default skuB456St2019Eu; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-b456-st-2019-us.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-b456-st-2019-us.spec.ts deleted file mode 100644 index 20e1cdd2e..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-b456-st-2019-us.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuB456St2019Us from './sku-b456-st-2019-us'; - -describe(`with skuB456St2019Us preset and us-warehouse channel`, () => { - it(`should return a skuB456St2019Us preset`, () => { - const skuB456St2019UsPreset = - skuB456St2019Us().build(); - expect(skuB456St2019UsPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "b456-st-2019-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "b456-st-2019", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuB456St2019Us preset when built for graphql`, () => { - const skuB456St2019UsPresetGraphql = - skuB456St2019Us().buildGraphql(); - expect(skuB456St2019UsPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "b456-st-2019-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "b456-st-2019", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-b456-st-2019-us.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-b456-st-2019-us.ts deleted file mode 100644 index 85c287c49..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-b456-st-2019-us.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const usWarehouse = ChannelDraft.presets.sampleDataB2B - .usWarehouse() - .build(); - -const b456St02 = ProductVariantDraft.presets.sampleDataB2B - .b456St02() - .build(); - -const skuB456St2019Us = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${b456St02.sku}-${usWarehouse.key}`) - .sku(b456St02.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(usWarehouse.key)); - -export default skuB456St2019Us; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-b456-st-2023-default.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-b456-st-2023-default.spec.ts deleted file mode 100644 index 66541b285..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-b456-st-2023-default.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuB456St2023Default from './sku-b456-st-2023-default'; - -describe(`with skuB456St2023Default preset and default-warehouse channel`, () => { - it(`should return a skuB456St2023Default preset`, () => { - const skuB456St2023DefaultPreset = - skuB456St2023Default().build(); - expect(skuB456St2023DefaultPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "b456-st-2023-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "b456-st-2023", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuB456St2023Default preset when built for graphql`, () => { - const skuB456St2023DefaultPresetGraphql = - skuB456St2023Default().buildGraphql(); - expect(skuB456St2023DefaultPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "b456-st-2023-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "b456-st-2023", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-b456-st-2023-default.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-b456-st-2023-default.ts deleted file mode 100644 index 8608012ee..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-b456-st-2023-default.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const defaultWarehouse = ChannelDraft.presets.sampleDataB2B - .defaultWarehouse() - .build(); - -const b456St03 = ProductVariantDraft.presets.sampleDataB2B - .b456St03() - .build(); - -const skuB456St2023Default = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${b456St03.sku}-${defaultWarehouse.key}`) - .sku(b456St03.sku!) - .quantityOnStock(1000) - .supplyChannel( - KeyReferenceDraft.presets.channel().key(defaultWarehouse.key) - ); - -export default skuB456St2023Default; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-b456-st-2023-eu.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-b456-st-2023-eu.spec.ts deleted file mode 100644 index a34c96262..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-b456-st-2023-eu.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuB456St2023Eu from './sku-b456-st-2023-eu'; - -describe(`with skuB456St2023Eu preset and eu-warehouse channel`, () => { - it(`should return a skuB456St2023Eu preset`, () => { - const skuB456St2023EuPreset = - skuB456St2023Eu().build(); - expect(skuB456St2023EuPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "b456-st-2023-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "b456-st-2023", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuB456St2023Eu preset when built for graphql`, () => { - const skuB456St2023EuPresetGraphql = - skuB456St2023Eu().buildGraphql(); - expect(skuB456St2023EuPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "b456-st-2023-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "b456-st-2023", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-b456-st-2023-eu.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-b456-st-2023-eu.ts deleted file mode 100644 index 95387d725..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-b456-st-2023-eu.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const euWarehouse = ChannelDraft.presets.sampleDataB2B - .euWarehouse() - .build(); - -const b456St03 = ProductVariantDraft.presets.sampleDataB2B - .b456St03() - .build(); - -const skuB456St2023Eu = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${b456St03.sku}-${euWarehouse.key}`) - .sku(b456St03.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(euWarehouse.key)); - -export default skuB456St2023Eu; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-b456-st-2023-us.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-b456-st-2023-us.spec.ts deleted file mode 100644 index 1522c834d..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-b456-st-2023-us.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuB456St2023Us from './sku-b456-st-2023-us'; - -describe(`with skuB456St2023Us preset and us-warehouse channel`, () => { - it(`should return a skuB456St2023Us preset`, () => { - const skuB456St2023UsPreset = - skuB456St2023Us().build(); - expect(skuB456St2023UsPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "b456-st-2023-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "b456-st-2023", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuB456St2023Us preset when built for graphql`, () => { - const skuB456St2023UsPresetGraphql = - skuB456St2023Us().buildGraphql(); - expect(skuB456St2023UsPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "b456-st-2023-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "b456-st-2023", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-b456-st-2023-us.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-b456-st-2023-us.ts deleted file mode 100644 index 398f8d49f..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-b456-st-2023-us.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const usWarehouse = ChannelDraft.presets.sampleDataB2B - .usWarehouse() - .build(); - -const b456St03 = ProductVariantDraft.presets.sampleDataB2B - .b456St03() - .build(); - -const skuB456St2023Us = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${b456St03.sku}-${usWarehouse.key}`) - .sku(b456St03.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(usWarehouse.key)); - -export default skuB456St2023Us; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bb-456-st-2015-default-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bb-456-st-2015-default-warehouse.spec.ts new file mode 100644 index 000000000..9a9c52740 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bb-456-st-2015-default-warehouse.spec.ts @@ -0,0 +1,40 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuBb456St2015DefaultWarehouse preset`, () => { + it(`should return a skuBb456St2015DefaultWarehouse preset when built for rest`, () => { + const skuBb456St2015DefaultWarehousePreset = InventoryEntryDraftRest.presets + .skuBb456St2015DefaultWarehouse() + .build(); + expect(skuBb456St2015DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuBb456St2015DefaultWarehouse preset when built for graphql`, () => { + const skuBb456St2015DefaultWarehousePreset = + InventoryEntryDraftGraphql.presets + .skuBb456St2015DefaultWarehouse() + .build(); + expect(skuBb456St2015DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuBb456St2015DefaultWarehouse preset when built for legacy rest`, () => { + const skuBb456St2015DefaultWarehousePreset = InventoryEntryDraft.presets + .skuBb456St2015DefaultWarehouse() + .buildRest(); + expect(skuBb456St2015DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuBb456St2015DefaultWarehouse preset when built for legacy graphql`, () => { + const skuBb456St2015DefaultWarehousePreset = InventoryEntryDraft.presets + .skuBb456St2015DefaultWarehouse() + .buildGraphql(); + expect(skuBb456St2015DefaultWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bb-456-st-2015-default-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bb-456-st-2015-default-warehouse.ts new file mode 100644 index 000000000..a30227166 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bb-456-st-2015-default-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .defaultWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .bb456St01() + .build(); + +const skuBb456St2015DefaultWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('bb456-st-2015-default-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuBb456St2015DefaultWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bb-456-st-2015-eu-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bb-456-st-2015-eu-warehouse.spec.ts new file mode 100644 index 000000000..40c44985f --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bb-456-st-2015-eu-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuBb456St2015EuWarehouse preset`, () => { + it(`should return a skuBb456St2015EuWarehouse preset when built for rest`, () => { + const skuBb456St2015EuWarehousePreset = InventoryEntryDraftRest.presets + .skuBb456St2015EuWarehouse() + .build(); + expect(skuBb456St2015EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuBb456St2015EuWarehouse preset when built for graphql`, () => { + const skuBb456St2015EuWarehousePreset = InventoryEntryDraftGraphql.presets + .skuBb456St2015EuWarehouse() + .build(); + expect(skuBb456St2015EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuBb456St2015EuWarehouse preset when built for legacy rest`, () => { + const skuBb456St2015EuWarehousePreset = InventoryEntryDraft.presets + .skuBb456St2015EuWarehouse() + .buildRest(); + expect(skuBb456St2015EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuBb456St2015EuWarehouse preset when built for legacy graphql`, () => { + const skuBb456St2015EuWarehousePreset = InventoryEntryDraft.presets + .skuBb456St2015EuWarehouse() + .buildGraphql(); + expect(skuBb456St2015EuWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bb-456-st-2015-eu-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bb-456-st-2015-eu-warehouse.ts new file mode 100644 index 000000000..12e7a07e8 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bb-456-st-2015-eu-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .euWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .bb456St01() + .build(); + +const skuBb456St2015EuWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('bb456-st-2015-eu-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuBb456St2015EuWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bb-456-st-2015-us-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bb-456-st-2015-us-warehouse.spec.ts new file mode 100644 index 000000000..4acdc34f3 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bb-456-st-2015-us-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuBb456St2015UsWarehouse preset`, () => { + it(`should return a skuBb456St2015UsWarehouse preset when built for rest`, () => { + const skuBb456St2015UsWarehousePreset = InventoryEntryDraftRest.presets + .skuBb456St2015UsWarehouse() + .build(); + expect(skuBb456St2015UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuBb456St2015UsWarehouse preset when built for graphql`, () => { + const skuBb456St2015UsWarehousePreset = InventoryEntryDraftGraphql.presets + .skuBb456St2015UsWarehouse() + .build(); + expect(skuBb456St2015UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuBb456St2015UsWarehouse preset when built for legacy rest`, () => { + const skuBb456St2015UsWarehousePreset = InventoryEntryDraft.presets + .skuBb456St2015UsWarehouse() + .buildRest(); + expect(skuBb456St2015UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuBb456St2015UsWarehouse preset when built for legacy graphql`, () => { + const skuBb456St2015UsWarehousePreset = InventoryEntryDraft.presets + .skuBb456St2015UsWarehouse() + .buildGraphql(); + expect(skuBb456St2015UsWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bb-456-st-2015-us-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bb-456-st-2015-us-warehouse.ts new file mode 100644 index 000000000..428b871f6 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bb-456-st-2015-us-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .usWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .bb456St01() + .build(); + +const skuBb456St2015UsWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('bb456-st-2015-us-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuBb456St2015UsWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bb-456-st-2019-default-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bb-456-st-2019-default-warehouse.spec.ts new file mode 100644 index 000000000..a6356e883 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bb-456-st-2019-default-warehouse.spec.ts @@ -0,0 +1,40 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuBb456St2019DefaultWarehouse preset`, () => { + it(`should return a skuBb456St2019DefaultWarehouse preset when built for rest`, () => { + const skuBb456St2019DefaultWarehousePreset = InventoryEntryDraftRest.presets + .skuBb456St2019DefaultWarehouse() + .build(); + expect(skuBb456St2019DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuBb456St2019DefaultWarehouse preset when built for graphql`, () => { + const skuBb456St2019DefaultWarehousePreset = + InventoryEntryDraftGraphql.presets + .skuBb456St2019DefaultWarehouse() + .build(); + expect(skuBb456St2019DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuBb456St2019DefaultWarehouse preset when built for legacy rest`, () => { + const skuBb456St2019DefaultWarehousePreset = InventoryEntryDraft.presets + .skuBb456St2019DefaultWarehouse() + .buildRest(); + expect(skuBb456St2019DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuBb456St2019DefaultWarehouse preset when built for legacy graphql`, () => { + const skuBb456St2019DefaultWarehousePreset = InventoryEntryDraft.presets + .skuBb456St2019DefaultWarehouse() + .buildGraphql(); + expect(skuBb456St2019DefaultWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bb-456-st-2019-default-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bb-456-st-2019-default-warehouse.ts new file mode 100644 index 000000000..8126c36cb --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bb-456-st-2019-default-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .defaultWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .bb456St02() + .build(); + +const skuBb456St2019DefaultWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('bb456-st-2019-default-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuBb456St2019DefaultWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bb-456-st-2019-eu-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bb-456-st-2019-eu-warehouse.spec.ts new file mode 100644 index 000000000..2353554b2 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bb-456-st-2019-eu-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuBb456St2019EuWarehouse preset`, () => { + it(`should return a skuBb456St2019EuWarehouse preset when built for rest`, () => { + const skuBb456St2019EuWarehousePreset = InventoryEntryDraftRest.presets + .skuBb456St2019EuWarehouse() + .build(); + expect(skuBb456St2019EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuBb456St2019EuWarehouse preset when built for graphql`, () => { + const skuBb456St2019EuWarehousePreset = InventoryEntryDraftGraphql.presets + .skuBb456St2019EuWarehouse() + .build(); + expect(skuBb456St2019EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuBb456St2019EuWarehouse preset when built for legacy rest`, () => { + const skuBb456St2019EuWarehousePreset = InventoryEntryDraft.presets + .skuBb456St2019EuWarehouse() + .buildRest(); + expect(skuBb456St2019EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuBb456St2019EuWarehouse preset when built for legacy graphql`, () => { + const skuBb456St2019EuWarehousePreset = InventoryEntryDraft.presets + .skuBb456St2019EuWarehouse() + .buildGraphql(); + expect(skuBb456St2019EuWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bb-456-st-2019-eu-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bb-456-st-2019-eu-warehouse.ts new file mode 100644 index 000000000..1bc4144a7 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bb-456-st-2019-eu-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .euWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .bb456St02() + .build(); + +const skuBb456St2019EuWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('bb456-st-2019-eu-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuBb456St2019EuWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bb-456-st-2019-us-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bb-456-st-2019-us-warehouse.spec.ts new file mode 100644 index 000000000..0bcf77b1c --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bb-456-st-2019-us-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuBb456St2019UsWarehouse preset`, () => { + it(`should return a skuBb456St2019UsWarehouse preset when built for rest`, () => { + const skuBb456St2019UsWarehousePreset = InventoryEntryDraftRest.presets + .skuBb456St2019UsWarehouse() + .build(); + expect(skuBb456St2019UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuBb456St2019UsWarehouse preset when built for graphql`, () => { + const skuBb456St2019UsWarehousePreset = InventoryEntryDraftGraphql.presets + .skuBb456St2019UsWarehouse() + .build(); + expect(skuBb456St2019UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuBb456St2019UsWarehouse preset when built for legacy rest`, () => { + const skuBb456St2019UsWarehousePreset = InventoryEntryDraft.presets + .skuBb456St2019UsWarehouse() + .buildRest(); + expect(skuBb456St2019UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuBb456St2019UsWarehouse preset when built for legacy graphql`, () => { + const skuBb456St2019UsWarehousePreset = InventoryEntryDraft.presets + .skuBb456St2019UsWarehouse() + .buildGraphql(); + expect(skuBb456St2019UsWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bb-456-st-2019-us-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bb-456-st-2019-us-warehouse.ts new file mode 100644 index 000000000..fca42117c --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bb-456-st-2019-us-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .usWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .bb456St02() + .build(); + +const skuBb456St2019UsWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('bb456-st-2019-us-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuBb456St2019UsWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bb-456-st-2023-default-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bb-456-st-2023-default-warehouse.spec.ts new file mode 100644 index 000000000..62110c05b --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bb-456-st-2023-default-warehouse.spec.ts @@ -0,0 +1,40 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuBb456St2023DefaultWarehouse preset`, () => { + it(`should return a skuBb456St2023DefaultWarehouse preset when built for rest`, () => { + const skuBb456St2023DefaultWarehousePreset = InventoryEntryDraftRest.presets + .skuBb456St2023DefaultWarehouse() + .build(); + expect(skuBb456St2023DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuBb456St2023DefaultWarehouse preset when built for graphql`, () => { + const skuBb456St2023DefaultWarehousePreset = + InventoryEntryDraftGraphql.presets + .skuBb456St2023DefaultWarehouse() + .build(); + expect(skuBb456St2023DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuBb456St2023DefaultWarehouse preset when built for legacy rest`, () => { + const skuBb456St2023DefaultWarehousePreset = InventoryEntryDraft.presets + .skuBb456St2023DefaultWarehouse() + .buildRest(); + expect(skuBb456St2023DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuBb456St2023DefaultWarehouse preset when built for legacy graphql`, () => { + const skuBb456St2023DefaultWarehousePreset = InventoryEntryDraft.presets + .skuBb456St2023DefaultWarehouse() + .buildGraphql(); + expect(skuBb456St2023DefaultWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bb-456-st-2023-default-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bb-456-st-2023-default-warehouse.ts new file mode 100644 index 000000000..fd91624fc --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bb-456-st-2023-default-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .defaultWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .bb456St03() + .build(); + +const skuBb456St2023DefaultWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('bb456-st-2023-default-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuBb456St2023DefaultWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bb-456-st-2023-eu-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bb-456-st-2023-eu-warehouse.spec.ts new file mode 100644 index 000000000..963079798 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bb-456-st-2023-eu-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuBb456St2023EuWarehouse preset`, () => { + it(`should return a skuBb456St2023EuWarehouse preset when built for rest`, () => { + const skuBb456St2023EuWarehousePreset = InventoryEntryDraftRest.presets + .skuBb456St2023EuWarehouse() + .build(); + expect(skuBb456St2023EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuBb456St2023EuWarehouse preset when built for graphql`, () => { + const skuBb456St2023EuWarehousePreset = InventoryEntryDraftGraphql.presets + .skuBb456St2023EuWarehouse() + .build(); + expect(skuBb456St2023EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuBb456St2023EuWarehouse preset when built for legacy rest`, () => { + const skuBb456St2023EuWarehousePreset = InventoryEntryDraft.presets + .skuBb456St2023EuWarehouse() + .buildRest(); + expect(skuBb456St2023EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuBb456St2023EuWarehouse preset when built for legacy graphql`, () => { + const skuBb456St2023EuWarehousePreset = InventoryEntryDraft.presets + .skuBb456St2023EuWarehouse() + .buildGraphql(); + expect(skuBb456St2023EuWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bb-456-st-2023-eu-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bb-456-st-2023-eu-warehouse.ts new file mode 100644 index 000000000..c683cfaf1 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bb-456-st-2023-eu-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .euWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .bb456St03() + .build(); + +const skuBb456St2023EuWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('bb456-st-2023-eu-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuBb456St2023EuWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bb-456-st-2023-us-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bb-456-st-2023-us-warehouse.spec.ts new file mode 100644 index 000000000..4bdbf283f --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bb-456-st-2023-us-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuBb456St2023UsWarehouse preset`, () => { + it(`should return a skuBb456St2023UsWarehouse preset when built for rest`, () => { + const skuBb456St2023UsWarehousePreset = InventoryEntryDraftRest.presets + .skuBb456St2023UsWarehouse() + .build(); + expect(skuBb456St2023UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuBb456St2023UsWarehouse preset when built for graphql`, () => { + const skuBb456St2023UsWarehousePreset = InventoryEntryDraftGraphql.presets + .skuBb456St2023UsWarehouse() + .build(); + expect(skuBb456St2023UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuBb456St2023UsWarehouse preset when built for legacy rest`, () => { + const skuBb456St2023UsWarehousePreset = InventoryEntryDraft.presets + .skuBb456St2023UsWarehouse() + .buildRest(); + expect(skuBb456St2023UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuBb456St2023UsWarehouse preset when built for legacy graphql`, () => { + const skuBb456St2023UsWarehousePreset = InventoryEntryDraft.presets + .skuBb456St2023UsWarehouse() + .buildGraphql(); + expect(skuBb456St2023UsWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bb-456-st-2023-us-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bb-456-st-2023-us-warehouse.ts new file mode 100644 index 000000000..8b598c8ff --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bb-456-st-2023-us-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .usWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .bb456St03() + .build(); + +const skuBb456St2023UsWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('bb456-st-2023-us-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuBb456St2023UsWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bb456-st-2015-default.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bb456-st-2015-default.spec.ts deleted file mode 100644 index 831ad5714..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bb456-st-2015-default.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuBb456St2015Default from './sku-bb456-st-2015-default'; - -describe(`with skuBb456St2015Default preset and default-warehouse channel`, () => { - it(`should return a skuBb456St2015Default preset`, () => { - const skuBb456St2015DefaultPreset = - skuBb456St2015Default().build(); - expect(skuBb456St2015DefaultPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "bb456-st-2015-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "bb456-st-2015", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuBb456St2015Default preset when built for graphql`, () => { - const skuBb456St2015DefaultPresetGraphql = - skuBb456St2015Default().buildGraphql(); - expect(skuBb456St2015DefaultPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "bb456-st-2015-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "bb456-st-2015", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bb456-st-2015-default.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bb456-st-2015-default.ts deleted file mode 100644 index bd7421c6f..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bb456-st-2015-default.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const defaultWarehouse = ChannelDraft.presets.sampleDataB2B - .defaultWarehouse() - .build(); - -const bb456St01 = ProductVariantDraft.presets.sampleDataB2B - .bb456St01() - .build(); - -const skuBb456St2015Default = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${bb456St01.sku}-${defaultWarehouse.key}`) - .sku(bb456St01.sku!) - .quantityOnStock(1000) - .supplyChannel( - KeyReferenceDraft.presets.channel().key(defaultWarehouse.key) - ); - -export default skuBb456St2015Default; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bb456-st-2015-eu.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bb456-st-2015-eu.spec.ts deleted file mode 100644 index 6f600967c..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bb456-st-2015-eu.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuBb456St2015Eu from './sku-bb456-st-2015-eu'; - -describe(`with skuBb456St2015Eu preset and eu-warehouse channel`, () => { - it(`should return a skuBb456St2015Eu preset`, () => { - const skuBb456St2015EuPreset = - skuBb456St2015Eu().build(); - expect(skuBb456St2015EuPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "bb456-st-2015-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "bb456-st-2015", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuBb456St2015Eu preset when built for graphql`, () => { - const skuBb456St2015EuPresetGraphql = - skuBb456St2015Eu().buildGraphql(); - expect(skuBb456St2015EuPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "bb456-st-2015-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "bb456-st-2015", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bb456-st-2015-eu.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bb456-st-2015-eu.ts deleted file mode 100644 index f4e2f71a0..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bb456-st-2015-eu.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const euWarehouse = ChannelDraft.presets.sampleDataB2B - .euWarehouse() - .build(); - -const bb456St01 = ProductVariantDraft.presets.sampleDataB2B - .bb456St01() - .build(); - -const skuBb456St2015Eu = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${bb456St01.sku}-${euWarehouse.key}`) - .sku(bb456St01.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(euWarehouse.key)); - -export default skuBb456St2015Eu; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bb456-st-2015-us.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bb456-st-2015-us.spec.ts deleted file mode 100644 index b63338ba3..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bb456-st-2015-us.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuBb456St2015Us from './sku-bb456-st-2015-us'; - -describe(`with skuBb456St2015Us preset and us-warehouse channel`, () => { - it(`should return a skuBb456St2015Us preset`, () => { - const skuBb456St2015UsPreset = - skuBb456St2015Us().build(); - expect(skuBb456St2015UsPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "bb456-st-2015-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "bb456-st-2015", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuBb456St2015Us preset when built for graphql`, () => { - const skuBb456St2015UsPresetGraphql = - skuBb456St2015Us().buildGraphql(); - expect(skuBb456St2015UsPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "bb456-st-2015-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "bb456-st-2015", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bb456-st-2015-us.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bb456-st-2015-us.ts deleted file mode 100644 index c5c09340f..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bb456-st-2015-us.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const usWarehouse = ChannelDraft.presets.sampleDataB2B - .usWarehouse() - .build(); - -const bb456St01 = ProductVariantDraft.presets.sampleDataB2B - .bb456St01() - .build(); - -const skuBb456St2015Us = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${bb456St01.sku}-${usWarehouse.key}`) - .sku(bb456St01.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(usWarehouse.key)); - -export default skuBb456St2015Us; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bb456-st-2019-default.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bb456-st-2019-default.spec.ts deleted file mode 100644 index 9a6ab97a8..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bb456-st-2019-default.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuBb456St2019Default from './sku-bb456-st-2019-default'; - -describe(`with skuBb456St2019Default preset and default-warehouse channel`, () => { - it(`should return a skuBb456St2019Default preset`, () => { - const skuBb456St2019DefaultPreset = - skuBb456St2019Default().build(); - expect(skuBb456St2019DefaultPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "bb456-st-2019-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "bb456-st-2019", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuBb456St2019Default preset when built for graphql`, () => { - const skuBb456St2019DefaultPresetGraphql = - skuBb456St2019Default().buildGraphql(); - expect(skuBb456St2019DefaultPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "bb456-st-2019-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "bb456-st-2019", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bb456-st-2019-default.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bb456-st-2019-default.ts deleted file mode 100644 index a534e4638..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bb456-st-2019-default.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const defaultWarehouse = ChannelDraft.presets.sampleDataB2B - .defaultWarehouse() - .build(); - -const bb456St02 = ProductVariantDraft.presets.sampleDataB2B - .bb456St02() - .build(); - -const skuBb456St2019Default = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${bb456St02.sku}-${defaultWarehouse.key}`) - .sku(bb456St02.sku!) - .quantityOnStock(1000) - .supplyChannel( - KeyReferenceDraft.presets.channel().key(defaultWarehouse.key) - ); - -export default skuBb456St2019Default; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bb456-st-2019-eu.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bb456-st-2019-eu.spec.ts deleted file mode 100644 index 58367a401..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bb456-st-2019-eu.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuBb456St2019Eu from './sku-bb456-st-2019-eu'; - -describe(`with skuBb456St2019Eu preset and eu-warehouse channel`, () => { - it(`should return a skuBb456St2019Eu preset`, () => { - const skuBb456St2019EuPreset = - skuBb456St2019Eu().build(); - expect(skuBb456St2019EuPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "bb456-st-2019-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "bb456-st-2019", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuBb456St2019Eu preset when built for graphql`, () => { - const skuBb456St2019EuPresetGraphql = - skuBb456St2019Eu().buildGraphql(); - expect(skuBb456St2019EuPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "bb456-st-2019-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "bb456-st-2019", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bb456-st-2019-eu.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bb456-st-2019-eu.ts deleted file mode 100644 index 18c492bf3..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bb456-st-2019-eu.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const euWarehouse = ChannelDraft.presets.sampleDataB2B - .euWarehouse() - .build(); - -const bb456St02 = ProductVariantDraft.presets.sampleDataB2B - .bb456St02() - .build(); - -const skuBb456St2019Eu = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${bb456St02.sku}-${euWarehouse.key}`) - .sku(bb456St02.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(euWarehouse.key)); - -export default skuBb456St2019Eu; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bb456-st-2019-us.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bb456-st-2019-us.spec.ts deleted file mode 100644 index 4fd5878bb..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bb456-st-2019-us.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuBb456St2019Us from './sku-bb456-st-2019-us'; - -describe(`with skuBb456St2019Us preset and us-warehouse channel`, () => { - it(`should return a skuBb456St2019Us preset`, () => { - const skuBb456St2019UsPreset = - skuBb456St2019Us().build(); - expect(skuBb456St2019UsPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "bb456-st-2019-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "bb456-st-2019", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuBb456St2019Us preset when built for graphql`, () => { - const skuBb456St2019UsPresetGraphql = - skuBb456St2019Us().buildGraphql(); - expect(skuBb456St2019UsPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "bb456-st-2019-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "bb456-st-2019", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bb456-st-2019-us.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bb456-st-2019-us.ts deleted file mode 100644 index 83162619c..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bb456-st-2019-us.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const usWarehouse = ChannelDraft.presets.sampleDataB2B - .usWarehouse() - .build(); - -const bb456St02 = ProductVariantDraft.presets.sampleDataB2B - .bb456St02() - .build(); - -const skuBb456St2019Us = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${bb456St02.sku}-${usWarehouse.key}`) - .sku(bb456St02.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(usWarehouse.key)); - -export default skuBb456St2019Us; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bb456-st-2023-default.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bb456-st-2023-default.spec.ts deleted file mode 100644 index 0a4e69d6c..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bb456-st-2023-default.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuBb456St2023Default from './sku-bb456-st-2023-default'; - -describe(`with skuBb456St2023Default preset and default-warehouse channel`, () => { - it(`should return a skuBb456St2023Default preset`, () => { - const skuBb456St2023DefaultPreset = - skuBb456St2023Default().build(); - expect(skuBb456St2023DefaultPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "bb456-st-2023-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "bb456-st-2023", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuBb456St2023Default preset when built for graphql`, () => { - const skuBb456St2023DefaultPresetGraphql = - skuBb456St2023Default().buildGraphql(); - expect(skuBb456St2023DefaultPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "bb456-st-2023-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "bb456-st-2023", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bb456-st-2023-default.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bb456-st-2023-default.ts deleted file mode 100644 index df21b8e4a..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bb456-st-2023-default.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const defaultWarehouse = ChannelDraft.presets.sampleDataB2B - .defaultWarehouse() - .build(); - -const bb456St03 = ProductVariantDraft.presets.sampleDataB2B - .bb456St03() - .build(); - -const skuBb456St2023Default = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${bb456St03.sku}-${defaultWarehouse.key}`) - .sku(bb456St03.sku!) - .quantityOnStock(1000) - .supplyChannel( - KeyReferenceDraft.presets.channel().key(defaultWarehouse.key) - ); - -export default skuBb456St2023Default; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bb456-st-2023-eu.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bb456-st-2023-eu.spec.ts deleted file mode 100644 index 97b862b13..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bb456-st-2023-eu.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuBb456St2023Eu from './sku-bb456-st-2023-eu'; - -describe(`with skuBb456St2023Eu preset and eu-warehouse channel`, () => { - it(`should return a skuBb456St2023Eu preset`, () => { - const skuBb456St2023EuPreset = - skuBb456St2023Eu().build(); - expect(skuBb456St2023EuPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "bb456-st-2023-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "bb456-st-2023", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuBb456St2023Eu preset when built for graphql`, () => { - const skuBb456St2023EuPresetGraphql = - skuBb456St2023Eu().buildGraphql(); - expect(skuBb456St2023EuPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "bb456-st-2023-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "bb456-st-2023", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bb456-st-2023-eu.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bb456-st-2023-eu.ts deleted file mode 100644 index e25119b8a..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bb456-st-2023-eu.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const euWarehouse = ChannelDraft.presets.sampleDataB2B - .euWarehouse() - .build(); - -const bb456St03 = ProductVariantDraft.presets.sampleDataB2B - .bb456St03() - .build(); - -const skuBb456St2023Eu = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${bb456St03.sku}-${euWarehouse.key}`) - .sku(bb456St03.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(euWarehouse.key)); - -export default skuBb456St2023Eu; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bb456-st-2023-us.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bb456-st-2023-us.spec.ts deleted file mode 100644 index 874ac5cb9..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bb456-st-2023-us.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuBb456St2023Us from './sku-bb456-st-2023-us'; - -describe(`with skuBb456St2023Us preset and us-warehouse channel`, () => { - it(`should return a skuBb456St2023Us preset`, () => { - const skuBb456St2023UsPreset = - skuBb456St2023Us().build(); - expect(skuBb456St2023UsPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "bb456-st-2023-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "bb456-st-2023", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuBb456St2023Us preset when built for graphql`, () => { - const skuBb456St2023UsPresetGraphql = - skuBb456St2023Us().buildGraphql(); - expect(skuBb456St2023UsPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "bb456-st-2023-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "bb456-st-2023", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bb456-st-2023-us.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bb456-st-2023-us.ts deleted file mode 100644 index e2eb08895..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bb456-st-2023-us.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const usWarehouse = ChannelDraft.presets.sampleDataB2B - .usWarehouse() - .build(); - -const bb456St03 = ProductVariantDraft.presets.sampleDataB2B - .bb456St03() - .build(); - -const skuBb456St2023Us = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${bb456St03.sku}-${usWarehouse.key}`) - .sku(bb456St03.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(usWarehouse.key)); - -export default skuBb456St2023Us; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bbb-234-wx-blue-default-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bbb-234-wx-blue-default-warehouse.spec.ts new file mode 100644 index 000000000..8de770e63 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bbb-234-wx-blue-default-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuBbb234WxBlueDefaultWarehouse preset`, () => { + it(`should return a skuBbb234WxBlueDefaultWarehouse preset when built for rest`, () => { + const skuBbb234WxBlueDefaultWarehousePreset = + InventoryEntryDraftRest.presets.skuBbb234WxBlueDefaultWarehouse().build(); + expect(skuBbb234WxBlueDefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuBbb234WxBlueDefaultWarehouse preset when built for graphql`, () => { + const skuBbb234WxBlueDefaultWarehousePreset = + InventoryEntryDraftGraphql.presets + .skuBbb234WxBlueDefaultWarehouse() + .build(); + expect(skuBbb234WxBlueDefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuBbb234WxBlueDefaultWarehouse preset when built for legacy rest`, () => { + const skuBbb234WxBlueDefaultWarehousePreset = InventoryEntryDraft.presets + .skuBbb234WxBlueDefaultWarehouse() + .buildRest(); + expect(skuBbb234WxBlueDefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuBbb234WxBlueDefaultWarehouse preset when built for legacy graphql`, () => { + const skuBbb234WxBlueDefaultWarehousePreset = InventoryEntryDraft.presets + .skuBbb234WxBlueDefaultWarehouse() + .buildGraphql(); + expect(skuBbb234WxBlueDefaultWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bbb-234-wx-blue-default-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bbb-234-wx-blue-default-warehouse.ts new file mode 100644 index 000000000..cf6fa38cf --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bbb-234-wx-blue-default-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .defaultWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .bbb234Wx02() + .build(); + +const skuBbb234WxBlueDefaultWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('bbb234-wx-blue-default-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuBbb234WxBlueDefaultWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bbb-234-wx-blue-eu-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bbb-234-wx-blue-eu-warehouse.spec.ts new file mode 100644 index 000000000..285ce2f3a --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bbb-234-wx-blue-eu-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuBbb234WxBlueEuWarehouse preset`, () => { + it(`should return a skuBbb234WxBlueEuWarehouse preset when built for rest`, () => { + const skuBbb234WxBlueEuWarehousePreset = InventoryEntryDraftRest.presets + .skuBbb234WxBlueEuWarehouse() + .build(); + expect(skuBbb234WxBlueEuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuBbb234WxBlueEuWarehouse preset when built for graphql`, () => { + const skuBbb234WxBlueEuWarehousePreset = InventoryEntryDraftGraphql.presets + .skuBbb234WxBlueEuWarehouse() + .build(); + expect(skuBbb234WxBlueEuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuBbb234WxBlueEuWarehouse preset when built for legacy rest`, () => { + const skuBbb234WxBlueEuWarehousePreset = InventoryEntryDraft.presets + .skuBbb234WxBlueEuWarehouse() + .buildRest(); + expect(skuBbb234WxBlueEuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuBbb234WxBlueEuWarehouse preset when built for legacy graphql`, () => { + const skuBbb234WxBlueEuWarehousePreset = InventoryEntryDraft.presets + .skuBbb234WxBlueEuWarehouse() + .buildGraphql(); + expect(skuBbb234WxBlueEuWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bbb-234-wx-blue-eu-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bbb-234-wx-blue-eu-warehouse.ts new file mode 100644 index 000000000..dfd4ba78a --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bbb-234-wx-blue-eu-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .euWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .bbb234Wx02() + .build(); + +const skuBbb234WxBlueEuWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('bbb234-wx-blue-eu-warehouse') + .sku(variant.sku!) + .quantityOnStock(999) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuBbb234WxBlueEuWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bbb-234-wx-blue-us-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bbb-234-wx-blue-us-warehouse.spec.ts new file mode 100644 index 000000000..358efbf60 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bbb-234-wx-blue-us-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuBbb234WxBlueUsWarehouse preset`, () => { + it(`should return a skuBbb234WxBlueUsWarehouse preset when built for rest`, () => { + const skuBbb234WxBlueUsWarehousePreset = InventoryEntryDraftRest.presets + .skuBbb234WxBlueUsWarehouse() + .build(); + expect(skuBbb234WxBlueUsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuBbb234WxBlueUsWarehouse preset when built for graphql`, () => { + const skuBbb234WxBlueUsWarehousePreset = InventoryEntryDraftGraphql.presets + .skuBbb234WxBlueUsWarehouse() + .build(); + expect(skuBbb234WxBlueUsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuBbb234WxBlueUsWarehouse preset when built for legacy rest`, () => { + const skuBbb234WxBlueUsWarehousePreset = InventoryEntryDraft.presets + .skuBbb234WxBlueUsWarehouse() + .buildRest(); + expect(skuBbb234WxBlueUsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuBbb234WxBlueUsWarehouse preset when built for legacy graphql`, () => { + const skuBbb234WxBlueUsWarehousePreset = InventoryEntryDraft.presets + .skuBbb234WxBlueUsWarehouse() + .buildGraphql(); + expect(skuBbb234WxBlueUsWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bbb-234-wx-blue-us-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bbb-234-wx-blue-us-warehouse.ts new file mode 100644 index 000000000..b1e36de76 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bbb-234-wx-blue-us-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .usWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .bbb234Wx02() + .build(); + +const skuBbb234WxBlueUsWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('bbb234-wx-blue-us-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuBbb234WxBlueUsWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bbb-234-wx-green-default-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bbb-234-wx-green-default-warehouse.spec.ts new file mode 100644 index 000000000..0d7e18117 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bbb-234-wx-green-default-warehouse.spec.ts @@ -0,0 +1,41 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuBbb234WxGreenDefaultWarehouse preset`, () => { + it(`should return a skuBbb234WxGreenDefaultWarehouse preset when built for rest`, () => { + const skuBbb234WxGreenDefaultWarehousePreset = + InventoryEntryDraftRest.presets + .skuBbb234WxGreenDefaultWarehouse() + .build(); + expect(skuBbb234WxGreenDefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuBbb234WxGreenDefaultWarehouse preset when built for graphql`, () => { + const skuBbb234WxGreenDefaultWarehousePreset = + InventoryEntryDraftGraphql.presets + .skuBbb234WxGreenDefaultWarehouse() + .build(); + expect(skuBbb234WxGreenDefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuBbb234WxGreenDefaultWarehouse preset when built for legacy rest`, () => { + const skuBbb234WxGreenDefaultWarehousePreset = InventoryEntryDraft.presets + .skuBbb234WxGreenDefaultWarehouse() + .buildRest(); + expect(skuBbb234WxGreenDefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuBbb234WxGreenDefaultWarehouse preset when built for legacy graphql`, () => { + const skuBbb234WxGreenDefaultWarehousePreset = InventoryEntryDraft.presets + .skuBbb234WxGreenDefaultWarehouse() + .buildGraphql(); + expect(skuBbb234WxGreenDefaultWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bbb-234-wx-green-default-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bbb-234-wx-green-default-warehouse.ts new file mode 100644 index 000000000..ae992666b --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bbb-234-wx-green-default-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .defaultWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .bbb234Wx03() + .build(); + +const skuBbb234WxGreenDefaultWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('bbb234-wx-green-default-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuBbb234WxGreenDefaultWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bbb-234-wx-green-eu-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bbb-234-wx-green-eu-warehouse.spec.ts new file mode 100644 index 000000000..06985f370 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bbb-234-wx-green-eu-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuBbb234WxGreenEuWarehouse preset`, () => { + it(`should return a skuBbb234WxGreenEuWarehouse preset when built for rest`, () => { + const skuBbb234WxGreenEuWarehousePreset = InventoryEntryDraftRest.presets + .skuBbb234WxGreenEuWarehouse() + .build(); + expect(skuBbb234WxGreenEuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuBbb234WxGreenEuWarehouse preset when built for graphql`, () => { + const skuBbb234WxGreenEuWarehousePreset = InventoryEntryDraftGraphql.presets + .skuBbb234WxGreenEuWarehouse() + .build(); + expect(skuBbb234WxGreenEuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuBbb234WxGreenEuWarehouse preset when built for legacy rest`, () => { + const skuBbb234WxGreenEuWarehousePreset = InventoryEntryDraft.presets + .skuBbb234WxGreenEuWarehouse() + .buildRest(); + expect(skuBbb234WxGreenEuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuBbb234WxGreenEuWarehouse preset when built for legacy graphql`, () => { + const skuBbb234WxGreenEuWarehousePreset = InventoryEntryDraft.presets + .skuBbb234WxGreenEuWarehouse() + .buildGraphql(); + expect(skuBbb234WxGreenEuWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bbb-234-wx-green-eu-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bbb-234-wx-green-eu-warehouse.ts new file mode 100644 index 000000000..0fdf4b238 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bbb-234-wx-green-eu-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .euWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .bbb234Wx03() + .build(); + +const skuBbb234WxGreenEuWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('bbb234-wx-green-eu-warehouse') + .sku(variant.sku!) + .quantityOnStock(999) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuBbb234WxGreenEuWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bbb-234-wx-green-us-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bbb-234-wx-green-us-warehouse.spec.ts new file mode 100644 index 000000000..b2fa4fa9d --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bbb-234-wx-green-us-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuBbb234WxGreenUsWarehouse preset`, () => { + it(`should return a skuBbb234WxGreenUsWarehouse preset when built for rest`, () => { + const skuBbb234WxGreenUsWarehousePreset = InventoryEntryDraftRest.presets + .skuBbb234WxGreenUsWarehouse() + .build(); + expect(skuBbb234WxGreenUsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuBbb234WxGreenUsWarehouse preset when built for graphql`, () => { + const skuBbb234WxGreenUsWarehousePreset = InventoryEntryDraftGraphql.presets + .skuBbb234WxGreenUsWarehouse() + .build(); + expect(skuBbb234WxGreenUsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuBbb234WxGreenUsWarehouse preset when built for legacy rest`, () => { + const skuBbb234WxGreenUsWarehousePreset = InventoryEntryDraft.presets + .skuBbb234WxGreenUsWarehouse() + .buildRest(); + expect(skuBbb234WxGreenUsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuBbb234WxGreenUsWarehouse preset when built for legacy graphql`, () => { + const skuBbb234WxGreenUsWarehousePreset = InventoryEntryDraft.presets + .skuBbb234WxGreenUsWarehouse() + .buildGraphql(); + expect(skuBbb234WxGreenUsWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bbb-234-wx-green-us-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bbb-234-wx-green-us-warehouse.ts new file mode 100644 index 000000000..1dd86fc4b --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bbb-234-wx-green-us-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .usWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .bbb234Wx03() + .build(); + +const skuBbb234WxGreenUsWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('bbb234-wx-green-us-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuBbb234WxGreenUsWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bbb-234-wx-red-default-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bbb-234-wx-red-default-warehouse.spec.ts new file mode 100644 index 000000000..c1e89db73 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bbb-234-wx-red-default-warehouse.spec.ts @@ -0,0 +1,40 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuBbb234WxRedDefaultWarehouse preset`, () => { + it(`should return a skuBbb234WxRedDefaultWarehouse preset when built for rest`, () => { + const skuBbb234WxRedDefaultWarehousePreset = InventoryEntryDraftRest.presets + .skuBbb234WxRedDefaultWarehouse() + .build(); + expect(skuBbb234WxRedDefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuBbb234WxRedDefaultWarehouse preset when built for graphql`, () => { + const skuBbb234WxRedDefaultWarehousePreset = + InventoryEntryDraftGraphql.presets + .skuBbb234WxRedDefaultWarehouse() + .build(); + expect(skuBbb234WxRedDefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuBbb234WxRedDefaultWarehouse preset when built for legacy rest`, () => { + const skuBbb234WxRedDefaultWarehousePreset = InventoryEntryDraft.presets + .skuBbb234WxRedDefaultWarehouse() + .buildRest(); + expect(skuBbb234WxRedDefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuBbb234WxRedDefaultWarehouse preset when built for legacy graphql`, () => { + const skuBbb234WxRedDefaultWarehousePreset = InventoryEntryDraft.presets + .skuBbb234WxRedDefaultWarehouse() + .buildGraphql(); + expect(skuBbb234WxRedDefaultWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bbb-234-wx-red-default-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bbb-234-wx-red-default-warehouse.ts new file mode 100644 index 000000000..c819b9fbe --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bbb-234-wx-red-default-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .defaultWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .bbb234Wx01() + .build(); + +const skuBbb234WxRedDefaultWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('bbb234-wx-red-default-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuBbb234WxRedDefaultWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bbb-234-wx-red-eu-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bbb-234-wx-red-eu-warehouse.spec.ts new file mode 100644 index 000000000..7bfc3c147 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bbb-234-wx-red-eu-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuBbb234WxRedEuWarehouse preset`, () => { + it(`should return a skuBbb234WxRedEuWarehouse preset when built for rest`, () => { + const skuBbb234WxRedEuWarehousePreset = InventoryEntryDraftRest.presets + .skuBbb234WxRedEuWarehouse() + .build(); + expect(skuBbb234WxRedEuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuBbb234WxRedEuWarehouse preset when built for graphql`, () => { + const skuBbb234WxRedEuWarehousePreset = InventoryEntryDraftGraphql.presets + .skuBbb234WxRedEuWarehouse() + .build(); + expect(skuBbb234WxRedEuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuBbb234WxRedEuWarehouse preset when built for legacy rest`, () => { + const skuBbb234WxRedEuWarehousePreset = InventoryEntryDraft.presets + .skuBbb234WxRedEuWarehouse() + .buildRest(); + expect(skuBbb234WxRedEuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuBbb234WxRedEuWarehouse preset when built for legacy graphql`, () => { + const skuBbb234WxRedEuWarehousePreset = InventoryEntryDraft.presets + .skuBbb234WxRedEuWarehouse() + .buildGraphql(); + expect(skuBbb234WxRedEuWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bbb-234-wx-red-eu-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bbb-234-wx-red-eu-warehouse.ts new file mode 100644 index 000000000..faf49b0ba --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bbb-234-wx-red-eu-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .euWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .bbb234Wx01() + .build(); + +const skuBbb234WxRedEuWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('bbb234-wx-red-eu-warehouse') + .sku(variant.sku!) + .quantityOnStock(999) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuBbb234WxRedEuWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bbb-234-wx-red-us-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bbb-234-wx-red-us-warehouse.spec.ts new file mode 100644 index 000000000..0ee25ab58 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bbb-234-wx-red-us-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuBbb234WxRedUsWarehouse preset`, () => { + it(`should return a skuBbb234WxRedUsWarehouse preset when built for rest`, () => { + const skuBbb234WxRedUsWarehousePreset = InventoryEntryDraftRest.presets + .skuBbb234WxRedUsWarehouse() + .build(); + expect(skuBbb234WxRedUsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuBbb234WxRedUsWarehouse preset when built for graphql`, () => { + const skuBbb234WxRedUsWarehousePreset = InventoryEntryDraftGraphql.presets + .skuBbb234WxRedUsWarehouse() + .build(); + expect(skuBbb234WxRedUsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuBbb234WxRedUsWarehouse preset when built for legacy rest`, () => { + const skuBbb234WxRedUsWarehousePreset = InventoryEntryDraft.presets + .skuBbb234WxRedUsWarehouse() + .buildRest(); + expect(skuBbb234WxRedUsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuBbb234WxRedUsWarehouse preset when built for legacy graphql`, () => { + const skuBbb234WxRedUsWarehousePreset = InventoryEntryDraft.presets + .skuBbb234WxRedUsWarehouse() + .buildGraphql(); + expect(skuBbb234WxRedUsWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bbb-234-wx-red-us-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bbb-234-wx-red-us-warehouse.ts new file mode 100644 index 000000000..fa0a24666 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bbb-234-wx-red-us-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .usWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .bbb234Wx01() + .build(); + +const skuBbb234WxRedUsWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('bbb234-wx-red-us-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuBbb234WxRedUsWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bbb234-wx-blue-default.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bbb234-wx-blue-default.spec.ts deleted file mode 100644 index c2c0de4e8..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bbb234-wx-blue-default.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuBbb234WxBlueDefault from './sku-bbb234-wx-blue-default'; - -describe(`with skuBbb234WxBlueDefault preset and default-warehouse channel`, () => { - it(`should return a skuBbb234WxBlueDefault preset`, () => { - const skuBbb234WxBlueDefaultPreset = - skuBbb234WxBlueDefault().build(); - expect(skuBbb234WxBlueDefaultPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "bbb234-wx-blue-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "bbb234-wx-blue", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuBbb234WxBlueDefault preset when built for graphql`, () => { - const skuBbb234WxBlueDefaultPresetGraphql = - skuBbb234WxBlueDefault().buildGraphql(); - expect(skuBbb234WxBlueDefaultPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "bbb234-wx-blue-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "bbb234-wx-blue", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bbb234-wx-blue-default.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bbb234-wx-blue-default.ts deleted file mode 100644 index b0df0449c..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bbb234-wx-blue-default.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const defaultWarehouse = ChannelDraft.presets.sampleDataB2B - .defaultWarehouse() - .build(); - -const bbb234Wx02 = ProductVariantDraft.presets.sampleDataB2B - .bbb234Wx02() - .build(); - -const skuBbb234WxBlueDefault = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${bbb234Wx02.sku}-${defaultWarehouse.key}`) - .sku(bbb234Wx02.sku!) - .quantityOnStock(1000) - .supplyChannel( - KeyReferenceDraft.presets.channel().key(defaultWarehouse.key) - ); - -export default skuBbb234WxBlueDefault; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bbb234-wx-blue-eu.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bbb234-wx-blue-eu.spec.ts deleted file mode 100644 index 13a6a5a0d..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bbb234-wx-blue-eu.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuBbb234WxBlueEu from './sku-bbb234-wx-blue-eu'; - -describe(`with skuBbb234WxBlueEu preset and eu-warehouse channel`, () => { - it(`should return a skuBbb234WxBlueEu preset`, () => { - const skuBbb234WxBlueEuPreset = - skuBbb234WxBlueEu().build(); - expect(skuBbb234WxBlueEuPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "bbb234-wx-blue-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "bbb234-wx-blue", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuBbb234WxBlueEu preset when built for graphql`, () => { - const skuBbb234WxBlueEuPresetGraphql = - skuBbb234WxBlueEu().buildGraphql(); - expect(skuBbb234WxBlueEuPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "bbb234-wx-blue-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "bbb234-wx-blue", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bbb234-wx-blue-eu.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bbb234-wx-blue-eu.ts deleted file mode 100644 index 94a4bcce4..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bbb234-wx-blue-eu.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const euWarehouse = ChannelDraft.presets.sampleDataB2B - .euWarehouse() - .build(); - -const bbb234Wx02 = ProductVariantDraft.presets.sampleDataB2B - .bbb234Wx02() - .build(); - -const skuBbb234WxBlueEu = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${bbb234Wx02.sku}-${euWarehouse.key}`) - .sku(bbb234Wx02.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(euWarehouse.key)); - -export default skuBbb234WxBlueEu; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bbb234-wx-blue-us.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bbb234-wx-blue-us.spec.ts deleted file mode 100644 index 21aeff7f5..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bbb234-wx-blue-us.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuBbb234WxBlueUs from './sku-bbb234-wx-blue-us'; - -describe(`with skuBbb234WxBlueUs preset and us-warehouse channel`, () => { - it(`should return a skuBbb234WxBlueUs preset`, () => { - const skuBbb234WxBlueUsPreset = - skuBbb234WxBlueUs().build(); - expect(skuBbb234WxBlueUsPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "bbb234-wx-blue-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "bbb234-wx-blue", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuBbb234WxBlueUs preset when built for graphql`, () => { - const skuBbb234WxBlueUsPresetGraphql = - skuBbb234WxBlueUs().buildGraphql(); - expect(skuBbb234WxBlueUsPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "bbb234-wx-blue-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "bbb234-wx-blue", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bbb234-wx-blue-us.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bbb234-wx-blue-us.ts deleted file mode 100644 index b0c9cc17b..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bbb234-wx-blue-us.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const usWarehouse = ChannelDraft.presets.sampleDataB2B - .usWarehouse() - .build(); - -const bbb234Wx02 = ProductVariantDraft.presets.sampleDataB2B - .bbb234Wx02() - .build(); - -const skuBbb234WxBlueUs = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${bbb234Wx02.sku}-${usWarehouse.key}`) - .sku(bbb234Wx02.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(usWarehouse.key)); - -export default skuBbb234WxBlueUs; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bbb234-wx-green-default.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bbb234-wx-green-default.spec.ts deleted file mode 100644 index c36e9b300..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bbb234-wx-green-default.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuBbb234WxGreenDefault from './sku-bbb234-wx-green-default'; - -describe(`with skuBbb234WxGreenDefault preset and default-warehouse channel`, () => { - it(`should return a skuBbb234WxGreenDefault preset`, () => { - const skuBbb234WxGreenDefaultPreset = - skuBbb234WxGreenDefault().build(); - expect(skuBbb234WxGreenDefaultPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "bbb234-wx-green-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "bbb234-wx-green", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuBbb234WxGreenDefault preset when built for graphql`, () => { - const skuBbb234WxGreenDefaultPresetGraphql = - skuBbb234WxGreenDefault().buildGraphql(); - expect(skuBbb234WxGreenDefaultPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "bbb234-wx-green-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "bbb234-wx-green", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bbb234-wx-green-default.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bbb234-wx-green-default.ts deleted file mode 100644 index dab79efed..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bbb234-wx-green-default.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const defaultWarehouse = ChannelDraft.presets.sampleDataB2B - .defaultWarehouse() - .build(); - -const bbb234Wx03 = ProductVariantDraft.presets.sampleDataB2B - .bbb234Wx03() - .build(); - -const skuBbb234WxGreenDefault = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${bbb234Wx03.sku}-${defaultWarehouse.key}`) - .sku(bbb234Wx03.sku!) - .quantityOnStock(1000) - .supplyChannel( - KeyReferenceDraft.presets.channel().key(defaultWarehouse.key) - ); - -export default skuBbb234WxGreenDefault; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bbb234-wx-green-eu.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bbb234-wx-green-eu.spec.ts deleted file mode 100644 index cef9b817b..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bbb234-wx-green-eu.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuBbb234WxGreenEu from './sku-bbb234-wx-green-eu'; - -describe(`with skuBbb234WxGreenEu preset and eu-warehouse channel`, () => { - it(`should return a skuBbb234WxGreenEu preset`, () => { - const skuBbb234WxGreenEuPreset = - skuBbb234WxGreenEu().build(); - expect(skuBbb234WxGreenEuPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "bbb234-wx-green-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "bbb234-wx-green", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuBbb234WxGreenEu preset when built for graphql`, () => { - const skuBbb234WxGreenEuPresetGraphql = - skuBbb234WxGreenEu().buildGraphql(); - expect(skuBbb234WxGreenEuPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "bbb234-wx-green-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "bbb234-wx-green", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bbb234-wx-green-eu.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bbb234-wx-green-eu.ts deleted file mode 100644 index 81a0616c4..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bbb234-wx-green-eu.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const euWarehouse = ChannelDraft.presets.sampleDataB2B - .euWarehouse() - .build(); - -const bbb234Wx03 = ProductVariantDraft.presets.sampleDataB2B - .bbb234Wx03() - .build(); - -const skuBbb234WxGreenEu = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${bbb234Wx03.sku}-${euWarehouse.key}`) - .sku(bbb234Wx03.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(euWarehouse.key)); - -export default skuBbb234WxGreenEu; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bbb234-wx-green-us.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bbb234-wx-green-us.spec.ts deleted file mode 100644 index af94fddfa..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bbb234-wx-green-us.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuBbb234WxGreenUs from './sku-bbb234-wx-green-us'; - -describe(`with skuBbb234WxGreenUs preset and us-warehouse channel`, () => { - it(`should return a skuBbb234WxGreenUs preset`, () => { - const skuBbb234WxGreenUsPreset = - skuBbb234WxGreenUs().build(); - expect(skuBbb234WxGreenUsPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "bbb234-wx-green-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "bbb234-wx-green", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuBbb234WxGreenUs preset when built for graphql`, () => { - const skuBbb234WxGreenUsPresetGraphql = - skuBbb234WxGreenUs().buildGraphql(); - expect(skuBbb234WxGreenUsPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "bbb234-wx-green-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "bbb234-wx-green", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bbb234-wx-green-us.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bbb234-wx-green-us.ts deleted file mode 100644 index c8d09e32b..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bbb234-wx-green-us.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const usWarehouse = ChannelDraft.presets.sampleDataB2B - .usWarehouse() - .build(); - -const bbb234Wx03 = ProductVariantDraft.presets.sampleDataB2B - .bbb234Wx03() - .build(); - -const skuBbb234WxGreenUs = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${bbb234Wx03.sku}-${usWarehouse.key}`) - .sku(bbb234Wx03.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(usWarehouse.key)); - -export default skuBbb234WxGreenUs; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bbb234-wx-red-default.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bbb234-wx-red-default.spec.ts deleted file mode 100644 index 9d9017927..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bbb234-wx-red-default.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuBbb234WxRedDefault from './sku-bbb234-wx-red-default'; - -describe(`with skuBbb234WxRedDefault preset and default-warehouse channel`, () => { - it(`should return a skuBbb234WxRedDefault preset`, () => { - const skuBbb234WxRedDefaultPreset = - skuBbb234WxRedDefault().build(); - expect(skuBbb234WxRedDefaultPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "bbb234-wx-red-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "bbb234-wx-red", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuBbb234WxRedDefault preset when built for graphql`, () => { - const skuBbb234WxRedDefaultPresetGraphql = - skuBbb234WxRedDefault().buildGraphql(); - expect(skuBbb234WxRedDefaultPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "bbb234-wx-red-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "bbb234-wx-red", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bbb234-wx-red-default.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bbb234-wx-red-default.ts deleted file mode 100644 index 622bcb0c0..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bbb234-wx-red-default.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const defaultWarehouse = ChannelDraft.presets.sampleDataB2B - .defaultWarehouse() - .build(); - -const bbb234Wx01 = ProductVariantDraft.presets.sampleDataB2B - .bbb234Wx01() - .build(); - -const skuBbb234WxRedDefault = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${bbb234Wx01.sku}-${defaultWarehouse.key}`) - .sku(bbb234Wx01.sku!) - .quantityOnStock(1000) - .supplyChannel( - KeyReferenceDraft.presets.channel().key(defaultWarehouse.key) - ); - -export default skuBbb234WxRedDefault; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bbb234-wx-red-eu.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bbb234-wx-red-eu.spec.ts deleted file mode 100644 index f410bd75f..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bbb234-wx-red-eu.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuBbb234WxRedEu from './sku-bbb234-wx-red-eu'; - -describe(`with skuBbb234WxRedEu preset and eu-warehouse channel`, () => { - it(`should return a skuBbb234WxRedEu preset`, () => { - const skuBbb234WxRedEuPreset = - skuBbb234WxRedEu().build(); - expect(skuBbb234WxRedEuPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "bbb234-wx-red-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "bbb234-wx-red", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuBbb234WxRedEu preset when built for graphql`, () => { - const skuBbb234WxRedEuPresetGraphql = - skuBbb234WxRedEu().buildGraphql(); - expect(skuBbb234WxRedEuPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "bbb234-wx-red-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "bbb234-wx-red", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bbb234-wx-red-eu.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bbb234-wx-red-eu.ts deleted file mode 100644 index 90163e01a..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bbb234-wx-red-eu.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const euWarehouse = ChannelDraft.presets.sampleDataB2B - .euWarehouse() - .build(); - -const bbb234Wx01 = ProductVariantDraft.presets.sampleDataB2B - .bbb234Wx01() - .build(); - -const skuBbb234WxRedEu = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${bbb234Wx01.sku}-${euWarehouse.key}`) - .sku(bbb234Wx01.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(euWarehouse.key)); - -export default skuBbb234WxRedEu; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bbb234-wx-red-us.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bbb234-wx-red-us.spec.ts deleted file mode 100644 index e2bd00947..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bbb234-wx-red-us.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuBbb234WxRedUs from './sku-bbb234-wx-red-us'; - -describe(`with skuBbb234WxRedUs preset and us-warehouse channel`, () => { - it(`should return a skuBbb234WxRedUs preset`, () => { - const skuBbb234WxRedUsPreset = - skuBbb234WxRedUs().build(); - expect(skuBbb234WxRedUsPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "bbb234-wx-red-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "bbb234-wx-red", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuBbb234WxRedUs preset when built for graphql`, () => { - const skuBbb234WxRedUsPresetGraphql = - skuBbb234WxRedUs().buildGraphql(); - expect(skuBbb234WxRedUsPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "bbb234-wx-red-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "bbb234-wx-red", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bbb234-wx-red-us.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bbb234-wx-red-us.ts deleted file mode 100644 index 1ad5e3d6e..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-bbb234-wx-red-us.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const usWarehouse = ChannelDraft.presets.sampleDataB2B - .usWarehouse() - .build(); - -const bbb234Wx01 = ProductVariantDraft.presets.sampleDataB2B - .bbb234Wx01() - .build(); - -const skuBbb234WxRedUs = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${bbb234Wx01.sku}-${usWarehouse.key}`) - .sku(bbb234Wx01.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(usWarehouse.key)); - -export default skuBbb234WxRedUs; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-brake-pad-set-default-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-brake-pad-set-default-warehouse.spec.ts new file mode 100644 index 000000000..97410a7de --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-brake-pad-set-default-warehouse.spec.ts @@ -0,0 +1,40 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuBrakePadSetDefaultWarehouse preset`, () => { + it(`should return a skuBrakePadSetDefaultWarehouse preset when built for rest`, () => { + const skuBrakePadSetDefaultWarehousePreset = InventoryEntryDraftRest.presets + .skuBrakePadSetDefaultWarehouse() + .build(); + expect(skuBrakePadSetDefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuBrakePadSetDefaultWarehouse preset when built for graphql`, () => { + const skuBrakePadSetDefaultWarehousePreset = + InventoryEntryDraftGraphql.presets + .skuBrakePadSetDefaultWarehouse() + .build(); + expect(skuBrakePadSetDefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuBrakePadSetDefaultWarehouse preset when built for legacy rest`, () => { + const skuBrakePadSetDefaultWarehousePreset = InventoryEntryDraft.presets + .skuBrakePadSetDefaultWarehouse() + .buildRest(); + expect(skuBrakePadSetDefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuBrakePadSetDefaultWarehouse preset when built for legacy graphql`, () => { + const skuBrakePadSetDefaultWarehousePreset = InventoryEntryDraft.presets + .skuBrakePadSetDefaultWarehouse() + .buildGraphql(); + expect(skuBrakePadSetDefaultWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-brake-pad-set-default-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-brake-pad-set-default-warehouse.ts new file mode 100644 index 000000000..22ff2b899 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-brake-pad-set-default-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .defaultWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .brakePadSet01() + .build(); + +const skuBrakePadSetDefaultWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('brake-pad-set-default-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuBrakePadSetDefaultWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-brake-pad-set-default.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-brake-pad-set-default.spec.ts deleted file mode 100644 index 2780dcd52..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-brake-pad-set-default.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuBrakePadSetDefault from './sku-brake-pad-set-default'; - -describe(`with skuBrakePadSetDefault preset and default-warehouse channel`, () => { - it(`should return a skuBrakePadSetDefault preset`, () => { - const skuBrakePadSetDefaultPreset = - skuBrakePadSetDefault().build(); - expect(skuBrakePadSetDefaultPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "brake-pad-set-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "brake-pad-set", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuBrakePadSetDefault preset when built for graphql`, () => { - const skuBrakePadSetDefaultPresetGraphql = - skuBrakePadSetDefault().buildGraphql(); - expect(skuBrakePadSetDefaultPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "brake-pad-set-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "brake-pad-set", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-brake-pad-set-default.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-brake-pad-set-default.ts deleted file mode 100644 index c1b813b45..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-brake-pad-set-default.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const defaultWarehouse = ChannelDraft.presets.sampleDataB2B - .defaultWarehouse() - .build(); - -const brakePadSet01 = ProductVariantDraft.presets.sampleDataB2B - .brakePadSet01() - .build(); - -const skuBrakePadSetDefault = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${brakePadSet01.sku}-${defaultWarehouse.key}`) - .sku(brakePadSet01.sku!) - .quantityOnStock(1000) - .supplyChannel( - KeyReferenceDraft.presets.channel().key(defaultWarehouse.key) - ); - -export default skuBrakePadSetDefault; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-brake-pad-set-eu-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-brake-pad-set-eu-warehouse.spec.ts new file mode 100644 index 000000000..1ec5ba87c --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-brake-pad-set-eu-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuBrakePadSetEuWarehouse preset`, () => { + it(`should return a skuBrakePadSetEuWarehouse preset when built for rest`, () => { + const skuBrakePadSetEuWarehousePreset = InventoryEntryDraftRest.presets + .skuBrakePadSetEuWarehouse() + .build(); + expect(skuBrakePadSetEuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuBrakePadSetEuWarehouse preset when built for graphql`, () => { + const skuBrakePadSetEuWarehousePreset = InventoryEntryDraftGraphql.presets + .skuBrakePadSetEuWarehouse() + .build(); + expect(skuBrakePadSetEuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuBrakePadSetEuWarehouse preset when built for legacy rest`, () => { + const skuBrakePadSetEuWarehousePreset = InventoryEntryDraft.presets + .skuBrakePadSetEuWarehouse() + .buildRest(); + expect(skuBrakePadSetEuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuBrakePadSetEuWarehouse preset when built for legacy graphql`, () => { + const skuBrakePadSetEuWarehousePreset = InventoryEntryDraft.presets + .skuBrakePadSetEuWarehouse() + .buildGraphql(); + expect(skuBrakePadSetEuWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-brake-pad-set-eu-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-brake-pad-set-eu-warehouse.ts new file mode 100644 index 000000000..f678e387c --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-brake-pad-set-eu-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .euWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .brakePadSet01() + .build(); + +const skuBrakePadSetEuWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('brake-pad-set-eu-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuBrakePadSetEuWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-brake-pad-set-eu.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-brake-pad-set-eu.spec.ts deleted file mode 100644 index 0390d2e11..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-brake-pad-set-eu.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuBrakePadSetEu from './sku-brake-pad-set-eu'; - -describe(`with skuBrakePadSetEu preset and eu-warehouse channel`, () => { - it(`should return a skuBrakePadSetEu preset`, () => { - const skuBrakePadSetEuPreset = - skuBrakePadSetEu().build(); - expect(skuBrakePadSetEuPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "brake-pad-set-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "brake-pad-set", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuBrakePadSetEu preset when built for graphql`, () => { - const skuBrakePadSetEuPresetGraphql = - skuBrakePadSetEu().buildGraphql(); - expect(skuBrakePadSetEuPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "brake-pad-set-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "brake-pad-set", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-brake-pad-set-eu.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-brake-pad-set-eu.ts deleted file mode 100644 index 47e060f5f..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-brake-pad-set-eu.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const euWarehouse = ChannelDraft.presets.sampleDataB2B - .euWarehouse() - .build(); - -const brakePadSet01 = ProductVariantDraft.presets.sampleDataB2B - .brakePadSet01() - .build(); - -const skuBrakePadSetEu = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${brakePadSet01.sku}-${euWarehouse.key}`) - .sku(brakePadSet01.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(euWarehouse.key)); - -export default skuBrakePadSetEu; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-brake-pad-set-us-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-brake-pad-set-us-warehouse.spec.ts new file mode 100644 index 000000000..72a1d9bbd --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-brake-pad-set-us-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuBrakePadSetUsWarehouse preset`, () => { + it(`should return a skuBrakePadSetUsWarehouse preset when built for rest`, () => { + const skuBrakePadSetUsWarehousePreset = InventoryEntryDraftRest.presets + .skuBrakePadSetUsWarehouse() + .build(); + expect(skuBrakePadSetUsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuBrakePadSetUsWarehouse preset when built for graphql`, () => { + const skuBrakePadSetUsWarehousePreset = InventoryEntryDraftGraphql.presets + .skuBrakePadSetUsWarehouse() + .build(); + expect(skuBrakePadSetUsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuBrakePadSetUsWarehouse preset when built for legacy rest`, () => { + const skuBrakePadSetUsWarehousePreset = InventoryEntryDraft.presets + .skuBrakePadSetUsWarehouse() + .buildRest(); + expect(skuBrakePadSetUsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuBrakePadSetUsWarehouse preset when built for legacy graphql`, () => { + const skuBrakePadSetUsWarehousePreset = InventoryEntryDraft.presets + .skuBrakePadSetUsWarehouse() + .buildGraphql(); + expect(skuBrakePadSetUsWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-brake-pad-set-us-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-brake-pad-set-us-warehouse.ts new file mode 100644 index 000000000..6bc3206f2 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-brake-pad-set-us-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .usWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .brakePadSet01() + .build(); + +const skuBrakePadSetUsWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('brake-pad-set-us-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuBrakePadSetUsWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-brake-pad-set-us.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-brake-pad-set-us.spec.ts deleted file mode 100644 index ff9ff7086..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-brake-pad-set-us.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuBrakePadSetUs from './sku-brake-pad-set-us'; - -describe(`with skuBrakePadSetUs preset and us-warehouse channel`, () => { - it(`should return a skuBrakePadSetUs preset`, () => { - const skuBrakePadSetUsPreset = - skuBrakePadSetUs().build(); - expect(skuBrakePadSetUsPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "brake-pad-set-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "brake-pad-set", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuBrakePadSetUs preset when built for graphql`, () => { - const skuBrakePadSetUsPresetGraphql = - skuBrakePadSetUs().buildGraphql(); - expect(skuBrakePadSetUsPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "brake-pad-set-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "brake-pad-set", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-brake-pad-set-us.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-brake-pad-set-us.ts deleted file mode 100644 index 9f9bd090e..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-brake-pad-set-us.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const usWarehouse = ChannelDraft.presets.sampleDataB2B - .usWarehouse() - .build(); - -const brakePadSet01 = ProductVariantDraft.presets.sampleDataB2B - .brakePadSet01() - .build(); - -const skuBrakePadSetUs = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${brakePadSet01.sku}-${usWarehouse.key}`) - .sku(brakePadSet01.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(usWarehouse.key)); - -export default skuBrakePadSetUs; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-c-789-uv-2015-default-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-c-789-uv-2015-default-warehouse.spec.ts new file mode 100644 index 000000000..dda4e72d9 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-c-789-uv-2015-default-warehouse.spec.ts @@ -0,0 +1,40 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuC789Uv2015DefaultWarehouse preset`, () => { + it(`should return a skuC789Uv2015DefaultWarehouse preset when built for rest`, () => { + const skuC789Uv2015DefaultWarehousePreset = InventoryEntryDraftRest.presets + .skuC789Uv2015DefaultWarehouse() + .build(); + expect(skuC789Uv2015DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuC789Uv2015DefaultWarehouse preset when built for graphql`, () => { + const skuC789Uv2015DefaultWarehousePreset = + InventoryEntryDraftGraphql.presets + .skuC789Uv2015DefaultWarehouse() + .build(); + expect(skuC789Uv2015DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuC789Uv2015DefaultWarehouse preset when built for legacy rest`, () => { + const skuC789Uv2015DefaultWarehousePreset = InventoryEntryDraft.presets + .skuC789Uv2015DefaultWarehouse() + .buildRest(); + expect(skuC789Uv2015DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuC789Uv2015DefaultWarehouse preset when built for legacy graphql`, () => { + const skuC789Uv2015DefaultWarehousePreset = InventoryEntryDraft.presets + .skuC789Uv2015DefaultWarehouse() + .buildGraphql(); + expect(skuC789Uv2015DefaultWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-c-789-uv-2015-default-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-c-789-uv-2015-default-warehouse.ts new file mode 100644 index 000000000..6ae7432a7 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-c-789-uv-2015-default-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .defaultWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .c789Uv01() + .build(); + +const skuC789Uv2015DefaultWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('c789-uv-2015-default-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuC789Uv2015DefaultWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-c-789-uv-2015-eu-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-c-789-uv-2015-eu-warehouse.spec.ts new file mode 100644 index 000000000..8b017ec86 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-c-789-uv-2015-eu-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuC789Uv2015EuWarehouse preset`, () => { + it(`should return a skuC789Uv2015EuWarehouse preset when built for rest`, () => { + const skuC789Uv2015EuWarehousePreset = InventoryEntryDraftRest.presets + .skuC789Uv2015EuWarehouse() + .build(); + expect(skuC789Uv2015EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuC789Uv2015EuWarehouse preset when built for graphql`, () => { + const skuC789Uv2015EuWarehousePreset = InventoryEntryDraftGraphql.presets + .skuC789Uv2015EuWarehouse() + .build(); + expect(skuC789Uv2015EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuC789Uv2015EuWarehouse preset when built for legacy rest`, () => { + const skuC789Uv2015EuWarehousePreset = InventoryEntryDraft.presets + .skuC789Uv2015EuWarehouse() + .buildRest(); + expect(skuC789Uv2015EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuC789Uv2015EuWarehouse preset when built for legacy graphql`, () => { + const skuC789Uv2015EuWarehousePreset = InventoryEntryDraft.presets + .skuC789Uv2015EuWarehouse() + .buildGraphql(); + expect(skuC789Uv2015EuWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-c-789-uv-2015-eu-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-c-789-uv-2015-eu-warehouse.ts new file mode 100644 index 000000000..ac52cc237 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-c-789-uv-2015-eu-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .euWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .c789Uv01() + .build(); + +const skuC789Uv2015EuWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('c789-uv-2015-eu-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuC789Uv2015EuWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-c-789-uv-2015-us-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-c-789-uv-2015-us-warehouse.spec.ts new file mode 100644 index 000000000..49ef39824 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-c-789-uv-2015-us-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuC789Uv2015UsWarehouse preset`, () => { + it(`should return a skuC789Uv2015UsWarehouse preset when built for rest`, () => { + const skuC789Uv2015UsWarehousePreset = InventoryEntryDraftRest.presets + .skuC789Uv2015UsWarehouse() + .build(); + expect(skuC789Uv2015UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuC789Uv2015UsWarehouse preset when built for graphql`, () => { + const skuC789Uv2015UsWarehousePreset = InventoryEntryDraftGraphql.presets + .skuC789Uv2015UsWarehouse() + .build(); + expect(skuC789Uv2015UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuC789Uv2015UsWarehouse preset when built for legacy rest`, () => { + const skuC789Uv2015UsWarehousePreset = InventoryEntryDraft.presets + .skuC789Uv2015UsWarehouse() + .buildRest(); + expect(skuC789Uv2015UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuC789Uv2015UsWarehouse preset when built for legacy graphql`, () => { + const skuC789Uv2015UsWarehousePreset = InventoryEntryDraft.presets + .skuC789Uv2015UsWarehouse() + .buildGraphql(); + expect(skuC789Uv2015UsWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-c-789-uv-2015-us-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-c-789-uv-2015-us-warehouse.ts new file mode 100644 index 000000000..032b0be03 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-c-789-uv-2015-us-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .usWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .c789Uv01() + .build(); + +const skuC789Uv2015UsWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('c789-uv-2015-us-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuC789Uv2015UsWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-c-789-uv-2019-default-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-c-789-uv-2019-default-warehouse.spec.ts new file mode 100644 index 000000000..c4b29ea25 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-c-789-uv-2019-default-warehouse.spec.ts @@ -0,0 +1,40 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuC789Uv2019DefaultWarehouse preset`, () => { + it(`should return a skuC789Uv2019DefaultWarehouse preset when built for rest`, () => { + const skuC789Uv2019DefaultWarehousePreset = InventoryEntryDraftRest.presets + .skuC789Uv2019DefaultWarehouse() + .build(); + expect(skuC789Uv2019DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuC789Uv2019DefaultWarehouse preset when built for graphql`, () => { + const skuC789Uv2019DefaultWarehousePreset = + InventoryEntryDraftGraphql.presets + .skuC789Uv2019DefaultWarehouse() + .build(); + expect(skuC789Uv2019DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuC789Uv2019DefaultWarehouse preset when built for legacy rest`, () => { + const skuC789Uv2019DefaultWarehousePreset = InventoryEntryDraft.presets + .skuC789Uv2019DefaultWarehouse() + .buildRest(); + expect(skuC789Uv2019DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuC789Uv2019DefaultWarehouse preset when built for legacy graphql`, () => { + const skuC789Uv2019DefaultWarehousePreset = InventoryEntryDraft.presets + .skuC789Uv2019DefaultWarehouse() + .buildGraphql(); + expect(skuC789Uv2019DefaultWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-c-789-uv-2019-default-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-c-789-uv-2019-default-warehouse.ts new file mode 100644 index 000000000..727ad1007 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-c-789-uv-2019-default-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .defaultWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .c789Uv02() + .build(); + +const skuC789Uv2019DefaultWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('c789-uv-2019-default-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuC789Uv2019DefaultWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-c-789-uv-2019-eu-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-c-789-uv-2019-eu-warehouse.spec.ts new file mode 100644 index 000000000..c11531891 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-c-789-uv-2019-eu-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuC789Uv2019EuWarehouse preset`, () => { + it(`should return a skuC789Uv2019EuWarehouse preset when built for rest`, () => { + const skuC789Uv2019EuWarehousePreset = InventoryEntryDraftRest.presets + .skuC789Uv2019EuWarehouse() + .build(); + expect(skuC789Uv2019EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuC789Uv2019EuWarehouse preset when built for graphql`, () => { + const skuC789Uv2019EuWarehousePreset = InventoryEntryDraftGraphql.presets + .skuC789Uv2019EuWarehouse() + .build(); + expect(skuC789Uv2019EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuC789Uv2019EuWarehouse preset when built for legacy rest`, () => { + const skuC789Uv2019EuWarehousePreset = InventoryEntryDraft.presets + .skuC789Uv2019EuWarehouse() + .buildRest(); + expect(skuC789Uv2019EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuC789Uv2019EuWarehouse preset when built for legacy graphql`, () => { + const skuC789Uv2019EuWarehousePreset = InventoryEntryDraft.presets + .skuC789Uv2019EuWarehouse() + .buildGraphql(); + expect(skuC789Uv2019EuWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-c-789-uv-2019-eu-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-c-789-uv-2019-eu-warehouse.ts new file mode 100644 index 000000000..3baa9995b --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-c-789-uv-2019-eu-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .euWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .c789Uv02() + .build(); + +const skuC789Uv2019EuWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('c789-uv-2019-eu-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuC789Uv2019EuWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-c-789-uv-2019-us-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-c-789-uv-2019-us-warehouse.spec.ts new file mode 100644 index 000000000..d28e2a31f --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-c-789-uv-2019-us-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuC789Uv2019UsWarehouse preset`, () => { + it(`should return a skuC789Uv2019UsWarehouse preset when built for rest`, () => { + const skuC789Uv2019UsWarehousePreset = InventoryEntryDraftRest.presets + .skuC789Uv2019UsWarehouse() + .build(); + expect(skuC789Uv2019UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuC789Uv2019UsWarehouse preset when built for graphql`, () => { + const skuC789Uv2019UsWarehousePreset = InventoryEntryDraftGraphql.presets + .skuC789Uv2019UsWarehouse() + .build(); + expect(skuC789Uv2019UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuC789Uv2019UsWarehouse preset when built for legacy rest`, () => { + const skuC789Uv2019UsWarehousePreset = InventoryEntryDraft.presets + .skuC789Uv2019UsWarehouse() + .buildRest(); + expect(skuC789Uv2019UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuC789Uv2019UsWarehouse preset when built for legacy graphql`, () => { + const skuC789Uv2019UsWarehousePreset = InventoryEntryDraft.presets + .skuC789Uv2019UsWarehouse() + .buildGraphql(); + expect(skuC789Uv2019UsWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-c-789-uv-2019-us-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-c-789-uv-2019-us-warehouse.ts new file mode 100644 index 000000000..30cc512e3 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-c-789-uv-2019-us-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .usWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .c789Uv02() + .build(); + +const skuC789Uv2019UsWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('c789-uv-2019-us-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuC789Uv2019UsWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-c-789-uv-2023-default-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-c-789-uv-2023-default-warehouse.spec.ts new file mode 100644 index 000000000..133fa6b02 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-c-789-uv-2023-default-warehouse.spec.ts @@ -0,0 +1,40 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuC789Uv2023DefaultWarehouse preset`, () => { + it(`should return a skuC789Uv2023DefaultWarehouse preset when built for rest`, () => { + const skuC789Uv2023DefaultWarehousePreset = InventoryEntryDraftRest.presets + .skuC789Uv2023DefaultWarehouse() + .build(); + expect(skuC789Uv2023DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuC789Uv2023DefaultWarehouse preset when built for graphql`, () => { + const skuC789Uv2023DefaultWarehousePreset = + InventoryEntryDraftGraphql.presets + .skuC789Uv2023DefaultWarehouse() + .build(); + expect(skuC789Uv2023DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuC789Uv2023DefaultWarehouse preset when built for legacy rest`, () => { + const skuC789Uv2023DefaultWarehousePreset = InventoryEntryDraft.presets + .skuC789Uv2023DefaultWarehouse() + .buildRest(); + expect(skuC789Uv2023DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuC789Uv2023DefaultWarehouse preset when built for legacy graphql`, () => { + const skuC789Uv2023DefaultWarehousePreset = InventoryEntryDraft.presets + .skuC789Uv2023DefaultWarehouse() + .buildGraphql(); + expect(skuC789Uv2023DefaultWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-c-789-uv-2023-default-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-c-789-uv-2023-default-warehouse.ts new file mode 100644 index 000000000..3376f40d8 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-c-789-uv-2023-default-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .defaultWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .c789Uv03() + .build(); + +const skuC789Uv2023DefaultWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('c789-uv-2023-default-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuC789Uv2023DefaultWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-c-789-uv-2023-eu-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-c-789-uv-2023-eu-warehouse.spec.ts new file mode 100644 index 000000000..6441bccd8 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-c-789-uv-2023-eu-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuC789Uv2023EuWarehouse preset`, () => { + it(`should return a skuC789Uv2023EuWarehouse preset when built for rest`, () => { + const skuC789Uv2023EuWarehousePreset = InventoryEntryDraftRest.presets + .skuC789Uv2023EuWarehouse() + .build(); + expect(skuC789Uv2023EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuC789Uv2023EuWarehouse preset when built for graphql`, () => { + const skuC789Uv2023EuWarehousePreset = InventoryEntryDraftGraphql.presets + .skuC789Uv2023EuWarehouse() + .build(); + expect(skuC789Uv2023EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuC789Uv2023EuWarehouse preset when built for legacy rest`, () => { + const skuC789Uv2023EuWarehousePreset = InventoryEntryDraft.presets + .skuC789Uv2023EuWarehouse() + .buildRest(); + expect(skuC789Uv2023EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuC789Uv2023EuWarehouse preset when built for legacy graphql`, () => { + const skuC789Uv2023EuWarehousePreset = InventoryEntryDraft.presets + .skuC789Uv2023EuWarehouse() + .buildGraphql(); + expect(skuC789Uv2023EuWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-c-789-uv-2023-eu-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-c-789-uv-2023-eu-warehouse.ts new file mode 100644 index 000000000..8e93913d5 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-c-789-uv-2023-eu-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .euWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .c789Uv03() + .build(); + +const skuC789Uv2023EuWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('c789-uv-2023-eu-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuC789Uv2023EuWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-c-789-uv-2023-us-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-c-789-uv-2023-us-warehouse.spec.ts new file mode 100644 index 000000000..367cbf401 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-c-789-uv-2023-us-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuC789Uv2023UsWarehouse preset`, () => { + it(`should return a skuC789Uv2023UsWarehouse preset when built for rest`, () => { + const skuC789Uv2023UsWarehousePreset = InventoryEntryDraftRest.presets + .skuC789Uv2023UsWarehouse() + .build(); + expect(skuC789Uv2023UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuC789Uv2023UsWarehouse preset when built for graphql`, () => { + const skuC789Uv2023UsWarehousePreset = InventoryEntryDraftGraphql.presets + .skuC789Uv2023UsWarehouse() + .build(); + expect(skuC789Uv2023UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuC789Uv2023UsWarehouse preset when built for legacy rest`, () => { + const skuC789Uv2023UsWarehousePreset = InventoryEntryDraft.presets + .skuC789Uv2023UsWarehouse() + .buildRest(); + expect(skuC789Uv2023UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuC789Uv2023UsWarehouse preset when built for legacy graphql`, () => { + const skuC789Uv2023UsWarehousePreset = InventoryEntryDraft.presets + .skuC789Uv2023UsWarehouse() + .buildGraphql(); + expect(skuC789Uv2023UsWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-c-789-uv-2023-us-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-c-789-uv-2023-us-warehouse.ts new file mode 100644 index 000000000..dfbe90be1 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-c-789-uv-2023-us-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .usWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .c789Uv03() + .build(); + +const skuC789Uv2023UsWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('c789-uv-2023-us-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuC789Uv2023UsWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-c789-uv-2015-default.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-c789-uv-2015-default.spec.ts deleted file mode 100644 index a744e9a7c..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-c789-uv-2015-default.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuC789Uv2015Default from './sku-c789-uv-2015-default'; - -describe(`with skuC789Uv2015Default preset and default-warehouse channel`, () => { - it(`should return a skuC789Uv2015Default preset`, () => { - const skuC789Uv2015DefaultPreset = - skuC789Uv2015Default().build(); - expect(skuC789Uv2015DefaultPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "c789-uv-2015-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "c789-uv-2015", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuC789Uv2015Default preset when built for graphql`, () => { - const skuC789Uv2015DefaultPresetGraphql = - skuC789Uv2015Default().buildGraphql(); - expect(skuC789Uv2015DefaultPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "c789-uv-2015-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "c789-uv-2015", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-c789-uv-2015-default.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-c789-uv-2015-default.ts deleted file mode 100644 index 004a2dc4f..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-c789-uv-2015-default.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const defaultWarehouse = ChannelDraft.presets.sampleDataB2B - .defaultWarehouse() - .build(); - -const c789Uv01 = ProductVariantDraft.presets.sampleDataB2B - .c789Uv01() - .build(); - -const skuC789Uv2015Default = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${c789Uv01.sku}-${defaultWarehouse.key}`) - .sku(c789Uv01.sku!) - .quantityOnStock(1000) - .supplyChannel( - KeyReferenceDraft.presets.channel().key(defaultWarehouse.key) - ); - -export default skuC789Uv2015Default; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-c789-uv-2015-eu.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-c789-uv-2015-eu.spec.ts deleted file mode 100644 index 2392fadce..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-c789-uv-2015-eu.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuC789Uv2015Eu from './sku-c789-uv-2015-eu'; - -describe(`with skuC789Uv2015Eu preset and eu-warehouse channel`, () => { - it(`should return a skuC789Uv2015Eu preset`, () => { - const skuC789Uv2015EuPreset = - skuC789Uv2015Eu().build(); - expect(skuC789Uv2015EuPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "c789-uv-2015-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "c789-uv-2015", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuC789Uv2015Eu preset when built for graphql`, () => { - const skuC789Uv2015EuPresetGraphql = - skuC789Uv2015Eu().buildGraphql(); - expect(skuC789Uv2015EuPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "c789-uv-2015-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "c789-uv-2015", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-c789-uv-2015-eu.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-c789-uv-2015-eu.ts deleted file mode 100644 index c1ae71eb3..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-c789-uv-2015-eu.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const euWarehouse = ChannelDraft.presets.sampleDataB2B - .euWarehouse() - .build(); - -const c789Uv01 = ProductVariantDraft.presets.sampleDataB2B - .c789Uv01() - .build(); - -const skuC789Uv2015Eu = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${c789Uv01.sku}-${euWarehouse.key}`) - .sku(c789Uv01.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(euWarehouse.key)); - -export default skuC789Uv2015Eu; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-c789-uv-2015-us.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-c789-uv-2015-us.spec.ts deleted file mode 100644 index 65322eefa..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-c789-uv-2015-us.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuC789Uv2015Us from './sku-c789-uv-2015-us'; - -describe(`with skuC789Uv2015Us preset and us-warehouse channel`, () => { - it(`should return a skuC789Uv2015Us preset`, () => { - const skuC789Uv2015UsPreset = - skuC789Uv2015Us().build(); - expect(skuC789Uv2015UsPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "c789-uv-2015-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "c789-uv-2015", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuC789Uv2015Us preset when built for graphql`, () => { - const skuC789Uv2015UsPresetGraphql = - skuC789Uv2015Us().buildGraphql(); - expect(skuC789Uv2015UsPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "c789-uv-2015-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "c789-uv-2015", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-c789-uv-2015-us.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-c789-uv-2015-us.ts deleted file mode 100644 index 12392df2a..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-c789-uv-2015-us.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const usWarehouse = ChannelDraft.presets.sampleDataB2B - .usWarehouse() - .build(); - -const c789Uv01 = ProductVariantDraft.presets.sampleDataB2B - .c789Uv01() - .build(); - -const skuC789Uv2015Us = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${c789Uv01.sku}-${usWarehouse.key}`) - .sku(c789Uv01.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(usWarehouse.key)); - -export default skuC789Uv2015Us; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-c789-uv-2019-default.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-c789-uv-2019-default.spec.ts deleted file mode 100644 index 52ebdb6bc..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-c789-uv-2019-default.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuC789Uv2019Default from './sku-c789-uv-2019-default'; - -describe(`with skuC789Uv2019Default preset and default-warehouse channel`, () => { - it(`should return a skuC789Uv2019Default preset`, () => { - const skuC789Uv2019DefaultPreset = - skuC789Uv2019Default().build(); - expect(skuC789Uv2019DefaultPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "c789-uv-2019-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "c789-uv-2019", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuC789Uv2019Default preset when built for graphql`, () => { - const skuC789Uv2019DefaultPresetGraphql = - skuC789Uv2019Default().buildGraphql(); - expect(skuC789Uv2019DefaultPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "c789-uv-2019-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "c789-uv-2019", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-c789-uv-2019-default.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-c789-uv-2019-default.ts deleted file mode 100644 index c21e81be6..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-c789-uv-2019-default.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const defaultWarehouse = ChannelDraft.presets.sampleDataB2B - .defaultWarehouse() - .build(); - -const c789Uv02 = ProductVariantDraft.presets.sampleDataB2B - .c789Uv02() - .build(); - -const skuC789Uv2019Default = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${c789Uv02.sku}-${defaultWarehouse.key}`) - .sku(c789Uv02.sku!) - .quantityOnStock(1000) - .supplyChannel( - KeyReferenceDraft.presets.channel().key(defaultWarehouse.key) - ); - -export default skuC789Uv2019Default; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-c789-uv-2019-eu.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-c789-uv-2019-eu.spec.ts deleted file mode 100644 index 2163f035c..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-c789-uv-2019-eu.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuC789Uv2019Eu from './sku-c789-uv-2019-eu'; - -describe(`with skuC789Uv2019Eu preset and eu-warehouse channel`, () => { - it(`should return a skuC789Uv2019Eu preset`, () => { - const skuC789Uv2019EuPreset = - skuC789Uv2019Eu().build(); - expect(skuC789Uv2019EuPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "c789-uv-2019-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "c789-uv-2019", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuC789Uv2019Eu preset when built for graphql`, () => { - const skuC789Uv2019EuPresetGraphql = - skuC789Uv2019Eu().buildGraphql(); - expect(skuC789Uv2019EuPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "c789-uv-2019-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "c789-uv-2019", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-c789-uv-2019-eu.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-c789-uv-2019-eu.ts deleted file mode 100644 index cf5afd110..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-c789-uv-2019-eu.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const euWarehouse = ChannelDraft.presets.sampleDataB2B - .euWarehouse() - .build(); - -const c789Uv02 = ProductVariantDraft.presets.sampleDataB2B - .c789Uv02() - .build(); - -const skuC789Uv2019Eu = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${c789Uv02.sku}-${euWarehouse.key}`) - .sku(c789Uv02.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(euWarehouse.key)); - -export default skuC789Uv2019Eu; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-c789-uv-2019-us.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-c789-uv-2019-us.spec.ts deleted file mode 100644 index cf17af10a..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-c789-uv-2019-us.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuC789Uv2019Us from './sku-c789-uv-2019-us'; - -describe(`with skuC789Uv2019Us preset and us-warehouse channel`, () => { - it(`should return a skuC789Uv2019Us preset`, () => { - const skuC789Uv2019UsPreset = - skuC789Uv2019Us().build(); - expect(skuC789Uv2019UsPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "c789-uv-2019-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "c789-uv-2019", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuC789Uv2019Us preset when built for graphql`, () => { - const skuC789Uv2019UsPresetGraphql = - skuC789Uv2019Us().buildGraphql(); - expect(skuC789Uv2019UsPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "c789-uv-2019-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "c789-uv-2019", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-c789-uv-2019-us.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-c789-uv-2019-us.ts deleted file mode 100644 index 7535335c5..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-c789-uv-2019-us.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const usWarehouse = ChannelDraft.presets.sampleDataB2B - .usWarehouse() - .build(); - -const c789Uv02 = ProductVariantDraft.presets.sampleDataB2B - .c789Uv02() - .build(); - -const skuC789Uv2019Us = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${c789Uv02.sku}-${usWarehouse.key}`) - .sku(c789Uv02.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(usWarehouse.key)); - -export default skuC789Uv2019Us; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-c789-uv-2023-default.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-c789-uv-2023-default.spec.ts deleted file mode 100644 index c5999e0b2..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-c789-uv-2023-default.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuC789Uv2023Default from './sku-c789-uv-2023-default'; - -describe(`with skuC789Uv2023Default preset and default-warehouse channel`, () => { - it(`should return a skuC789Uv2023Default preset`, () => { - const skuC789Uv2023DefaultPreset = - skuC789Uv2023Default().build(); - expect(skuC789Uv2023DefaultPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "c789-uv-2023-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "c789-uv-2023", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuC789Uv2023Default preset when built for graphql`, () => { - const skuC789Uv2023DefaultPresetGraphql = - skuC789Uv2023Default().buildGraphql(); - expect(skuC789Uv2023DefaultPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "c789-uv-2023-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "c789-uv-2023", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-c789-uv-2023-default.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-c789-uv-2023-default.ts deleted file mode 100644 index bfe08e565..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-c789-uv-2023-default.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const defaultWarehouse = ChannelDraft.presets.sampleDataB2B - .defaultWarehouse() - .build(); - -const c789Uv03 = ProductVariantDraft.presets.sampleDataB2B - .c789Uv03() - .build(); - -const skuC789Uv2023Default = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${c789Uv03.sku}-${defaultWarehouse.key}`) - .sku(c789Uv03.sku!) - .quantityOnStock(1000) - .supplyChannel( - KeyReferenceDraft.presets.channel().key(defaultWarehouse.key) - ); - -export default skuC789Uv2023Default; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-c789-uv-2023-eu.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-c789-uv-2023-eu.spec.ts deleted file mode 100644 index 7241742cb..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-c789-uv-2023-eu.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuC789Uv2023Eu from './sku-c789-uv-2023-eu'; - -describe(`with skuC789Uv2023Eu preset and eu-warehouse channel`, () => { - it(`should return a skuC789Uv2023Eu preset`, () => { - const skuC789Uv2023EuPreset = - skuC789Uv2023Eu().build(); - expect(skuC789Uv2023EuPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "c789-uv-2023-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "c789-uv-2023", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuC789Uv2023Eu preset when built for graphql`, () => { - const skuC789Uv2023EuPresetGraphql = - skuC789Uv2023Eu().buildGraphql(); - expect(skuC789Uv2023EuPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "c789-uv-2023-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "c789-uv-2023", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-c789-uv-2023-eu.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-c789-uv-2023-eu.ts deleted file mode 100644 index 77553b30a..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-c789-uv-2023-eu.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const euWarehouse = ChannelDraft.presets.sampleDataB2B - .euWarehouse() - .build(); - -const c789Uv03 = ProductVariantDraft.presets.sampleDataB2B - .c789Uv03() - .build(); - -const skuC789Uv2023Eu = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${c789Uv03.sku}-${euWarehouse.key}`) - .sku(c789Uv03.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(euWarehouse.key)); - -export default skuC789Uv2023Eu; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-c789-uv-2023-us.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-c789-uv-2023-us.spec.ts deleted file mode 100644 index ad801187f..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-c789-uv-2023-us.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuC789Uv2023Us from './sku-c789-uv-2023-us'; - -describe(`with skuC789Uv2023Us preset and us-warehouse channel`, () => { - it(`should return a skuC789Uv2023Us preset`, () => { - const skuC789Uv2023UsPreset = - skuC789Uv2023Us().build(); - expect(skuC789Uv2023UsPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "c789-uv-2023-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "c789-uv-2023", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuC789Uv2023Us preset when built for graphql`, () => { - const skuC789Uv2023UsPresetGraphql = - skuC789Uv2023Us().buildGraphql(); - expect(skuC789Uv2023UsPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "c789-uv-2023-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "c789-uv-2023", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-c789-uv-2023-us.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-c789-uv-2023-us.ts deleted file mode 100644 index 63a2e5919..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-c789-uv-2023-us.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const usWarehouse = ChannelDraft.presets.sampleDataB2B - .usWarehouse() - .build(); - -const c789Uv03 = ProductVariantDraft.presets.sampleDataB2B - .c789Uv03() - .build(); - -const skuC789Uv2023Us = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${c789Uv03.sku}-${usWarehouse.key}`) - .sku(c789Uv03.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(usWarehouse.key)); - -export default skuC789Uv2023Us; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-cc-789-uv-2015-default-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-cc-789-uv-2015-default-warehouse.spec.ts new file mode 100644 index 000000000..330a5d7e8 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-cc-789-uv-2015-default-warehouse.spec.ts @@ -0,0 +1,40 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuCc789Uv2015DefaultWarehouse preset`, () => { + it(`should return a skuCc789Uv2015DefaultWarehouse preset when built for rest`, () => { + const skuCc789Uv2015DefaultWarehousePreset = InventoryEntryDraftRest.presets + .skuCc789Uv2015DefaultWarehouse() + .build(); + expect(skuCc789Uv2015DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuCc789Uv2015DefaultWarehouse preset when built for graphql`, () => { + const skuCc789Uv2015DefaultWarehousePreset = + InventoryEntryDraftGraphql.presets + .skuCc789Uv2015DefaultWarehouse() + .build(); + expect(skuCc789Uv2015DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuCc789Uv2015DefaultWarehouse preset when built for legacy rest`, () => { + const skuCc789Uv2015DefaultWarehousePreset = InventoryEntryDraft.presets + .skuCc789Uv2015DefaultWarehouse() + .buildRest(); + expect(skuCc789Uv2015DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuCc789Uv2015DefaultWarehouse preset when built for legacy graphql`, () => { + const skuCc789Uv2015DefaultWarehousePreset = InventoryEntryDraft.presets + .skuCc789Uv2015DefaultWarehouse() + .buildGraphql(); + expect(skuCc789Uv2015DefaultWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-cc-789-uv-2015-default-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-cc-789-uv-2015-default-warehouse.ts new file mode 100644 index 000000000..139d265a8 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-cc-789-uv-2015-default-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .defaultWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .cc789Uv01() + .build(); + +const skuCc789Uv2015DefaultWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('cc789-uv-2015-default-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuCc789Uv2015DefaultWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-cc-789-uv-2015-eu-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-cc-789-uv-2015-eu-warehouse.spec.ts new file mode 100644 index 000000000..d6d0ffd4f --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-cc-789-uv-2015-eu-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuCc789Uv2015EuWarehouse preset`, () => { + it(`should return a skuCc789Uv2015EuWarehouse preset when built for rest`, () => { + const skuCc789Uv2015EuWarehousePreset = InventoryEntryDraftRest.presets + .skuCc789Uv2015EuWarehouse() + .build(); + expect(skuCc789Uv2015EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuCc789Uv2015EuWarehouse preset when built for graphql`, () => { + const skuCc789Uv2015EuWarehousePreset = InventoryEntryDraftGraphql.presets + .skuCc789Uv2015EuWarehouse() + .build(); + expect(skuCc789Uv2015EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuCc789Uv2015EuWarehouse preset when built for legacy rest`, () => { + const skuCc789Uv2015EuWarehousePreset = InventoryEntryDraft.presets + .skuCc789Uv2015EuWarehouse() + .buildRest(); + expect(skuCc789Uv2015EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuCc789Uv2015EuWarehouse preset when built for legacy graphql`, () => { + const skuCc789Uv2015EuWarehousePreset = InventoryEntryDraft.presets + .skuCc789Uv2015EuWarehouse() + .buildGraphql(); + expect(skuCc789Uv2015EuWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-cc-789-uv-2015-eu-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-cc-789-uv-2015-eu-warehouse.ts new file mode 100644 index 000000000..22dcd3313 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-cc-789-uv-2015-eu-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .euWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .cc789Uv01() + .build(); + +const skuCc789Uv2015EuWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('cc789-uv-2015-eu-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuCc789Uv2015EuWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-cc-789-uv-2015-us-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-cc-789-uv-2015-us-warehouse.spec.ts new file mode 100644 index 000000000..1d39a62b2 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-cc-789-uv-2015-us-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuCc789Uv2015UsWarehouse preset`, () => { + it(`should return a skuCc789Uv2015UsWarehouse preset when built for rest`, () => { + const skuCc789Uv2015UsWarehousePreset = InventoryEntryDraftRest.presets + .skuCc789Uv2015UsWarehouse() + .build(); + expect(skuCc789Uv2015UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuCc789Uv2015UsWarehouse preset when built for graphql`, () => { + const skuCc789Uv2015UsWarehousePreset = InventoryEntryDraftGraphql.presets + .skuCc789Uv2015UsWarehouse() + .build(); + expect(skuCc789Uv2015UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuCc789Uv2015UsWarehouse preset when built for legacy rest`, () => { + const skuCc789Uv2015UsWarehousePreset = InventoryEntryDraft.presets + .skuCc789Uv2015UsWarehouse() + .buildRest(); + expect(skuCc789Uv2015UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuCc789Uv2015UsWarehouse preset when built for legacy graphql`, () => { + const skuCc789Uv2015UsWarehousePreset = InventoryEntryDraft.presets + .skuCc789Uv2015UsWarehouse() + .buildGraphql(); + expect(skuCc789Uv2015UsWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-cc-789-uv-2015-us-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-cc-789-uv-2015-us-warehouse.ts new file mode 100644 index 000000000..855874ba6 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-cc-789-uv-2015-us-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .usWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .cc789Uv01() + .build(); + +const skuCc789Uv2015UsWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('cc789-uv-2015-us-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuCc789Uv2015UsWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-cc-789-uv-2019-default-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-cc-789-uv-2019-default-warehouse.spec.ts new file mode 100644 index 000000000..9606b9358 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-cc-789-uv-2019-default-warehouse.spec.ts @@ -0,0 +1,40 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuCc789Uv2019DefaultWarehouse preset`, () => { + it(`should return a skuCc789Uv2019DefaultWarehouse preset when built for rest`, () => { + const skuCc789Uv2019DefaultWarehousePreset = InventoryEntryDraftRest.presets + .skuCc789Uv2019DefaultWarehouse() + .build(); + expect(skuCc789Uv2019DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuCc789Uv2019DefaultWarehouse preset when built for graphql`, () => { + const skuCc789Uv2019DefaultWarehousePreset = + InventoryEntryDraftGraphql.presets + .skuCc789Uv2019DefaultWarehouse() + .build(); + expect(skuCc789Uv2019DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuCc789Uv2019DefaultWarehouse preset when built for legacy rest`, () => { + const skuCc789Uv2019DefaultWarehousePreset = InventoryEntryDraft.presets + .skuCc789Uv2019DefaultWarehouse() + .buildRest(); + expect(skuCc789Uv2019DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuCc789Uv2019DefaultWarehouse preset when built for legacy graphql`, () => { + const skuCc789Uv2019DefaultWarehousePreset = InventoryEntryDraft.presets + .skuCc789Uv2019DefaultWarehouse() + .buildGraphql(); + expect(skuCc789Uv2019DefaultWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-cc-789-uv-2019-default-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-cc-789-uv-2019-default-warehouse.ts new file mode 100644 index 000000000..04e02d500 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-cc-789-uv-2019-default-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .defaultWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .cc789Uv02() + .build(); + +const skuCc789Uv2019DefaultWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('cc789-uv-2019-default-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuCc789Uv2019DefaultWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-cc-789-uv-2019-eu-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-cc-789-uv-2019-eu-warehouse.spec.ts new file mode 100644 index 000000000..91d2c477f --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-cc-789-uv-2019-eu-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuCc789Uv2019EuWarehouse preset`, () => { + it(`should return a skuCc789Uv2019EuWarehouse preset when built for rest`, () => { + const skuCc789Uv2019EuWarehousePreset = InventoryEntryDraftRest.presets + .skuCc789Uv2019EuWarehouse() + .build(); + expect(skuCc789Uv2019EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuCc789Uv2019EuWarehouse preset when built for graphql`, () => { + const skuCc789Uv2019EuWarehousePreset = InventoryEntryDraftGraphql.presets + .skuCc789Uv2019EuWarehouse() + .build(); + expect(skuCc789Uv2019EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuCc789Uv2019EuWarehouse preset when built for legacy rest`, () => { + const skuCc789Uv2019EuWarehousePreset = InventoryEntryDraft.presets + .skuCc789Uv2019EuWarehouse() + .buildRest(); + expect(skuCc789Uv2019EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuCc789Uv2019EuWarehouse preset when built for legacy graphql`, () => { + const skuCc789Uv2019EuWarehousePreset = InventoryEntryDraft.presets + .skuCc789Uv2019EuWarehouse() + .buildGraphql(); + expect(skuCc789Uv2019EuWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-cc-789-uv-2019-eu-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-cc-789-uv-2019-eu-warehouse.ts new file mode 100644 index 000000000..69a5efd75 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-cc-789-uv-2019-eu-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .euWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .cc789Uv02() + .build(); + +const skuCc789Uv2019EuWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('cc789-uv-2019-eu-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuCc789Uv2019EuWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-cc-789-uv-2019-us-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-cc-789-uv-2019-us-warehouse.spec.ts new file mode 100644 index 000000000..799c5cf1b --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-cc-789-uv-2019-us-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuCc789Uv2019UsWarehouse preset`, () => { + it(`should return a skuCc789Uv2019UsWarehouse preset when built for rest`, () => { + const skuCc789Uv2019UsWarehousePreset = InventoryEntryDraftRest.presets + .skuCc789Uv2019UsWarehouse() + .build(); + expect(skuCc789Uv2019UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuCc789Uv2019UsWarehouse preset when built for graphql`, () => { + const skuCc789Uv2019UsWarehousePreset = InventoryEntryDraftGraphql.presets + .skuCc789Uv2019UsWarehouse() + .build(); + expect(skuCc789Uv2019UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuCc789Uv2019UsWarehouse preset when built for legacy rest`, () => { + const skuCc789Uv2019UsWarehousePreset = InventoryEntryDraft.presets + .skuCc789Uv2019UsWarehouse() + .buildRest(); + expect(skuCc789Uv2019UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuCc789Uv2019UsWarehouse preset when built for legacy graphql`, () => { + const skuCc789Uv2019UsWarehousePreset = InventoryEntryDraft.presets + .skuCc789Uv2019UsWarehouse() + .buildGraphql(); + expect(skuCc789Uv2019UsWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-cc-789-uv-2019-us-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-cc-789-uv-2019-us-warehouse.ts new file mode 100644 index 000000000..d7186d7ed --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-cc-789-uv-2019-us-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .usWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .cc789Uv02() + .build(); + +const skuCc789Uv2019UsWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('cc789-uv-2019-us-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuCc789Uv2019UsWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-cc-789-uv-2023-default-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-cc-789-uv-2023-default-warehouse.spec.ts new file mode 100644 index 000000000..18e8b6dc2 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-cc-789-uv-2023-default-warehouse.spec.ts @@ -0,0 +1,40 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuCc789Uv2023DefaultWarehouse preset`, () => { + it(`should return a skuCc789Uv2023DefaultWarehouse preset when built for rest`, () => { + const skuCc789Uv2023DefaultWarehousePreset = InventoryEntryDraftRest.presets + .skuCc789Uv2023DefaultWarehouse() + .build(); + expect(skuCc789Uv2023DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuCc789Uv2023DefaultWarehouse preset when built for graphql`, () => { + const skuCc789Uv2023DefaultWarehousePreset = + InventoryEntryDraftGraphql.presets + .skuCc789Uv2023DefaultWarehouse() + .build(); + expect(skuCc789Uv2023DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuCc789Uv2023DefaultWarehouse preset when built for legacy rest`, () => { + const skuCc789Uv2023DefaultWarehousePreset = InventoryEntryDraft.presets + .skuCc789Uv2023DefaultWarehouse() + .buildRest(); + expect(skuCc789Uv2023DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuCc789Uv2023DefaultWarehouse preset when built for legacy graphql`, () => { + const skuCc789Uv2023DefaultWarehousePreset = InventoryEntryDraft.presets + .skuCc789Uv2023DefaultWarehouse() + .buildGraphql(); + expect(skuCc789Uv2023DefaultWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-cc-789-uv-2023-default-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-cc-789-uv-2023-default-warehouse.ts new file mode 100644 index 000000000..72dec7641 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-cc-789-uv-2023-default-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .defaultWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .cc789Uv03() + .build(); + +const skuCc789Uv2023DefaultWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('cc789-uv-2023-default-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuCc789Uv2023DefaultWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-cc-789-uv-2023-eu-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-cc-789-uv-2023-eu-warehouse.spec.ts new file mode 100644 index 000000000..134c32824 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-cc-789-uv-2023-eu-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuCc789Uv2023EuWarehouse preset`, () => { + it(`should return a skuCc789Uv2023EuWarehouse preset when built for rest`, () => { + const skuCc789Uv2023EuWarehousePreset = InventoryEntryDraftRest.presets + .skuCc789Uv2023EuWarehouse() + .build(); + expect(skuCc789Uv2023EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuCc789Uv2023EuWarehouse preset when built for graphql`, () => { + const skuCc789Uv2023EuWarehousePreset = InventoryEntryDraftGraphql.presets + .skuCc789Uv2023EuWarehouse() + .build(); + expect(skuCc789Uv2023EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuCc789Uv2023EuWarehouse preset when built for legacy rest`, () => { + const skuCc789Uv2023EuWarehousePreset = InventoryEntryDraft.presets + .skuCc789Uv2023EuWarehouse() + .buildRest(); + expect(skuCc789Uv2023EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuCc789Uv2023EuWarehouse preset when built for legacy graphql`, () => { + const skuCc789Uv2023EuWarehousePreset = InventoryEntryDraft.presets + .skuCc789Uv2023EuWarehouse() + .buildGraphql(); + expect(skuCc789Uv2023EuWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-cc-789-uv-2023-eu-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-cc-789-uv-2023-eu-warehouse.ts new file mode 100644 index 000000000..448933acd --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-cc-789-uv-2023-eu-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .euWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .cc789Uv03() + .build(); + +const skuCc789Uv2023EuWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('cc789-uv-2023-eu-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuCc789Uv2023EuWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-cc-789-uv-2023-us-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-cc-789-uv-2023-us-warehouse.spec.ts new file mode 100644 index 000000000..9142d7c36 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-cc-789-uv-2023-us-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuCc789Uv2023UsWarehouse preset`, () => { + it(`should return a skuCc789Uv2023UsWarehouse preset when built for rest`, () => { + const skuCc789Uv2023UsWarehousePreset = InventoryEntryDraftRest.presets + .skuCc789Uv2023UsWarehouse() + .build(); + expect(skuCc789Uv2023UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuCc789Uv2023UsWarehouse preset when built for graphql`, () => { + const skuCc789Uv2023UsWarehousePreset = InventoryEntryDraftGraphql.presets + .skuCc789Uv2023UsWarehouse() + .build(); + expect(skuCc789Uv2023UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuCc789Uv2023UsWarehouse preset when built for legacy rest`, () => { + const skuCc789Uv2023UsWarehousePreset = InventoryEntryDraft.presets + .skuCc789Uv2023UsWarehouse() + .buildRest(); + expect(skuCc789Uv2023UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuCc789Uv2023UsWarehouse preset when built for legacy graphql`, () => { + const skuCc789Uv2023UsWarehousePreset = InventoryEntryDraft.presets + .skuCc789Uv2023UsWarehouse() + .buildGraphql(); + expect(skuCc789Uv2023UsWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-cc-789-uv-2023-us-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-cc-789-uv-2023-us-warehouse.ts new file mode 100644 index 000000000..9ea505147 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-cc-789-uv-2023-us-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .usWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .cc789Uv03() + .build(); + +const skuCc789Uv2023UsWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('cc789-uv-2023-us-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuCc789Uv2023UsWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-cc789-uv-2015-default.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-cc789-uv-2015-default.spec.ts deleted file mode 100644 index 4376d5e33..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-cc789-uv-2015-default.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuCc789Uv2015Default from './sku-cc789-uv-2015-default'; - -describe(`with skuCc789Uv2015Default preset and default-warehouse channel`, () => { - it(`should return a skuCc789Uv2015Default preset`, () => { - const skuCc789Uv2015DefaultPreset = - skuCc789Uv2015Default().build(); - expect(skuCc789Uv2015DefaultPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "cc789-uv-2015-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "cc789-uv-2015", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuCc789Uv2015Default preset when built for graphql`, () => { - const skuCc789Uv2015DefaultPresetGraphql = - skuCc789Uv2015Default().buildGraphql(); - expect(skuCc789Uv2015DefaultPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "cc789-uv-2015-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "cc789-uv-2015", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-cc789-uv-2015-default.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-cc789-uv-2015-default.ts deleted file mode 100644 index 413bf3494..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-cc789-uv-2015-default.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const defaultWarehouse = ChannelDraft.presets.sampleDataB2B - .defaultWarehouse() - .build(); - -const cc789Uv01 = ProductVariantDraft.presets.sampleDataB2B - .cc789Uv01() - .build(); - -const skuCc789Uv2015Default = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${cc789Uv01.sku}-${defaultWarehouse.key}`) - .sku(cc789Uv01.sku!) - .quantityOnStock(1000) - .supplyChannel( - KeyReferenceDraft.presets.channel().key(defaultWarehouse.key) - ); - -export default skuCc789Uv2015Default; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-cc789-uv-2015-eu.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-cc789-uv-2015-eu.spec.ts deleted file mode 100644 index 320014bd2..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-cc789-uv-2015-eu.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuCc789Uv2015Eu from './sku-cc789-uv-2015-eu'; - -describe(`with skuCc789Uv2015Eu preset and eu-warehouse channel`, () => { - it(`should return a skuCc789Uv2015Eu preset`, () => { - const skuCc789Uv2015EuPreset = - skuCc789Uv2015Eu().build(); - expect(skuCc789Uv2015EuPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "cc789-uv-2015-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "cc789-uv-2015", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuCc789Uv2015Eu preset when built for graphql`, () => { - const skuCc789Uv2015EuPresetGraphql = - skuCc789Uv2015Eu().buildGraphql(); - expect(skuCc789Uv2015EuPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "cc789-uv-2015-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "cc789-uv-2015", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-cc789-uv-2015-eu.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-cc789-uv-2015-eu.ts deleted file mode 100644 index ec0d10995..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-cc789-uv-2015-eu.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const euWarehouse = ChannelDraft.presets.sampleDataB2B - .euWarehouse() - .build(); - -const cc789Uv01 = ProductVariantDraft.presets.sampleDataB2B - .cc789Uv01() - .build(); - -const skuCc789Uv2015Eu = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${cc789Uv01.sku}-${euWarehouse.key}`) - .sku(cc789Uv01.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(euWarehouse.key)); - -export default skuCc789Uv2015Eu; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-cc789-uv-2015-us.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-cc789-uv-2015-us.spec.ts deleted file mode 100644 index e6de582d0..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-cc789-uv-2015-us.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuCc789Uv2015Us from './sku-cc789-uv-2015-us'; - -describe(`with skuCc789Uv2015Us preset and us-warehouse channel`, () => { - it(`should return a skuCc789Uv2015Us preset`, () => { - const skuCc789Uv2015UsPreset = - skuCc789Uv2015Us().build(); - expect(skuCc789Uv2015UsPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "cc789-uv-2015-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "cc789-uv-2015", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuCc789Uv2015Us preset when built for graphql`, () => { - const skuCc789Uv2015UsPresetGraphql = - skuCc789Uv2015Us().buildGraphql(); - expect(skuCc789Uv2015UsPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "cc789-uv-2015-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "cc789-uv-2015", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-cc789-uv-2015-us.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-cc789-uv-2015-us.ts deleted file mode 100644 index cab1a2915..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-cc789-uv-2015-us.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const usWarehouse = ChannelDraft.presets.sampleDataB2B - .usWarehouse() - .build(); - -const cc789Uv01 = ProductVariantDraft.presets.sampleDataB2B - .cc789Uv01() - .build(); - -const skuCc789Uv2015Us = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${cc789Uv01.sku}-${usWarehouse.key}`) - .sku(cc789Uv01.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(usWarehouse.key)); - -export default skuCc789Uv2015Us; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-cc789-uv-2019-default.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-cc789-uv-2019-default.spec.ts deleted file mode 100644 index d21db61e1..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-cc789-uv-2019-default.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuCc789Uv2019Default from './sku-cc789-uv-2019-default'; - -describe(`with skuCc789Uv2019Default preset and default-warehouse channel`, () => { - it(`should return a skuCc789Uv2019Default preset`, () => { - const skuCc789Uv2019DefaultPreset = - skuCc789Uv2019Default().build(); - expect(skuCc789Uv2019DefaultPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "cc789-uv-2019-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "cc789-uv-2019", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuCc789Uv2019Default preset when built for graphql`, () => { - const skuCc789Uv2019DefaultPresetGraphql = - skuCc789Uv2019Default().buildGraphql(); - expect(skuCc789Uv2019DefaultPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "cc789-uv-2019-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "cc789-uv-2019", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-cc789-uv-2019-default.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-cc789-uv-2019-default.ts deleted file mode 100644 index d2f4300de..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-cc789-uv-2019-default.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const defaultWarehouse = ChannelDraft.presets.sampleDataB2B - .defaultWarehouse() - .build(); - -const cc789Uv02 = ProductVariantDraft.presets.sampleDataB2B - .cc789Uv02() - .build(); - -const skuCc789Uv2019Default = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${cc789Uv02.sku}-${defaultWarehouse.key}`) - .sku(cc789Uv02.sku!) - .quantityOnStock(1000) - .supplyChannel( - KeyReferenceDraft.presets.channel().key(defaultWarehouse.key) - ); - -export default skuCc789Uv2019Default; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-cc789-uv-2019-eu.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-cc789-uv-2019-eu.spec.ts deleted file mode 100644 index 909e4f758..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-cc789-uv-2019-eu.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuCc789Uv2019Eu from './sku-cc789-uv-2019-eu'; - -describe(`with skuCc789Uv2019Eu preset and eu-warehouse channel`, () => { - it(`should return a skuCc789Uv2019Eu preset`, () => { - const skuCc789Uv2019EuPreset = - skuCc789Uv2019Eu().build(); - expect(skuCc789Uv2019EuPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "cc789-uv-2019-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "cc789-uv-2019", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuCc789Uv2019Eu preset when built for graphql`, () => { - const skuCc789Uv2019EuPresetGraphql = - skuCc789Uv2019Eu().buildGraphql(); - expect(skuCc789Uv2019EuPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "cc789-uv-2019-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "cc789-uv-2019", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-cc789-uv-2019-eu.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-cc789-uv-2019-eu.ts deleted file mode 100644 index c01a38e32..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-cc789-uv-2019-eu.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const euWarehouse = ChannelDraft.presets.sampleDataB2B - .euWarehouse() - .build(); - -const cc789Uv02 = ProductVariantDraft.presets.sampleDataB2B - .cc789Uv02() - .build(); - -const skuCc789Uv2019Eu = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${cc789Uv02.sku}-${euWarehouse.key}`) - .sku(cc789Uv02.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(euWarehouse.key)); - -export default skuCc789Uv2019Eu; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-cc789-uv-2019-us.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-cc789-uv-2019-us.spec.ts deleted file mode 100644 index 6efac5002..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-cc789-uv-2019-us.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuCc789Uv2019Us from './sku-cc789-uv-2019-us'; - -describe(`with skuCc789Uv2019Us preset and us-warehouse channel`, () => { - it(`should return a skuCc789Uv2019Us preset`, () => { - const skuCc789Uv2019UsPreset = - skuCc789Uv2019Us().build(); - expect(skuCc789Uv2019UsPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "cc789-uv-2019-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "cc789-uv-2019", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuCc789Uv2019Us preset when built for graphql`, () => { - const skuCc789Uv2019UsPresetGraphql = - skuCc789Uv2019Us().buildGraphql(); - expect(skuCc789Uv2019UsPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "cc789-uv-2019-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "cc789-uv-2019", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-cc789-uv-2019-us.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-cc789-uv-2019-us.ts deleted file mode 100644 index e41c72a3f..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-cc789-uv-2019-us.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const usWarehouse = ChannelDraft.presets.sampleDataB2B - .usWarehouse() - .build(); - -const cc789Uv02 = ProductVariantDraft.presets.sampleDataB2B - .cc789Uv02() - .build(); - -const skuCc789Uv2019Us = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${cc789Uv02.sku}-${usWarehouse.key}`) - .sku(cc789Uv02.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(usWarehouse.key)); - -export default skuCc789Uv2019Us; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-cc789-uv-2023-default.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-cc789-uv-2023-default.spec.ts deleted file mode 100644 index 22b4fe1a2..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-cc789-uv-2023-default.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuCc789Uv2023Default from './sku-cc789-uv-2023-default'; - -describe(`with skuCc789Uv2023Default preset and default-warehouse channel`, () => { - it(`should return a skuCc789Uv2023Default preset`, () => { - const skuCc789Uv2023DefaultPreset = - skuCc789Uv2023Default().build(); - expect(skuCc789Uv2023DefaultPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "cc789-uv-2023-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "cc789-uv-2023", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuCc789Uv2023Default preset when built for graphql`, () => { - const skuCc789Uv2023DefaultPresetGraphql = - skuCc789Uv2023Default().buildGraphql(); - expect(skuCc789Uv2023DefaultPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "cc789-uv-2023-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "cc789-uv-2023", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-cc789-uv-2023-default.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-cc789-uv-2023-default.ts deleted file mode 100644 index ffaae5cc1..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-cc789-uv-2023-default.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const defaultWarehouse = ChannelDraft.presets.sampleDataB2B - .defaultWarehouse() - .build(); - -const cc789Uv03 = ProductVariantDraft.presets.sampleDataB2B - .cc789Uv03() - .build(); - -const skuCc789Uv2023Default = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${cc789Uv03.sku}-${defaultWarehouse.key}`) - .sku(cc789Uv03.sku!) - .quantityOnStock(1000) - .supplyChannel( - KeyReferenceDraft.presets.channel().key(defaultWarehouse.key) - ); - -export default skuCc789Uv2023Default; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-cc789-uv-2023-eu.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-cc789-uv-2023-eu.spec.ts deleted file mode 100644 index 9984a0c29..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-cc789-uv-2023-eu.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuCc789Uv2023Eu from './sku-cc789-uv-2023-eu'; - -describe(`with skuCc789Uv2023Eu preset and eu-warehouse channel`, () => { - it(`should return a skuCc789Uv2023Eu preset`, () => { - const skuCc789Uv2023EuPreset = - skuCc789Uv2023Eu().build(); - expect(skuCc789Uv2023EuPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "cc789-uv-2023-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "cc789-uv-2023", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuCc789Uv2023Eu preset when built for graphql`, () => { - const skuCc789Uv2023EuPresetGraphql = - skuCc789Uv2023Eu().buildGraphql(); - expect(skuCc789Uv2023EuPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "cc789-uv-2023-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "cc789-uv-2023", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-cc789-uv-2023-eu.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-cc789-uv-2023-eu.ts deleted file mode 100644 index 8f7547905..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-cc789-uv-2023-eu.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const euWarehouse = ChannelDraft.presets.sampleDataB2B - .euWarehouse() - .build(); - -const cc789Uv03 = ProductVariantDraft.presets.sampleDataB2B - .cc789Uv03() - .build(); - -const skuCc789Uv2023Eu = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${cc789Uv03.sku}-${euWarehouse.key}`) - .sku(cc789Uv03.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(euWarehouse.key)); - -export default skuCc789Uv2023Eu; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-cc789-uv-2023-us.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-cc789-uv-2023-us.spec.ts deleted file mode 100644 index 3c1cc8863..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-cc789-uv-2023-us.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuCc789Uv2023Us from './sku-cc789-uv-2023-us'; - -describe(`with skuCc789Uv2023Us preset and us-warehouse channel`, () => { - it(`should return a skuCc789Uv2023Us preset`, () => { - const skuCc789Uv2023UsPreset = - skuCc789Uv2023Us().build(); - expect(skuCc789Uv2023UsPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "cc789-uv-2023-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "cc789-uv-2023", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuCc789Uv2023Us preset when built for graphql`, () => { - const skuCc789Uv2023UsPresetGraphql = - skuCc789Uv2023Us().buildGraphql(); - expect(skuCc789Uv2023UsPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "cc789-uv-2023-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "cc789-uv-2023", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-cc789-uv-2023-us.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-cc789-uv-2023-us.ts deleted file mode 100644 index 785cf97e3..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-cc789-uv-2023-us.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const usWarehouse = ChannelDraft.presets.sampleDataB2B - .usWarehouse() - .build(); - -const cc789Uv03 = ProductVariantDraft.presets.sampleDataB2B - .cc789Uv03() - .build(); - -const skuCc789Uv2023Us = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${cc789Uv03.sku}-${usWarehouse.key}`) - .sku(cc789Uv03.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(usWarehouse.key)); - -export default skuCc789Uv2023Us; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ccc-567-yz-blue-default-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ccc-567-yz-blue-default-warehouse.spec.ts new file mode 100644 index 000000000..99806a132 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ccc-567-yz-blue-default-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuCcc567YzBlueDefaultWarehouse preset`, () => { + it(`should return a skuCcc567YzBlueDefaultWarehouse preset when built for rest`, () => { + const skuCcc567YzBlueDefaultWarehousePreset = + InventoryEntryDraftRest.presets.skuCcc567YzBlueDefaultWarehouse().build(); + expect(skuCcc567YzBlueDefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuCcc567YzBlueDefaultWarehouse preset when built for graphql`, () => { + const skuCcc567YzBlueDefaultWarehousePreset = + InventoryEntryDraftGraphql.presets + .skuCcc567YzBlueDefaultWarehouse() + .build(); + expect(skuCcc567YzBlueDefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuCcc567YzBlueDefaultWarehouse preset when built for legacy rest`, () => { + const skuCcc567YzBlueDefaultWarehousePreset = InventoryEntryDraft.presets + .skuCcc567YzBlueDefaultWarehouse() + .buildRest(); + expect(skuCcc567YzBlueDefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuCcc567YzBlueDefaultWarehouse preset when built for legacy graphql`, () => { + const skuCcc567YzBlueDefaultWarehousePreset = InventoryEntryDraft.presets + .skuCcc567YzBlueDefaultWarehouse() + .buildGraphql(); + expect(skuCcc567YzBlueDefaultWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ccc-567-yz-blue-default-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ccc-567-yz-blue-default-warehouse.ts new file mode 100644 index 000000000..2004527ea --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ccc-567-yz-blue-default-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .defaultWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .ccc567Yz02() + .build(); + +const skuCcc567YzBlueDefaultWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('ccc567-yz-blue-default-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuCcc567YzBlueDefaultWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ccc-567-yz-blue-eu-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ccc-567-yz-blue-eu-warehouse.spec.ts new file mode 100644 index 000000000..d3c66ae9e --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ccc-567-yz-blue-eu-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuCcc567YzBlueEuWarehouse preset`, () => { + it(`should return a skuCcc567YzBlueEuWarehouse preset when built for rest`, () => { + const skuCcc567YzBlueEuWarehousePreset = InventoryEntryDraftRest.presets + .skuCcc567YzBlueEuWarehouse() + .build(); + expect(skuCcc567YzBlueEuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuCcc567YzBlueEuWarehouse preset when built for graphql`, () => { + const skuCcc567YzBlueEuWarehousePreset = InventoryEntryDraftGraphql.presets + .skuCcc567YzBlueEuWarehouse() + .build(); + expect(skuCcc567YzBlueEuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuCcc567YzBlueEuWarehouse preset when built for legacy rest`, () => { + const skuCcc567YzBlueEuWarehousePreset = InventoryEntryDraft.presets + .skuCcc567YzBlueEuWarehouse() + .buildRest(); + expect(skuCcc567YzBlueEuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuCcc567YzBlueEuWarehouse preset when built for legacy graphql`, () => { + const skuCcc567YzBlueEuWarehousePreset = InventoryEntryDraft.presets + .skuCcc567YzBlueEuWarehouse() + .buildGraphql(); + expect(skuCcc567YzBlueEuWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ccc-567-yz-blue-eu-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ccc-567-yz-blue-eu-warehouse.ts new file mode 100644 index 000000000..f3839c5a3 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ccc-567-yz-blue-eu-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .euWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .ccc567Yz02() + .build(); + +const skuCcc567YzBlueEuWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('ccc567-yz-blue-eu-warehouse') + .sku(variant.sku!) + .quantityOnStock(999) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuCcc567YzBlueEuWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ccc-567-yz-blue-us-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ccc-567-yz-blue-us-warehouse.spec.ts new file mode 100644 index 000000000..c44285b64 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ccc-567-yz-blue-us-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuCcc567YzBlueUsWarehouse preset`, () => { + it(`should return a skuCcc567YzBlueUsWarehouse preset when built for rest`, () => { + const skuCcc567YzBlueUsWarehousePreset = InventoryEntryDraftRest.presets + .skuCcc567YzBlueUsWarehouse() + .build(); + expect(skuCcc567YzBlueUsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuCcc567YzBlueUsWarehouse preset when built for graphql`, () => { + const skuCcc567YzBlueUsWarehousePreset = InventoryEntryDraftGraphql.presets + .skuCcc567YzBlueUsWarehouse() + .build(); + expect(skuCcc567YzBlueUsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuCcc567YzBlueUsWarehouse preset when built for legacy rest`, () => { + const skuCcc567YzBlueUsWarehousePreset = InventoryEntryDraft.presets + .skuCcc567YzBlueUsWarehouse() + .buildRest(); + expect(skuCcc567YzBlueUsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuCcc567YzBlueUsWarehouse preset when built for legacy graphql`, () => { + const skuCcc567YzBlueUsWarehousePreset = InventoryEntryDraft.presets + .skuCcc567YzBlueUsWarehouse() + .buildGraphql(); + expect(skuCcc567YzBlueUsWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ccc-567-yz-blue-us-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ccc-567-yz-blue-us-warehouse.ts new file mode 100644 index 000000000..c4d94509a --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ccc-567-yz-blue-us-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .usWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .ccc567Yz02() + .build(); + +const skuCcc567YzBlueUsWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('ccc567-yz-blue-us-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuCcc567YzBlueUsWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ccc-567-yz-green-default-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ccc-567-yz-green-default-warehouse.spec.ts new file mode 100644 index 000000000..571ad81fd --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ccc-567-yz-green-default-warehouse.spec.ts @@ -0,0 +1,41 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuCcc567YzGreenDefaultWarehouse preset`, () => { + it(`should return a skuCcc567YzGreenDefaultWarehouse preset when built for rest`, () => { + const skuCcc567YzGreenDefaultWarehousePreset = + InventoryEntryDraftRest.presets + .skuCcc567YzGreenDefaultWarehouse() + .build(); + expect(skuCcc567YzGreenDefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuCcc567YzGreenDefaultWarehouse preset when built for graphql`, () => { + const skuCcc567YzGreenDefaultWarehousePreset = + InventoryEntryDraftGraphql.presets + .skuCcc567YzGreenDefaultWarehouse() + .build(); + expect(skuCcc567YzGreenDefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuCcc567YzGreenDefaultWarehouse preset when built for legacy rest`, () => { + const skuCcc567YzGreenDefaultWarehousePreset = InventoryEntryDraft.presets + .skuCcc567YzGreenDefaultWarehouse() + .buildRest(); + expect(skuCcc567YzGreenDefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuCcc567YzGreenDefaultWarehouse preset when built for legacy graphql`, () => { + const skuCcc567YzGreenDefaultWarehousePreset = InventoryEntryDraft.presets + .skuCcc567YzGreenDefaultWarehouse() + .buildGraphql(); + expect(skuCcc567YzGreenDefaultWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ccc-567-yz-green-default-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ccc-567-yz-green-default-warehouse.ts new file mode 100644 index 000000000..cfda0661f --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ccc-567-yz-green-default-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .defaultWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .ccc567Yz03() + .build(); + +const skuCcc567YzGreenDefaultWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('ccc567-yz-green-default-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuCcc567YzGreenDefaultWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ccc-567-yz-green-eu-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ccc-567-yz-green-eu-warehouse.spec.ts new file mode 100644 index 000000000..dcdf996e4 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ccc-567-yz-green-eu-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuCcc567YzGreenEuWarehouse preset`, () => { + it(`should return a skuCcc567YzGreenEuWarehouse preset when built for rest`, () => { + const skuCcc567YzGreenEuWarehousePreset = InventoryEntryDraftRest.presets + .skuCcc567YzGreenEuWarehouse() + .build(); + expect(skuCcc567YzGreenEuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuCcc567YzGreenEuWarehouse preset when built for graphql`, () => { + const skuCcc567YzGreenEuWarehousePreset = InventoryEntryDraftGraphql.presets + .skuCcc567YzGreenEuWarehouse() + .build(); + expect(skuCcc567YzGreenEuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuCcc567YzGreenEuWarehouse preset when built for legacy rest`, () => { + const skuCcc567YzGreenEuWarehousePreset = InventoryEntryDraft.presets + .skuCcc567YzGreenEuWarehouse() + .buildRest(); + expect(skuCcc567YzGreenEuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuCcc567YzGreenEuWarehouse preset when built for legacy graphql`, () => { + const skuCcc567YzGreenEuWarehousePreset = InventoryEntryDraft.presets + .skuCcc567YzGreenEuWarehouse() + .buildGraphql(); + expect(skuCcc567YzGreenEuWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ccc-567-yz-green-eu-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ccc-567-yz-green-eu-warehouse.ts new file mode 100644 index 000000000..b0395f218 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ccc-567-yz-green-eu-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .euWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .ccc567Yz03() + .build(); + +const skuCcc567YzGreenEuWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('ccc567-yz-green-eu-warehouse') + .sku(variant.sku!) + .quantityOnStock(999) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuCcc567YzGreenEuWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ccc-567-yz-green-us-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ccc-567-yz-green-us-warehouse.spec.ts new file mode 100644 index 000000000..a643cf78f --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ccc-567-yz-green-us-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuCcc567YzGreenUsWarehouse preset`, () => { + it(`should return a skuCcc567YzGreenUsWarehouse preset when built for rest`, () => { + const skuCcc567YzGreenUsWarehousePreset = InventoryEntryDraftRest.presets + .skuCcc567YzGreenUsWarehouse() + .build(); + expect(skuCcc567YzGreenUsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuCcc567YzGreenUsWarehouse preset when built for graphql`, () => { + const skuCcc567YzGreenUsWarehousePreset = InventoryEntryDraftGraphql.presets + .skuCcc567YzGreenUsWarehouse() + .build(); + expect(skuCcc567YzGreenUsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuCcc567YzGreenUsWarehouse preset when built for legacy rest`, () => { + const skuCcc567YzGreenUsWarehousePreset = InventoryEntryDraft.presets + .skuCcc567YzGreenUsWarehouse() + .buildRest(); + expect(skuCcc567YzGreenUsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuCcc567YzGreenUsWarehouse preset when built for legacy graphql`, () => { + const skuCcc567YzGreenUsWarehousePreset = InventoryEntryDraft.presets + .skuCcc567YzGreenUsWarehouse() + .buildGraphql(); + expect(skuCcc567YzGreenUsWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ccc-567-yz-green-us-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ccc-567-yz-green-us-warehouse.ts new file mode 100644 index 000000000..6f1fbe99a --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ccc-567-yz-green-us-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .usWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .ccc567Yz03() + .build(); + +const skuCcc567YzGreenUsWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('ccc567-yz-green-us-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuCcc567YzGreenUsWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ccc-567-yz-red-default-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ccc-567-yz-red-default-warehouse.spec.ts new file mode 100644 index 000000000..e2ac21124 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ccc-567-yz-red-default-warehouse.spec.ts @@ -0,0 +1,40 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuCcc567YzRedDefaultWarehouse preset`, () => { + it(`should return a skuCcc567YzRedDefaultWarehouse preset when built for rest`, () => { + const skuCcc567YzRedDefaultWarehousePreset = InventoryEntryDraftRest.presets + .skuCcc567YzRedDefaultWarehouse() + .build(); + expect(skuCcc567YzRedDefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuCcc567YzRedDefaultWarehouse preset when built for graphql`, () => { + const skuCcc567YzRedDefaultWarehousePreset = + InventoryEntryDraftGraphql.presets + .skuCcc567YzRedDefaultWarehouse() + .build(); + expect(skuCcc567YzRedDefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuCcc567YzRedDefaultWarehouse preset when built for legacy rest`, () => { + const skuCcc567YzRedDefaultWarehousePreset = InventoryEntryDraft.presets + .skuCcc567YzRedDefaultWarehouse() + .buildRest(); + expect(skuCcc567YzRedDefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuCcc567YzRedDefaultWarehouse preset when built for legacy graphql`, () => { + const skuCcc567YzRedDefaultWarehousePreset = InventoryEntryDraft.presets + .skuCcc567YzRedDefaultWarehouse() + .buildGraphql(); + expect(skuCcc567YzRedDefaultWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ccc-567-yz-red-default-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ccc-567-yz-red-default-warehouse.ts new file mode 100644 index 000000000..f4a0cb008 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ccc-567-yz-red-default-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .defaultWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .ccc567Yz01() + .build(); + +const skuCcc567YzRedDefaultWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('ccc567-yz-red-default-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuCcc567YzRedDefaultWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ccc-567-yz-red-eu-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ccc-567-yz-red-eu-warehouse.spec.ts new file mode 100644 index 000000000..2137998a4 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ccc-567-yz-red-eu-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuCcc567YzRedEuWarehouse preset`, () => { + it(`should return a skuCcc567YzRedEuWarehouse preset when built for rest`, () => { + const skuCcc567YzRedEuWarehousePreset = InventoryEntryDraftRest.presets + .skuCcc567YzRedEuWarehouse() + .build(); + expect(skuCcc567YzRedEuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuCcc567YzRedEuWarehouse preset when built for graphql`, () => { + const skuCcc567YzRedEuWarehousePreset = InventoryEntryDraftGraphql.presets + .skuCcc567YzRedEuWarehouse() + .build(); + expect(skuCcc567YzRedEuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuCcc567YzRedEuWarehouse preset when built for legacy rest`, () => { + const skuCcc567YzRedEuWarehousePreset = InventoryEntryDraft.presets + .skuCcc567YzRedEuWarehouse() + .buildRest(); + expect(skuCcc567YzRedEuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuCcc567YzRedEuWarehouse preset when built for legacy graphql`, () => { + const skuCcc567YzRedEuWarehousePreset = InventoryEntryDraft.presets + .skuCcc567YzRedEuWarehouse() + .buildGraphql(); + expect(skuCcc567YzRedEuWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ccc-567-yz-red-eu-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ccc-567-yz-red-eu-warehouse.ts new file mode 100644 index 000000000..e30a90edd --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ccc-567-yz-red-eu-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .euWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .ccc567Yz01() + .build(); + +const skuCcc567YzRedEuWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('ccc567-yz-red-eu-warehouse') + .sku(variant.sku!) + .quantityOnStock(999) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuCcc567YzRedEuWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ccc-567-yz-red-us-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ccc-567-yz-red-us-warehouse.spec.ts new file mode 100644 index 000000000..fb256fcc2 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ccc-567-yz-red-us-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuCcc567YzRedUsWarehouse preset`, () => { + it(`should return a skuCcc567YzRedUsWarehouse preset when built for rest`, () => { + const skuCcc567YzRedUsWarehousePreset = InventoryEntryDraftRest.presets + .skuCcc567YzRedUsWarehouse() + .build(); + expect(skuCcc567YzRedUsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuCcc567YzRedUsWarehouse preset when built for graphql`, () => { + const skuCcc567YzRedUsWarehousePreset = InventoryEntryDraftGraphql.presets + .skuCcc567YzRedUsWarehouse() + .build(); + expect(skuCcc567YzRedUsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuCcc567YzRedUsWarehouse preset when built for legacy rest`, () => { + const skuCcc567YzRedUsWarehousePreset = InventoryEntryDraft.presets + .skuCcc567YzRedUsWarehouse() + .buildRest(); + expect(skuCcc567YzRedUsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuCcc567YzRedUsWarehouse preset when built for legacy graphql`, () => { + const skuCcc567YzRedUsWarehousePreset = InventoryEntryDraft.presets + .skuCcc567YzRedUsWarehouse() + .buildGraphql(); + expect(skuCcc567YzRedUsWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ccc-567-yz-red-us-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ccc-567-yz-red-us-warehouse.ts new file mode 100644 index 000000000..9ecd1608b --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ccc-567-yz-red-us-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .usWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .ccc567Yz01() + .build(); + +const skuCcc567YzRedUsWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('ccc567-yz-red-us-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuCcc567YzRedUsWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ccc567-yz-blue-default.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ccc567-yz-blue-default.spec.ts deleted file mode 100644 index b23c51f2b..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ccc567-yz-blue-default.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuCcc567YzBlueDefault from './sku-ccc567-yz-blue-default'; - -describe(`with skuCcc567YzBlueDefault preset and default-warehouse channel`, () => { - it(`should return a skuCcc567YzBlueDefault preset`, () => { - const skuCcc567YzBlueDefaultPreset = - skuCcc567YzBlueDefault().build(); - expect(skuCcc567YzBlueDefaultPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "ccc567-yz-blue-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "ccc567-yz-blue", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuCcc567YzBlueDefault preset when built for graphql`, () => { - const skuCcc567YzBlueDefaultPresetGraphql = - skuCcc567YzBlueDefault().buildGraphql(); - expect(skuCcc567YzBlueDefaultPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "ccc567-yz-blue-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "ccc567-yz-blue", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ccc567-yz-blue-default.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ccc567-yz-blue-default.ts deleted file mode 100644 index 92e4f9136..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ccc567-yz-blue-default.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const defaultWarehouse = ChannelDraft.presets.sampleDataB2B - .defaultWarehouse() - .build(); - -const ccc567Yz02 = ProductVariantDraft.presets.sampleDataB2B - .ccc567Yz02() - .build(); - -const skuCcc567YzBlueDefault = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${ccc567Yz02.sku}-${defaultWarehouse.key}`) - .sku(ccc567Yz02.sku!) - .quantityOnStock(1000) - .supplyChannel( - KeyReferenceDraft.presets.channel().key(defaultWarehouse.key) - ); - -export default skuCcc567YzBlueDefault; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ccc567-yz-blue-eu.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ccc567-yz-blue-eu.spec.ts deleted file mode 100644 index ba9c0a165..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ccc567-yz-blue-eu.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuCcc567YzBlueEu from './sku-ccc567-yz-blue-eu'; - -describe(`with skuCcc567YzBlueEu preset and eu-warehouse channel`, () => { - it(`should return a skuCcc567YzBlueEu preset`, () => { - const skuCcc567YzBlueEuPreset = - skuCcc567YzBlueEu().build(); - expect(skuCcc567YzBlueEuPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "ccc567-yz-blue-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "ccc567-yz-blue", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuCcc567YzBlueEu preset when built for graphql`, () => { - const skuCcc567YzBlueEuPresetGraphql = - skuCcc567YzBlueEu().buildGraphql(); - expect(skuCcc567YzBlueEuPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "ccc567-yz-blue-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "ccc567-yz-blue", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ccc567-yz-blue-eu.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ccc567-yz-blue-eu.ts deleted file mode 100644 index e19c90436..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ccc567-yz-blue-eu.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const euWarehouse = ChannelDraft.presets.sampleDataB2B - .euWarehouse() - .build(); - -const ccc567Yz02 = ProductVariantDraft.presets.sampleDataB2B - .ccc567Yz02() - .build(); - -const skuCcc567YzBlueEu = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${ccc567Yz02.sku}-${euWarehouse.key}`) - .sku(ccc567Yz02.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(euWarehouse.key)); - -export default skuCcc567YzBlueEu; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ccc567-yz-blue-us.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ccc567-yz-blue-us.spec.ts deleted file mode 100644 index cda336806..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ccc567-yz-blue-us.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuCcc567YzBlueUs from './sku-ccc567-yz-blue-us'; - -describe(`with skuCcc567YzBlueUs preset and us-warehouse channel`, () => { - it(`should return a skuCcc567YzBlueUs preset`, () => { - const skuCcc567YzBlueUsPreset = - skuCcc567YzBlueUs().build(); - expect(skuCcc567YzBlueUsPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "ccc567-yz-blue-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "ccc567-yz-blue", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuCcc567YzBlueUs preset when built for graphql`, () => { - const skuCcc567YzBlueUsPresetGraphql = - skuCcc567YzBlueUs().buildGraphql(); - expect(skuCcc567YzBlueUsPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "ccc567-yz-blue-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "ccc567-yz-blue", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ccc567-yz-blue-us.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ccc567-yz-blue-us.ts deleted file mode 100644 index 1de6c7b06..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ccc567-yz-blue-us.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const usWarehouse = ChannelDraft.presets.sampleDataB2B - .usWarehouse() - .build(); - -const ccc567Yz02 = ProductVariantDraft.presets.sampleDataB2B - .ccc567Yz02() - .build(); - -const skuCcc567YzBlueUs = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${ccc567Yz02.sku}-${usWarehouse.key}`) - .sku(ccc567Yz02.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(usWarehouse.key)); - -export default skuCcc567YzBlueUs; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ccc567-yz-green-default.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ccc567-yz-green-default.spec.ts deleted file mode 100644 index e1c6246e2..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ccc567-yz-green-default.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuCcc567YzGreenDefault from './sku-ccc567-yz-green-default'; - -describe(`with skuCcc567YzGreenDefault preset and default-warehouse channel`, () => { - it(`should return a skuCcc567YzGreenDefault preset`, () => { - const skuCcc567YzGreenDefaultPreset = - skuCcc567YzGreenDefault().build(); - expect(skuCcc567YzGreenDefaultPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "ccc567-yz-green-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "ccc567-yz-green", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuCcc567YzGreenDefault preset when built for graphql`, () => { - const skuCcc567YzGreenDefaultPresetGraphql = - skuCcc567YzGreenDefault().buildGraphql(); - expect(skuCcc567YzGreenDefaultPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "ccc567-yz-green-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "ccc567-yz-green", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ccc567-yz-green-default.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ccc567-yz-green-default.ts deleted file mode 100644 index f6f7b5158..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ccc567-yz-green-default.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const defaultWarehouse = ChannelDraft.presets.sampleDataB2B - .defaultWarehouse() - .build(); - -const ccc567Yz03 = ProductVariantDraft.presets.sampleDataB2B - .ccc567Yz03() - .build(); - -const skuCcc567YzGreenDefault = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${ccc567Yz03.sku}-${defaultWarehouse.key}`) - .sku(ccc567Yz03.sku!) - .quantityOnStock(1000) - .supplyChannel( - KeyReferenceDraft.presets.channel().key(defaultWarehouse.key) - ); - -export default skuCcc567YzGreenDefault; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ccc567-yz-green-eu.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ccc567-yz-green-eu.spec.ts deleted file mode 100644 index 3381a1a30..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ccc567-yz-green-eu.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuCcc567YzGreenEu from './sku-ccc567-yz-green-eu'; - -describe(`with skuCcc567YzGreenEu preset and eu-warehouse channel`, () => { - it(`should return a skuCcc567YzGreenEu preset`, () => { - const skuCcc567YzGreenEuPreset = - skuCcc567YzGreenEu().build(); - expect(skuCcc567YzGreenEuPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "ccc567-yz-green-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "ccc567-yz-green", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuCcc567YzGreenEu preset when built for graphql`, () => { - const skuCcc567YzGreenEuPresetGraphql = - skuCcc567YzGreenEu().buildGraphql(); - expect(skuCcc567YzGreenEuPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "ccc567-yz-green-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "ccc567-yz-green", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ccc567-yz-green-eu.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ccc567-yz-green-eu.ts deleted file mode 100644 index f246c84cf..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ccc567-yz-green-eu.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const euWarehouse = ChannelDraft.presets.sampleDataB2B - .euWarehouse() - .build(); - -const ccc567Yz03 = ProductVariantDraft.presets.sampleDataB2B - .ccc567Yz03() - .build(); - -const skuCcc567YzGreenEu = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${ccc567Yz03.sku}-${euWarehouse.key}`) - .sku(ccc567Yz03.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(euWarehouse.key)); - -export default skuCcc567YzGreenEu; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ccc567-yz-green-us.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ccc567-yz-green-us.spec.ts deleted file mode 100644 index 570209a61..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ccc567-yz-green-us.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuCcc567YzGreenUs from './sku-ccc567-yz-green-us'; - -describe(`with skuCcc567YzGreenUs preset and us-warehouse channel`, () => { - it(`should return a skuCcc567YzGreenUs preset`, () => { - const skuCcc567YzGreenUsPreset = - skuCcc567YzGreenUs().build(); - expect(skuCcc567YzGreenUsPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "ccc567-yz-green-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "ccc567-yz-green", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuCcc567YzGreenUs preset when built for graphql`, () => { - const skuCcc567YzGreenUsPresetGraphql = - skuCcc567YzGreenUs().buildGraphql(); - expect(skuCcc567YzGreenUsPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "ccc567-yz-green-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "ccc567-yz-green", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ccc567-yz-green-us.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ccc567-yz-green-us.ts deleted file mode 100644 index a24f162e0..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ccc567-yz-green-us.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const usWarehouse = ChannelDraft.presets.sampleDataB2B - .usWarehouse() - .build(); - -const ccc567Yz03 = ProductVariantDraft.presets.sampleDataB2B - .ccc567Yz03() - .build(); - -const skuCcc567YzGreenUs = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${ccc567Yz03.sku}-${usWarehouse.key}`) - .sku(ccc567Yz03.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(usWarehouse.key)); - -export default skuCcc567YzGreenUs; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ccc567-yz-red-default.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ccc567-yz-red-default.spec.ts deleted file mode 100644 index 61467530a..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ccc567-yz-red-default.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuCcc567YzRedDefault from './sku-ccc567-yz-red-default'; - -describe(`with skuCcc567YzRedDefault preset and default-warehouse channel`, () => { - it(`should return a skuCcc567YzRedDefault preset`, () => { - const skuCcc567YzRedDefaultPreset = - skuCcc567YzRedDefault().build(); - expect(skuCcc567YzRedDefaultPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "ccc567-yz-red-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "ccc567-yz-red", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuCcc567YzRedDefault preset when built for graphql`, () => { - const skuCcc567YzRedDefaultPresetGraphql = - skuCcc567YzRedDefault().buildGraphql(); - expect(skuCcc567YzRedDefaultPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "ccc567-yz-red-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "ccc567-yz-red", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ccc567-yz-red-default.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ccc567-yz-red-default.ts deleted file mode 100644 index 8c2faad2e..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ccc567-yz-red-default.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const defaultWarehouse = ChannelDraft.presets.sampleDataB2B - .defaultWarehouse() - .build(); - -const ccc567Yz01 = ProductVariantDraft.presets.sampleDataB2B - .ccc567Yz01() - .build(); - -const skuCcc567YzRedDefault = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${ccc567Yz01.sku}-${defaultWarehouse.key}`) - .sku(ccc567Yz01.sku!) - .quantityOnStock(1000) - .supplyChannel( - KeyReferenceDraft.presets.channel().key(defaultWarehouse.key) - ); - -export default skuCcc567YzRedDefault; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ccc567-yz-red-eu.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ccc567-yz-red-eu.spec.ts deleted file mode 100644 index 4606f4e71..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ccc567-yz-red-eu.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuCcc567YzRedEu from './sku-ccc567-yz-red-eu'; - -describe(`with skuCcc567YzRedEu preset and eu-warehouse channel`, () => { - it(`should return a skuCcc567YzRedEu preset`, () => { - const skuCcc567YzRedEuPreset = - skuCcc567YzRedEu().build(); - expect(skuCcc567YzRedEuPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "ccc567-yz-red-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "ccc567-yz-red", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuCcc567YzRedEu preset when built for graphql`, () => { - const skuCcc567YzRedEuPresetGraphql = - skuCcc567YzRedEu().buildGraphql(); - expect(skuCcc567YzRedEuPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "ccc567-yz-red-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "ccc567-yz-red", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ccc567-yz-red-eu.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ccc567-yz-red-eu.ts deleted file mode 100644 index 30894c99d..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ccc567-yz-red-eu.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const euWarehouse = ChannelDraft.presets.sampleDataB2B - .euWarehouse() - .build(); - -const ccc567Yz01 = ProductVariantDraft.presets.sampleDataB2B - .ccc567Yz01() - .build(); - -const skuCcc567YzRedEu = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${ccc567Yz01.sku}-${euWarehouse.key}`) - .sku(ccc567Yz01.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(euWarehouse.key)); - -export default skuCcc567YzRedEu; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ccc567-yz-red-us.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ccc567-yz-red-us.spec.ts deleted file mode 100644 index 3b20f8993..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ccc567-yz-red-us.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuCcc567YzRedUs from './sku-ccc567-yz-red-us'; - -describe(`with skuCcc567YzRedUs preset and us-warehouse channel`, () => { - it(`should return a skuCcc567YzRedUs preset`, () => { - const skuCcc567YzRedUsPreset = - skuCcc567YzRedUs().build(); - expect(skuCcc567YzRedUsPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "ccc567-yz-red-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "ccc567-yz-red", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuCcc567YzRedUs preset when built for graphql`, () => { - const skuCcc567YzRedUsPresetGraphql = - skuCcc567YzRedUs().buildGraphql(); - expect(skuCcc567YzRedUsPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "ccc567-yz-red-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "ccc567-yz-red", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ccc567-yz-red-us.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ccc567-yz-red-us.ts deleted file mode 100644 index b9562f0ed..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ccc567-yz-red-us.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const usWarehouse = ChannelDraft.presets.sampleDataB2B - .usWarehouse() - .build(); - -const ccc567Yz01 = ProductVariantDraft.presets.sampleDataB2B - .ccc567Yz01() - .build(); - -const skuCcc567YzRedUs = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${ccc567Yz01.sku}-${usWarehouse.key}`) - .sku(ccc567Yz01.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(usWarehouse.key)); - -export default skuCcc567YzRedUs; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-d-234-wx-2015-default-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-d-234-wx-2015-default-warehouse.spec.ts new file mode 100644 index 000000000..642013b77 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-d-234-wx-2015-default-warehouse.spec.ts @@ -0,0 +1,40 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuD234Wx2015DefaultWarehouse preset`, () => { + it(`should return a skuD234Wx2015DefaultWarehouse preset when built for rest`, () => { + const skuD234Wx2015DefaultWarehousePreset = InventoryEntryDraftRest.presets + .skuD234Wx2015DefaultWarehouse() + .build(); + expect(skuD234Wx2015DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuD234Wx2015DefaultWarehouse preset when built for graphql`, () => { + const skuD234Wx2015DefaultWarehousePreset = + InventoryEntryDraftGraphql.presets + .skuD234Wx2015DefaultWarehouse() + .build(); + expect(skuD234Wx2015DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuD234Wx2015DefaultWarehouse preset when built for legacy rest`, () => { + const skuD234Wx2015DefaultWarehousePreset = InventoryEntryDraft.presets + .skuD234Wx2015DefaultWarehouse() + .buildRest(); + expect(skuD234Wx2015DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuD234Wx2015DefaultWarehouse preset when built for legacy graphql`, () => { + const skuD234Wx2015DefaultWarehousePreset = InventoryEntryDraft.presets + .skuD234Wx2015DefaultWarehouse() + .buildGraphql(); + expect(skuD234Wx2015DefaultWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-d-234-wx-2015-default-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-d-234-wx-2015-default-warehouse.ts new file mode 100644 index 000000000..4f96cb4ce --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-d-234-wx-2015-default-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .defaultWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .d234Wx01() + .build(); + +const skuD234Wx2015DefaultWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('d234-wx-2015-default-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuD234Wx2015DefaultWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-d-234-wx-2015-eu-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-d-234-wx-2015-eu-warehouse.spec.ts new file mode 100644 index 000000000..4d8571d15 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-d-234-wx-2015-eu-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuD234Wx2015EuWarehouse preset`, () => { + it(`should return a skuD234Wx2015EuWarehouse preset when built for rest`, () => { + const skuD234Wx2015EuWarehousePreset = InventoryEntryDraftRest.presets + .skuD234Wx2015EuWarehouse() + .build(); + expect(skuD234Wx2015EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuD234Wx2015EuWarehouse preset when built for graphql`, () => { + const skuD234Wx2015EuWarehousePreset = InventoryEntryDraftGraphql.presets + .skuD234Wx2015EuWarehouse() + .build(); + expect(skuD234Wx2015EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuD234Wx2015EuWarehouse preset when built for legacy rest`, () => { + const skuD234Wx2015EuWarehousePreset = InventoryEntryDraft.presets + .skuD234Wx2015EuWarehouse() + .buildRest(); + expect(skuD234Wx2015EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuD234Wx2015EuWarehouse preset when built for legacy graphql`, () => { + const skuD234Wx2015EuWarehousePreset = InventoryEntryDraft.presets + .skuD234Wx2015EuWarehouse() + .buildGraphql(); + expect(skuD234Wx2015EuWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-d-234-wx-2015-eu-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-d-234-wx-2015-eu-warehouse.ts new file mode 100644 index 000000000..ed4aa8345 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-d-234-wx-2015-eu-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .euWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .d234Wx01() + .build(); + +const skuD234Wx2015EuWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('d234-wx-2015-eu-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuD234Wx2015EuWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-d-234-wx-2015-us-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-d-234-wx-2015-us-warehouse.spec.ts new file mode 100644 index 000000000..146a351a8 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-d-234-wx-2015-us-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuD234Wx2015UsWarehouse preset`, () => { + it(`should return a skuD234Wx2015UsWarehouse preset when built for rest`, () => { + const skuD234Wx2015UsWarehousePreset = InventoryEntryDraftRest.presets + .skuD234Wx2015UsWarehouse() + .build(); + expect(skuD234Wx2015UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuD234Wx2015UsWarehouse preset when built for graphql`, () => { + const skuD234Wx2015UsWarehousePreset = InventoryEntryDraftGraphql.presets + .skuD234Wx2015UsWarehouse() + .build(); + expect(skuD234Wx2015UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuD234Wx2015UsWarehouse preset when built for legacy rest`, () => { + const skuD234Wx2015UsWarehousePreset = InventoryEntryDraft.presets + .skuD234Wx2015UsWarehouse() + .buildRest(); + expect(skuD234Wx2015UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuD234Wx2015UsWarehouse preset when built for legacy graphql`, () => { + const skuD234Wx2015UsWarehousePreset = InventoryEntryDraft.presets + .skuD234Wx2015UsWarehouse() + .buildGraphql(); + expect(skuD234Wx2015UsWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-d-234-wx-2015-us-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-d-234-wx-2015-us-warehouse.ts new file mode 100644 index 000000000..83b3787cd --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-d-234-wx-2015-us-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .usWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .d234Wx01() + .build(); + +const skuD234Wx2015UsWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('d234-wx-2015-us-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuD234Wx2015UsWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-d-234-wx-2019-default-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-d-234-wx-2019-default-warehouse.spec.ts new file mode 100644 index 000000000..f4d5209bc --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-d-234-wx-2019-default-warehouse.spec.ts @@ -0,0 +1,40 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuD234Wx2019DefaultWarehouse preset`, () => { + it(`should return a skuD234Wx2019DefaultWarehouse preset when built for rest`, () => { + const skuD234Wx2019DefaultWarehousePreset = InventoryEntryDraftRest.presets + .skuD234Wx2019DefaultWarehouse() + .build(); + expect(skuD234Wx2019DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuD234Wx2019DefaultWarehouse preset when built for graphql`, () => { + const skuD234Wx2019DefaultWarehousePreset = + InventoryEntryDraftGraphql.presets + .skuD234Wx2019DefaultWarehouse() + .build(); + expect(skuD234Wx2019DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuD234Wx2019DefaultWarehouse preset when built for legacy rest`, () => { + const skuD234Wx2019DefaultWarehousePreset = InventoryEntryDraft.presets + .skuD234Wx2019DefaultWarehouse() + .buildRest(); + expect(skuD234Wx2019DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuD234Wx2019DefaultWarehouse preset when built for legacy graphql`, () => { + const skuD234Wx2019DefaultWarehousePreset = InventoryEntryDraft.presets + .skuD234Wx2019DefaultWarehouse() + .buildGraphql(); + expect(skuD234Wx2019DefaultWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-d-234-wx-2019-default-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-d-234-wx-2019-default-warehouse.ts new file mode 100644 index 000000000..fddc587c2 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-d-234-wx-2019-default-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .defaultWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .d234Wx02() + .build(); + +const skuD234Wx2019DefaultWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('d234-wx-2019-default-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuD234Wx2019DefaultWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-d-234-wx-2019-eu-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-d-234-wx-2019-eu-warehouse.spec.ts new file mode 100644 index 000000000..faad4b7ee --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-d-234-wx-2019-eu-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuD234Wx2019EuWarehouse preset`, () => { + it(`should return a skuD234Wx2019EuWarehouse preset when built for rest`, () => { + const skuD234Wx2019EuWarehousePreset = InventoryEntryDraftRest.presets + .skuD234Wx2019EuWarehouse() + .build(); + expect(skuD234Wx2019EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuD234Wx2019EuWarehouse preset when built for graphql`, () => { + const skuD234Wx2019EuWarehousePreset = InventoryEntryDraftGraphql.presets + .skuD234Wx2019EuWarehouse() + .build(); + expect(skuD234Wx2019EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuD234Wx2019EuWarehouse preset when built for legacy rest`, () => { + const skuD234Wx2019EuWarehousePreset = InventoryEntryDraft.presets + .skuD234Wx2019EuWarehouse() + .buildRest(); + expect(skuD234Wx2019EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuD234Wx2019EuWarehouse preset when built for legacy graphql`, () => { + const skuD234Wx2019EuWarehousePreset = InventoryEntryDraft.presets + .skuD234Wx2019EuWarehouse() + .buildGraphql(); + expect(skuD234Wx2019EuWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-d-234-wx-2019-eu-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-d-234-wx-2019-eu-warehouse.ts new file mode 100644 index 000000000..2f338d53f --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-d-234-wx-2019-eu-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .euWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .d234Wx02() + .build(); + +const skuD234Wx2019EuWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('d234-wx-2019-eu-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuD234Wx2019EuWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-d-234-wx-2019-us-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-d-234-wx-2019-us-warehouse.spec.ts new file mode 100644 index 000000000..446991214 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-d-234-wx-2019-us-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuD234Wx2019UsWarehouse preset`, () => { + it(`should return a skuD234Wx2019UsWarehouse preset when built for rest`, () => { + const skuD234Wx2019UsWarehousePreset = InventoryEntryDraftRest.presets + .skuD234Wx2019UsWarehouse() + .build(); + expect(skuD234Wx2019UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuD234Wx2019UsWarehouse preset when built for graphql`, () => { + const skuD234Wx2019UsWarehousePreset = InventoryEntryDraftGraphql.presets + .skuD234Wx2019UsWarehouse() + .build(); + expect(skuD234Wx2019UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuD234Wx2019UsWarehouse preset when built for legacy rest`, () => { + const skuD234Wx2019UsWarehousePreset = InventoryEntryDraft.presets + .skuD234Wx2019UsWarehouse() + .buildRest(); + expect(skuD234Wx2019UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuD234Wx2019UsWarehouse preset when built for legacy graphql`, () => { + const skuD234Wx2019UsWarehousePreset = InventoryEntryDraft.presets + .skuD234Wx2019UsWarehouse() + .buildGraphql(); + expect(skuD234Wx2019UsWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-d-234-wx-2019-us-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-d-234-wx-2019-us-warehouse.ts new file mode 100644 index 000000000..cd2d6c1a6 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-d-234-wx-2019-us-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .usWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .d234Wx02() + .build(); + +const skuD234Wx2019UsWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('d234-wx-2019-us-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuD234Wx2019UsWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-d-234-wx-2023-default-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-d-234-wx-2023-default-warehouse.spec.ts new file mode 100644 index 000000000..c8e619c1e --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-d-234-wx-2023-default-warehouse.spec.ts @@ -0,0 +1,40 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuD234Wx2023DefaultWarehouse preset`, () => { + it(`should return a skuD234Wx2023DefaultWarehouse preset when built for rest`, () => { + const skuD234Wx2023DefaultWarehousePreset = InventoryEntryDraftRest.presets + .skuD234Wx2023DefaultWarehouse() + .build(); + expect(skuD234Wx2023DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuD234Wx2023DefaultWarehouse preset when built for graphql`, () => { + const skuD234Wx2023DefaultWarehousePreset = + InventoryEntryDraftGraphql.presets + .skuD234Wx2023DefaultWarehouse() + .build(); + expect(skuD234Wx2023DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuD234Wx2023DefaultWarehouse preset when built for legacy rest`, () => { + const skuD234Wx2023DefaultWarehousePreset = InventoryEntryDraft.presets + .skuD234Wx2023DefaultWarehouse() + .buildRest(); + expect(skuD234Wx2023DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuD234Wx2023DefaultWarehouse preset when built for legacy graphql`, () => { + const skuD234Wx2023DefaultWarehousePreset = InventoryEntryDraft.presets + .skuD234Wx2023DefaultWarehouse() + .buildGraphql(); + expect(skuD234Wx2023DefaultWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-d-234-wx-2023-default-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-d-234-wx-2023-default-warehouse.ts new file mode 100644 index 000000000..099b1a70f --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-d-234-wx-2023-default-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .defaultWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .d234Wx03() + .build(); + +const skuD234Wx2023DefaultWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('d234-wx-2023-default-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuD234Wx2023DefaultWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-d-234-wx-2023-eu-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-d-234-wx-2023-eu-warehouse.spec.ts new file mode 100644 index 000000000..457b4b675 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-d-234-wx-2023-eu-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuD234Wx2023EuWarehouse preset`, () => { + it(`should return a skuD234Wx2023EuWarehouse preset when built for rest`, () => { + const skuD234Wx2023EuWarehousePreset = InventoryEntryDraftRest.presets + .skuD234Wx2023EuWarehouse() + .build(); + expect(skuD234Wx2023EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuD234Wx2023EuWarehouse preset when built for graphql`, () => { + const skuD234Wx2023EuWarehousePreset = InventoryEntryDraftGraphql.presets + .skuD234Wx2023EuWarehouse() + .build(); + expect(skuD234Wx2023EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuD234Wx2023EuWarehouse preset when built for legacy rest`, () => { + const skuD234Wx2023EuWarehousePreset = InventoryEntryDraft.presets + .skuD234Wx2023EuWarehouse() + .buildRest(); + expect(skuD234Wx2023EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuD234Wx2023EuWarehouse preset when built for legacy graphql`, () => { + const skuD234Wx2023EuWarehousePreset = InventoryEntryDraft.presets + .skuD234Wx2023EuWarehouse() + .buildGraphql(); + expect(skuD234Wx2023EuWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-d-234-wx-2023-eu-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-d-234-wx-2023-eu-warehouse.ts new file mode 100644 index 000000000..62ee9ffe3 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-d-234-wx-2023-eu-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .euWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .d234Wx03() + .build(); + +const skuD234Wx2023EuWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('d234-wx-2023-eu-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuD234Wx2023EuWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-d-234-wx-2023-us-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-d-234-wx-2023-us-warehouse.spec.ts new file mode 100644 index 000000000..f523467a6 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-d-234-wx-2023-us-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuD234Wx2023UsWarehouse preset`, () => { + it(`should return a skuD234Wx2023UsWarehouse preset when built for rest`, () => { + const skuD234Wx2023UsWarehousePreset = InventoryEntryDraftRest.presets + .skuD234Wx2023UsWarehouse() + .build(); + expect(skuD234Wx2023UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuD234Wx2023UsWarehouse preset when built for graphql`, () => { + const skuD234Wx2023UsWarehousePreset = InventoryEntryDraftGraphql.presets + .skuD234Wx2023UsWarehouse() + .build(); + expect(skuD234Wx2023UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuD234Wx2023UsWarehouse preset when built for legacy rest`, () => { + const skuD234Wx2023UsWarehousePreset = InventoryEntryDraft.presets + .skuD234Wx2023UsWarehouse() + .buildRest(); + expect(skuD234Wx2023UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuD234Wx2023UsWarehouse preset when built for legacy graphql`, () => { + const skuD234Wx2023UsWarehousePreset = InventoryEntryDraft.presets + .skuD234Wx2023UsWarehouse() + .buildGraphql(); + expect(skuD234Wx2023UsWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-d-234-wx-2023-us-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-d-234-wx-2023-us-warehouse.ts new file mode 100644 index 000000000..3cea7048e --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-d-234-wx-2023-us-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .usWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .d234Wx03() + .build(); + +const skuD234Wx2023UsWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('d234-wx-2023-us-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuD234Wx2023UsWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-d234-wx-2015-default.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-d234-wx-2015-default.spec.ts deleted file mode 100644 index d418e504d..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-d234-wx-2015-default.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuD234Wx2015Default from './sku-d234-wx-2015-default'; - -describe(`with skuD234Wx2015Default preset and default-warehouse channel`, () => { - it(`should return a skuD234Wx2015Default preset`, () => { - const skuD234Wx2015DefaultPreset = - skuD234Wx2015Default().build(); - expect(skuD234Wx2015DefaultPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "d234-wx-2015-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "d234-wx-2015", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuD234Wx2015Default preset when built for graphql`, () => { - const skuD234Wx2015DefaultPresetGraphql = - skuD234Wx2015Default().buildGraphql(); - expect(skuD234Wx2015DefaultPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "d234-wx-2015-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "d234-wx-2015", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-d234-wx-2015-default.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-d234-wx-2015-default.ts deleted file mode 100644 index 0c8651185..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-d234-wx-2015-default.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const defaultWarehouse = ChannelDraft.presets.sampleDataB2B - .defaultWarehouse() - .build(); - -const d234Wx01 = ProductVariantDraft.presets.sampleDataB2B - .d234Wx01() - .build(); - -const skuD234Wx2015Default = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${d234Wx01.sku}-${defaultWarehouse.key}`) - .sku(d234Wx01.sku!) - .quantityOnStock(1000) - .supplyChannel( - KeyReferenceDraft.presets.channel().key(defaultWarehouse.key) - ); - -export default skuD234Wx2015Default; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-d234-wx-2015-eu.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-d234-wx-2015-eu.spec.ts deleted file mode 100644 index bd6d1d6ee..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-d234-wx-2015-eu.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuD234Wx2015Eu from './sku-d234-wx-2015-eu'; - -describe(`with skuD234Wx2015Eu preset and eu-warehouse channel`, () => { - it(`should return a skuD234Wx2015Eu preset`, () => { - const skuD234Wx2015EuPreset = - skuD234Wx2015Eu().build(); - expect(skuD234Wx2015EuPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "d234-wx-2015-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "d234-wx-2015", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuD234Wx2015Eu preset when built for graphql`, () => { - const skuD234Wx2015EuPresetGraphql = - skuD234Wx2015Eu().buildGraphql(); - expect(skuD234Wx2015EuPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "d234-wx-2015-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "d234-wx-2015", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-d234-wx-2015-eu.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-d234-wx-2015-eu.ts deleted file mode 100644 index 9caef3429..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-d234-wx-2015-eu.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const euWarehouse = ChannelDraft.presets.sampleDataB2B - .euWarehouse() - .build(); - -const d234Wx01 = ProductVariantDraft.presets.sampleDataB2B - .d234Wx01() - .build(); - -const skuD234Wx2015Eu = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${d234Wx01.sku}-${euWarehouse.key}`) - .sku(d234Wx01.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(euWarehouse.key)); - -export default skuD234Wx2015Eu; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-d234-wx-2015-us.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-d234-wx-2015-us.spec.ts deleted file mode 100644 index 3ebefc122..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-d234-wx-2015-us.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuD234Wx2015Us from './sku-d234-wx-2015-us'; - -describe(`with skuD234Wx2015Us preset and us-warehouse channel`, () => { - it(`should return a skuD234Wx2015Us preset`, () => { - const skuD234Wx2015UsPreset = - skuD234Wx2015Us().build(); - expect(skuD234Wx2015UsPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "d234-wx-2015-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "d234-wx-2015", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuD234Wx2015Us preset when built for graphql`, () => { - const skuD234Wx2015UsPresetGraphql = - skuD234Wx2015Us().buildGraphql(); - expect(skuD234Wx2015UsPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "d234-wx-2015-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "d234-wx-2015", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-d234-wx-2015-us.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-d234-wx-2015-us.ts deleted file mode 100644 index 780c8fd19..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-d234-wx-2015-us.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const usWarehouse = ChannelDraft.presets.sampleDataB2B - .usWarehouse() - .build(); - -const d234Wx01 = ProductVariantDraft.presets.sampleDataB2B - .d234Wx01() - .build(); - -const skuD234Wx2015Us = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${d234Wx01.sku}-${usWarehouse.key}`) - .sku(d234Wx01.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(usWarehouse.key)); - -export default skuD234Wx2015Us; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-d234-wx-2019-default.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-d234-wx-2019-default.spec.ts deleted file mode 100644 index 90a256bac..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-d234-wx-2019-default.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuD234Wx2019Default from './sku-d234-wx-2019-default'; - -describe(`with skuD234Wx2019Default preset and default-warehouse channel`, () => { - it(`should return a skuD234Wx2019Default preset`, () => { - const skuD234Wx2019DefaultPreset = - skuD234Wx2019Default().build(); - expect(skuD234Wx2019DefaultPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "d234-wx-2019-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "d234-wx-2019", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuD234Wx2019Default preset when built for graphql`, () => { - const skuD234Wx2019DefaultPresetGraphql = - skuD234Wx2019Default().buildGraphql(); - expect(skuD234Wx2019DefaultPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "d234-wx-2019-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "d234-wx-2019", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-d234-wx-2019-default.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-d234-wx-2019-default.ts deleted file mode 100644 index 1188a4875..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-d234-wx-2019-default.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const defaultWarehouse = ChannelDraft.presets.sampleDataB2B - .defaultWarehouse() - .build(); - -const d234Wx02 = ProductVariantDraft.presets.sampleDataB2B - .d234Wx02() - .build(); - -const skuD234Wx2019Default = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${d234Wx02.sku}-${defaultWarehouse.key}`) - .sku(d234Wx02.sku!) - .quantityOnStock(1000) - .supplyChannel( - KeyReferenceDraft.presets.channel().key(defaultWarehouse.key) - ); - -export default skuD234Wx2019Default; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-d234-wx-2019-eu.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-d234-wx-2019-eu.spec.ts deleted file mode 100644 index f133e8942..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-d234-wx-2019-eu.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuD234Wx2019Eu from './sku-d234-wx-2019-eu'; - -describe(`with skuD234Wx2019Eu preset and eu-warehouse channel`, () => { - it(`should return a skuD234Wx2019Eu preset`, () => { - const skuD234Wx2019EuPreset = - skuD234Wx2019Eu().build(); - expect(skuD234Wx2019EuPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "d234-wx-2019-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "d234-wx-2019", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuD234Wx2019Eu preset when built for graphql`, () => { - const skuD234Wx2019EuPresetGraphql = - skuD234Wx2019Eu().buildGraphql(); - expect(skuD234Wx2019EuPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "d234-wx-2019-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "d234-wx-2019", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-d234-wx-2019-eu.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-d234-wx-2019-eu.ts deleted file mode 100644 index 94c5ef634..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-d234-wx-2019-eu.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const euWarehouse = ChannelDraft.presets.sampleDataB2B - .euWarehouse() - .build(); - -const d234Wx02 = ProductVariantDraft.presets.sampleDataB2B - .d234Wx02() - .build(); - -const skuD234Wx2019Eu = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${d234Wx02.sku}-${euWarehouse.key}`) - .sku(d234Wx02.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(euWarehouse.key)); - -export default skuD234Wx2019Eu; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-d234-wx-2019-us.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-d234-wx-2019-us.spec.ts deleted file mode 100644 index b8f5c7971..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-d234-wx-2019-us.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuD234Wx2019Us from './sku-d234-wx-2019-us'; - -describe(`with skuD234Wx2019Us preset and us-warehouse channel`, () => { - it(`should return a skuD234Wx2019Us preset`, () => { - const skuD234Wx2019UsPreset = - skuD234Wx2019Us().build(); - expect(skuD234Wx2019UsPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "d234-wx-2019-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "d234-wx-2019", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuD234Wx2019Us preset when built for graphql`, () => { - const skuD234Wx2019UsPresetGraphql = - skuD234Wx2019Us().buildGraphql(); - expect(skuD234Wx2019UsPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "d234-wx-2019-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "d234-wx-2019", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-d234-wx-2019-us.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-d234-wx-2019-us.ts deleted file mode 100644 index 29cb83536..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-d234-wx-2019-us.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const usWarehouse = ChannelDraft.presets.sampleDataB2B - .usWarehouse() - .build(); - -const d234Wx02 = ProductVariantDraft.presets.sampleDataB2B - .d234Wx02() - .build(); - -const skuD234Wx2019Us = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${d234Wx02.sku}-${usWarehouse.key}`) - .sku(d234Wx02.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(usWarehouse.key)); - -export default skuD234Wx2019Us; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-d234-wx-2023-default.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-d234-wx-2023-default.spec.ts deleted file mode 100644 index 7f6287456..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-d234-wx-2023-default.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuD234Wx2023Default from './sku-d234-wx-2023-default'; - -describe(`with skuD234Wx2023Default preset and default-warehouse channel`, () => { - it(`should return a skuD234Wx2023Default preset`, () => { - const skuD234Wx2023DefaultPreset = - skuD234Wx2023Default().build(); - expect(skuD234Wx2023DefaultPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "d234-wx-2023-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "d234-wx-2023", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuD234Wx2023Default preset when built for graphql`, () => { - const skuD234Wx2023DefaultPresetGraphql = - skuD234Wx2023Default().buildGraphql(); - expect(skuD234Wx2023DefaultPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "d234-wx-2023-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "d234-wx-2023", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-d234-wx-2023-default.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-d234-wx-2023-default.ts deleted file mode 100644 index 29ac56142..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-d234-wx-2023-default.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const defaultWarehouse = ChannelDraft.presets.sampleDataB2B - .defaultWarehouse() - .build(); - -const d234Wx03 = ProductVariantDraft.presets.sampleDataB2B - .d234Wx03() - .build(); - -const skuD234Wx2023Default = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${d234Wx03.sku}-${defaultWarehouse.key}`) - .sku(d234Wx03.sku!) - .quantityOnStock(1000) - .supplyChannel( - KeyReferenceDraft.presets.channel().key(defaultWarehouse.key) - ); - -export default skuD234Wx2023Default; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-d234-wx-2023-eu.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-d234-wx-2023-eu.spec.ts deleted file mode 100644 index 9d5262d61..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-d234-wx-2023-eu.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuD234Wx2023Eu from './sku-d234-wx-2023-eu'; - -describe(`with skuD234Wx2023Eu preset and eu-warehouse channel`, () => { - it(`should return a skuD234Wx2023Eu preset`, () => { - const skuD234Wx2023EuPreset = - skuD234Wx2023Eu().build(); - expect(skuD234Wx2023EuPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "d234-wx-2023-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "d234-wx-2023", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuD234Wx2023Eu preset when built for graphql`, () => { - const skuD234Wx2023EuPresetGraphql = - skuD234Wx2023Eu().buildGraphql(); - expect(skuD234Wx2023EuPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "d234-wx-2023-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "d234-wx-2023", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-d234-wx-2023-eu.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-d234-wx-2023-eu.ts deleted file mode 100644 index b143e109c..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-d234-wx-2023-eu.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const euWarehouse = ChannelDraft.presets.sampleDataB2B - .euWarehouse() - .build(); - -const d234Wx03 = ProductVariantDraft.presets.sampleDataB2B - .d234Wx03() - .build(); - -const skuD234Wx2023Eu = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${d234Wx03.sku}-${euWarehouse.key}`) - .sku(d234Wx03.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(euWarehouse.key)); - -export default skuD234Wx2023Eu; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-d234-wx-2023-us.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-d234-wx-2023-us.spec.ts deleted file mode 100644 index c16b367b4..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-d234-wx-2023-us.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuD234Wx2023Us from './sku-d234-wx-2023-us'; - -describe(`with skuD234Wx2023Us preset and us-warehouse channel`, () => { - it(`should return a skuD234Wx2023Us preset`, () => { - const skuD234Wx2023UsPreset = - skuD234Wx2023Us().build(); - expect(skuD234Wx2023UsPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "d234-wx-2023-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "d234-wx-2023", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuD234Wx2023Us preset when built for graphql`, () => { - const skuD234Wx2023UsPresetGraphql = - skuD234Wx2023Us().buildGraphql(); - expect(skuD234Wx2023UsPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "d234-wx-2023-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "d234-wx-2023", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-d234-wx-2023-us.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-d234-wx-2023-us.ts deleted file mode 100644 index 7918ed4f0..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-d234-wx-2023-us.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const usWarehouse = ChannelDraft.presets.sampleDataB2B - .usWarehouse() - .build(); - -const d234Wx03 = ProductVariantDraft.presets.sampleDataB2B - .d234Wx03() - .build(); - -const skuD234Wx2023Us = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${d234Wx03.sku}-${usWarehouse.key}`) - .sku(d234Wx03.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(usWarehouse.key)); - -export default skuD234Wx2023Us; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-dd-234-wx-2015-default-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-dd-234-wx-2015-default-warehouse.spec.ts new file mode 100644 index 000000000..82193ffd6 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-dd-234-wx-2015-default-warehouse.spec.ts @@ -0,0 +1,40 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuDd234Wx2015DefaultWarehouse preset`, () => { + it(`should return a skuDd234Wx2015DefaultWarehouse preset when built for rest`, () => { + const skuDd234Wx2015DefaultWarehousePreset = InventoryEntryDraftRest.presets + .skuDd234Wx2015DefaultWarehouse() + .build(); + expect(skuDd234Wx2015DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuDd234Wx2015DefaultWarehouse preset when built for graphql`, () => { + const skuDd234Wx2015DefaultWarehousePreset = + InventoryEntryDraftGraphql.presets + .skuDd234Wx2015DefaultWarehouse() + .build(); + expect(skuDd234Wx2015DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuDd234Wx2015DefaultWarehouse preset when built for legacy rest`, () => { + const skuDd234Wx2015DefaultWarehousePreset = InventoryEntryDraft.presets + .skuDd234Wx2015DefaultWarehouse() + .buildRest(); + expect(skuDd234Wx2015DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuDd234Wx2015DefaultWarehouse preset when built for legacy graphql`, () => { + const skuDd234Wx2015DefaultWarehousePreset = InventoryEntryDraft.presets + .skuDd234Wx2015DefaultWarehouse() + .buildGraphql(); + expect(skuDd234Wx2015DefaultWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-dd-234-wx-2015-default-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-dd-234-wx-2015-default-warehouse.ts new file mode 100644 index 000000000..453943d2b --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-dd-234-wx-2015-default-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .defaultWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .dd234Wx01() + .build(); + +const skuDd234Wx2015DefaultWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('dd234-wx-2015-default-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuDd234Wx2015DefaultWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-dd-234-wx-2015-eu-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-dd-234-wx-2015-eu-warehouse.spec.ts new file mode 100644 index 000000000..a23ce1936 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-dd-234-wx-2015-eu-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuDd234Wx2015EuWarehouse preset`, () => { + it(`should return a skuDd234Wx2015EuWarehouse preset when built for rest`, () => { + const skuDd234Wx2015EuWarehousePreset = InventoryEntryDraftRest.presets + .skuDd234Wx2015EuWarehouse() + .build(); + expect(skuDd234Wx2015EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuDd234Wx2015EuWarehouse preset when built for graphql`, () => { + const skuDd234Wx2015EuWarehousePreset = InventoryEntryDraftGraphql.presets + .skuDd234Wx2015EuWarehouse() + .build(); + expect(skuDd234Wx2015EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuDd234Wx2015EuWarehouse preset when built for legacy rest`, () => { + const skuDd234Wx2015EuWarehousePreset = InventoryEntryDraft.presets + .skuDd234Wx2015EuWarehouse() + .buildRest(); + expect(skuDd234Wx2015EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuDd234Wx2015EuWarehouse preset when built for legacy graphql`, () => { + const skuDd234Wx2015EuWarehousePreset = InventoryEntryDraft.presets + .skuDd234Wx2015EuWarehouse() + .buildGraphql(); + expect(skuDd234Wx2015EuWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-dd-234-wx-2015-eu-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-dd-234-wx-2015-eu-warehouse.ts new file mode 100644 index 000000000..4447f8c51 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-dd-234-wx-2015-eu-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .euWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .dd234Wx01() + .build(); + +const skuDd234Wx2015EuWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('dd234-wx-2015-eu-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuDd234Wx2015EuWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-dd-234-wx-2015-us-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-dd-234-wx-2015-us-warehouse.spec.ts new file mode 100644 index 000000000..b04185586 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-dd-234-wx-2015-us-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuDd234Wx2015UsWarehouse preset`, () => { + it(`should return a skuDd234Wx2015UsWarehouse preset when built for rest`, () => { + const skuDd234Wx2015UsWarehousePreset = InventoryEntryDraftRest.presets + .skuDd234Wx2015UsWarehouse() + .build(); + expect(skuDd234Wx2015UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuDd234Wx2015UsWarehouse preset when built for graphql`, () => { + const skuDd234Wx2015UsWarehousePreset = InventoryEntryDraftGraphql.presets + .skuDd234Wx2015UsWarehouse() + .build(); + expect(skuDd234Wx2015UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuDd234Wx2015UsWarehouse preset when built for legacy rest`, () => { + const skuDd234Wx2015UsWarehousePreset = InventoryEntryDraft.presets + .skuDd234Wx2015UsWarehouse() + .buildRest(); + expect(skuDd234Wx2015UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuDd234Wx2015UsWarehouse preset when built for legacy graphql`, () => { + const skuDd234Wx2015UsWarehousePreset = InventoryEntryDraft.presets + .skuDd234Wx2015UsWarehouse() + .buildGraphql(); + expect(skuDd234Wx2015UsWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-dd-234-wx-2015-us-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-dd-234-wx-2015-us-warehouse.ts new file mode 100644 index 000000000..b26fd013c --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-dd-234-wx-2015-us-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .usWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .dd234Wx01() + .build(); + +const skuDd234Wx2015UsWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('dd234-wx-2015-us-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuDd234Wx2015UsWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-dd-234-wx-2019-default-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-dd-234-wx-2019-default-warehouse.spec.ts new file mode 100644 index 000000000..305a615c7 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-dd-234-wx-2019-default-warehouse.spec.ts @@ -0,0 +1,40 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuDd234Wx2019DefaultWarehouse preset`, () => { + it(`should return a skuDd234Wx2019DefaultWarehouse preset when built for rest`, () => { + const skuDd234Wx2019DefaultWarehousePreset = InventoryEntryDraftRest.presets + .skuDd234Wx2019DefaultWarehouse() + .build(); + expect(skuDd234Wx2019DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuDd234Wx2019DefaultWarehouse preset when built for graphql`, () => { + const skuDd234Wx2019DefaultWarehousePreset = + InventoryEntryDraftGraphql.presets + .skuDd234Wx2019DefaultWarehouse() + .build(); + expect(skuDd234Wx2019DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuDd234Wx2019DefaultWarehouse preset when built for legacy rest`, () => { + const skuDd234Wx2019DefaultWarehousePreset = InventoryEntryDraft.presets + .skuDd234Wx2019DefaultWarehouse() + .buildRest(); + expect(skuDd234Wx2019DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuDd234Wx2019DefaultWarehouse preset when built for legacy graphql`, () => { + const skuDd234Wx2019DefaultWarehousePreset = InventoryEntryDraft.presets + .skuDd234Wx2019DefaultWarehouse() + .buildGraphql(); + expect(skuDd234Wx2019DefaultWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-dd-234-wx-2019-default-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-dd-234-wx-2019-default-warehouse.ts new file mode 100644 index 000000000..d4e1744de --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-dd-234-wx-2019-default-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .defaultWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .dd234Wx02() + .build(); + +const skuDd234Wx2019DefaultWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('dd234-wx-2019-default-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuDd234Wx2019DefaultWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-dd-234-wx-2019-eu-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-dd-234-wx-2019-eu-warehouse.spec.ts new file mode 100644 index 000000000..4caa8bd11 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-dd-234-wx-2019-eu-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuDd234Wx2019EuWarehouse preset`, () => { + it(`should return a skuDd234Wx2019EuWarehouse preset when built for rest`, () => { + const skuDd234Wx2019EuWarehousePreset = InventoryEntryDraftRest.presets + .skuDd234Wx2019EuWarehouse() + .build(); + expect(skuDd234Wx2019EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuDd234Wx2019EuWarehouse preset when built for graphql`, () => { + const skuDd234Wx2019EuWarehousePreset = InventoryEntryDraftGraphql.presets + .skuDd234Wx2019EuWarehouse() + .build(); + expect(skuDd234Wx2019EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuDd234Wx2019EuWarehouse preset when built for legacy rest`, () => { + const skuDd234Wx2019EuWarehousePreset = InventoryEntryDraft.presets + .skuDd234Wx2019EuWarehouse() + .buildRest(); + expect(skuDd234Wx2019EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuDd234Wx2019EuWarehouse preset when built for legacy graphql`, () => { + const skuDd234Wx2019EuWarehousePreset = InventoryEntryDraft.presets + .skuDd234Wx2019EuWarehouse() + .buildGraphql(); + expect(skuDd234Wx2019EuWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-dd-234-wx-2019-eu-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-dd-234-wx-2019-eu-warehouse.ts new file mode 100644 index 000000000..e3f95bd54 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-dd-234-wx-2019-eu-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .euWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .dd234Wx02() + .build(); + +const skuDd234Wx2019EuWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('dd234-wx-2019-eu-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuDd234Wx2019EuWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-dd-234-wx-2019-us-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-dd-234-wx-2019-us-warehouse.spec.ts new file mode 100644 index 000000000..c782e1785 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-dd-234-wx-2019-us-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuDd234Wx2019UsWarehouse preset`, () => { + it(`should return a skuDd234Wx2019UsWarehouse preset when built for rest`, () => { + const skuDd234Wx2019UsWarehousePreset = InventoryEntryDraftRest.presets + .skuDd234Wx2019UsWarehouse() + .build(); + expect(skuDd234Wx2019UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuDd234Wx2019UsWarehouse preset when built for graphql`, () => { + const skuDd234Wx2019UsWarehousePreset = InventoryEntryDraftGraphql.presets + .skuDd234Wx2019UsWarehouse() + .build(); + expect(skuDd234Wx2019UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuDd234Wx2019UsWarehouse preset when built for legacy rest`, () => { + const skuDd234Wx2019UsWarehousePreset = InventoryEntryDraft.presets + .skuDd234Wx2019UsWarehouse() + .buildRest(); + expect(skuDd234Wx2019UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuDd234Wx2019UsWarehouse preset when built for legacy graphql`, () => { + const skuDd234Wx2019UsWarehousePreset = InventoryEntryDraft.presets + .skuDd234Wx2019UsWarehouse() + .buildGraphql(); + expect(skuDd234Wx2019UsWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-dd-234-wx-2019-us-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-dd-234-wx-2019-us-warehouse.ts new file mode 100644 index 000000000..f4255f694 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-dd-234-wx-2019-us-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .usWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .dd234Wx02() + .build(); + +const skuDd234Wx2019UsWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('dd234-wx-2019-us-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuDd234Wx2019UsWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-dd-234-wx-2023-default-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-dd-234-wx-2023-default-warehouse.spec.ts new file mode 100644 index 000000000..7ffc46045 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-dd-234-wx-2023-default-warehouse.spec.ts @@ -0,0 +1,40 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuDd234Wx2023DefaultWarehouse preset`, () => { + it(`should return a skuDd234Wx2023DefaultWarehouse preset when built for rest`, () => { + const skuDd234Wx2023DefaultWarehousePreset = InventoryEntryDraftRest.presets + .skuDd234Wx2023DefaultWarehouse() + .build(); + expect(skuDd234Wx2023DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuDd234Wx2023DefaultWarehouse preset when built for graphql`, () => { + const skuDd234Wx2023DefaultWarehousePreset = + InventoryEntryDraftGraphql.presets + .skuDd234Wx2023DefaultWarehouse() + .build(); + expect(skuDd234Wx2023DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuDd234Wx2023DefaultWarehouse preset when built for legacy rest`, () => { + const skuDd234Wx2023DefaultWarehousePreset = InventoryEntryDraft.presets + .skuDd234Wx2023DefaultWarehouse() + .buildRest(); + expect(skuDd234Wx2023DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuDd234Wx2023DefaultWarehouse preset when built for legacy graphql`, () => { + const skuDd234Wx2023DefaultWarehousePreset = InventoryEntryDraft.presets + .skuDd234Wx2023DefaultWarehouse() + .buildGraphql(); + expect(skuDd234Wx2023DefaultWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-dd-234-wx-2023-default-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-dd-234-wx-2023-default-warehouse.ts new file mode 100644 index 000000000..8baef76ef --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-dd-234-wx-2023-default-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .defaultWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .dd234Wx03() + .build(); + +const skuDd234Wx2023DefaultWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('dd234-wx-2023-default-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuDd234Wx2023DefaultWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-dd-234-wx-2023-eu-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-dd-234-wx-2023-eu-warehouse.spec.ts new file mode 100644 index 000000000..5a7ae4e38 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-dd-234-wx-2023-eu-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuDd234Wx2023EuWarehouse preset`, () => { + it(`should return a skuDd234Wx2023EuWarehouse preset when built for rest`, () => { + const skuDd234Wx2023EuWarehousePreset = InventoryEntryDraftRest.presets + .skuDd234Wx2023EuWarehouse() + .build(); + expect(skuDd234Wx2023EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuDd234Wx2023EuWarehouse preset when built for graphql`, () => { + const skuDd234Wx2023EuWarehousePreset = InventoryEntryDraftGraphql.presets + .skuDd234Wx2023EuWarehouse() + .build(); + expect(skuDd234Wx2023EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuDd234Wx2023EuWarehouse preset when built for legacy rest`, () => { + const skuDd234Wx2023EuWarehousePreset = InventoryEntryDraft.presets + .skuDd234Wx2023EuWarehouse() + .buildRest(); + expect(skuDd234Wx2023EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuDd234Wx2023EuWarehouse preset when built for legacy graphql`, () => { + const skuDd234Wx2023EuWarehousePreset = InventoryEntryDraft.presets + .skuDd234Wx2023EuWarehouse() + .buildGraphql(); + expect(skuDd234Wx2023EuWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-dd-234-wx-2023-eu-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-dd-234-wx-2023-eu-warehouse.ts new file mode 100644 index 000000000..40955e6e6 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-dd-234-wx-2023-eu-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .euWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .dd234Wx03() + .build(); + +const skuDd234Wx2023EuWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('dd234-wx-2023-eu-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuDd234Wx2023EuWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-dd-234-wx-2023-us-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-dd-234-wx-2023-us-warehouse.spec.ts new file mode 100644 index 000000000..00ed5cead --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-dd-234-wx-2023-us-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuDd234Wx2023UsWarehouse preset`, () => { + it(`should return a skuDd234Wx2023UsWarehouse preset when built for rest`, () => { + const skuDd234Wx2023UsWarehousePreset = InventoryEntryDraftRest.presets + .skuDd234Wx2023UsWarehouse() + .build(); + expect(skuDd234Wx2023UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuDd234Wx2023UsWarehouse preset when built for graphql`, () => { + const skuDd234Wx2023UsWarehousePreset = InventoryEntryDraftGraphql.presets + .skuDd234Wx2023UsWarehouse() + .build(); + expect(skuDd234Wx2023UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuDd234Wx2023UsWarehouse preset when built for legacy rest`, () => { + const skuDd234Wx2023UsWarehousePreset = InventoryEntryDraft.presets + .skuDd234Wx2023UsWarehouse() + .buildRest(); + expect(skuDd234Wx2023UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuDd234Wx2023UsWarehouse preset when built for legacy graphql`, () => { + const skuDd234Wx2023UsWarehousePreset = InventoryEntryDraft.presets + .skuDd234Wx2023UsWarehouse() + .buildGraphql(); + expect(skuDd234Wx2023UsWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-dd-234-wx-2023-us-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-dd-234-wx-2023-us-warehouse.ts new file mode 100644 index 000000000..e32214d92 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-dd-234-wx-2023-us-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .usWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .dd234Wx03() + .build(); + +const skuDd234Wx2023UsWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('dd234-wx-2023-us-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuDd234Wx2023UsWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-dd234-wx-2015-default.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-dd234-wx-2015-default.spec.ts deleted file mode 100644 index 75f059ee3..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-dd234-wx-2015-default.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuDd234Wx2015Default from './sku-dd234-wx-2015-default'; - -describe(`with skuDd234Wx2015Default preset and default-warehouse channel`, () => { - it(`should return a skuDd234Wx2015Default preset`, () => { - const skuDd234Wx2015DefaultPreset = - skuDd234Wx2015Default().build(); - expect(skuDd234Wx2015DefaultPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "dd234-wx-2015-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "dd234-wx-2015", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuDd234Wx2015Default preset when built for graphql`, () => { - const skuDd234Wx2015DefaultPresetGraphql = - skuDd234Wx2015Default().buildGraphql(); - expect(skuDd234Wx2015DefaultPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "dd234-wx-2015-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "dd234-wx-2015", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-dd234-wx-2015-default.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-dd234-wx-2015-default.ts deleted file mode 100644 index 4823d236a..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-dd234-wx-2015-default.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const defaultWarehouse = ChannelDraft.presets.sampleDataB2B - .defaultWarehouse() - .build(); - -const dd234Wx01 = ProductVariantDraft.presets.sampleDataB2B - .dd234Wx01() - .build(); - -const skuDd234Wx2015Default = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${dd234Wx01.sku}-${defaultWarehouse.key}`) - .sku(dd234Wx01.sku!) - .quantityOnStock(1000) - .supplyChannel( - KeyReferenceDraft.presets.channel().key(defaultWarehouse.key) - ); - -export default skuDd234Wx2015Default; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-dd234-wx-2015-eu.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-dd234-wx-2015-eu.spec.ts deleted file mode 100644 index ef8547786..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-dd234-wx-2015-eu.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuDd234Wx2015Eu from './sku-dd234-wx-2015-eu'; - -describe(`with skuDd234Wx2015Eu preset and eu-warehouse channel`, () => { - it(`should return a skuDd234Wx2015Eu preset`, () => { - const skuDd234Wx2015EuPreset = - skuDd234Wx2015Eu().build(); - expect(skuDd234Wx2015EuPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "dd234-wx-2015-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "dd234-wx-2015", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuDd234Wx2015Eu preset when built for graphql`, () => { - const skuDd234Wx2015EuPresetGraphql = - skuDd234Wx2015Eu().buildGraphql(); - expect(skuDd234Wx2015EuPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "dd234-wx-2015-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "dd234-wx-2015", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-dd234-wx-2015-eu.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-dd234-wx-2015-eu.ts deleted file mode 100644 index a242d3a54..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-dd234-wx-2015-eu.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const euWarehouse = ChannelDraft.presets.sampleDataB2B - .euWarehouse() - .build(); - -const dd234Wx01 = ProductVariantDraft.presets.sampleDataB2B - .dd234Wx01() - .build(); - -const skuDd234Wx2015Eu = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${dd234Wx01.sku}-${euWarehouse.key}`) - .sku(dd234Wx01.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(euWarehouse.key)); - -export default skuDd234Wx2015Eu; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-dd234-wx-2015-us.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-dd234-wx-2015-us.spec.ts deleted file mode 100644 index b1e57cbe2..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-dd234-wx-2015-us.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuDd234Wx2015Us from './sku-dd234-wx-2015-us'; - -describe(`with skuDd234Wx2015Us preset and us-warehouse channel`, () => { - it(`should return a skuDd234Wx2015Us preset`, () => { - const skuDd234Wx2015UsPreset = - skuDd234Wx2015Us().build(); - expect(skuDd234Wx2015UsPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "dd234-wx-2015-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "dd234-wx-2015", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuDd234Wx2015Us preset when built for graphql`, () => { - const skuDd234Wx2015UsPresetGraphql = - skuDd234Wx2015Us().buildGraphql(); - expect(skuDd234Wx2015UsPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "dd234-wx-2015-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "dd234-wx-2015", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-dd234-wx-2015-us.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-dd234-wx-2015-us.ts deleted file mode 100644 index f30cb82a9..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-dd234-wx-2015-us.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const usWarehouse = ChannelDraft.presets.sampleDataB2B - .usWarehouse() - .build(); - -const dd234Wx01 = ProductVariantDraft.presets.sampleDataB2B - .dd234Wx01() - .build(); - -const skuDd234Wx2015Us = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${dd234Wx01.sku}-${usWarehouse.key}`) - .sku(dd234Wx01.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(usWarehouse.key)); - -export default skuDd234Wx2015Us; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-dd234-wx-2019-default.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-dd234-wx-2019-default.spec.ts deleted file mode 100644 index 83a653b7f..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-dd234-wx-2019-default.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuDd234Wx2019Default from './sku-dd234-wx-2019-default'; - -describe(`with skuDd234Wx2019Default preset and default-warehouse channel`, () => { - it(`should return a skuDd234Wx2019Default preset`, () => { - const skuDd234Wx2019DefaultPreset = - skuDd234Wx2019Default().build(); - expect(skuDd234Wx2019DefaultPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "dd234-wx-2019-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "dd234-wx-2019", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuDd234Wx2019Default preset when built for graphql`, () => { - const skuDd234Wx2019DefaultPresetGraphql = - skuDd234Wx2019Default().buildGraphql(); - expect(skuDd234Wx2019DefaultPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "dd234-wx-2019-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "dd234-wx-2019", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-dd234-wx-2019-default.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-dd234-wx-2019-default.ts deleted file mode 100644 index b194fb17f..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-dd234-wx-2019-default.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const defaultWarehouse = ChannelDraft.presets.sampleDataB2B - .defaultWarehouse() - .build(); - -const dd234Wx02 = ProductVariantDraft.presets.sampleDataB2B - .dd234Wx02() - .build(); - -const skuDd234Wx2019Default = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${dd234Wx02.sku}-${defaultWarehouse.key}`) - .sku(dd234Wx02.sku!) - .quantityOnStock(1000) - .supplyChannel( - KeyReferenceDraft.presets.channel().key(defaultWarehouse.key) - ); - -export default skuDd234Wx2019Default; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-dd234-wx-2019-eu.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-dd234-wx-2019-eu.spec.ts deleted file mode 100644 index ffd230eb1..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-dd234-wx-2019-eu.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuDd234Wx2019Eu from './sku-dd234-wx-2019-eu'; - -describe(`with skuDd234Wx2019Eu preset and eu-warehouse channel`, () => { - it(`should return a skuDd234Wx2019Eu preset`, () => { - const skuDd234Wx2019EuPreset = - skuDd234Wx2019Eu().build(); - expect(skuDd234Wx2019EuPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "dd234-wx-2019-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "dd234-wx-2019", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuDd234Wx2019Eu preset when built for graphql`, () => { - const skuDd234Wx2019EuPresetGraphql = - skuDd234Wx2019Eu().buildGraphql(); - expect(skuDd234Wx2019EuPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "dd234-wx-2019-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "dd234-wx-2019", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-dd234-wx-2019-eu.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-dd234-wx-2019-eu.ts deleted file mode 100644 index 66a43873e..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-dd234-wx-2019-eu.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const euWarehouse = ChannelDraft.presets.sampleDataB2B - .euWarehouse() - .build(); - -const dd234Wx02 = ProductVariantDraft.presets.sampleDataB2B - .dd234Wx02() - .build(); - -const skuDd234Wx2019Eu = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${dd234Wx02.sku}-${euWarehouse.key}`) - .sku(dd234Wx02.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(euWarehouse.key)); - -export default skuDd234Wx2019Eu; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-dd234-wx-2019-us.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-dd234-wx-2019-us.spec.ts deleted file mode 100644 index f0e6d8bfa..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-dd234-wx-2019-us.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuDd234Wx2019Us from './sku-dd234-wx-2019-us'; - -describe(`with skuDd234Wx2019Us preset and us-warehouse channel`, () => { - it(`should return a skuDd234Wx2019Us preset`, () => { - const skuDd234Wx2019UsPreset = - skuDd234Wx2019Us().build(); - expect(skuDd234Wx2019UsPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "dd234-wx-2019-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "dd234-wx-2019", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuDd234Wx2019Us preset when built for graphql`, () => { - const skuDd234Wx2019UsPresetGraphql = - skuDd234Wx2019Us().buildGraphql(); - expect(skuDd234Wx2019UsPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "dd234-wx-2019-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "dd234-wx-2019", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-dd234-wx-2019-us.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-dd234-wx-2019-us.ts deleted file mode 100644 index fde3e5d0a..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-dd234-wx-2019-us.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const usWarehouse = ChannelDraft.presets.sampleDataB2B - .usWarehouse() - .build(); - -const dd234Wx02 = ProductVariantDraft.presets.sampleDataB2B - .dd234Wx02() - .build(); - -const skuDd234Wx2019Us = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${dd234Wx02.sku}-${usWarehouse.key}`) - .sku(dd234Wx02.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(usWarehouse.key)); - -export default skuDd234Wx2019Us; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-dd234-wx-2023-default.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-dd234-wx-2023-default.spec.ts deleted file mode 100644 index 032005d5f..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-dd234-wx-2023-default.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuDd234Wx2023Default from './sku-dd234-wx-2023-default'; - -describe(`with skuDd234Wx2023Default preset and default-warehouse channel`, () => { - it(`should return a skuDd234Wx2023Default preset`, () => { - const skuDd234Wx2023DefaultPreset = - skuDd234Wx2023Default().build(); - expect(skuDd234Wx2023DefaultPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "dd234-wx-2023-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "dd234-wx-2023", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuDd234Wx2023Default preset when built for graphql`, () => { - const skuDd234Wx2023DefaultPresetGraphql = - skuDd234Wx2023Default().buildGraphql(); - expect(skuDd234Wx2023DefaultPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "dd234-wx-2023-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "dd234-wx-2023", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-dd234-wx-2023-default.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-dd234-wx-2023-default.ts deleted file mode 100644 index 0d86ea328..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-dd234-wx-2023-default.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const defaultWarehouse = ChannelDraft.presets.sampleDataB2B - .defaultWarehouse() - .build(); - -const dd234Wx03 = ProductVariantDraft.presets.sampleDataB2B - .dd234Wx03() - .build(); - -const skuDd234Wx2023Default = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${dd234Wx03.sku}-${defaultWarehouse.key}`) - .sku(dd234Wx03.sku!) - .quantityOnStock(1000) - .supplyChannel( - KeyReferenceDraft.presets.channel().key(defaultWarehouse.key) - ); - -export default skuDd234Wx2023Default; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-dd234-wx-2023-eu.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-dd234-wx-2023-eu.spec.ts deleted file mode 100644 index 518b10efc..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-dd234-wx-2023-eu.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuDd234Wx2023Eu from './sku-dd234-wx-2023-eu'; - -describe(`with skuDd234Wx2023Eu preset and eu-warehouse channel`, () => { - it(`should return a skuDd234Wx2023Eu preset`, () => { - const skuDd234Wx2023EuPreset = - skuDd234Wx2023Eu().build(); - expect(skuDd234Wx2023EuPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "dd234-wx-2023-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "dd234-wx-2023", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuDd234Wx2023Eu preset when built for graphql`, () => { - const skuDd234Wx2023EuPresetGraphql = - skuDd234Wx2023Eu().buildGraphql(); - expect(skuDd234Wx2023EuPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "dd234-wx-2023-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "dd234-wx-2023", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-dd234-wx-2023-eu.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-dd234-wx-2023-eu.ts deleted file mode 100644 index ebf8cfa3e..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-dd234-wx-2023-eu.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const euWarehouse = ChannelDraft.presets.sampleDataB2B - .euWarehouse() - .build(); - -const dd234Wx03 = ProductVariantDraft.presets.sampleDataB2B - .dd234Wx03() - .build(); - -const skuDd234Wx2023Eu = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${dd234Wx03.sku}-${euWarehouse.key}`) - .sku(dd234Wx03.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(euWarehouse.key)); - -export default skuDd234Wx2023Eu; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-dd234-wx-2023-us.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-dd234-wx-2023-us.spec.ts deleted file mode 100644 index 8a2a3e570..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-dd234-wx-2023-us.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuDd234Wx2023Us from './sku-dd234-wx-2023-us'; - -describe(`with skuDd234Wx2023Us preset and us-warehouse channel`, () => { - it(`should return a skuDd234Wx2023Us preset`, () => { - const skuDd234Wx2023UsPreset = - skuDd234Wx2023Us().build(); - expect(skuDd234Wx2023UsPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "dd234-wx-2023-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "dd234-wx-2023", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuDd234Wx2023Us preset when built for graphql`, () => { - const skuDd234Wx2023UsPresetGraphql = - skuDd234Wx2023Us().buildGraphql(); - expect(skuDd234Wx2023UsPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "dd234-wx-2023-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "dd234-wx-2023", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-dd234-wx-2023-us.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-dd234-wx-2023-us.ts deleted file mode 100644 index a57187b52..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-dd234-wx-2023-us.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const usWarehouse = ChannelDraft.presets.sampleDataB2B - .usWarehouse() - .build(); - -const dd234Wx03 = ProductVariantDraft.presets.sampleDataB2B - .dd234Wx03() - .build(); - -const skuDd234Wx2023Us = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${dd234Wx03.sku}-${usWarehouse.key}`) - .sku(dd234Wx03.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(usWarehouse.key)); - -export default skuDd234Wx2023Us; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ddd-890-op-blue-default-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ddd-890-op-blue-default-warehouse.spec.ts new file mode 100644 index 000000000..b62d3dd7c --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ddd-890-op-blue-default-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuDdd890OpBlueDefaultWarehouse preset`, () => { + it(`should return a skuDdd890OpBlueDefaultWarehouse preset when built for rest`, () => { + const skuDdd890OpBlueDefaultWarehousePreset = + InventoryEntryDraftRest.presets.skuDdd890OpBlueDefaultWarehouse().build(); + expect(skuDdd890OpBlueDefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuDdd890OpBlueDefaultWarehouse preset when built for graphql`, () => { + const skuDdd890OpBlueDefaultWarehousePreset = + InventoryEntryDraftGraphql.presets + .skuDdd890OpBlueDefaultWarehouse() + .build(); + expect(skuDdd890OpBlueDefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuDdd890OpBlueDefaultWarehouse preset when built for legacy rest`, () => { + const skuDdd890OpBlueDefaultWarehousePreset = InventoryEntryDraft.presets + .skuDdd890OpBlueDefaultWarehouse() + .buildRest(); + expect(skuDdd890OpBlueDefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuDdd890OpBlueDefaultWarehouse preset when built for legacy graphql`, () => { + const skuDdd890OpBlueDefaultWarehousePreset = InventoryEntryDraft.presets + .skuDdd890OpBlueDefaultWarehouse() + .buildGraphql(); + expect(skuDdd890OpBlueDefaultWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ddd-890-op-blue-default-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ddd-890-op-blue-default-warehouse.ts new file mode 100644 index 000000000..7771d7ce0 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ddd-890-op-blue-default-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .defaultWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .ddd890Op02() + .build(); + +const skuDdd890OpBlueDefaultWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('ddd890-op-blue-default-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuDdd890OpBlueDefaultWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ddd-890-op-blue-eu-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ddd-890-op-blue-eu-warehouse.spec.ts new file mode 100644 index 000000000..e9f855b76 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ddd-890-op-blue-eu-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuDdd890OpBlueEuWarehouse preset`, () => { + it(`should return a skuDdd890OpBlueEuWarehouse preset when built for rest`, () => { + const skuDdd890OpBlueEuWarehousePreset = InventoryEntryDraftRest.presets + .skuDdd890OpBlueEuWarehouse() + .build(); + expect(skuDdd890OpBlueEuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuDdd890OpBlueEuWarehouse preset when built for graphql`, () => { + const skuDdd890OpBlueEuWarehousePreset = InventoryEntryDraftGraphql.presets + .skuDdd890OpBlueEuWarehouse() + .build(); + expect(skuDdd890OpBlueEuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuDdd890OpBlueEuWarehouse preset when built for legacy rest`, () => { + const skuDdd890OpBlueEuWarehousePreset = InventoryEntryDraft.presets + .skuDdd890OpBlueEuWarehouse() + .buildRest(); + expect(skuDdd890OpBlueEuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuDdd890OpBlueEuWarehouse preset when built for legacy graphql`, () => { + const skuDdd890OpBlueEuWarehousePreset = InventoryEntryDraft.presets + .skuDdd890OpBlueEuWarehouse() + .buildGraphql(); + expect(skuDdd890OpBlueEuWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ddd-890-op-blue-eu-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ddd-890-op-blue-eu-warehouse.ts new file mode 100644 index 000000000..f627fe81b --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ddd-890-op-blue-eu-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .euWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .ddd890Op02() + .build(); + +const skuDdd890OpBlueEuWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('ddd890-op-blue-eu-warehouse') + .sku(variant.sku!) + .quantityOnStock(999) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuDdd890OpBlueEuWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ddd-890-op-blue-us-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ddd-890-op-blue-us-warehouse.spec.ts new file mode 100644 index 000000000..c648cc174 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ddd-890-op-blue-us-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuDdd890OpBlueUsWarehouse preset`, () => { + it(`should return a skuDdd890OpBlueUsWarehouse preset when built for rest`, () => { + const skuDdd890OpBlueUsWarehousePreset = InventoryEntryDraftRest.presets + .skuDdd890OpBlueUsWarehouse() + .build(); + expect(skuDdd890OpBlueUsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuDdd890OpBlueUsWarehouse preset when built for graphql`, () => { + const skuDdd890OpBlueUsWarehousePreset = InventoryEntryDraftGraphql.presets + .skuDdd890OpBlueUsWarehouse() + .build(); + expect(skuDdd890OpBlueUsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuDdd890OpBlueUsWarehouse preset when built for legacy rest`, () => { + const skuDdd890OpBlueUsWarehousePreset = InventoryEntryDraft.presets + .skuDdd890OpBlueUsWarehouse() + .buildRest(); + expect(skuDdd890OpBlueUsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuDdd890OpBlueUsWarehouse preset when built for legacy graphql`, () => { + const skuDdd890OpBlueUsWarehousePreset = InventoryEntryDraft.presets + .skuDdd890OpBlueUsWarehouse() + .buildGraphql(); + expect(skuDdd890OpBlueUsWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ddd-890-op-blue-us-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ddd-890-op-blue-us-warehouse.ts new file mode 100644 index 000000000..e53e92225 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ddd-890-op-blue-us-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .usWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .ddd890Op02() + .build(); + +const skuDdd890OpBlueUsWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('ddd890-op-blue-us-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuDdd890OpBlueUsWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ddd-890-op-green-default-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ddd-890-op-green-default-warehouse.spec.ts new file mode 100644 index 000000000..2bc5cf18e --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ddd-890-op-green-default-warehouse.spec.ts @@ -0,0 +1,41 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuDdd890OpGreenDefaultWarehouse preset`, () => { + it(`should return a skuDdd890OpGreenDefaultWarehouse preset when built for rest`, () => { + const skuDdd890OpGreenDefaultWarehousePreset = + InventoryEntryDraftRest.presets + .skuDdd890OpGreenDefaultWarehouse() + .build(); + expect(skuDdd890OpGreenDefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuDdd890OpGreenDefaultWarehouse preset when built for graphql`, () => { + const skuDdd890OpGreenDefaultWarehousePreset = + InventoryEntryDraftGraphql.presets + .skuDdd890OpGreenDefaultWarehouse() + .build(); + expect(skuDdd890OpGreenDefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuDdd890OpGreenDefaultWarehouse preset when built for legacy rest`, () => { + const skuDdd890OpGreenDefaultWarehousePreset = InventoryEntryDraft.presets + .skuDdd890OpGreenDefaultWarehouse() + .buildRest(); + expect(skuDdd890OpGreenDefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuDdd890OpGreenDefaultWarehouse preset when built for legacy graphql`, () => { + const skuDdd890OpGreenDefaultWarehousePreset = InventoryEntryDraft.presets + .skuDdd890OpGreenDefaultWarehouse() + .buildGraphql(); + expect(skuDdd890OpGreenDefaultWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ddd-890-op-green-default-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ddd-890-op-green-default-warehouse.ts new file mode 100644 index 000000000..20bd68819 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ddd-890-op-green-default-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .defaultWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .ddd890Op03() + .build(); + +const skuDdd890OpGreenDefaultWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('ddd890-op-green-default-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuDdd890OpGreenDefaultWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ddd-890-op-green-eu-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ddd-890-op-green-eu-warehouse.spec.ts new file mode 100644 index 000000000..18d20fc7e --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ddd-890-op-green-eu-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuDdd890OpGreenEuWarehouse preset`, () => { + it(`should return a skuDdd890OpGreenEuWarehouse preset when built for rest`, () => { + const skuDdd890OpGreenEuWarehousePreset = InventoryEntryDraftRest.presets + .skuDdd890OpGreenEuWarehouse() + .build(); + expect(skuDdd890OpGreenEuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuDdd890OpGreenEuWarehouse preset when built for graphql`, () => { + const skuDdd890OpGreenEuWarehousePreset = InventoryEntryDraftGraphql.presets + .skuDdd890OpGreenEuWarehouse() + .build(); + expect(skuDdd890OpGreenEuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuDdd890OpGreenEuWarehouse preset when built for legacy rest`, () => { + const skuDdd890OpGreenEuWarehousePreset = InventoryEntryDraft.presets + .skuDdd890OpGreenEuWarehouse() + .buildRest(); + expect(skuDdd890OpGreenEuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuDdd890OpGreenEuWarehouse preset when built for legacy graphql`, () => { + const skuDdd890OpGreenEuWarehousePreset = InventoryEntryDraft.presets + .skuDdd890OpGreenEuWarehouse() + .buildGraphql(); + expect(skuDdd890OpGreenEuWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ddd-890-op-green-eu-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ddd-890-op-green-eu-warehouse.ts new file mode 100644 index 000000000..3cde05bcd --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ddd-890-op-green-eu-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .euWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .ddd890Op03() + .build(); + +const skuDdd890OpGreenEuWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('ddd890-op-green-eu-warehouse') + .sku(variant.sku!) + .quantityOnStock(999) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuDdd890OpGreenEuWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ddd-890-op-green-us-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ddd-890-op-green-us-warehouse.spec.ts new file mode 100644 index 000000000..a4896ca4f --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ddd-890-op-green-us-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuDdd890OpGreenUsWarehouse preset`, () => { + it(`should return a skuDdd890OpGreenUsWarehouse preset when built for rest`, () => { + const skuDdd890OpGreenUsWarehousePreset = InventoryEntryDraftRest.presets + .skuDdd890OpGreenUsWarehouse() + .build(); + expect(skuDdd890OpGreenUsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuDdd890OpGreenUsWarehouse preset when built for graphql`, () => { + const skuDdd890OpGreenUsWarehousePreset = InventoryEntryDraftGraphql.presets + .skuDdd890OpGreenUsWarehouse() + .build(); + expect(skuDdd890OpGreenUsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuDdd890OpGreenUsWarehouse preset when built for legacy rest`, () => { + const skuDdd890OpGreenUsWarehousePreset = InventoryEntryDraft.presets + .skuDdd890OpGreenUsWarehouse() + .buildRest(); + expect(skuDdd890OpGreenUsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuDdd890OpGreenUsWarehouse preset when built for legacy graphql`, () => { + const skuDdd890OpGreenUsWarehousePreset = InventoryEntryDraft.presets + .skuDdd890OpGreenUsWarehouse() + .buildGraphql(); + expect(skuDdd890OpGreenUsWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ddd-890-op-green-us-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ddd-890-op-green-us-warehouse.ts new file mode 100644 index 000000000..2cc442ad0 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ddd-890-op-green-us-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .usWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .ddd890Op03() + .build(); + +const skuDdd890OpGreenUsWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('ddd890-op-green-us-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuDdd890OpGreenUsWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ddd-890-op-red-default-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ddd-890-op-red-default-warehouse.spec.ts new file mode 100644 index 000000000..d09465ab9 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ddd-890-op-red-default-warehouse.spec.ts @@ -0,0 +1,40 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuDdd890OpRedDefaultWarehouse preset`, () => { + it(`should return a skuDdd890OpRedDefaultWarehouse preset when built for rest`, () => { + const skuDdd890OpRedDefaultWarehousePreset = InventoryEntryDraftRest.presets + .skuDdd890OpRedDefaultWarehouse() + .build(); + expect(skuDdd890OpRedDefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuDdd890OpRedDefaultWarehouse preset when built for graphql`, () => { + const skuDdd890OpRedDefaultWarehousePreset = + InventoryEntryDraftGraphql.presets + .skuDdd890OpRedDefaultWarehouse() + .build(); + expect(skuDdd890OpRedDefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuDdd890OpRedDefaultWarehouse preset when built for legacy rest`, () => { + const skuDdd890OpRedDefaultWarehousePreset = InventoryEntryDraft.presets + .skuDdd890OpRedDefaultWarehouse() + .buildRest(); + expect(skuDdd890OpRedDefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuDdd890OpRedDefaultWarehouse preset when built for legacy graphql`, () => { + const skuDdd890OpRedDefaultWarehousePreset = InventoryEntryDraft.presets + .skuDdd890OpRedDefaultWarehouse() + .buildGraphql(); + expect(skuDdd890OpRedDefaultWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ddd-890-op-red-default-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ddd-890-op-red-default-warehouse.ts new file mode 100644 index 000000000..8d5f04e33 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ddd-890-op-red-default-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .defaultWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .ddd890Op01() + .build(); + +const skuDdd890OpRedDefaultWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('ddd890-op-red-default-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuDdd890OpRedDefaultWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ddd-890-op-red-eu-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ddd-890-op-red-eu-warehouse.spec.ts new file mode 100644 index 000000000..dcef2259a --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ddd-890-op-red-eu-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuDdd890OpRedEuWarehouse preset`, () => { + it(`should return a skuDdd890OpRedEuWarehouse preset when built for rest`, () => { + const skuDdd890OpRedEuWarehousePreset = InventoryEntryDraftRest.presets + .skuDdd890OpRedEuWarehouse() + .build(); + expect(skuDdd890OpRedEuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuDdd890OpRedEuWarehouse preset when built for graphql`, () => { + const skuDdd890OpRedEuWarehousePreset = InventoryEntryDraftGraphql.presets + .skuDdd890OpRedEuWarehouse() + .build(); + expect(skuDdd890OpRedEuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuDdd890OpRedEuWarehouse preset when built for legacy rest`, () => { + const skuDdd890OpRedEuWarehousePreset = InventoryEntryDraft.presets + .skuDdd890OpRedEuWarehouse() + .buildRest(); + expect(skuDdd890OpRedEuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuDdd890OpRedEuWarehouse preset when built for legacy graphql`, () => { + const skuDdd890OpRedEuWarehousePreset = InventoryEntryDraft.presets + .skuDdd890OpRedEuWarehouse() + .buildGraphql(); + expect(skuDdd890OpRedEuWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ddd-890-op-red-eu-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ddd-890-op-red-eu-warehouse.ts new file mode 100644 index 000000000..4cf36ecf6 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ddd-890-op-red-eu-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .euWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .ddd890Op01() + .build(); + +const skuDdd890OpRedEuWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('ddd890-op-red-eu-warehouse') + .sku(variant.sku!) + .quantityOnStock(999) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuDdd890OpRedEuWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ddd-890-op-red-us-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ddd-890-op-red-us-warehouse.spec.ts new file mode 100644 index 000000000..d5b51fc0a --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ddd-890-op-red-us-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuDdd890OpRedUsWarehouse preset`, () => { + it(`should return a skuDdd890OpRedUsWarehouse preset when built for rest`, () => { + const skuDdd890OpRedUsWarehousePreset = InventoryEntryDraftRest.presets + .skuDdd890OpRedUsWarehouse() + .build(); + expect(skuDdd890OpRedUsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuDdd890OpRedUsWarehouse preset when built for graphql`, () => { + const skuDdd890OpRedUsWarehousePreset = InventoryEntryDraftGraphql.presets + .skuDdd890OpRedUsWarehouse() + .build(); + expect(skuDdd890OpRedUsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuDdd890OpRedUsWarehouse preset when built for legacy rest`, () => { + const skuDdd890OpRedUsWarehousePreset = InventoryEntryDraft.presets + .skuDdd890OpRedUsWarehouse() + .buildRest(); + expect(skuDdd890OpRedUsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuDdd890OpRedUsWarehouse preset when built for legacy graphql`, () => { + const skuDdd890OpRedUsWarehousePreset = InventoryEntryDraft.presets + .skuDdd890OpRedUsWarehouse() + .buildGraphql(); + expect(skuDdd890OpRedUsWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ddd-890-op-red-us-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ddd-890-op-red-us-warehouse.ts new file mode 100644 index 000000000..5e72bacc8 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ddd-890-op-red-us-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .usWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .ddd890Op01() + .build(); + +const skuDdd890OpRedUsWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('ddd890-op-red-us-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuDdd890OpRedUsWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ddd890-op-blue-default.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ddd890-op-blue-default.spec.ts deleted file mode 100644 index ebf731633..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ddd890-op-blue-default.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuDdd890OpBlueDefault from './sku-ddd890-op-blue-default'; - -describe(`with skuDdd890OpBlueDefault preset and default-warehouse channel`, () => { - it(`should return a skuDdd890OpBlueDefault preset`, () => { - const skuDdd890OpBlueDefaultPreset = - skuDdd890OpBlueDefault().build(); - expect(skuDdd890OpBlueDefaultPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "ddd890-op-blue-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "ddd890-op-blue", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuDdd890OpBlueDefault preset when built for graphql`, () => { - const skuDdd890OpBlueDefaultPresetGraphql = - skuDdd890OpBlueDefault().buildGraphql(); - expect(skuDdd890OpBlueDefaultPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "ddd890-op-blue-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "ddd890-op-blue", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ddd890-op-blue-default.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ddd890-op-blue-default.ts deleted file mode 100644 index 4db1bb565..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ddd890-op-blue-default.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const defaultWarehouse = ChannelDraft.presets.sampleDataB2B - .defaultWarehouse() - .build(); - -const ddd890Op02 = ProductVariantDraft.presets.sampleDataB2B - .ddd890Op02() - .build(); - -const skuDdd890OpBlueDefault = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${ddd890Op02.sku}-${defaultWarehouse.key}`) - .sku(ddd890Op02.sku!) - .quantityOnStock(1000) - .supplyChannel( - KeyReferenceDraft.presets.channel().key(defaultWarehouse.key) - ); - -export default skuDdd890OpBlueDefault; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ddd890-op-blue-eu.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ddd890-op-blue-eu.spec.ts deleted file mode 100644 index 5c6a3e1e6..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ddd890-op-blue-eu.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuDdd890OpBlueEu from './sku-ddd890-op-blue-eu'; - -describe(`with skuDdd890OpBlueEu preset and eu-warehouse channel`, () => { - it(`should return a skuDdd890OpBlueEu preset`, () => { - const skuDdd890OpBlueEuPreset = - skuDdd890OpBlueEu().build(); - expect(skuDdd890OpBlueEuPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "ddd890-op-blue-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "ddd890-op-blue", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuDdd890OpBlueEu preset when built for graphql`, () => { - const skuDdd890OpBlueEuPresetGraphql = - skuDdd890OpBlueEu().buildGraphql(); - expect(skuDdd890OpBlueEuPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "ddd890-op-blue-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "ddd890-op-blue", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ddd890-op-blue-eu.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ddd890-op-blue-eu.ts deleted file mode 100644 index 70b2bb5f6..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ddd890-op-blue-eu.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const euWarehouse = ChannelDraft.presets.sampleDataB2B - .euWarehouse() - .build(); - -const ddd890Op02 = ProductVariantDraft.presets.sampleDataB2B - .ddd890Op02() - .build(); - -const skuDdd890OpBlueEu = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${ddd890Op02.sku}-${euWarehouse.key}`) - .sku(ddd890Op02.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(euWarehouse.key)); - -export default skuDdd890OpBlueEu; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ddd890-op-blue-us.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ddd890-op-blue-us.spec.ts deleted file mode 100644 index 5f751c4dc..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ddd890-op-blue-us.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuDdd890OpBlueUs from './sku-ddd890-op-blue-us'; - -describe(`with skuDdd890OpBlueUs preset and us-warehouse channel`, () => { - it(`should return a skuDdd890OpBlueUs preset`, () => { - const skuDdd890OpBlueUsPreset = - skuDdd890OpBlueUs().build(); - expect(skuDdd890OpBlueUsPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "ddd890-op-blue-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "ddd890-op-blue", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuDdd890OpBlueUs preset when built for graphql`, () => { - const skuDdd890OpBlueUsPresetGraphql = - skuDdd890OpBlueUs().buildGraphql(); - expect(skuDdd890OpBlueUsPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "ddd890-op-blue-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "ddd890-op-blue", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ddd890-op-blue-us.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ddd890-op-blue-us.ts deleted file mode 100644 index d6b236652..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ddd890-op-blue-us.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const usWarehouse = ChannelDraft.presets.sampleDataB2B - .usWarehouse() - .build(); - -const ddd890Op02 = ProductVariantDraft.presets.sampleDataB2B - .ddd890Op02() - .build(); - -const skuDdd890OpBlueUs = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${ddd890Op02.sku}-${usWarehouse.key}`) - .sku(ddd890Op02.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(usWarehouse.key)); - -export default skuDdd890OpBlueUs; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ddd890-op-green-default.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ddd890-op-green-default.spec.ts deleted file mode 100644 index cbf98ed4b..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ddd890-op-green-default.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuDdd890OpGreenDefault from './sku-ddd890-op-green-default'; - -describe(`with skuDdd890OpGreenDefault preset and default-warehouse channel`, () => { - it(`should return a skuDdd890OpGreenDefault preset`, () => { - const skuDdd890OpGreenDefaultPreset = - skuDdd890OpGreenDefault().build(); - expect(skuDdd890OpGreenDefaultPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "ddd890-op-green-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "ddd890-op-green", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuDdd890OpGreenDefault preset when built for graphql`, () => { - const skuDdd890OpGreenDefaultPresetGraphql = - skuDdd890OpGreenDefault().buildGraphql(); - expect(skuDdd890OpGreenDefaultPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "ddd890-op-green-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "ddd890-op-green", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ddd890-op-green-default.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ddd890-op-green-default.ts deleted file mode 100644 index 3bf60df37..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ddd890-op-green-default.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const defaultWarehouse = ChannelDraft.presets.sampleDataB2B - .defaultWarehouse() - .build(); - -const ddd890Op03 = ProductVariantDraft.presets.sampleDataB2B - .ddd890Op03() - .build(); - -const skuDdd890OpGreenDefault = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${ddd890Op03.sku}-${defaultWarehouse.key}`) - .sku(ddd890Op03.sku!) - .quantityOnStock(1000) - .supplyChannel( - KeyReferenceDraft.presets.channel().key(defaultWarehouse.key) - ); - -export default skuDdd890OpGreenDefault; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ddd890-op-green-eu.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ddd890-op-green-eu.spec.ts deleted file mode 100644 index c1326b4ea..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ddd890-op-green-eu.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuDdd890OpGreenEu from './sku-ddd890-op-green-eu'; - -describe(`with skuDdd890OpGreenEu preset and eu-warehouse channel`, () => { - it(`should return a skuDdd890OpGreenEu preset`, () => { - const skuDdd890OpGreenEuPreset = - skuDdd890OpGreenEu().build(); - expect(skuDdd890OpGreenEuPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "ddd890-op-green-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "ddd890-op-green", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuDdd890OpGreenEu preset when built for graphql`, () => { - const skuDdd890OpGreenEuPresetGraphql = - skuDdd890OpGreenEu().buildGraphql(); - expect(skuDdd890OpGreenEuPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "ddd890-op-green-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "ddd890-op-green", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ddd890-op-green-eu.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ddd890-op-green-eu.ts deleted file mode 100644 index a60997995..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ddd890-op-green-eu.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const euWarehouse = ChannelDraft.presets.sampleDataB2B - .euWarehouse() - .build(); - -const ddd890Op03 = ProductVariantDraft.presets.sampleDataB2B - .ddd890Op03() - .build(); - -const skuDdd890OpGreenEu = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${ddd890Op03.sku}-${euWarehouse.key}`) - .sku(ddd890Op03.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(euWarehouse.key)); - -export default skuDdd890OpGreenEu; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ddd890-op-green-us.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ddd890-op-green-us.spec.ts deleted file mode 100644 index 08ed77dd0..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ddd890-op-green-us.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuDdd890OpGreenUs from './sku-ddd890-op-green-us'; - -describe(`with skuDdd890OpGreenUs preset and us-warehouse channel`, () => { - it(`should return a skuDdd890OpGreenUs preset`, () => { - const skuDdd890OpGreenUsPreset = - skuDdd890OpGreenUs().build(); - expect(skuDdd890OpGreenUsPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "ddd890-op-green-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "ddd890-op-green", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuDdd890OpGreenUs preset when built for graphql`, () => { - const skuDdd890OpGreenUsPresetGraphql = - skuDdd890OpGreenUs().buildGraphql(); - expect(skuDdd890OpGreenUsPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "ddd890-op-green-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "ddd890-op-green", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ddd890-op-green-us.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ddd890-op-green-us.ts deleted file mode 100644 index ce44d010b..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ddd890-op-green-us.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const usWarehouse = ChannelDraft.presets.sampleDataB2B - .usWarehouse() - .build(); - -const ddd890Op03 = ProductVariantDraft.presets.sampleDataB2B - .ddd890Op03() - .build(); - -const skuDdd890OpGreenUs = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${ddd890Op03.sku}-${usWarehouse.key}`) - .sku(ddd890Op03.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(usWarehouse.key)); - -export default skuDdd890OpGreenUs; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ddd890-op-red-default.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ddd890-op-red-default.spec.ts deleted file mode 100644 index febd64e83..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ddd890-op-red-default.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuDdd890OpRedDefault from './sku-ddd890-op-red-default'; - -describe(`with skuDdd890OpRedDefault preset and default-warehouse channel`, () => { - it(`should return a skuDdd890OpRedDefault preset`, () => { - const skuDdd890OpRedDefaultPreset = - skuDdd890OpRedDefault().build(); - expect(skuDdd890OpRedDefaultPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "ddd890-op-red-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "ddd890-op-red", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuDdd890OpRedDefault preset when built for graphql`, () => { - const skuDdd890OpRedDefaultPresetGraphql = - skuDdd890OpRedDefault().buildGraphql(); - expect(skuDdd890OpRedDefaultPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "ddd890-op-red-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "ddd890-op-red", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ddd890-op-red-default.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ddd890-op-red-default.ts deleted file mode 100644 index face0639a..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ddd890-op-red-default.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const defaultWarehouse = ChannelDraft.presets.sampleDataB2B - .defaultWarehouse() - .build(); - -const ddd890Op01 = ProductVariantDraft.presets.sampleDataB2B - .ddd890Op01() - .build(); - -const skuDdd890OpRedDefault = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${ddd890Op01.sku}-${defaultWarehouse.key}`) - .sku(ddd890Op01.sku!) - .quantityOnStock(1000) - .supplyChannel( - KeyReferenceDraft.presets.channel().key(defaultWarehouse.key) - ); - -export default skuDdd890OpRedDefault; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ddd890-op-red-eu.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ddd890-op-red-eu.spec.ts deleted file mode 100644 index 10c577498..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ddd890-op-red-eu.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuDdd890OpRedEu from './sku-ddd890-op-red-eu'; - -describe(`with skuDdd890OpRedEu preset and eu-warehouse channel`, () => { - it(`should return a skuDdd890OpRedEu preset`, () => { - const skuDdd890OpRedEuPreset = - skuDdd890OpRedEu().build(); - expect(skuDdd890OpRedEuPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "ddd890-op-red-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "ddd890-op-red", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuDdd890OpRedEu preset when built for graphql`, () => { - const skuDdd890OpRedEuPresetGraphql = - skuDdd890OpRedEu().buildGraphql(); - expect(skuDdd890OpRedEuPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "ddd890-op-red-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "ddd890-op-red", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ddd890-op-red-eu.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ddd890-op-red-eu.ts deleted file mode 100644 index 229f5f85f..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ddd890-op-red-eu.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const euWarehouse = ChannelDraft.presets.sampleDataB2B - .euWarehouse() - .build(); - -const ddd890Op01 = ProductVariantDraft.presets.sampleDataB2B - .ddd890Op01() - .build(); - -const skuDdd890OpRedEu = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${ddd890Op01.sku}-${euWarehouse.key}`) - .sku(ddd890Op01.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(euWarehouse.key)); - -export default skuDdd890OpRedEu; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ddd890-op-red-us.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ddd890-op-red-us.spec.ts deleted file mode 100644 index f614b8c61..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ddd890-op-red-us.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuDdd890OpRedUs from './sku-ddd890-op-red-us'; - -describe(`with skuDdd890OpRedUs preset and us-warehouse channel`, () => { - it(`should return a skuDdd890OpRedUs preset`, () => { - const skuDdd890OpRedUsPreset = - skuDdd890OpRedUs().build(); - expect(skuDdd890OpRedUsPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "ddd890-op-red-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "ddd890-op-red", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuDdd890OpRedUs preset when built for graphql`, () => { - const skuDdd890OpRedUsPresetGraphql = - skuDdd890OpRedUs().buildGraphql(); - expect(skuDdd890OpRedUsPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "ddd890-op-red-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "ddd890-op-red", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ddd890-op-red-us.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ddd890-op-red-us.ts deleted file mode 100644 index 7680f4b6f..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ddd890-op-red-us.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const usWarehouse = ChannelDraft.presets.sampleDataB2B - .usWarehouse() - .build(); - -const ddd890Op01 = ProductVariantDraft.presets.sampleDataB2B - .ddd890Op01() - .build(); - -const skuDdd890OpRedUs = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${ddd890Op01.sku}-${usWarehouse.key}`) - .sku(ddd890Op01.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(usWarehouse.key)); - -export default skuDdd890OpRedUs; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-e-567-yz-2015-default-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-e-567-yz-2015-default-warehouse.spec.ts new file mode 100644 index 000000000..dbd9e8490 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-e-567-yz-2015-default-warehouse.spec.ts @@ -0,0 +1,40 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuE567Yz2015DefaultWarehouse preset`, () => { + it(`should return a skuE567Yz2015DefaultWarehouse preset when built for rest`, () => { + const skuE567Yz2015DefaultWarehousePreset = InventoryEntryDraftRest.presets + .skuE567Yz2015DefaultWarehouse() + .build(); + expect(skuE567Yz2015DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuE567Yz2015DefaultWarehouse preset when built for graphql`, () => { + const skuE567Yz2015DefaultWarehousePreset = + InventoryEntryDraftGraphql.presets + .skuE567Yz2015DefaultWarehouse() + .build(); + expect(skuE567Yz2015DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuE567Yz2015DefaultWarehouse preset when built for legacy rest`, () => { + const skuE567Yz2015DefaultWarehousePreset = InventoryEntryDraft.presets + .skuE567Yz2015DefaultWarehouse() + .buildRest(); + expect(skuE567Yz2015DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuE567Yz2015DefaultWarehouse preset when built for legacy graphql`, () => { + const skuE567Yz2015DefaultWarehousePreset = InventoryEntryDraft.presets + .skuE567Yz2015DefaultWarehouse() + .buildGraphql(); + expect(skuE567Yz2015DefaultWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-e-567-yz-2015-default-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-e-567-yz-2015-default-warehouse.ts new file mode 100644 index 000000000..40908870d --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-e-567-yz-2015-default-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .defaultWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .e567Yz01() + .build(); + +const skuE567Yz2015DefaultWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('e567-yz-2015-default-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuE567Yz2015DefaultWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-e-567-yz-2015-eu-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-e-567-yz-2015-eu-warehouse.spec.ts new file mode 100644 index 000000000..90992b3fb --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-e-567-yz-2015-eu-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuE567Yz2015EuWarehouse preset`, () => { + it(`should return a skuE567Yz2015EuWarehouse preset when built for rest`, () => { + const skuE567Yz2015EuWarehousePreset = InventoryEntryDraftRest.presets + .skuE567Yz2015EuWarehouse() + .build(); + expect(skuE567Yz2015EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuE567Yz2015EuWarehouse preset when built for graphql`, () => { + const skuE567Yz2015EuWarehousePreset = InventoryEntryDraftGraphql.presets + .skuE567Yz2015EuWarehouse() + .build(); + expect(skuE567Yz2015EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuE567Yz2015EuWarehouse preset when built for legacy rest`, () => { + const skuE567Yz2015EuWarehousePreset = InventoryEntryDraft.presets + .skuE567Yz2015EuWarehouse() + .buildRest(); + expect(skuE567Yz2015EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuE567Yz2015EuWarehouse preset when built for legacy graphql`, () => { + const skuE567Yz2015EuWarehousePreset = InventoryEntryDraft.presets + .skuE567Yz2015EuWarehouse() + .buildGraphql(); + expect(skuE567Yz2015EuWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-e-567-yz-2015-eu-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-e-567-yz-2015-eu-warehouse.ts new file mode 100644 index 000000000..f887716b6 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-e-567-yz-2015-eu-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .euWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .e567Yz01() + .build(); + +const skuE567Yz2015EuWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('e567-yz-2015-eu-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuE567Yz2015EuWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-e-567-yz-2015-us-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-e-567-yz-2015-us-warehouse.spec.ts new file mode 100644 index 000000000..2097ef08c --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-e-567-yz-2015-us-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuE567Yz2015UsWarehouse preset`, () => { + it(`should return a skuE567Yz2015UsWarehouse preset when built for rest`, () => { + const skuE567Yz2015UsWarehousePreset = InventoryEntryDraftRest.presets + .skuE567Yz2015UsWarehouse() + .build(); + expect(skuE567Yz2015UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuE567Yz2015UsWarehouse preset when built for graphql`, () => { + const skuE567Yz2015UsWarehousePreset = InventoryEntryDraftGraphql.presets + .skuE567Yz2015UsWarehouse() + .build(); + expect(skuE567Yz2015UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuE567Yz2015UsWarehouse preset when built for legacy rest`, () => { + const skuE567Yz2015UsWarehousePreset = InventoryEntryDraft.presets + .skuE567Yz2015UsWarehouse() + .buildRest(); + expect(skuE567Yz2015UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuE567Yz2015UsWarehouse preset when built for legacy graphql`, () => { + const skuE567Yz2015UsWarehousePreset = InventoryEntryDraft.presets + .skuE567Yz2015UsWarehouse() + .buildGraphql(); + expect(skuE567Yz2015UsWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-e-567-yz-2015-us-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-e-567-yz-2015-us-warehouse.ts new file mode 100644 index 000000000..1e01360b6 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-e-567-yz-2015-us-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .usWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .e567Yz01() + .build(); + +const skuE567Yz2015UsWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('e567-yz-2015-us-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuE567Yz2015UsWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-e-567-yz-2019-default-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-e-567-yz-2019-default-warehouse.spec.ts new file mode 100644 index 000000000..381b19135 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-e-567-yz-2019-default-warehouse.spec.ts @@ -0,0 +1,40 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuE567Yz2019DefaultWarehouse preset`, () => { + it(`should return a skuE567Yz2019DefaultWarehouse preset when built for rest`, () => { + const skuE567Yz2019DefaultWarehousePreset = InventoryEntryDraftRest.presets + .skuE567Yz2019DefaultWarehouse() + .build(); + expect(skuE567Yz2019DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuE567Yz2019DefaultWarehouse preset when built for graphql`, () => { + const skuE567Yz2019DefaultWarehousePreset = + InventoryEntryDraftGraphql.presets + .skuE567Yz2019DefaultWarehouse() + .build(); + expect(skuE567Yz2019DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuE567Yz2019DefaultWarehouse preset when built for legacy rest`, () => { + const skuE567Yz2019DefaultWarehousePreset = InventoryEntryDraft.presets + .skuE567Yz2019DefaultWarehouse() + .buildRest(); + expect(skuE567Yz2019DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuE567Yz2019DefaultWarehouse preset when built for legacy graphql`, () => { + const skuE567Yz2019DefaultWarehousePreset = InventoryEntryDraft.presets + .skuE567Yz2019DefaultWarehouse() + .buildGraphql(); + expect(skuE567Yz2019DefaultWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-e-567-yz-2019-default-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-e-567-yz-2019-default-warehouse.ts new file mode 100644 index 000000000..8f711c179 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-e-567-yz-2019-default-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .defaultWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .e567Yz02() + .build(); + +const skuE567Yz2019DefaultWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('e567-yz-2019-default-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuE567Yz2019DefaultWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-e-567-yz-2019-eu-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-e-567-yz-2019-eu-warehouse.spec.ts new file mode 100644 index 000000000..d97cb81d4 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-e-567-yz-2019-eu-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuE567Yz2019EuWarehouse preset`, () => { + it(`should return a skuE567Yz2019EuWarehouse preset when built for rest`, () => { + const skuE567Yz2019EuWarehousePreset = InventoryEntryDraftRest.presets + .skuE567Yz2019EuWarehouse() + .build(); + expect(skuE567Yz2019EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuE567Yz2019EuWarehouse preset when built for graphql`, () => { + const skuE567Yz2019EuWarehousePreset = InventoryEntryDraftGraphql.presets + .skuE567Yz2019EuWarehouse() + .build(); + expect(skuE567Yz2019EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuE567Yz2019EuWarehouse preset when built for legacy rest`, () => { + const skuE567Yz2019EuWarehousePreset = InventoryEntryDraft.presets + .skuE567Yz2019EuWarehouse() + .buildRest(); + expect(skuE567Yz2019EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuE567Yz2019EuWarehouse preset when built for legacy graphql`, () => { + const skuE567Yz2019EuWarehousePreset = InventoryEntryDraft.presets + .skuE567Yz2019EuWarehouse() + .buildGraphql(); + expect(skuE567Yz2019EuWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-e-567-yz-2019-eu-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-e-567-yz-2019-eu-warehouse.ts new file mode 100644 index 000000000..cbe408d82 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-e-567-yz-2019-eu-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .euWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .e567Yz02() + .build(); + +const skuE567Yz2019EuWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('e567-yz-2019-eu-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuE567Yz2019EuWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-e-567-yz-2019-us-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-e-567-yz-2019-us-warehouse.spec.ts new file mode 100644 index 000000000..466c73005 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-e-567-yz-2019-us-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuE567Yz2019UsWarehouse preset`, () => { + it(`should return a skuE567Yz2019UsWarehouse preset when built for rest`, () => { + const skuE567Yz2019UsWarehousePreset = InventoryEntryDraftRest.presets + .skuE567Yz2019UsWarehouse() + .build(); + expect(skuE567Yz2019UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuE567Yz2019UsWarehouse preset when built for graphql`, () => { + const skuE567Yz2019UsWarehousePreset = InventoryEntryDraftGraphql.presets + .skuE567Yz2019UsWarehouse() + .build(); + expect(skuE567Yz2019UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuE567Yz2019UsWarehouse preset when built for legacy rest`, () => { + const skuE567Yz2019UsWarehousePreset = InventoryEntryDraft.presets + .skuE567Yz2019UsWarehouse() + .buildRest(); + expect(skuE567Yz2019UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuE567Yz2019UsWarehouse preset when built for legacy graphql`, () => { + const skuE567Yz2019UsWarehousePreset = InventoryEntryDraft.presets + .skuE567Yz2019UsWarehouse() + .buildGraphql(); + expect(skuE567Yz2019UsWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-e-567-yz-2019-us-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-e-567-yz-2019-us-warehouse.ts new file mode 100644 index 000000000..d8c1cf1f4 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-e-567-yz-2019-us-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .usWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .e567Yz02() + .build(); + +const skuE567Yz2019UsWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('e567-yz-2019-us-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuE567Yz2019UsWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-e-567-yz-2023-default-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-e-567-yz-2023-default-warehouse.spec.ts new file mode 100644 index 000000000..e0defceee --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-e-567-yz-2023-default-warehouse.spec.ts @@ -0,0 +1,40 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuE567Yz2023DefaultWarehouse preset`, () => { + it(`should return a skuE567Yz2023DefaultWarehouse preset when built for rest`, () => { + const skuE567Yz2023DefaultWarehousePreset = InventoryEntryDraftRest.presets + .skuE567Yz2023DefaultWarehouse() + .build(); + expect(skuE567Yz2023DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuE567Yz2023DefaultWarehouse preset when built for graphql`, () => { + const skuE567Yz2023DefaultWarehousePreset = + InventoryEntryDraftGraphql.presets + .skuE567Yz2023DefaultWarehouse() + .build(); + expect(skuE567Yz2023DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuE567Yz2023DefaultWarehouse preset when built for legacy rest`, () => { + const skuE567Yz2023DefaultWarehousePreset = InventoryEntryDraft.presets + .skuE567Yz2023DefaultWarehouse() + .buildRest(); + expect(skuE567Yz2023DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuE567Yz2023DefaultWarehouse preset when built for legacy graphql`, () => { + const skuE567Yz2023DefaultWarehousePreset = InventoryEntryDraft.presets + .skuE567Yz2023DefaultWarehouse() + .buildGraphql(); + expect(skuE567Yz2023DefaultWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-e-567-yz-2023-default-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-e-567-yz-2023-default-warehouse.ts new file mode 100644 index 000000000..945faf2cf --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-e-567-yz-2023-default-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .defaultWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .e567Yz03() + .build(); + +const skuE567Yz2023DefaultWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('e567-yz-2023-default-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuE567Yz2023DefaultWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-e-567-yz-2023-eu-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-e-567-yz-2023-eu-warehouse.spec.ts new file mode 100644 index 000000000..3fe6a77fd --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-e-567-yz-2023-eu-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuE567Yz2023EuWarehouse preset`, () => { + it(`should return a skuE567Yz2023EuWarehouse preset when built for rest`, () => { + const skuE567Yz2023EuWarehousePreset = InventoryEntryDraftRest.presets + .skuE567Yz2023EuWarehouse() + .build(); + expect(skuE567Yz2023EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuE567Yz2023EuWarehouse preset when built for graphql`, () => { + const skuE567Yz2023EuWarehousePreset = InventoryEntryDraftGraphql.presets + .skuE567Yz2023EuWarehouse() + .build(); + expect(skuE567Yz2023EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuE567Yz2023EuWarehouse preset when built for legacy rest`, () => { + const skuE567Yz2023EuWarehousePreset = InventoryEntryDraft.presets + .skuE567Yz2023EuWarehouse() + .buildRest(); + expect(skuE567Yz2023EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuE567Yz2023EuWarehouse preset when built for legacy graphql`, () => { + const skuE567Yz2023EuWarehousePreset = InventoryEntryDraft.presets + .skuE567Yz2023EuWarehouse() + .buildGraphql(); + expect(skuE567Yz2023EuWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-e-567-yz-2023-eu-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-e-567-yz-2023-eu-warehouse.ts new file mode 100644 index 000000000..9425813a1 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-e-567-yz-2023-eu-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .euWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .e567Yz03() + .build(); + +const skuE567Yz2023EuWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('e567-yz-2023-eu-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuE567Yz2023EuWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-e-567-yz-2023-us-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-e-567-yz-2023-us-warehouse.spec.ts new file mode 100644 index 000000000..81c0701da --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-e-567-yz-2023-us-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuE567Yz2023UsWarehouse preset`, () => { + it(`should return a skuE567Yz2023UsWarehouse preset when built for rest`, () => { + const skuE567Yz2023UsWarehousePreset = InventoryEntryDraftRest.presets + .skuE567Yz2023UsWarehouse() + .build(); + expect(skuE567Yz2023UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuE567Yz2023UsWarehouse preset when built for graphql`, () => { + const skuE567Yz2023UsWarehousePreset = InventoryEntryDraftGraphql.presets + .skuE567Yz2023UsWarehouse() + .build(); + expect(skuE567Yz2023UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuE567Yz2023UsWarehouse preset when built for legacy rest`, () => { + const skuE567Yz2023UsWarehousePreset = InventoryEntryDraft.presets + .skuE567Yz2023UsWarehouse() + .buildRest(); + expect(skuE567Yz2023UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuE567Yz2023UsWarehouse preset when built for legacy graphql`, () => { + const skuE567Yz2023UsWarehousePreset = InventoryEntryDraft.presets + .skuE567Yz2023UsWarehouse() + .buildGraphql(); + expect(skuE567Yz2023UsWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-e-567-yz-2023-us-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-e-567-yz-2023-us-warehouse.ts new file mode 100644 index 000000000..a43d92ae9 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-e-567-yz-2023-us-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .usWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .e567Yz03() + .build(); + +const skuE567Yz2023UsWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('e567-yz-2023-us-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuE567Yz2023UsWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-e567-yz-2015-default.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-e567-yz-2015-default.spec.ts deleted file mode 100644 index 9f60d8d22..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-e567-yz-2015-default.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuE567Yz2015Default from './sku-e567-yz-2015-default'; - -describe(`with skuE567Yz2015Default preset and default-warehouse channel`, () => { - it(`should return a skuE567Yz2015Default preset`, () => { - const skuE567Yz2015DefaultPreset = - skuE567Yz2015Default().build(); - expect(skuE567Yz2015DefaultPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "e567-yz-2015-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "e567-yz-2015", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuE567Yz2015Default preset when built for graphql`, () => { - const skuE567Yz2015DefaultPresetGraphql = - skuE567Yz2015Default().buildGraphql(); - expect(skuE567Yz2015DefaultPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "e567-yz-2015-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "e567-yz-2015", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-e567-yz-2015-default.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-e567-yz-2015-default.ts deleted file mode 100644 index 00e162f02..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-e567-yz-2015-default.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const defaultWarehouse = ChannelDraft.presets.sampleDataB2B - .defaultWarehouse() - .build(); - -const e567Yz01 = ProductVariantDraft.presets.sampleDataB2B - .e567Yz01() - .build(); - -const skuE567Yz2015Default = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${e567Yz01.sku}-${defaultWarehouse.key}`) - .sku(e567Yz01.sku!) - .quantityOnStock(1000) - .supplyChannel( - KeyReferenceDraft.presets.channel().key(defaultWarehouse.key) - ); - -export default skuE567Yz2015Default; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-e567-yz-2015-eu.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-e567-yz-2015-eu.spec.ts deleted file mode 100644 index d97930404..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-e567-yz-2015-eu.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuE567Yz2015Eu from './sku-e567-yz-2015-eu'; - -describe(`with skuE567Yz2015Eu preset and eu-warehouse channel`, () => { - it(`should return a skuE567Yz2015Eu preset`, () => { - const skuE567Yz2015EuPreset = - skuE567Yz2015Eu().build(); - expect(skuE567Yz2015EuPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "e567-yz-2015-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "e567-yz-2015", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuE567Yz2015Eu preset when built for graphql`, () => { - const skuE567Yz2015EuPresetGraphql = - skuE567Yz2015Eu().buildGraphql(); - expect(skuE567Yz2015EuPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "e567-yz-2015-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "e567-yz-2015", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-e567-yz-2015-eu.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-e567-yz-2015-eu.ts deleted file mode 100644 index 02157066b..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-e567-yz-2015-eu.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const euWarehouse = ChannelDraft.presets.sampleDataB2B - .euWarehouse() - .build(); - -const e567Yz01 = ProductVariantDraft.presets.sampleDataB2B - .e567Yz01() - .build(); - -const skuE567Yz2015Eu = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${e567Yz01.sku}-${euWarehouse.key}`) - .sku(e567Yz01.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(euWarehouse.key)); - -export default skuE567Yz2015Eu; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-e567-yz-2015-us.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-e567-yz-2015-us.spec.ts deleted file mode 100644 index 20a655ec2..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-e567-yz-2015-us.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuE567Yz2015Us from './sku-e567-yz-2015-us'; - -describe(`with skuE567Yz2015Us preset and us-warehouse channel`, () => { - it(`should return a skuE567Yz2015Us preset`, () => { - const skuE567Yz2015UsPreset = - skuE567Yz2015Us().build(); - expect(skuE567Yz2015UsPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "e567-yz-2015-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "e567-yz-2015", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuE567Yz2015Us preset when built for graphql`, () => { - const skuE567Yz2015UsPresetGraphql = - skuE567Yz2015Us().buildGraphql(); - expect(skuE567Yz2015UsPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "e567-yz-2015-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "e567-yz-2015", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-e567-yz-2015-us.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-e567-yz-2015-us.ts deleted file mode 100644 index af504d3e9..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-e567-yz-2015-us.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const usWarehouse = ChannelDraft.presets.sampleDataB2B - .usWarehouse() - .build(); - -const e567Yz01 = ProductVariantDraft.presets.sampleDataB2B - .e567Yz01() - .build(); - -const skuE567Yz2015Us = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${e567Yz01.sku}-${usWarehouse.key}`) - .sku(e567Yz01.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(usWarehouse.key)); - -export default skuE567Yz2015Us; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-e567-yz-2019-default.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-e567-yz-2019-default.spec.ts deleted file mode 100644 index b5f9dedb3..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-e567-yz-2019-default.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuE567Yz2019Default from './sku-e567-yz-2019-default'; - -describe(`with skuE567Yz2019Default preset and default-warehouse channel`, () => { - it(`should return a skuE567Yz2019Default preset`, () => { - const skuE567Yz2019DefaultPreset = - skuE567Yz2019Default().build(); - expect(skuE567Yz2019DefaultPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "e567-yz-2019-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "e567-yz-2019", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuE567Yz2019Default preset when built for graphql`, () => { - const skuE567Yz2019DefaultPresetGraphql = - skuE567Yz2019Default().buildGraphql(); - expect(skuE567Yz2019DefaultPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "e567-yz-2019-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "e567-yz-2019", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-e567-yz-2019-default.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-e567-yz-2019-default.ts deleted file mode 100644 index fba892685..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-e567-yz-2019-default.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const defaultWarehouse = ChannelDraft.presets.sampleDataB2B - .defaultWarehouse() - .build(); - -const e567Yz02 = ProductVariantDraft.presets.sampleDataB2B - .e567Yz02() - .build(); - -const skuE567Yz2019Default = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${e567Yz02.sku}-${defaultWarehouse.key}`) - .sku(e567Yz02.sku!) - .quantityOnStock(1000) - .supplyChannel( - KeyReferenceDraft.presets.channel().key(defaultWarehouse.key) - ); - -export default skuE567Yz2019Default; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-e567-yz-2019-eu.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-e567-yz-2019-eu.spec.ts deleted file mode 100644 index 06f793cb0..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-e567-yz-2019-eu.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuE567Yz2019Eu from './sku-e567-yz-2019-eu'; - -describe(`with skuE567Yz2019Eu preset and eu-warehouse channel`, () => { - it(`should return a skuE567Yz2019Eu preset`, () => { - const skuE567Yz2019EuPreset = - skuE567Yz2019Eu().build(); - expect(skuE567Yz2019EuPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "e567-yz-2019-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "e567-yz-2019", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuE567Yz2019Eu preset when built for graphql`, () => { - const skuE567Yz2019EuPresetGraphql = - skuE567Yz2019Eu().buildGraphql(); - expect(skuE567Yz2019EuPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "e567-yz-2019-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "e567-yz-2019", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-e567-yz-2019-eu.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-e567-yz-2019-eu.ts deleted file mode 100644 index c2ee7340c..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-e567-yz-2019-eu.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const euWarehouse = ChannelDraft.presets.sampleDataB2B - .euWarehouse() - .build(); - -const e567Yz02 = ProductVariantDraft.presets.sampleDataB2B - .e567Yz02() - .build(); - -const skuE567Yz2019Eu = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${e567Yz02.sku}-${euWarehouse.key}`) - .sku(e567Yz02.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(euWarehouse.key)); - -export default skuE567Yz2019Eu; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-e567-yz-2019-us.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-e567-yz-2019-us.spec.ts deleted file mode 100644 index 2bce35656..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-e567-yz-2019-us.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuE567Yz2019Us from './sku-e567-yz-2019-us'; - -describe(`with skuE567Yz2019Us preset and us-warehouse channel`, () => { - it(`should return a skuE567Yz2019Us preset`, () => { - const skuE567Yz2019UsPreset = - skuE567Yz2019Us().build(); - expect(skuE567Yz2019UsPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "e567-yz-2019-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "e567-yz-2019", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuE567Yz2019Us preset when built for graphql`, () => { - const skuE567Yz2019UsPresetGraphql = - skuE567Yz2019Us().buildGraphql(); - expect(skuE567Yz2019UsPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "e567-yz-2019-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "e567-yz-2019", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-e567-yz-2019-us.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-e567-yz-2019-us.ts deleted file mode 100644 index 2d8107480..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-e567-yz-2019-us.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const usWarehouse = ChannelDraft.presets.sampleDataB2B - .usWarehouse() - .build(); - -const e567Yz02 = ProductVariantDraft.presets.sampleDataB2B - .e567Yz02() - .build(); - -const skuE567Yz2019Us = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${e567Yz02.sku}-${usWarehouse.key}`) - .sku(e567Yz02.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(usWarehouse.key)); - -export default skuE567Yz2019Us; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-e567-yz-2023-default.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-e567-yz-2023-default.spec.ts deleted file mode 100644 index 2ddcb1fbb..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-e567-yz-2023-default.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuE567Yz2023Default from './sku-e567-yz-2023-default'; - -describe(`with skuE567Yz2023Default preset and default-warehouse channel`, () => { - it(`should return a skuE567Yz2023Default preset`, () => { - const skuE567Yz2023DefaultPreset = - skuE567Yz2023Default().build(); - expect(skuE567Yz2023DefaultPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "e567-yz-2023-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "e567-yz-2023", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuE567Yz2023Default preset when built for graphql`, () => { - const skuE567Yz2023DefaultPresetGraphql = - skuE567Yz2023Default().buildGraphql(); - expect(skuE567Yz2023DefaultPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "e567-yz-2023-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "e567-yz-2023", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-e567-yz-2023-default.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-e567-yz-2023-default.ts deleted file mode 100644 index 43e7c62ba..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-e567-yz-2023-default.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const defaultWarehouse = ChannelDraft.presets.sampleDataB2B - .defaultWarehouse() - .build(); - -const e567Yz03 = ProductVariantDraft.presets.sampleDataB2B - .e567Yz03() - .build(); - -const skuE567Yz2023Default = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${e567Yz03.sku}-${defaultWarehouse.key}`) - .sku(e567Yz03.sku!) - .quantityOnStock(1000) - .supplyChannel( - KeyReferenceDraft.presets.channel().key(defaultWarehouse.key) - ); - -export default skuE567Yz2023Default; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-e567-yz-2023-eu.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-e567-yz-2023-eu.spec.ts deleted file mode 100644 index db59c5d4f..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-e567-yz-2023-eu.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuE567Yz2023Eu from './sku-e567-yz-2023-eu'; - -describe(`with skuE567Yz2023Eu preset and eu-warehouse channel`, () => { - it(`should return a skuE567Yz2023Eu preset`, () => { - const skuE567Yz2023EuPreset = - skuE567Yz2023Eu().build(); - expect(skuE567Yz2023EuPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "e567-yz-2023-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "e567-yz-2023", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuE567Yz2023Eu preset when built for graphql`, () => { - const skuE567Yz2023EuPresetGraphql = - skuE567Yz2023Eu().buildGraphql(); - expect(skuE567Yz2023EuPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "e567-yz-2023-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "e567-yz-2023", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-e567-yz-2023-eu.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-e567-yz-2023-eu.ts deleted file mode 100644 index ea97fb1b2..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-e567-yz-2023-eu.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const euWarehouse = ChannelDraft.presets.sampleDataB2B - .euWarehouse() - .build(); - -const e567Yz03 = ProductVariantDraft.presets.sampleDataB2B - .e567Yz03() - .build(); - -const skuE567Yz2023Eu = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${e567Yz03.sku}-${euWarehouse.key}`) - .sku(e567Yz03.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(euWarehouse.key)); - -export default skuE567Yz2023Eu; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-e567-yz-2023-us.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-e567-yz-2023-us.spec.ts deleted file mode 100644 index 3da0b4dab..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-e567-yz-2023-us.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuE567Yz2023Us from './sku-e567-yz-2023-us'; - -describe(`with skuE567Yz2023Us preset and us-warehouse channel`, () => { - it(`should return a skuE567Yz2023Us preset`, () => { - const skuE567Yz2023UsPreset = - skuE567Yz2023Us().build(); - expect(skuE567Yz2023UsPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "e567-yz-2023-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "e567-yz-2023", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuE567Yz2023Us preset when built for graphql`, () => { - const skuE567Yz2023UsPresetGraphql = - skuE567Yz2023Us().buildGraphql(); - expect(skuE567Yz2023UsPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "e567-yz-2023-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "e567-yz-2023", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-e567-yz-2023-us.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-e567-yz-2023-us.ts deleted file mode 100644 index c9beb59b7..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-e567-yz-2023-us.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const usWarehouse = ChannelDraft.presets.sampleDataB2B - .usWarehouse() - .build(); - -const e567Yz03 = ProductVariantDraft.presets.sampleDataB2B - .e567Yz03() - .build(); - -const skuE567Yz2023Us = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${e567Yz03.sku}-${usWarehouse.key}`) - .sku(e567Yz03.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(usWarehouse.key)); - -export default skuE567Yz2023Us; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ee-567-yz-2015-default-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ee-567-yz-2015-default-warehouse.spec.ts new file mode 100644 index 000000000..5cfaa1c1a --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ee-567-yz-2015-default-warehouse.spec.ts @@ -0,0 +1,40 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuEe567Yz2015DefaultWarehouse preset`, () => { + it(`should return a skuEe567Yz2015DefaultWarehouse preset when built for rest`, () => { + const skuEe567Yz2015DefaultWarehousePreset = InventoryEntryDraftRest.presets + .skuEe567Yz2015DefaultWarehouse() + .build(); + expect(skuEe567Yz2015DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuEe567Yz2015DefaultWarehouse preset when built for graphql`, () => { + const skuEe567Yz2015DefaultWarehousePreset = + InventoryEntryDraftGraphql.presets + .skuEe567Yz2015DefaultWarehouse() + .build(); + expect(skuEe567Yz2015DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuEe567Yz2015DefaultWarehouse preset when built for legacy rest`, () => { + const skuEe567Yz2015DefaultWarehousePreset = InventoryEntryDraft.presets + .skuEe567Yz2015DefaultWarehouse() + .buildRest(); + expect(skuEe567Yz2015DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuEe567Yz2015DefaultWarehouse preset when built for legacy graphql`, () => { + const skuEe567Yz2015DefaultWarehousePreset = InventoryEntryDraft.presets + .skuEe567Yz2015DefaultWarehouse() + .buildGraphql(); + expect(skuEe567Yz2015DefaultWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ee-567-yz-2015-default-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ee-567-yz-2015-default-warehouse.ts new file mode 100644 index 000000000..d226ae030 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ee-567-yz-2015-default-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .defaultWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .ee567Yz01() + .build(); + +const skuEe567Yz2015DefaultWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('ee567-yz-2015-default-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuEe567Yz2015DefaultWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ee-567-yz-2015-eu-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ee-567-yz-2015-eu-warehouse.spec.ts new file mode 100644 index 000000000..6189e94d5 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ee-567-yz-2015-eu-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuEe567Yz2015EuWarehouse preset`, () => { + it(`should return a skuEe567Yz2015EuWarehouse preset when built for rest`, () => { + const skuEe567Yz2015EuWarehousePreset = InventoryEntryDraftRest.presets + .skuEe567Yz2015EuWarehouse() + .build(); + expect(skuEe567Yz2015EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuEe567Yz2015EuWarehouse preset when built for graphql`, () => { + const skuEe567Yz2015EuWarehousePreset = InventoryEntryDraftGraphql.presets + .skuEe567Yz2015EuWarehouse() + .build(); + expect(skuEe567Yz2015EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuEe567Yz2015EuWarehouse preset when built for legacy rest`, () => { + const skuEe567Yz2015EuWarehousePreset = InventoryEntryDraft.presets + .skuEe567Yz2015EuWarehouse() + .buildRest(); + expect(skuEe567Yz2015EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuEe567Yz2015EuWarehouse preset when built for legacy graphql`, () => { + const skuEe567Yz2015EuWarehousePreset = InventoryEntryDraft.presets + .skuEe567Yz2015EuWarehouse() + .buildGraphql(); + expect(skuEe567Yz2015EuWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ee-567-yz-2015-eu-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ee-567-yz-2015-eu-warehouse.ts new file mode 100644 index 000000000..939a2dc06 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ee-567-yz-2015-eu-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .euWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .ee567Yz01() + .build(); + +const skuEe567Yz2015EuWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('ee567-yz-2015-eu-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuEe567Yz2015EuWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ee-567-yz-2015-us-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ee-567-yz-2015-us-warehouse.spec.ts new file mode 100644 index 000000000..4c6a027b1 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ee-567-yz-2015-us-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuEe567Yz2015UsWarehouse preset`, () => { + it(`should return a skuEe567Yz2015UsWarehouse preset when built for rest`, () => { + const skuEe567Yz2015UsWarehousePreset = InventoryEntryDraftRest.presets + .skuEe567Yz2015UsWarehouse() + .build(); + expect(skuEe567Yz2015UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuEe567Yz2015UsWarehouse preset when built for graphql`, () => { + const skuEe567Yz2015UsWarehousePreset = InventoryEntryDraftGraphql.presets + .skuEe567Yz2015UsWarehouse() + .build(); + expect(skuEe567Yz2015UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuEe567Yz2015UsWarehouse preset when built for legacy rest`, () => { + const skuEe567Yz2015UsWarehousePreset = InventoryEntryDraft.presets + .skuEe567Yz2015UsWarehouse() + .buildRest(); + expect(skuEe567Yz2015UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuEe567Yz2015UsWarehouse preset when built for legacy graphql`, () => { + const skuEe567Yz2015UsWarehousePreset = InventoryEntryDraft.presets + .skuEe567Yz2015UsWarehouse() + .buildGraphql(); + expect(skuEe567Yz2015UsWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ee-567-yz-2015-us-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ee-567-yz-2015-us-warehouse.ts new file mode 100644 index 000000000..eb31700ec --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ee-567-yz-2015-us-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .usWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .ee567Yz01() + .build(); + +const skuEe567Yz2015UsWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('ee567-yz-2015-us-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuEe567Yz2015UsWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ee-567-yz-2019-default-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ee-567-yz-2019-default-warehouse.spec.ts new file mode 100644 index 000000000..5cb467b9c --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ee-567-yz-2019-default-warehouse.spec.ts @@ -0,0 +1,40 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuEe567Yz2019DefaultWarehouse preset`, () => { + it(`should return a skuEe567Yz2019DefaultWarehouse preset when built for rest`, () => { + const skuEe567Yz2019DefaultWarehousePreset = InventoryEntryDraftRest.presets + .skuEe567Yz2019DefaultWarehouse() + .build(); + expect(skuEe567Yz2019DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuEe567Yz2019DefaultWarehouse preset when built for graphql`, () => { + const skuEe567Yz2019DefaultWarehousePreset = + InventoryEntryDraftGraphql.presets + .skuEe567Yz2019DefaultWarehouse() + .build(); + expect(skuEe567Yz2019DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuEe567Yz2019DefaultWarehouse preset when built for legacy rest`, () => { + const skuEe567Yz2019DefaultWarehousePreset = InventoryEntryDraft.presets + .skuEe567Yz2019DefaultWarehouse() + .buildRest(); + expect(skuEe567Yz2019DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuEe567Yz2019DefaultWarehouse preset when built for legacy graphql`, () => { + const skuEe567Yz2019DefaultWarehousePreset = InventoryEntryDraft.presets + .skuEe567Yz2019DefaultWarehouse() + .buildGraphql(); + expect(skuEe567Yz2019DefaultWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ee-567-yz-2019-default-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ee-567-yz-2019-default-warehouse.ts new file mode 100644 index 000000000..00e778f62 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ee-567-yz-2019-default-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .defaultWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .ee567Yz02() + .build(); + +const skuEe567Yz2019DefaultWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('ee567-yz-2019-default-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuEe567Yz2019DefaultWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ee-567-yz-2019-eu-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ee-567-yz-2019-eu-warehouse.spec.ts new file mode 100644 index 000000000..622452542 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ee-567-yz-2019-eu-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuEe567Yz2019EuWarehouse preset`, () => { + it(`should return a skuEe567Yz2019EuWarehouse preset when built for rest`, () => { + const skuEe567Yz2019EuWarehousePreset = InventoryEntryDraftRest.presets + .skuEe567Yz2019EuWarehouse() + .build(); + expect(skuEe567Yz2019EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuEe567Yz2019EuWarehouse preset when built for graphql`, () => { + const skuEe567Yz2019EuWarehousePreset = InventoryEntryDraftGraphql.presets + .skuEe567Yz2019EuWarehouse() + .build(); + expect(skuEe567Yz2019EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuEe567Yz2019EuWarehouse preset when built for legacy rest`, () => { + const skuEe567Yz2019EuWarehousePreset = InventoryEntryDraft.presets + .skuEe567Yz2019EuWarehouse() + .buildRest(); + expect(skuEe567Yz2019EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuEe567Yz2019EuWarehouse preset when built for legacy graphql`, () => { + const skuEe567Yz2019EuWarehousePreset = InventoryEntryDraft.presets + .skuEe567Yz2019EuWarehouse() + .buildGraphql(); + expect(skuEe567Yz2019EuWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ee-567-yz-2019-eu-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ee-567-yz-2019-eu-warehouse.ts new file mode 100644 index 000000000..d3c558a05 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ee-567-yz-2019-eu-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .euWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .ee567Yz02() + .build(); + +const skuEe567Yz2019EuWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('ee567-yz-2019-eu-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuEe567Yz2019EuWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ee-567-yz-2019-us-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ee-567-yz-2019-us-warehouse.spec.ts new file mode 100644 index 000000000..0737305ef --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ee-567-yz-2019-us-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuEe567Yz2019UsWarehouse preset`, () => { + it(`should return a skuEe567Yz2019UsWarehouse preset when built for rest`, () => { + const skuEe567Yz2019UsWarehousePreset = InventoryEntryDraftRest.presets + .skuEe567Yz2019UsWarehouse() + .build(); + expect(skuEe567Yz2019UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuEe567Yz2019UsWarehouse preset when built for graphql`, () => { + const skuEe567Yz2019UsWarehousePreset = InventoryEntryDraftGraphql.presets + .skuEe567Yz2019UsWarehouse() + .build(); + expect(skuEe567Yz2019UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuEe567Yz2019UsWarehouse preset when built for legacy rest`, () => { + const skuEe567Yz2019UsWarehousePreset = InventoryEntryDraft.presets + .skuEe567Yz2019UsWarehouse() + .buildRest(); + expect(skuEe567Yz2019UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuEe567Yz2019UsWarehouse preset when built for legacy graphql`, () => { + const skuEe567Yz2019UsWarehousePreset = InventoryEntryDraft.presets + .skuEe567Yz2019UsWarehouse() + .buildGraphql(); + expect(skuEe567Yz2019UsWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ee-567-yz-2019-us-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ee-567-yz-2019-us-warehouse.ts new file mode 100644 index 000000000..65d3b61d3 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ee-567-yz-2019-us-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .usWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .ee567Yz02() + .build(); + +const skuEe567Yz2019UsWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('ee567-yz-2019-us-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuEe567Yz2019UsWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ee-567-yz-2023-default-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ee-567-yz-2023-default-warehouse.spec.ts new file mode 100644 index 000000000..e007fc86d --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ee-567-yz-2023-default-warehouse.spec.ts @@ -0,0 +1,40 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuEe567Yz2023DefaultWarehouse preset`, () => { + it(`should return a skuEe567Yz2023DefaultWarehouse preset when built for rest`, () => { + const skuEe567Yz2023DefaultWarehousePreset = InventoryEntryDraftRest.presets + .skuEe567Yz2023DefaultWarehouse() + .build(); + expect(skuEe567Yz2023DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuEe567Yz2023DefaultWarehouse preset when built for graphql`, () => { + const skuEe567Yz2023DefaultWarehousePreset = + InventoryEntryDraftGraphql.presets + .skuEe567Yz2023DefaultWarehouse() + .build(); + expect(skuEe567Yz2023DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuEe567Yz2023DefaultWarehouse preset when built for legacy rest`, () => { + const skuEe567Yz2023DefaultWarehousePreset = InventoryEntryDraft.presets + .skuEe567Yz2023DefaultWarehouse() + .buildRest(); + expect(skuEe567Yz2023DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuEe567Yz2023DefaultWarehouse preset when built for legacy graphql`, () => { + const skuEe567Yz2023DefaultWarehousePreset = InventoryEntryDraft.presets + .skuEe567Yz2023DefaultWarehouse() + .buildGraphql(); + expect(skuEe567Yz2023DefaultWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ee-567-yz-2023-default-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ee-567-yz-2023-default-warehouse.ts new file mode 100644 index 000000000..1a4d856a8 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ee-567-yz-2023-default-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .defaultWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .ee567Yz03() + .build(); + +const skuEe567Yz2023DefaultWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('ee567-yz-2023-default-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuEe567Yz2023DefaultWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ee-567-yz-2023-eu-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ee-567-yz-2023-eu-warehouse.spec.ts new file mode 100644 index 000000000..949dce8e9 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ee-567-yz-2023-eu-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuEe567Yz2023EuWarehouse preset`, () => { + it(`should return a skuEe567Yz2023EuWarehouse preset when built for rest`, () => { + const skuEe567Yz2023EuWarehousePreset = InventoryEntryDraftRest.presets + .skuEe567Yz2023EuWarehouse() + .build(); + expect(skuEe567Yz2023EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuEe567Yz2023EuWarehouse preset when built for graphql`, () => { + const skuEe567Yz2023EuWarehousePreset = InventoryEntryDraftGraphql.presets + .skuEe567Yz2023EuWarehouse() + .build(); + expect(skuEe567Yz2023EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuEe567Yz2023EuWarehouse preset when built for legacy rest`, () => { + const skuEe567Yz2023EuWarehousePreset = InventoryEntryDraft.presets + .skuEe567Yz2023EuWarehouse() + .buildRest(); + expect(skuEe567Yz2023EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuEe567Yz2023EuWarehouse preset when built for legacy graphql`, () => { + const skuEe567Yz2023EuWarehousePreset = InventoryEntryDraft.presets + .skuEe567Yz2023EuWarehouse() + .buildGraphql(); + expect(skuEe567Yz2023EuWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ee-567-yz-2023-eu-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ee-567-yz-2023-eu-warehouse.ts new file mode 100644 index 000000000..228c49e12 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ee-567-yz-2023-eu-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .euWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .ee567Yz03() + .build(); + +const skuEe567Yz2023EuWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('ee567-yz-2023-eu-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuEe567Yz2023EuWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ee-567-yz-2023-us-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ee-567-yz-2023-us-warehouse.spec.ts new file mode 100644 index 000000000..968251014 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ee-567-yz-2023-us-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuEe567Yz2023UsWarehouse preset`, () => { + it(`should return a skuEe567Yz2023UsWarehouse preset when built for rest`, () => { + const skuEe567Yz2023UsWarehousePreset = InventoryEntryDraftRest.presets + .skuEe567Yz2023UsWarehouse() + .build(); + expect(skuEe567Yz2023UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuEe567Yz2023UsWarehouse preset when built for graphql`, () => { + const skuEe567Yz2023UsWarehousePreset = InventoryEntryDraftGraphql.presets + .skuEe567Yz2023UsWarehouse() + .build(); + expect(skuEe567Yz2023UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuEe567Yz2023UsWarehouse preset when built for legacy rest`, () => { + const skuEe567Yz2023UsWarehousePreset = InventoryEntryDraft.presets + .skuEe567Yz2023UsWarehouse() + .buildRest(); + expect(skuEe567Yz2023UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuEe567Yz2023UsWarehouse preset when built for legacy graphql`, () => { + const skuEe567Yz2023UsWarehousePreset = InventoryEntryDraft.presets + .skuEe567Yz2023UsWarehouse() + .buildGraphql(); + expect(skuEe567Yz2023UsWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ee-567-yz-2023-us-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ee-567-yz-2023-us-warehouse.ts new file mode 100644 index 000000000..576d1acad --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ee-567-yz-2023-us-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .usWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .ee567Yz03() + .build(); + +const skuEe567Yz2023UsWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('ee567-yz-2023-us-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuEe567Yz2023UsWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ee567-yz-2015-default.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ee567-yz-2015-default.spec.ts deleted file mode 100644 index 4fbf388e3..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ee567-yz-2015-default.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuEe567Yz2015Default from './sku-ee567-yz-2015-default'; - -describe(`with skuEe567Yz2015Default preset and default-warehouse channel`, () => { - it(`should return a skuEe567Yz2015Default preset`, () => { - const skuEe567Yz2015DefaultPreset = - skuEe567Yz2015Default().build(); - expect(skuEe567Yz2015DefaultPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "ee567-yz-2015-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "ee567-yz-2015", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuEe567Yz2015Default preset when built for graphql`, () => { - const skuEe567Yz2015DefaultPresetGraphql = - skuEe567Yz2015Default().buildGraphql(); - expect(skuEe567Yz2015DefaultPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "ee567-yz-2015-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "ee567-yz-2015", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ee567-yz-2015-default.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ee567-yz-2015-default.ts deleted file mode 100644 index 910cdd86e..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ee567-yz-2015-default.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const defaultWarehouse = ChannelDraft.presets.sampleDataB2B - .defaultWarehouse() - .build(); - -const ee567Yz01 = ProductVariantDraft.presets.sampleDataB2B - .ee567Yz01() - .build(); - -const skuEe567Yz2015Default = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${ee567Yz01.sku}-${defaultWarehouse.key}`) - .sku(ee567Yz01.sku!) - .quantityOnStock(1000) - .supplyChannel( - KeyReferenceDraft.presets.channel().key(defaultWarehouse.key) - ); - -export default skuEe567Yz2015Default; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ee567-yz-2015-eu.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ee567-yz-2015-eu.spec.ts deleted file mode 100644 index d5238de0a..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ee567-yz-2015-eu.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuEe567Yz2015Eu from './sku-ee567-yz-2015-eu'; - -describe(`with skuEe567Yz2015Eu preset and eu-warehouse channel`, () => { - it(`should return a skuEe567Yz2015Eu preset`, () => { - const skuEe567Yz2015EuPreset = - skuEe567Yz2015Eu().build(); - expect(skuEe567Yz2015EuPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "ee567-yz-2015-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "ee567-yz-2015", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuEe567Yz2015Eu preset when built for graphql`, () => { - const skuEe567Yz2015EuPresetGraphql = - skuEe567Yz2015Eu().buildGraphql(); - expect(skuEe567Yz2015EuPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "ee567-yz-2015-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "ee567-yz-2015", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ee567-yz-2015-eu.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ee567-yz-2015-eu.ts deleted file mode 100644 index c08f3e156..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ee567-yz-2015-eu.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const euWarehouse = ChannelDraft.presets.sampleDataB2B - .euWarehouse() - .build(); - -const ee567Yz01 = ProductVariantDraft.presets.sampleDataB2B - .ee567Yz01() - .build(); - -const skuEe567Yz2015Eu = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${ee567Yz01.sku}-${euWarehouse.key}`) - .sku(ee567Yz01.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(euWarehouse.key)); - -export default skuEe567Yz2015Eu; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ee567-yz-2015-us.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ee567-yz-2015-us.spec.ts deleted file mode 100644 index 15cc4401f..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ee567-yz-2015-us.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuEe567Yz2015Us from './sku-ee567-yz-2015-us'; - -describe(`with skuEe567Yz2015Us preset and us-warehouse channel`, () => { - it(`should return a skuEe567Yz2015Us preset`, () => { - const skuEe567Yz2015UsPreset = - skuEe567Yz2015Us().build(); - expect(skuEe567Yz2015UsPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "ee567-yz-2015-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "ee567-yz-2015", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuEe567Yz2015Us preset when built for graphql`, () => { - const skuEe567Yz2015UsPresetGraphql = - skuEe567Yz2015Us().buildGraphql(); - expect(skuEe567Yz2015UsPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "ee567-yz-2015-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "ee567-yz-2015", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ee567-yz-2015-us.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ee567-yz-2015-us.ts deleted file mode 100644 index 2a1863d4b..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ee567-yz-2015-us.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const usWarehouse = ChannelDraft.presets.sampleDataB2B - .usWarehouse() - .build(); - -const ee567Yz01 = ProductVariantDraft.presets.sampleDataB2B - .ee567Yz01() - .build(); - -const skuEe567Yz2015Us = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${ee567Yz01.sku}-${usWarehouse.key}`) - .sku(ee567Yz01.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(usWarehouse.key)); - -export default skuEe567Yz2015Us; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ee567-yz-2019-default.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ee567-yz-2019-default.spec.ts deleted file mode 100644 index 1cda9633c..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ee567-yz-2019-default.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuEe567Yz2019Default from './sku-ee567-yz-2019-default'; - -describe(`with skuEe567Yz2019Default preset and default-warehouse channel`, () => { - it(`should return a skuEe567Yz2019Default preset`, () => { - const skuEe567Yz2019DefaultPreset = - skuEe567Yz2019Default().build(); - expect(skuEe567Yz2019DefaultPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "ee567-yz-2019-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "ee567-yz-2019", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuEe567Yz2019Default preset when built for graphql`, () => { - const skuEe567Yz2019DefaultPresetGraphql = - skuEe567Yz2019Default().buildGraphql(); - expect(skuEe567Yz2019DefaultPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "ee567-yz-2019-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "ee567-yz-2019", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ee567-yz-2019-default.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ee567-yz-2019-default.ts deleted file mode 100644 index c7de989e4..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ee567-yz-2019-default.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const defaultWarehouse = ChannelDraft.presets.sampleDataB2B - .defaultWarehouse() - .build(); - -const ee567Yz02 = ProductVariantDraft.presets.sampleDataB2B - .ee567Yz02() - .build(); - -const skuEe567Yz2019Default = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${ee567Yz02.sku}-${defaultWarehouse.key}`) - .sku(ee567Yz02.sku!) - .quantityOnStock(1000) - .supplyChannel( - KeyReferenceDraft.presets.channel().key(defaultWarehouse.key) - ); - -export default skuEe567Yz2019Default; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ee567-yz-2019-eu.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ee567-yz-2019-eu.spec.ts deleted file mode 100644 index f4420ddf7..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ee567-yz-2019-eu.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuEe567Yz2019Eu from './sku-ee567-yz-2019-eu'; - -describe(`with skuEe567Yz2019Eu preset and eu-warehouse channel`, () => { - it(`should return a skuEe567Yz2019Eu preset`, () => { - const skuEe567Yz2019EuPreset = - skuEe567Yz2019Eu().build(); - expect(skuEe567Yz2019EuPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "ee567-yz-2019-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "ee567-yz-2019", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuEe567Yz2019Eu preset when built for graphql`, () => { - const skuEe567Yz2019EuPresetGraphql = - skuEe567Yz2019Eu().buildGraphql(); - expect(skuEe567Yz2019EuPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "ee567-yz-2019-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "ee567-yz-2019", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ee567-yz-2019-eu.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ee567-yz-2019-eu.ts deleted file mode 100644 index ce537e9a6..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ee567-yz-2019-eu.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const euWarehouse = ChannelDraft.presets.sampleDataB2B - .euWarehouse() - .build(); - -const ee567Yz02 = ProductVariantDraft.presets.sampleDataB2B - .ee567Yz02() - .build(); - -const skuEe567Yz2019Eu = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${ee567Yz02.sku}-${euWarehouse.key}`) - .sku(ee567Yz02.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(euWarehouse.key)); - -export default skuEe567Yz2019Eu; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ee567-yz-2019-us.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ee567-yz-2019-us.spec.ts deleted file mode 100644 index 8fd7a734d..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ee567-yz-2019-us.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuEe567Yz2019Us from './sku-ee567-yz-2019-us'; - -describe(`with skuEe567Yz2019Us preset and us-warehouse channel`, () => { - it(`should return a skuEe567Yz2019Us preset`, () => { - const skuEe567Yz2019UsPreset = - skuEe567Yz2019Us().build(); - expect(skuEe567Yz2019UsPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "ee567-yz-2019-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "ee567-yz-2019", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuEe567Yz2019Us preset when built for graphql`, () => { - const skuEe567Yz2019UsPresetGraphql = - skuEe567Yz2019Us().buildGraphql(); - expect(skuEe567Yz2019UsPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "ee567-yz-2019-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "ee567-yz-2019", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ee567-yz-2019-us.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ee567-yz-2019-us.ts deleted file mode 100644 index d378b1ba5..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ee567-yz-2019-us.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const usWarehouse = ChannelDraft.presets.sampleDataB2B - .usWarehouse() - .build(); - -const ee567Yz02 = ProductVariantDraft.presets.sampleDataB2B - .ee567Yz02() - .build(); - -const skuEe567Yz2019Us = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${ee567Yz02.sku}-${usWarehouse.key}`) - .sku(ee567Yz02.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(usWarehouse.key)); - -export default skuEe567Yz2019Us; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ee567-yz-2023-default.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ee567-yz-2023-default.spec.ts deleted file mode 100644 index 45fc464f1..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ee567-yz-2023-default.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuEe567Yz2023Default from './sku-ee567-yz-2023-default'; - -describe(`with skuEe567Yz2023Default preset and default-warehouse channel`, () => { - it(`should return a skuEe567Yz2023Default preset`, () => { - const skuEe567Yz2023DefaultPreset = - skuEe567Yz2023Default().build(); - expect(skuEe567Yz2023DefaultPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "ee567-yz-2023-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "ee567-yz-2023", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuEe567Yz2023Default preset when built for graphql`, () => { - const skuEe567Yz2023DefaultPresetGraphql = - skuEe567Yz2023Default().buildGraphql(); - expect(skuEe567Yz2023DefaultPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "ee567-yz-2023-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "ee567-yz-2023", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ee567-yz-2023-default.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ee567-yz-2023-default.ts deleted file mode 100644 index ad2477150..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ee567-yz-2023-default.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const defaultWarehouse = ChannelDraft.presets.sampleDataB2B - .defaultWarehouse() - .build(); - -const ee567Yz03 = ProductVariantDraft.presets.sampleDataB2B - .ee567Yz03() - .build(); - -const skuEe567Yz2023Default = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${ee567Yz03.sku}-${defaultWarehouse.key}`) - .sku(ee567Yz03.sku!) - .quantityOnStock(1000) - .supplyChannel( - KeyReferenceDraft.presets.channel().key(defaultWarehouse.key) - ); - -export default skuEe567Yz2023Default; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ee567-yz-2023-eu.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ee567-yz-2023-eu.spec.ts deleted file mode 100644 index 66c74b180..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ee567-yz-2023-eu.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuEe567Yz2023Eu from './sku-ee567-yz-2023-eu'; - -describe(`with skuEe567Yz2023Eu preset and eu-warehouse channel`, () => { - it(`should return a skuEe567Yz2023Eu preset`, () => { - const skuEe567Yz2023EuPreset = - skuEe567Yz2023Eu().build(); - expect(skuEe567Yz2023EuPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "ee567-yz-2023-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "ee567-yz-2023", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuEe567Yz2023Eu preset when built for graphql`, () => { - const skuEe567Yz2023EuPresetGraphql = - skuEe567Yz2023Eu().buildGraphql(); - expect(skuEe567Yz2023EuPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "ee567-yz-2023-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "ee567-yz-2023", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ee567-yz-2023-eu.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ee567-yz-2023-eu.ts deleted file mode 100644 index 7f2a0e4f3..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ee567-yz-2023-eu.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const euWarehouse = ChannelDraft.presets.sampleDataB2B - .euWarehouse() - .build(); - -const ee567Yz03 = ProductVariantDraft.presets.sampleDataB2B - .ee567Yz03() - .build(); - -const skuEe567Yz2023Eu = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${ee567Yz03.sku}-${euWarehouse.key}`) - .sku(ee567Yz03.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(euWarehouse.key)); - -export default skuEe567Yz2023Eu; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ee567-yz-2023-us.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ee567-yz-2023-us.spec.ts deleted file mode 100644 index d099f4c87..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ee567-yz-2023-us.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuEe567Yz2023Us from './sku-ee567-yz-2023-us'; - -describe(`with skuEe567Yz2023Us preset and us-warehouse channel`, () => { - it(`should return a skuEe567Yz2023Us preset`, () => { - const skuEe567Yz2023UsPreset = - skuEe567Yz2023Us().build(); - expect(skuEe567Yz2023UsPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "ee567-yz-2023-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "ee567-yz-2023", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuEe567Yz2023Us preset when built for graphql`, () => { - const skuEe567Yz2023UsPresetGraphql = - skuEe567Yz2023Us().buildGraphql(); - expect(skuEe567Yz2023UsPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "ee567-yz-2023-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "ee567-yz-2023", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ee567-yz-2023-us.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ee567-yz-2023-us.ts deleted file mode 100644 index 4567c391f..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ee567-yz-2023-us.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const usWarehouse = ChannelDraft.presets.sampleDataB2B - .usWarehouse() - .build(); - -const ee567Yz03 = ProductVariantDraft.presets.sampleDataB2B - .ee567Yz03() - .build(); - -const skuEe567Yz2023Us = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${ee567Yz03.sku}-${usWarehouse.key}`) - .sku(ee567Yz03.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(usWarehouse.key)); - -export default skuEe567Yz2023Us; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-eee-123-qr-blue-default-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-eee-123-qr-blue-default-warehouse.spec.ts new file mode 100644 index 000000000..68d7c20e3 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-eee-123-qr-blue-default-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuEee123QrBlueDefaultWarehouse preset`, () => { + it(`should return a skuEee123QrBlueDefaultWarehouse preset when built for rest`, () => { + const skuEee123QrBlueDefaultWarehousePreset = + InventoryEntryDraftRest.presets.skuEee123QrBlueDefaultWarehouse().build(); + expect(skuEee123QrBlueDefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuEee123QrBlueDefaultWarehouse preset when built for graphql`, () => { + const skuEee123QrBlueDefaultWarehousePreset = + InventoryEntryDraftGraphql.presets + .skuEee123QrBlueDefaultWarehouse() + .build(); + expect(skuEee123QrBlueDefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuEee123QrBlueDefaultWarehouse preset when built for legacy rest`, () => { + const skuEee123QrBlueDefaultWarehousePreset = InventoryEntryDraft.presets + .skuEee123QrBlueDefaultWarehouse() + .buildRest(); + expect(skuEee123QrBlueDefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuEee123QrBlueDefaultWarehouse preset when built for legacy graphql`, () => { + const skuEee123QrBlueDefaultWarehousePreset = InventoryEntryDraft.presets + .skuEee123QrBlueDefaultWarehouse() + .buildGraphql(); + expect(skuEee123QrBlueDefaultWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-eee-123-qr-blue-default-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-eee-123-qr-blue-default-warehouse.ts new file mode 100644 index 000000000..f64e34395 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-eee-123-qr-blue-default-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .defaultWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .eee123Qr02() + .build(); + +const skuEee123QrBlueDefaultWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('eee123-qr-blue-default-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuEee123QrBlueDefaultWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-eee-123-qr-blue-eu-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-eee-123-qr-blue-eu-warehouse.spec.ts new file mode 100644 index 000000000..fbdd05ac7 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-eee-123-qr-blue-eu-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuEee123QrBlueEuWarehouse preset`, () => { + it(`should return a skuEee123QrBlueEuWarehouse preset when built for rest`, () => { + const skuEee123QrBlueEuWarehousePreset = InventoryEntryDraftRest.presets + .skuEee123QrBlueEuWarehouse() + .build(); + expect(skuEee123QrBlueEuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuEee123QrBlueEuWarehouse preset when built for graphql`, () => { + const skuEee123QrBlueEuWarehousePreset = InventoryEntryDraftGraphql.presets + .skuEee123QrBlueEuWarehouse() + .build(); + expect(skuEee123QrBlueEuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuEee123QrBlueEuWarehouse preset when built for legacy rest`, () => { + const skuEee123QrBlueEuWarehousePreset = InventoryEntryDraft.presets + .skuEee123QrBlueEuWarehouse() + .buildRest(); + expect(skuEee123QrBlueEuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuEee123QrBlueEuWarehouse preset when built for legacy graphql`, () => { + const skuEee123QrBlueEuWarehousePreset = InventoryEntryDraft.presets + .skuEee123QrBlueEuWarehouse() + .buildGraphql(); + expect(skuEee123QrBlueEuWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-eee-123-qr-blue-eu-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-eee-123-qr-blue-eu-warehouse.ts new file mode 100644 index 000000000..18f8dce2d --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-eee-123-qr-blue-eu-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .euWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .eee123Qr02() + .build(); + +const skuEee123QrBlueEuWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('eee123-qr-blue-eu-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuEee123QrBlueEuWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-eee-123-qr-blue-us-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-eee-123-qr-blue-us-warehouse.spec.ts new file mode 100644 index 000000000..bef8d0464 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-eee-123-qr-blue-us-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuEee123QrBlueUsWarehouse preset`, () => { + it(`should return a skuEee123QrBlueUsWarehouse preset when built for rest`, () => { + const skuEee123QrBlueUsWarehousePreset = InventoryEntryDraftRest.presets + .skuEee123QrBlueUsWarehouse() + .build(); + expect(skuEee123QrBlueUsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuEee123QrBlueUsWarehouse preset when built for graphql`, () => { + const skuEee123QrBlueUsWarehousePreset = InventoryEntryDraftGraphql.presets + .skuEee123QrBlueUsWarehouse() + .build(); + expect(skuEee123QrBlueUsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuEee123QrBlueUsWarehouse preset when built for legacy rest`, () => { + const skuEee123QrBlueUsWarehousePreset = InventoryEntryDraft.presets + .skuEee123QrBlueUsWarehouse() + .buildRest(); + expect(skuEee123QrBlueUsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuEee123QrBlueUsWarehouse preset when built for legacy graphql`, () => { + const skuEee123QrBlueUsWarehousePreset = InventoryEntryDraft.presets + .skuEee123QrBlueUsWarehouse() + .buildGraphql(); + expect(skuEee123QrBlueUsWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-eee-123-qr-blue-us-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-eee-123-qr-blue-us-warehouse.ts new file mode 100644 index 000000000..8abbef15c --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-eee-123-qr-blue-us-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .usWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .eee123Qr02() + .build(); + +const skuEee123QrBlueUsWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('eee123-qr-blue-us-warehouse') + .sku(variant.sku!) + .quantityOnStock(999) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuEee123QrBlueUsWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-eee-123-qr-green-default-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-eee-123-qr-green-default-warehouse.spec.ts new file mode 100644 index 000000000..49435bebf --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-eee-123-qr-green-default-warehouse.spec.ts @@ -0,0 +1,41 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuEee123QrGreenDefaultWarehouse preset`, () => { + it(`should return a skuEee123QrGreenDefaultWarehouse preset when built for rest`, () => { + const skuEee123QrGreenDefaultWarehousePreset = + InventoryEntryDraftRest.presets + .skuEee123QrGreenDefaultWarehouse() + .build(); + expect(skuEee123QrGreenDefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuEee123QrGreenDefaultWarehouse preset when built for graphql`, () => { + const skuEee123QrGreenDefaultWarehousePreset = + InventoryEntryDraftGraphql.presets + .skuEee123QrGreenDefaultWarehouse() + .build(); + expect(skuEee123QrGreenDefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuEee123QrGreenDefaultWarehouse preset when built for legacy rest`, () => { + const skuEee123QrGreenDefaultWarehousePreset = InventoryEntryDraft.presets + .skuEee123QrGreenDefaultWarehouse() + .buildRest(); + expect(skuEee123QrGreenDefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuEee123QrGreenDefaultWarehouse preset when built for legacy graphql`, () => { + const skuEee123QrGreenDefaultWarehousePreset = InventoryEntryDraft.presets + .skuEee123QrGreenDefaultWarehouse() + .buildGraphql(); + expect(skuEee123QrGreenDefaultWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-eee-123-qr-green-default-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-eee-123-qr-green-default-warehouse.ts new file mode 100644 index 000000000..eb368b6e6 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-eee-123-qr-green-default-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .defaultWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .eee123Qr03() + .build(); + +const skuEee123QrGreenDefaultWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('eee123-qr-green-default-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuEee123QrGreenDefaultWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-eee-123-qr-green-eu-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-eee-123-qr-green-eu-warehouse.spec.ts new file mode 100644 index 000000000..64dc5f47f --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-eee-123-qr-green-eu-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuEee123QrGreenEuWarehouse preset`, () => { + it(`should return a skuEee123QrGreenEuWarehouse preset when built for rest`, () => { + const skuEee123QrGreenEuWarehousePreset = InventoryEntryDraftRest.presets + .skuEee123QrGreenEuWarehouse() + .build(); + expect(skuEee123QrGreenEuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuEee123QrGreenEuWarehouse preset when built for graphql`, () => { + const skuEee123QrGreenEuWarehousePreset = InventoryEntryDraftGraphql.presets + .skuEee123QrGreenEuWarehouse() + .build(); + expect(skuEee123QrGreenEuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuEee123QrGreenEuWarehouse preset when built for legacy rest`, () => { + const skuEee123QrGreenEuWarehousePreset = InventoryEntryDraft.presets + .skuEee123QrGreenEuWarehouse() + .buildRest(); + expect(skuEee123QrGreenEuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuEee123QrGreenEuWarehouse preset when built for legacy graphql`, () => { + const skuEee123QrGreenEuWarehousePreset = InventoryEntryDraft.presets + .skuEee123QrGreenEuWarehouse() + .buildGraphql(); + expect(skuEee123QrGreenEuWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-eee-123-qr-green-eu-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-eee-123-qr-green-eu-warehouse.ts new file mode 100644 index 000000000..cce047b74 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-eee-123-qr-green-eu-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .euWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .eee123Qr03() + .build(); + +const skuEee123QrGreenEuWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('eee123-qr-green-eu-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuEee123QrGreenEuWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-eee-123-qr-green-us-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-eee-123-qr-green-us-warehouse.spec.ts new file mode 100644 index 000000000..b25915997 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-eee-123-qr-green-us-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuEee123QrGreenUsWarehouse preset`, () => { + it(`should return a skuEee123QrGreenUsWarehouse preset when built for rest`, () => { + const skuEee123QrGreenUsWarehousePreset = InventoryEntryDraftRest.presets + .skuEee123QrGreenUsWarehouse() + .build(); + expect(skuEee123QrGreenUsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuEee123QrGreenUsWarehouse preset when built for graphql`, () => { + const skuEee123QrGreenUsWarehousePreset = InventoryEntryDraftGraphql.presets + .skuEee123QrGreenUsWarehouse() + .build(); + expect(skuEee123QrGreenUsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuEee123QrGreenUsWarehouse preset when built for legacy rest`, () => { + const skuEee123QrGreenUsWarehousePreset = InventoryEntryDraft.presets + .skuEee123QrGreenUsWarehouse() + .buildRest(); + expect(skuEee123QrGreenUsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuEee123QrGreenUsWarehouse preset when built for legacy graphql`, () => { + const skuEee123QrGreenUsWarehousePreset = InventoryEntryDraft.presets + .skuEee123QrGreenUsWarehouse() + .buildGraphql(); + expect(skuEee123QrGreenUsWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-eee-123-qr-green-us-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-eee-123-qr-green-us-warehouse.ts new file mode 100644 index 000000000..36750db78 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-eee-123-qr-green-us-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .usWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .eee123Qr03() + .build(); + +const skuEee123QrGreenUsWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('eee123-qr-green-us-warehouse') + .sku(variant.sku!) + .quantityOnStock(999) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuEee123QrGreenUsWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-eee-123-qr-red-default-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-eee-123-qr-red-default-warehouse.spec.ts new file mode 100644 index 000000000..8e921c219 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-eee-123-qr-red-default-warehouse.spec.ts @@ -0,0 +1,40 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuEee123QrRedDefaultWarehouse preset`, () => { + it(`should return a skuEee123QrRedDefaultWarehouse preset when built for rest`, () => { + const skuEee123QrRedDefaultWarehousePreset = InventoryEntryDraftRest.presets + .skuEee123QrRedDefaultWarehouse() + .build(); + expect(skuEee123QrRedDefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuEee123QrRedDefaultWarehouse preset when built for graphql`, () => { + const skuEee123QrRedDefaultWarehousePreset = + InventoryEntryDraftGraphql.presets + .skuEee123QrRedDefaultWarehouse() + .build(); + expect(skuEee123QrRedDefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuEee123QrRedDefaultWarehouse preset when built for legacy rest`, () => { + const skuEee123QrRedDefaultWarehousePreset = InventoryEntryDraft.presets + .skuEee123QrRedDefaultWarehouse() + .buildRest(); + expect(skuEee123QrRedDefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuEee123QrRedDefaultWarehouse preset when built for legacy graphql`, () => { + const skuEee123QrRedDefaultWarehousePreset = InventoryEntryDraft.presets + .skuEee123QrRedDefaultWarehouse() + .buildGraphql(); + expect(skuEee123QrRedDefaultWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-eee-123-qr-red-default-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-eee-123-qr-red-default-warehouse.ts new file mode 100644 index 000000000..f66c64d69 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-eee-123-qr-red-default-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .defaultWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .eee123Qr01() + .build(); + +const skuEee123QrRedDefaultWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('eee123-qr-red-default-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuEee123QrRedDefaultWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-eee-123-qr-red-eu-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-eee-123-qr-red-eu-warehouse.spec.ts new file mode 100644 index 000000000..0729b24ca --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-eee-123-qr-red-eu-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuEee123QrRedEuWarehouse preset`, () => { + it(`should return a skuEee123QrRedEuWarehouse preset when built for rest`, () => { + const skuEee123QrRedEuWarehousePreset = InventoryEntryDraftRest.presets + .skuEee123QrRedEuWarehouse() + .build(); + expect(skuEee123QrRedEuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuEee123QrRedEuWarehouse preset when built for graphql`, () => { + const skuEee123QrRedEuWarehousePreset = InventoryEntryDraftGraphql.presets + .skuEee123QrRedEuWarehouse() + .build(); + expect(skuEee123QrRedEuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuEee123QrRedEuWarehouse preset when built for legacy rest`, () => { + const skuEee123QrRedEuWarehousePreset = InventoryEntryDraft.presets + .skuEee123QrRedEuWarehouse() + .buildRest(); + expect(skuEee123QrRedEuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuEee123QrRedEuWarehouse preset when built for legacy graphql`, () => { + const skuEee123QrRedEuWarehousePreset = InventoryEntryDraft.presets + .skuEee123QrRedEuWarehouse() + .buildGraphql(); + expect(skuEee123QrRedEuWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-eee-123-qr-red-eu-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-eee-123-qr-red-eu-warehouse.ts new file mode 100644 index 000000000..e72eb21d6 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-eee-123-qr-red-eu-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .euWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .eee123Qr01() + .build(); + +const skuEee123QrRedEuWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('eee123-qr-red-eu-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuEee123QrRedEuWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-eee-123-qr-red-us-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-eee-123-qr-red-us-warehouse.spec.ts new file mode 100644 index 000000000..92903bbfd --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-eee-123-qr-red-us-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuEee123QrRedUsWarehouse preset`, () => { + it(`should return a skuEee123QrRedUsWarehouse preset when built for rest`, () => { + const skuEee123QrRedUsWarehousePreset = InventoryEntryDraftRest.presets + .skuEee123QrRedUsWarehouse() + .build(); + expect(skuEee123QrRedUsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuEee123QrRedUsWarehouse preset when built for graphql`, () => { + const skuEee123QrRedUsWarehousePreset = InventoryEntryDraftGraphql.presets + .skuEee123QrRedUsWarehouse() + .build(); + expect(skuEee123QrRedUsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuEee123QrRedUsWarehouse preset when built for legacy rest`, () => { + const skuEee123QrRedUsWarehousePreset = InventoryEntryDraft.presets + .skuEee123QrRedUsWarehouse() + .buildRest(); + expect(skuEee123QrRedUsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuEee123QrRedUsWarehouse preset when built for legacy graphql`, () => { + const skuEee123QrRedUsWarehousePreset = InventoryEntryDraft.presets + .skuEee123QrRedUsWarehouse() + .buildGraphql(); + expect(skuEee123QrRedUsWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-eee-123-qr-red-us-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-eee-123-qr-red-us-warehouse.ts new file mode 100644 index 000000000..82d575bd2 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-eee-123-qr-red-us-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .usWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .eee123Qr01() + .build(); + +const skuEee123QrRedUsWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('eee123-qr-red-us-warehouse') + .sku(variant.sku!) + .quantityOnStock(999) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuEee123QrRedUsWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-eee123-qr-blue-default.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-eee123-qr-blue-default.spec.ts deleted file mode 100644 index d8add7109..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-eee123-qr-blue-default.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuEee123QrBlueDefault from './sku-eee123-qr-blue-default'; - -describe(`with skuEee123QrBlueDefault preset and default-warehouse channel`, () => { - it(`should return a skuEee123QrBlueDefault preset`, () => { - const skuEee123QrBlueDefaultPreset = - skuEee123QrBlueDefault().build(); - expect(skuEee123QrBlueDefaultPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "eee123-qr-blue-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "eee123-qr-blue", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuEee123QrBlueDefault preset when built for graphql`, () => { - const skuEee123QrBlueDefaultPresetGraphql = - skuEee123QrBlueDefault().buildGraphql(); - expect(skuEee123QrBlueDefaultPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "eee123-qr-blue-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "eee123-qr-blue", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-eee123-qr-blue-default.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-eee123-qr-blue-default.ts deleted file mode 100644 index a2a805dd5..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-eee123-qr-blue-default.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const defaultWarehouse = ChannelDraft.presets.sampleDataB2B - .defaultWarehouse() - .build(); - -const eee123Qr02 = ProductVariantDraft.presets.sampleDataB2B - .eee123Qr02() - .build(); - -const skuEee123QrBlueDefault = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${eee123Qr02.sku}-${defaultWarehouse.key}`) - .sku(eee123Qr02.sku!) - .quantityOnStock(1000) - .supplyChannel( - KeyReferenceDraft.presets.channel().key(defaultWarehouse.key) - ); - -export default skuEee123QrBlueDefault; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-eee123-qr-blue-eu.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-eee123-qr-blue-eu.spec.ts deleted file mode 100644 index 3c3916227..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-eee123-qr-blue-eu.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuEee123QrBlueEu from './sku-eee123-qr-blue-eu'; - -describe(`with skuEee123QrBlueEu preset and eu-warehouse channel`, () => { - it(`should return a skuEee123QrBlueEu preset`, () => { - const skuEee123QrBlueEuPreset = - skuEee123QrBlueEu().build(); - expect(skuEee123QrBlueEuPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "eee123-qr-blue-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "eee123-qr-blue", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuEee123QrBlueEu preset when built for graphql`, () => { - const skuEee123QrBlueEuPresetGraphql = - skuEee123QrBlueEu().buildGraphql(); - expect(skuEee123QrBlueEuPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "eee123-qr-blue-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "eee123-qr-blue", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-eee123-qr-blue-eu.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-eee123-qr-blue-eu.ts deleted file mode 100644 index dfa394086..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-eee123-qr-blue-eu.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const euWarehouse = ChannelDraft.presets.sampleDataB2B - .euWarehouse() - .build(); - -const eee123Qr02 = ProductVariantDraft.presets.sampleDataB2B - .eee123Qr02() - .build(); - -const skuEee123QrBlueEu = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${eee123Qr02.sku}-${euWarehouse.key}`) - .sku(eee123Qr02.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(euWarehouse.key)); - -export default skuEee123QrBlueEu; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-eee123-qr-blue-us.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-eee123-qr-blue-us.spec.ts deleted file mode 100644 index 9958a511f..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-eee123-qr-blue-us.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuEee123QrBlueUs from './sku-eee123-qr-blue-us'; - -describe(`with skuEee123QrBlueUs preset and us-warehouse channel`, () => { - it(`should return a skuEee123QrBlueUs preset`, () => { - const skuEee123QrBlueUsPreset = - skuEee123QrBlueUs().build(); - expect(skuEee123QrBlueUsPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "eee123-qr-blue-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "eee123-qr-blue", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuEee123QrBlueUs preset when built for graphql`, () => { - const skuEee123QrBlueUsPresetGraphql = - skuEee123QrBlueUs().buildGraphql(); - expect(skuEee123QrBlueUsPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "eee123-qr-blue-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "eee123-qr-blue", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-eee123-qr-blue-us.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-eee123-qr-blue-us.ts deleted file mode 100644 index acbd401d8..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-eee123-qr-blue-us.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const usWarehouse = ChannelDraft.presets.sampleDataB2B - .usWarehouse() - .build(); - -const eee123Qr02 = ProductVariantDraft.presets.sampleDataB2B - .eee123Qr02() - .build(); - -const skuEee123QrBlueUs = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${eee123Qr02.sku}-${usWarehouse.key}`) - .sku(eee123Qr02.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(usWarehouse.key)); - -export default skuEee123QrBlueUs; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-eee123-qr-green-default.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-eee123-qr-green-default.spec.ts deleted file mode 100644 index 46b6269e6..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-eee123-qr-green-default.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuEee123QrGreenDefault from './sku-eee123-qr-green-default'; - -describe(`with skuEee123QrGreenDefault preset and default-warehouse channel`, () => { - it(`should return a skuEee123QrGreenDefault preset`, () => { - const skuEee123QrGreenDefaultPreset = - skuEee123QrGreenDefault().build(); - expect(skuEee123QrGreenDefaultPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "eee123-qr-green-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "eee123-qr-green", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuEee123QrGreenDefault preset when built for graphql`, () => { - const skuEee123QrGreenDefaultPresetGraphql = - skuEee123QrGreenDefault().buildGraphql(); - expect(skuEee123QrGreenDefaultPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "eee123-qr-green-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "eee123-qr-green", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-eee123-qr-green-default.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-eee123-qr-green-default.ts deleted file mode 100644 index a314ca0bf..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-eee123-qr-green-default.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const defaultWarehouse = ChannelDraft.presets.sampleDataB2B - .defaultWarehouse() - .build(); - -const eee123Qr03 = ProductVariantDraft.presets.sampleDataB2B - .eee123Qr03() - .build(); - -const skuEee123QrGreenDefault = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${eee123Qr03.sku}-${defaultWarehouse.key}`) - .sku(eee123Qr03.sku!) - .quantityOnStock(1000) - .supplyChannel( - KeyReferenceDraft.presets.channel().key(defaultWarehouse.key) - ); - -export default skuEee123QrGreenDefault; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-eee123-qr-green-eu.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-eee123-qr-green-eu.spec.ts deleted file mode 100644 index 8b1f4afd4..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-eee123-qr-green-eu.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuEee123QrGreenEu from './sku-eee123-qr-green-eu'; - -describe(`with skuEee123QrGreenEu preset and eu-warehouse channel`, () => { - it(`should return a skuEee123QrGreenEu preset`, () => { - const skuEee123QrGreenEuPreset = - skuEee123QrGreenEu().build(); - expect(skuEee123QrGreenEuPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "eee123-qr-green-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "eee123-qr-green", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuEee123QrGreenEu preset when built for graphql`, () => { - const skuEee123QrGreenEuPresetGraphql = - skuEee123QrGreenEu().buildGraphql(); - expect(skuEee123QrGreenEuPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "eee123-qr-green-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "eee123-qr-green", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-eee123-qr-green-eu.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-eee123-qr-green-eu.ts deleted file mode 100644 index 4c57e22e2..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-eee123-qr-green-eu.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const euWarehouse = ChannelDraft.presets.sampleDataB2B - .euWarehouse() - .build(); - -const eee123Qr03 = ProductVariantDraft.presets.sampleDataB2B - .eee123Qr03() - .build(); - -const skuEee123QrGreenEu = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${eee123Qr03.sku}-${euWarehouse.key}`) - .sku(eee123Qr03.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(euWarehouse.key)); - -export default skuEee123QrGreenEu; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-eee123-qr-green-us.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-eee123-qr-green-us.spec.ts deleted file mode 100644 index ac3a6e5c7..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-eee123-qr-green-us.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuEee123QrGreenUs from './sku-eee123-qr-green-us'; - -describe(`with skuEee123QrGreenUs preset and us-warehouse channel`, () => { - it(`should return a skuEee123QrGreenUs preset`, () => { - const skuEee123QrGreenUsPreset = - skuEee123QrGreenUs().build(); - expect(skuEee123QrGreenUsPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "eee123-qr-green-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "eee123-qr-green", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuEee123QrGreenUs preset when built for graphql`, () => { - const skuEee123QrGreenUsPresetGraphql = - skuEee123QrGreenUs().buildGraphql(); - expect(skuEee123QrGreenUsPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "eee123-qr-green-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "eee123-qr-green", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-eee123-qr-green-us.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-eee123-qr-green-us.ts deleted file mode 100644 index 9ab7a4505..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-eee123-qr-green-us.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const usWarehouse = ChannelDraft.presets.sampleDataB2B - .usWarehouse() - .build(); - -const eee123Qr03 = ProductVariantDraft.presets.sampleDataB2B - .eee123Qr03() - .build(); - -const skuEee123QrGreenUs = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${eee123Qr03.sku}-${usWarehouse.key}`) - .sku(eee123Qr03.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(usWarehouse.key)); - -export default skuEee123QrGreenUs; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-eee123-qr-red-default.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-eee123-qr-red-default.spec.ts deleted file mode 100644 index 3a4ab3127..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-eee123-qr-red-default.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuEee123QrRedDefault from './sku-eee123-qr-red-default'; - -describe(`with skuEee123QrRedDefault preset and default-warehouse channel`, () => { - it(`should return a skuEee123QrRedDefault preset`, () => { - const skuEee123QrRedDefaultPreset = - skuEee123QrRedDefault().build(); - expect(skuEee123QrRedDefaultPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "eee123-qr-red-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "eee123-qr-red", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuEee123QrRedDefault preset when built for graphql`, () => { - const skuEee123QrRedDefaultPresetGraphql = - skuEee123QrRedDefault().buildGraphql(); - expect(skuEee123QrRedDefaultPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "eee123-qr-red-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "eee123-qr-red", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-eee123-qr-red-default.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-eee123-qr-red-default.ts deleted file mode 100644 index 3705b8a9f..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-eee123-qr-red-default.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const defaultWarehouse = ChannelDraft.presets.sampleDataB2B - .defaultWarehouse() - .build(); - -const eee123Qr01 = ProductVariantDraft.presets.sampleDataB2B - .eee123Qr01() - .build(); - -const skuEee123QrRedDefault = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${eee123Qr01.sku}-${defaultWarehouse.key}`) - .sku(eee123Qr01.sku!) - .quantityOnStock(1000) - .supplyChannel( - KeyReferenceDraft.presets.channel().key(defaultWarehouse.key) - ); - -export default skuEee123QrRedDefault; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-eee123-qr-red-eu.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-eee123-qr-red-eu.spec.ts deleted file mode 100644 index e0d3cf833..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-eee123-qr-red-eu.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuEee123QrRedEu from './sku-eee123-qr-red-eu'; - -describe(`with skuEee123QrRedEu preset and eu-warehouse channel`, () => { - it(`should return a skuEee123QrRedEu preset`, () => { - const skuEee123QrRedEuPreset = - skuEee123QrRedEu().build(); - expect(skuEee123QrRedEuPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "eee123-qr-red-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "eee123-qr-red", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuEee123QrRedEu preset when built for graphql`, () => { - const skuEee123QrRedEuPresetGraphql = - skuEee123QrRedEu().buildGraphql(); - expect(skuEee123QrRedEuPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "eee123-qr-red-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "eee123-qr-red", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-eee123-qr-red-eu.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-eee123-qr-red-eu.ts deleted file mode 100644 index c6f055896..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-eee123-qr-red-eu.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const euWarehouse = ChannelDraft.presets.sampleDataB2B - .euWarehouse() - .build(); - -const eee123Qr01 = ProductVariantDraft.presets.sampleDataB2B - .eee123Qr01() - .build(); - -const skuEee123QrRedEu = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${eee123Qr01.sku}-${euWarehouse.key}`) - .sku(eee123Qr01.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(euWarehouse.key)); - -export default skuEee123QrRedEu; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-eee123-qr-red-us.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-eee123-qr-red-us.spec.ts deleted file mode 100644 index 2ce53b288..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-eee123-qr-red-us.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuEee123QrRedUs from './sku-eee123-qr-red-us'; - -describe(`with skuEee123QrRedUs preset and us-warehouse channel`, () => { - it(`should return a skuEee123QrRedUs preset`, () => { - const skuEee123QrRedUsPreset = - skuEee123QrRedUs().build(); - expect(skuEee123QrRedUsPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "eee123-qr-red-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "eee123-qr-red", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuEee123QrRedUs preset when built for graphql`, () => { - const skuEee123QrRedUsPresetGraphql = - skuEee123QrRedUs().buildGraphql(); - expect(skuEee123QrRedUsPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "eee123-qr-red-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "eee123-qr-red", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-eee123-qr-red-us.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-eee123-qr-red-us.ts deleted file mode 100644 index 854df5382..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-eee123-qr-red-us.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const usWarehouse = ChannelDraft.presets.sampleDataB2B - .usWarehouse() - .build(); - -const eee123Qr01 = ProductVariantDraft.presets.sampleDataB2B - .eee123Qr01() - .build(); - -const skuEee123QrRedUs = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${eee123Qr01.sku}-${usWarehouse.key}`) - .sku(eee123Qr01.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(usWarehouse.key)); - -export default skuEee123QrRedUs; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-f-890-op-2015-default-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-f-890-op-2015-default-warehouse.spec.ts new file mode 100644 index 000000000..4db70abbd --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-f-890-op-2015-default-warehouse.spec.ts @@ -0,0 +1,40 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuF890Op2015DefaultWarehouse preset`, () => { + it(`should return a skuF890Op2015DefaultWarehouse preset when built for rest`, () => { + const skuF890Op2015DefaultWarehousePreset = InventoryEntryDraftRest.presets + .skuF890Op2015DefaultWarehouse() + .build(); + expect(skuF890Op2015DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuF890Op2015DefaultWarehouse preset when built for graphql`, () => { + const skuF890Op2015DefaultWarehousePreset = + InventoryEntryDraftGraphql.presets + .skuF890Op2015DefaultWarehouse() + .build(); + expect(skuF890Op2015DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuF890Op2015DefaultWarehouse preset when built for legacy rest`, () => { + const skuF890Op2015DefaultWarehousePreset = InventoryEntryDraft.presets + .skuF890Op2015DefaultWarehouse() + .buildRest(); + expect(skuF890Op2015DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuF890Op2015DefaultWarehouse preset when built for legacy graphql`, () => { + const skuF890Op2015DefaultWarehousePreset = InventoryEntryDraft.presets + .skuF890Op2015DefaultWarehouse() + .buildGraphql(); + expect(skuF890Op2015DefaultWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-f-890-op-2015-default-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-f-890-op-2015-default-warehouse.ts new file mode 100644 index 000000000..3101d8378 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-f-890-op-2015-default-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .defaultWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .f890Op01() + .build(); + +const skuF890Op2015DefaultWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('f890-op-2015-default-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuF890Op2015DefaultWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-f-890-op-2015-eu-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-f-890-op-2015-eu-warehouse.spec.ts new file mode 100644 index 000000000..1b5f09d04 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-f-890-op-2015-eu-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuF890Op2015EuWarehouse preset`, () => { + it(`should return a skuF890Op2015EuWarehouse preset when built for rest`, () => { + const skuF890Op2015EuWarehousePreset = InventoryEntryDraftRest.presets + .skuF890Op2015EuWarehouse() + .build(); + expect(skuF890Op2015EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuF890Op2015EuWarehouse preset when built for graphql`, () => { + const skuF890Op2015EuWarehousePreset = InventoryEntryDraftGraphql.presets + .skuF890Op2015EuWarehouse() + .build(); + expect(skuF890Op2015EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuF890Op2015EuWarehouse preset when built for legacy rest`, () => { + const skuF890Op2015EuWarehousePreset = InventoryEntryDraft.presets + .skuF890Op2015EuWarehouse() + .buildRest(); + expect(skuF890Op2015EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuF890Op2015EuWarehouse preset when built for legacy graphql`, () => { + const skuF890Op2015EuWarehousePreset = InventoryEntryDraft.presets + .skuF890Op2015EuWarehouse() + .buildGraphql(); + expect(skuF890Op2015EuWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-f-890-op-2015-eu-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-f-890-op-2015-eu-warehouse.ts new file mode 100644 index 000000000..484568ecb --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-f-890-op-2015-eu-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .euWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .f890Op01() + .build(); + +const skuF890Op2015EuWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('f890-op-2015-eu-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuF890Op2015EuWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-f-890-op-2015-us-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-f-890-op-2015-us-warehouse.spec.ts new file mode 100644 index 000000000..5a7329fd7 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-f-890-op-2015-us-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuF890Op2015UsWarehouse preset`, () => { + it(`should return a skuF890Op2015UsWarehouse preset when built for rest`, () => { + const skuF890Op2015UsWarehousePreset = InventoryEntryDraftRest.presets + .skuF890Op2015UsWarehouse() + .build(); + expect(skuF890Op2015UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuF890Op2015UsWarehouse preset when built for graphql`, () => { + const skuF890Op2015UsWarehousePreset = InventoryEntryDraftGraphql.presets + .skuF890Op2015UsWarehouse() + .build(); + expect(skuF890Op2015UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuF890Op2015UsWarehouse preset when built for legacy rest`, () => { + const skuF890Op2015UsWarehousePreset = InventoryEntryDraft.presets + .skuF890Op2015UsWarehouse() + .buildRest(); + expect(skuF890Op2015UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuF890Op2015UsWarehouse preset when built for legacy graphql`, () => { + const skuF890Op2015UsWarehousePreset = InventoryEntryDraft.presets + .skuF890Op2015UsWarehouse() + .buildGraphql(); + expect(skuF890Op2015UsWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-f-890-op-2015-us-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-f-890-op-2015-us-warehouse.ts new file mode 100644 index 000000000..b402ffcbf --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-f-890-op-2015-us-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .usWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .f890Op01() + .build(); + +const skuF890Op2015UsWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('f890-op-2015-us-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuF890Op2015UsWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-f-890-op-2019-default-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-f-890-op-2019-default-warehouse.spec.ts new file mode 100644 index 000000000..1d2bfcb58 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-f-890-op-2019-default-warehouse.spec.ts @@ -0,0 +1,40 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuF890Op2019DefaultWarehouse preset`, () => { + it(`should return a skuF890Op2019DefaultWarehouse preset when built for rest`, () => { + const skuF890Op2019DefaultWarehousePreset = InventoryEntryDraftRest.presets + .skuF890Op2019DefaultWarehouse() + .build(); + expect(skuF890Op2019DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuF890Op2019DefaultWarehouse preset when built for graphql`, () => { + const skuF890Op2019DefaultWarehousePreset = + InventoryEntryDraftGraphql.presets + .skuF890Op2019DefaultWarehouse() + .build(); + expect(skuF890Op2019DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuF890Op2019DefaultWarehouse preset when built for legacy rest`, () => { + const skuF890Op2019DefaultWarehousePreset = InventoryEntryDraft.presets + .skuF890Op2019DefaultWarehouse() + .buildRest(); + expect(skuF890Op2019DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuF890Op2019DefaultWarehouse preset when built for legacy graphql`, () => { + const skuF890Op2019DefaultWarehousePreset = InventoryEntryDraft.presets + .skuF890Op2019DefaultWarehouse() + .buildGraphql(); + expect(skuF890Op2019DefaultWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-f-890-op-2019-default-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-f-890-op-2019-default-warehouse.ts new file mode 100644 index 000000000..636313ce2 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-f-890-op-2019-default-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .defaultWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .f890Op02() + .build(); + +const skuF890Op2019DefaultWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('f890-op-2019-default-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuF890Op2019DefaultWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-f-890-op-2019-eu-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-f-890-op-2019-eu-warehouse.spec.ts new file mode 100644 index 000000000..67b5fa137 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-f-890-op-2019-eu-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuF890Op2019EuWarehouse preset`, () => { + it(`should return a skuF890Op2019EuWarehouse preset when built for rest`, () => { + const skuF890Op2019EuWarehousePreset = InventoryEntryDraftRest.presets + .skuF890Op2019EuWarehouse() + .build(); + expect(skuF890Op2019EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuF890Op2019EuWarehouse preset when built for graphql`, () => { + const skuF890Op2019EuWarehousePreset = InventoryEntryDraftGraphql.presets + .skuF890Op2019EuWarehouse() + .build(); + expect(skuF890Op2019EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuF890Op2019EuWarehouse preset when built for legacy rest`, () => { + const skuF890Op2019EuWarehousePreset = InventoryEntryDraft.presets + .skuF890Op2019EuWarehouse() + .buildRest(); + expect(skuF890Op2019EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuF890Op2019EuWarehouse preset when built for legacy graphql`, () => { + const skuF890Op2019EuWarehousePreset = InventoryEntryDraft.presets + .skuF890Op2019EuWarehouse() + .buildGraphql(); + expect(skuF890Op2019EuWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-f-890-op-2019-eu-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-f-890-op-2019-eu-warehouse.ts new file mode 100644 index 000000000..44196edcd --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-f-890-op-2019-eu-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .euWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .f890Op02() + .build(); + +const skuF890Op2019EuWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('f890-op-2019-eu-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuF890Op2019EuWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-f-890-op-2019-us-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-f-890-op-2019-us-warehouse.spec.ts new file mode 100644 index 000000000..f7cf54efe --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-f-890-op-2019-us-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuF890Op2019UsWarehouse preset`, () => { + it(`should return a skuF890Op2019UsWarehouse preset when built for rest`, () => { + const skuF890Op2019UsWarehousePreset = InventoryEntryDraftRest.presets + .skuF890Op2019UsWarehouse() + .build(); + expect(skuF890Op2019UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuF890Op2019UsWarehouse preset when built for graphql`, () => { + const skuF890Op2019UsWarehousePreset = InventoryEntryDraftGraphql.presets + .skuF890Op2019UsWarehouse() + .build(); + expect(skuF890Op2019UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuF890Op2019UsWarehouse preset when built for legacy rest`, () => { + const skuF890Op2019UsWarehousePreset = InventoryEntryDraft.presets + .skuF890Op2019UsWarehouse() + .buildRest(); + expect(skuF890Op2019UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuF890Op2019UsWarehouse preset when built for legacy graphql`, () => { + const skuF890Op2019UsWarehousePreset = InventoryEntryDraft.presets + .skuF890Op2019UsWarehouse() + .buildGraphql(); + expect(skuF890Op2019UsWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-f-890-op-2019-us-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-f-890-op-2019-us-warehouse.ts new file mode 100644 index 000000000..99b1af29c --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-f-890-op-2019-us-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .usWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .f890Op02() + .build(); + +const skuF890Op2019UsWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('f890-op-2019-us-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuF890Op2019UsWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-f-890-op-2023-default-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-f-890-op-2023-default-warehouse.spec.ts new file mode 100644 index 000000000..bf59753f1 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-f-890-op-2023-default-warehouse.spec.ts @@ -0,0 +1,40 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuF890Op2023DefaultWarehouse preset`, () => { + it(`should return a skuF890Op2023DefaultWarehouse preset when built for rest`, () => { + const skuF890Op2023DefaultWarehousePreset = InventoryEntryDraftRest.presets + .skuF890Op2023DefaultWarehouse() + .build(); + expect(skuF890Op2023DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuF890Op2023DefaultWarehouse preset when built for graphql`, () => { + const skuF890Op2023DefaultWarehousePreset = + InventoryEntryDraftGraphql.presets + .skuF890Op2023DefaultWarehouse() + .build(); + expect(skuF890Op2023DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuF890Op2023DefaultWarehouse preset when built for legacy rest`, () => { + const skuF890Op2023DefaultWarehousePreset = InventoryEntryDraft.presets + .skuF890Op2023DefaultWarehouse() + .buildRest(); + expect(skuF890Op2023DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuF890Op2023DefaultWarehouse preset when built for legacy graphql`, () => { + const skuF890Op2023DefaultWarehousePreset = InventoryEntryDraft.presets + .skuF890Op2023DefaultWarehouse() + .buildGraphql(); + expect(skuF890Op2023DefaultWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-f-890-op-2023-default-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-f-890-op-2023-default-warehouse.ts new file mode 100644 index 000000000..115b13c74 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-f-890-op-2023-default-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .defaultWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .f890Op03() + .build(); + +const skuF890Op2023DefaultWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('f890-op-2023-default-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuF890Op2023DefaultWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-f-890-op-2023-eu-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-f-890-op-2023-eu-warehouse.spec.ts new file mode 100644 index 000000000..6218a6dc7 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-f-890-op-2023-eu-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuF890Op2023EuWarehouse preset`, () => { + it(`should return a skuF890Op2023EuWarehouse preset when built for rest`, () => { + const skuF890Op2023EuWarehousePreset = InventoryEntryDraftRest.presets + .skuF890Op2023EuWarehouse() + .build(); + expect(skuF890Op2023EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuF890Op2023EuWarehouse preset when built for graphql`, () => { + const skuF890Op2023EuWarehousePreset = InventoryEntryDraftGraphql.presets + .skuF890Op2023EuWarehouse() + .build(); + expect(skuF890Op2023EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuF890Op2023EuWarehouse preset when built for legacy rest`, () => { + const skuF890Op2023EuWarehousePreset = InventoryEntryDraft.presets + .skuF890Op2023EuWarehouse() + .buildRest(); + expect(skuF890Op2023EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuF890Op2023EuWarehouse preset when built for legacy graphql`, () => { + const skuF890Op2023EuWarehousePreset = InventoryEntryDraft.presets + .skuF890Op2023EuWarehouse() + .buildGraphql(); + expect(skuF890Op2023EuWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-f-890-op-2023-eu-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-f-890-op-2023-eu-warehouse.ts new file mode 100644 index 000000000..7bb3bade2 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-f-890-op-2023-eu-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .euWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .f890Op03() + .build(); + +const skuF890Op2023EuWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('f890-op-2023-eu-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuF890Op2023EuWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-f-890-op-2023-us-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-f-890-op-2023-us-warehouse.spec.ts new file mode 100644 index 000000000..0ef34b8d7 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-f-890-op-2023-us-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuF890Op2023UsWarehouse preset`, () => { + it(`should return a skuF890Op2023UsWarehouse preset when built for rest`, () => { + const skuF890Op2023UsWarehousePreset = InventoryEntryDraftRest.presets + .skuF890Op2023UsWarehouse() + .build(); + expect(skuF890Op2023UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuF890Op2023UsWarehouse preset when built for graphql`, () => { + const skuF890Op2023UsWarehousePreset = InventoryEntryDraftGraphql.presets + .skuF890Op2023UsWarehouse() + .build(); + expect(skuF890Op2023UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuF890Op2023UsWarehouse preset when built for legacy rest`, () => { + const skuF890Op2023UsWarehousePreset = InventoryEntryDraft.presets + .skuF890Op2023UsWarehouse() + .buildRest(); + expect(skuF890Op2023UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuF890Op2023UsWarehouse preset when built for legacy graphql`, () => { + const skuF890Op2023UsWarehousePreset = InventoryEntryDraft.presets + .skuF890Op2023UsWarehouse() + .buildGraphql(); + expect(skuF890Op2023UsWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-f-890-op-2023-us-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-f-890-op-2023-us-warehouse.ts new file mode 100644 index 000000000..672881f4e --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-f-890-op-2023-us-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .usWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .f890Op03() + .build(); + +const skuF890Op2023UsWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('f890-op-2023-us-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuF890Op2023UsWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-f890-op-2015-default.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-f890-op-2015-default.spec.ts deleted file mode 100644 index 5d056eef0..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-f890-op-2015-default.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuF890Op2015Default from './sku-f890-op-2015-default'; - -describe(`with skuF890Op2015Default preset and default-warehouse channel`, () => { - it(`should return a skuF890Op2015Default preset`, () => { - const skuF890Op2015DefaultPreset = - skuF890Op2015Default().build(); - expect(skuF890Op2015DefaultPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "f890-op-2015-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "f890-op-2015", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuF890Op2015Default preset when built for graphql`, () => { - const skuF890Op2015DefaultPresetGraphql = - skuF890Op2015Default().buildGraphql(); - expect(skuF890Op2015DefaultPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "f890-op-2015-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "f890-op-2015", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-f890-op-2015-default.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-f890-op-2015-default.ts deleted file mode 100644 index 407fc71c3..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-f890-op-2015-default.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const defaultWarehouse = ChannelDraft.presets.sampleDataB2B - .defaultWarehouse() - .build(); - -const f890Op01 = ProductVariantDraft.presets.sampleDataB2B - .f890Op01() - .build(); - -const skuF890Op2015Default = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${f890Op01.sku}-${defaultWarehouse.key}`) - .sku(f890Op01.sku!) - .quantityOnStock(1000) - .supplyChannel( - KeyReferenceDraft.presets.channel().key(defaultWarehouse.key) - ); - -export default skuF890Op2015Default; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-f890-op-2015-eu.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-f890-op-2015-eu.spec.ts deleted file mode 100644 index ee9a655a7..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-f890-op-2015-eu.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuF890Op2015Eu from './sku-f890-op-2015-eu'; - -describe(`with skuF890Op2015Eu preset and eu-warehouse channel`, () => { - it(`should return a skuF890Op2015Eu preset`, () => { - const skuF890Op2015EuPreset = - skuF890Op2015Eu().build(); - expect(skuF890Op2015EuPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "f890-op-2015-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "f890-op-2015", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuF890Op2015Eu preset when built for graphql`, () => { - const skuF890Op2015EuPresetGraphql = - skuF890Op2015Eu().buildGraphql(); - expect(skuF890Op2015EuPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "f890-op-2015-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "f890-op-2015", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-f890-op-2015-eu.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-f890-op-2015-eu.ts deleted file mode 100644 index e46d260fc..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-f890-op-2015-eu.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const euWarehouse = ChannelDraft.presets.sampleDataB2B - .euWarehouse() - .build(); - -const f890Op01 = ProductVariantDraft.presets.sampleDataB2B - .f890Op01() - .build(); - -const skuF890Op2015Eu = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${f890Op01.sku}-${euWarehouse.key}`) - .sku(f890Op01.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(euWarehouse.key)); - -export default skuF890Op2015Eu; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-f890-op-2015-us.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-f890-op-2015-us.spec.ts deleted file mode 100644 index 9de902fff..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-f890-op-2015-us.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuF890Op2015Us from './sku-f890-op-2015-us'; - -describe(`with skuF890Op2015Us preset and us-warehouse channel`, () => { - it(`should return a skuF890Op2015Us preset`, () => { - const skuF890Op2015UsPreset = - skuF890Op2015Us().build(); - expect(skuF890Op2015UsPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "f890-op-2015-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "f890-op-2015", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuF890Op2015Us preset when built for graphql`, () => { - const skuF890Op2015UsPresetGraphql = - skuF890Op2015Us().buildGraphql(); - expect(skuF890Op2015UsPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "f890-op-2015-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "f890-op-2015", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-f890-op-2015-us.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-f890-op-2015-us.ts deleted file mode 100644 index a301a24e1..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-f890-op-2015-us.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const usWarehouse = ChannelDraft.presets.sampleDataB2B - .usWarehouse() - .build(); - -const f890Op01 = ProductVariantDraft.presets.sampleDataB2B - .f890Op01() - .build(); - -const skuF890Op2015Us = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${f890Op01.sku}-${usWarehouse.key}`) - .sku(f890Op01.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(usWarehouse.key)); - -export default skuF890Op2015Us; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-f890-op-2019-default.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-f890-op-2019-default.spec.ts deleted file mode 100644 index 55bb726f4..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-f890-op-2019-default.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuF890Op2019Default from './sku-f890-op-2019-default'; - -describe(`with skuF890Op2019Default preset and default-warehouse channel`, () => { - it(`should return a skuF890Op2019Default preset`, () => { - const skuF890Op2019DefaultPreset = - skuF890Op2019Default().build(); - expect(skuF890Op2019DefaultPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "f890-op-2019-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "f890-op-2019", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuF890Op2019Default preset when built for graphql`, () => { - const skuF890Op2019DefaultPresetGraphql = - skuF890Op2019Default().buildGraphql(); - expect(skuF890Op2019DefaultPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "f890-op-2019-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "f890-op-2019", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-f890-op-2019-default.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-f890-op-2019-default.ts deleted file mode 100644 index 1c6ca2b77..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-f890-op-2019-default.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const defaultWarehouse = ChannelDraft.presets.sampleDataB2B - .defaultWarehouse() - .build(); - -const f890Op02 = ProductVariantDraft.presets.sampleDataB2B - .f890Op02() - .build(); - -const skuF890Op2019Default = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${f890Op02.sku}-${defaultWarehouse.key}`) - .sku(f890Op02.sku!) - .quantityOnStock(1000) - .supplyChannel( - KeyReferenceDraft.presets.channel().key(defaultWarehouse.key) - ); - -export default skuF890Op2019Default; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-f890-op-2019-eu.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-f890-op-2019-eu.spec.ts deleted file mode 100644 index 98d6f3a5a..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-f890-op-2019-eu.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuF890Op2019Eu from './sku-f890-op-2019-eu'; - -describe(`with skuF890Op2019Eu preset and eu-warehouse channel`, () => { - it(`should return a skuF890Op2019Eu preset`, () => { - const skuF890Op2019EuPreset = - skuF890Op2019Eu().build(); - expect(skuF890Op2019EuPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "f890-op-2019-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "f890-op-2019", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuF890Op2019Eu preset when built for graphql`, () => { - const skuF890Op2019EuPresetGraphql = - skuF890Op2019Eu().buildGraphql(); - expect(skuF890Op2019EuPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "f890-op-2019-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "f890-op-2019", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-f890-op-2019-eu.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-f890-op-2019-eu.ts deleted file mode 100644 index 93bb8da60..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-f890-op-2019-eu.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const euWarehouse = ChannelDraft.presets.sampleDataB2B - .euWarehouse() - .build(); - -const f890Op02 = ProductVariantDraft.presets.sampleDataB2B - .f890Op02() - .build(); - -const skuF890Op2019Eu = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${f890Op02.sku}-${euWarehouse.key}`) - .sku(f890Op02.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(euWarehouse.key)); - -export default skuF890Op2019Eu; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-f890-op-2019-us.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-f890-op-2019-us.spec.ts deleted file mode 100644 index 8abccb801..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-f890-op-2019-us.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuF890Op2019Us from './sku-f890-op-2019-us'; - -describe(`with skuF890Op2019Us preset and us-warehouse channel`, () => { - it(`should return a skuF890Op2019Us preset`, () => { - const skuF890Op2019UsPreset = - skuF890Op2019Us().build(); - expect(skuF890Op2019UsPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "f890-op-2019-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "f890-op-2019", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuF890Op2019Us preset when built for graphql`, () => { - const skuF890Op2019UsPresetGraphql = - skuF890Op2019Us().buildGraphql(); - expect(skuF890Op2019UsPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "f890-op-2019-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "f890-op-2019", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-f890-op-2019-us.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-f890-op-2019-us.ts deleted file mode 100644 index ec8626796..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-f890-op-2019-us.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const usWarehouse = ChannelDraft.presets.sampleDataB2B - .usWarehouse() - .build(); - -const f890Op02 = ProductVariantDraft.presets.sampleDataB2B - .f890Op02() - .build(); - -const skuF890Op2019Us = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${f890Op02.sku}-${usWarehouse.key}`) - .sku(f890Op02.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(usWarehouse.key)); - -export default skuF890Op2019Us; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-f890-op-2023-default.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-f890-op-2023-default.spec.ts deleted file mode 100644 index a0857fbea..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-f890-op-2023-default.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuF890Op2023Default from './sku-f890-op-2023-default'; - -describe(`with skuF890Op2023Default preset and default-warehouse channel`, () => { - it(`should return a skuF890Op2023Default preset`, () => { - const skuF890Op2023DefaultPreset = - skuF890Op2023Default().build(); - expect(skuF890Op2023DefaultPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "f890-op-2023-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "f890-op-2023", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuF890Op2023Default preset when built for graphql`, () => { - const skuF890Op2023DefaultPresetGraphql = - skuF890Op2023Default().buildGraphql(); - expect(skuF890Op2023DefaultPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "f890-op-2023-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "f890-op-2023", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-f890-op-2023-default.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-f890-op-2023-default.ts deleted file mode 100644 index 8a4356256..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-f890-op-2023-default.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const defaultWarehouse = ChannelDraft.presets.sampleDataB2B - .defaultWarehouse() - .build(); - -const f890Op03 = ProductVariantDraft.presets.sampleDataB2B - .f890Op03() - .build(); - -const skuF890Op2023Default = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${f890Op03.sku}-${defaultWarehouse.key}`) - .sku(f890Op03.sku!) - .quantityOnStock(1000) - .supplyChannel( - KeyReferenceDraft.presets.channel().key(defaultWarehouse.key) - ); - -export default skuF890Op2023Default; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-f890-op-2023-eu.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-f890-op-2023-eu.spec.ts deleted file mode 100644 index a02c35b70..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-f890-op-2023-eu.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuF890Op2023Eu from './sku-f890-op-2023-eu'; - -describe(`with skuF890Op2023Eu preset and eu-warehouse channel`, () => { - it(`should return a skuF890Op2023Eu preset`, () => { - const skuF890Op2023EuPreset = - skuF890Op2023Eu().build(); - expect(skuF890Op2023EuPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "f890-op-2023-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "f890-op-2023", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuF890Op2023Eu preset when built for graphql`, () => { - const skuF890Op2023EuPresetGraphql = - skuF890Op2023Eu().buildGraphql(); - expect(skuF890Op2023EuPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "f890-op-2023-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "f890-op-2023", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-f890-op-2023-eu.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-f890-op-2023-eu.ts deleted file mode 100644 index d91a26af0..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-f890-op-2023-eu.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const euWarehouse = ChannelDraft.presets.sampleDataB2B - .euWarehouse() - .build(); - -const f890Op03 = ProductVariantDraft.presets.sampleDataB2B - .f890Op03() - .build(); - -const skuF890Op2023Eu = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${f890Op03.sku}-${euWarehouse.key}`) - .sku(f890Op03.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(euWarehouse.key)); - -export default skuF890Op2023Eu; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-f890-op-2023-us.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-f890-op-2023-us.spec.ts deleted file mode 100644 index b87d1f2c3..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-f890-op-2023-us.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuF890Op2023Us from './sku-f890-op-2023-us'; - -describe(`with skuF890Op2023Us preset and us-warehouse channel`, () => { - it(`should return a skuF890Op2023Us preset`, () => { - const skuF890Op2023UsPreset = - skuF890Op2023Us().build(); - expect(skuF890Op2023UsPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "f890-op-2023-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "f890-op-2023", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuF890Op2023Us preset when built for graphql`, () => { - const skuF890Op2023UsPresetGraphql = - skuF890Op2023Us().buildGraphql(); - expect(skuF890Op2023UsPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "f890-op-2023-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "f890-op-2023", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-f890-op-2023-us.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-f890-op-2023-us.ts deleted file mode 100644 index ab68396b9..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-f890-op-2023-us.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const usWarehouse = ChannelDraft.presets.sampleDataB2B - .usWarehouse() - .build(); - -const f890Op03 = ProductVariantDraft.presets.sampleDataB2B - .f890Op03() - .build(); - -const skuF890Op2023Us = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${f890Op03.sku}-${usWarehouse.key}`) - .sku(f890Op03.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(usWarehouse.key)); - -export default skuF890Op2023Us; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ff-890-op-2015-default-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ff-890-op-2015-default-warehouse.spec.ts new file mode 100644 index 000000000..07b10f527 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ff-890-op-2015-default-warehouse.spec.ts @@ -0,0 +1,40 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuFf890Op2015DefaultWarehouse preset`, () => { + it(`should return a skuFf890Op2015DefaultWarehouse preset when built for rest`, () => { + const skuFf890Op2015DefaultWarehousePreset = InventoryEntryDraftRest.presets + .skuFf890Op2015DefaultWarehouse() + .build(); + expect(skuFf890Op2015DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuFf890Op2015DefaultWarehouse preset when built for graphql`, () => { + const skuFf890Op2015DefaultWarehousePreset = + InventoryEntryDraftGraphql.presets + .skuFf890Op2015DefaultWarehouse() + .build(); + expect(skuFf890Op2015DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuFf890Op2015DefaultWarehouse preset when built for legacy rest`, () => { + const skuFf890Op2015DefaultWarehousePreset = InventoryEntryDraft.presets + .skuFf890Op2015DefaultWarehouse() + .buildRest(); + expect(skuFf890Op2015DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuFf890Op2015DefaultWarehouse preset when built for legacy graphql`, () => { + const skuFf890Op2015DefaultWarehousePreset = InventoryEntryDraft.presets + .skuFf890Op2015DefaultWarehouse() + .buildGraphql(); + expect(skuFf890Op2015DefaultWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ff-890-op-2015-default-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ff-890-op-2015-default-warehouse.ts new file mode 100644 index 000000000..b2f893d22 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ff-890-op-2015-default-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .defaultWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .ff890Op01() + .build(); + +const skuFf890Op2015DefaultWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('ff890-op-2015-default-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuFf890Op2015DefaultWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ff-890-op-2015-eu-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ff-890-op-2015-eu-warehouse.spec.ts new file mode 100644 index 000000000..c72acfb3f --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ff-890-op-2015-eu-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuFf890Op2015EuWarehouse preset`, () => { + it(`should return a skuFf890Op2015EuWarehouse preset when built for rest`, () => { + const skuFf890Op2015EuWarehousePreset = InventoryEntryDraftRest.presets + .skuFf890Op2015EuWarehouse() + .build(); + expect(skuFf890Op2015EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuFf890Op2015EuWarehouse preset when built for graphql`, () => { + const skuFf890Op2015EuWarehousePreset = InventoryEntryDraftGraphql.presets + .skuFf890Op2015EuWarehouse() + .build(); + expect(skuFf890Op2015EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuFf890Op2015EuWarehouse preset when built for legacy rest`, () => { + const skuFf890Op2015EuWarehousePreset = InventoryEntryDraft.presets + .skuFf890Op2015EuWarehouse() + .buildRest(); + expect(skuFf890Op2015EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuFf890Op2015EuWarehouse preset when built for legacy graphql`, () => { + const skuFf890Op2015EuWarehousePreset = InventoryEntryDraft.presets + .skuFf890Op2015EuWarehouse() + .buildGraphql(); + expect(skuFf890Op2015EuWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ff-890-op-2015-eu-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ff-890-op-2015-eu-warehouse.ts new file mode 100644 index 000000000..58d2c76a5 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ff-890-op-2015-eu-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .euWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .ff890Op01() + .build(); + +const skuFf890Op2015EuWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('ff890-op-2015-eu-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuFf890Op2015EuWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ff-890-op-2015-us-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ff-890-op-2015-us-warehouse.spec.ts new file mode 100644 index 000000000..85d674727 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ff-890-op-2015-us-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuFf890Op2015UsWarehouse preset`, () => { + it(`should return a skuFf890Op2015UsWarehouse preset when built for rest`, () => { + const skuFf890Op2015UsWarehousePreset = InventoryEntryDraftRest.presets + .skuFf890Op2015UsWarehouse() + .build(); + expect(skuFf890Op2015UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuFf890Op2015UsWarehouse preset when built for graphql`, () => { + const skuFf890Op2015UsWarehousePreset = InventoryEntryDraftGraphql.presets + .skuFf890Op2015UsWarehouse() + .build(); + expect(skuFf890Op2015UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuFf890Op2015UsWarehouse preset when built for legacy rest`, () => { + const skuFf890Op2015UsWarehousePreset = InventoryEntryDraft.presets + .skuFf890Op2015UsWarehouse() + .buildRest(); + expect(skuFf890Op2015UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuFf890Op2015UsWarehouse preset when built for legacy graphql`, () => { + const skuFf890Op2015UsWarehousePreset = InventoryEntryDraft.presets + .skuFf890Op2015UsWarehouse() + .buildGraphql(); + expect(skuFf890Op2015UsWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ff-890-op-2015-us-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ff-890-op-2015-us-warehouse.ts new file mode 100644 index 000000000..f69825e4f --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ff-890-op-2015-us-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .usWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .ff890Op01() + .build(); + +const skuFf890Op2015UsWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('ff890-op-2015-us-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuFf890Op2015UsWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ff-890-op-2019-default-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ff-890-op-2019-default-warehouse.spec.ts new file mode 100644 index 000000000..3b2fb9fda --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ff-890-op-2019-default-warehouse.spec.ts @@ -0,0 +1,40 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuFf890Op2019DefaultWarehouse preset`, () => { + it(`should return a skuFf890Op2019DefaultWarehouse preset when built for rest`, () => { + const skuFf890Op2019DefaultWarehousePreset = InventoryEntryDraftRest.presets + .skuFf890Op2019DefaultWarehouse() + .build(); + expect(skuFf890Op2019DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuFf890Op2019DefaultWarehouse preset when built for graphql`, () => { + const skuFf890Op2019DefaultWarehousePreset = + InventoryEntryDraftGraphql.presets + .skuFf890Op2019DefaultWarehouse() + .build(); + expect(skuFf890Op2019DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuFf890Op2019DefaultWarehouse preset when built for legacy rest`, () => { + const skuFf890Op2019DefaultWarehousePreset = InventoryEntryDraft.presets + .skuFf890Op2019DefaultWarehouse() + .buildRest(); + expect(skuFf890Op2019DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuFf890Op2019DefaultWarehouse preset when built for legacy graphql`, () => { + const skuFf890Op2019DefaultWarehousePreset = InventoryEntryDraft.presets + .skuFf890Op2019DefaultWarehouse() + .buildGraphql(); + expect(skuFf890Op2019DefaultWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ff-890-op-2019-default-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ff-890-op-2019-default-warehouse.ts new file mode 100644 index 000000000..317f7a7f2 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ff-890-op-2019-default-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .defaultWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .ff890Op02() + .build(); + +const skuFf890Op2019DefaultWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('ff890-op-2019-default-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuFf890Op2019DefaultWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ff-890-op-2019-eu-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ff-890-op-2019-eu-warehouse.spec.ts new file mode 100644 index 000000000..a38091480 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ff-890-op-2019-eu-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuFf890Op2019EuWarehouse preset`, () => { + it(`should return a skuFf890Op2019EuWarehouse preset when built for rest`, () => { + const skuFf890Op2019EuWarehousePreset = InventoryEntryDraftRest.presets + .skuFf890Op2019EuWarehouse() + .build(); + expect(skuFf890Op2019EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuFf890Op2019EuWarehouse preset when built for graphql`, () => { + const skuFf890Op2019EuWarehousePreset = InventoryEntryDraftGraphql.presets + .skuFf890Op2019EuWarehouse() + .build(); + expect(skuFf890Op2019EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuFf890Op2019EuWarehouse preset when built for legacy rest`, () => { + const skuFf890Op2019EuWarehousePreset = InventoryEntryDraft.presets + .skuFf890Op2019EuWarehouse() + .buildRest(); + expect(skuFf890Op2019EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuFf890Op2019EuWarehouse preset when built for legacy graphql`, () => { + const skuFf890Op2019EuWarehousePreset = InventoryEntryDraft.presets + .skuFf890Op2019EuWarehouse() + .buildGraphql(); + expect(skuFf890Op2019EuWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ff-890-op-2019-eu-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ff-890-op-2019-eu-warehouse.ts new file mode 100644 index 000000000..79bad7cfe --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ff-890-op-2019-eu-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .euWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .ff890Op02() + .build(); + +const skuFf890Op2019EuWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('ff890-op-2019-eu-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuFf890Op2019EuWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ff-890-op-2019-us-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ff-890-op-2019-us-warehouse.spec.ts new file mode 100644 index 000000000..35d024863 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ff-890-op-2019-us-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuFf890Op2019UsWarehouse preset`, () => { + it(`should return a skuFf890Op2019UsWarehouse preset when built for rest`, () => { + const skuFf890Op2019UsWarehousePreset = InventoryEntryDraftRest.presets + .skuFf890Op2019UsWarehouse() + .build(); + expect(skuFf890Op2019UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuFf890Op2019UsWarehouse preset when built for graphql`, () => { + const skuFf890Op2019UsWarehousePreset = InventoryEntryDraftGraphql.presets + .skuFf890Op2019UsWarehouse() + .build(); + expect(skuFf890Op2019UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuFf890Op2019UsWarehouse preset when built for legacy rest`, () => { + const skuFf890Op2019UsWarehousePreset = InventoryEntryDraft.presets + .skuFf890Op2019UsWarehouse() + .buildRest(); + expect(skuFf890Op2019UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuFf890Op2019UsWarehouse preset when built for legacy graphql`, () => { + const skuFf890Op2019UsWarehousePreset = InventoryEntryDraft.presets + .skuFf890Op2019UsWarehouse() + .buildGraphql(); + expect(skuFf890Op2019UsWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ff-890-op-2019-us-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ff-890-op-2019-us-warehouse.ts new file mode 100644 index 000000000..ffd8b98f9 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ff-890-op-2019-us-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .usWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .ff890Op02() + .build(); + +const skuFf890Op2019UsWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('ff890-op-2019-us-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuFf890Op2019UsWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ff-890-op-2023-default-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ff-890-op-2023-default-warehouse.spec.ts new file mode 100644 index 000000000..6e41f33ce --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ff-890-op-2023-default-warehouse.spec.ts @@ -0,0 +1,40 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuFf890Op2023DefaultWarehouse preset`, () => { + it(`should return a skuFf890Op2023DefaultWarehouse preset when built for rest`, () => { + const skuFf890Op2023DefaultWarehousePreset = InventoryEntryDraftRest.presets + .skuFf890Op2023DefaultWarehouse() + .build(); + expect(skuFf890Op2023DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuFf890Op2023DefaultWarehouse preset when built for graphql`, () => { + const skuFf890Op2023DefaultWarehousePreset = + InventoryEntryDraftGraphql.presets + .skuFf890Op2023DefaultWarehouse() + .build(); + expect(skuFf890Op2023DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuFf890Op2023DefaultWarehouse preset when built for legacy rest`, () => { + const skuFf890Op2023DefaultWarehousePreset = InventoryEntryDraft.presets + .skuFf890Op2023DefaultWarehouse() + .buildRest(); + expect(skuFf890Op2023DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuFf890Op2023DefaultWarehouse preset when built for legacy graphql`, () => { + const skuFf890Op2023DefaultWarehousePreset = InventoryEntryDraft.presets + .skuFf890Op2023DefaultWarehouse() + .buildGraphql(); + expect(skuFf890Op2023DefaultWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ff-890-op-2023-default-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ff-890-op-2023-default-warehouse.ts new file mode 100644 index 000000000..6a26b21ee --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ff-890-op-2023-default-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .defaultWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .ff890Op03() + .build(); + +const skuFf890Op2023DefaultWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('ff890-op-2023-default-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuFf890Op2023DefaultWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ff-890-op-2023-eu-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ff-890-op-2023-eu-warehouse.spec.ts new file mode 100644 index 000000000..7978cf754 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ff-890-op-2023-eu-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuFf890Op2023EuWarehouse preset`, () => { + it(`should return a skuFf890Op2023EuWarehouse preset when built for rest`, () => { + const skuFf890Op2023EuWarehousePreset = InventoryEntryDraftRest.presets + .skuFf890Op2023EuWarehouse() + .build(); + expect(skuFf890Op2023EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuFf890Op2023EuWarehouse preset when built for graphql`, () => { + const skuFf890Op2023EuWarehousePreset = InventoryEntryDraftGraphql.presets + .skuFf890Op2023EuWarehouse() + .build(); + expect(skuFf890Op2023EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuFf890Op2023EuWarehouse preset when built for legacy rest`, () => { + const skuFf890Op2023EuWarehousePreset = InventoryEntryDraft.presets + .skuFf890Op2023EuWarehouse() + .buildRest(); + expect(skuFf890Op2023EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuFf890Op2023EuWarehouse preset when built for legacy graphql`, () => { + const skuFf890Op2023EuWarehousePreset = InventoryEntryDraft.presets + .skuFf890Op2023EuWarehouse() + .buildGraphql(); + expect(skuFf890Op2023EuWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ff-890-op-2023-eu-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ff-890-op-2023-eu-warehouse.ts new file mode 100644 index 000000000..ef5101ef0 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ff-890-op-2023-eu-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .euWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .ff890Op03() + .build(); + +const skuFf890Op2023EuWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('ff890-op-2023-eu-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuFf890Op2023EuWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ff-890-op-2023-us-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ff-890-op-2023-us-warehouse.spec.ts new file mode 100644 index 000000000..02c0e24fa --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ff-890-op-2023-us-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuFf890Op2023UsWarehouse preset`, () => { + it(`should return a skuFf890Op2023UsWarehouse preset when built for rest`, () => { + const skuFf890Op2023UsWarehousePreset = InventoryEntryDraftRest.presets + .skuFf890Op2023UsWarehouse() + .build(); + expect(skuFf890Op2023UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuFf890Op2023UsWarehouse preset when built for graphql`, () => { + const skuFf890Op2023UsWarehousePreset = InventoryEntryDraftGraphql.presets + .skuFf890Op2023UsWarehouse() + .build(); + expect(skuFf890Op2023UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuFf890Op2023UsWarehouse preset when built for legacy rest`, () => { + const skuFf890Op2023UsWarehousePreset = InventoryEntryDraft.presets + .skuFf890Op2023UsWarehouse() + .buildRest(); + expect(skuFf890Op2023UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuFf890Op2023UsWarehouse preset when built for legacy graphql`, () => { + const skuFf890Op2023UsWarehousePreset = InventoryEntryDraft.presets + .skuFf890Op2023UsWarehouse() + .buildGraphql(); + expect(skuFf890Op2023UsWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ff-890-op-2023-us-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ff-890-op-2023-us-warehouse.ts new file mode 100644 index 000000000..99cc07a83 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ff-890-op-2023-us-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .usWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .ff890Op03() + .build(); + +const skuFf890Op2023UsWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('ff890-op-2023-us-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuFf890Op2023UsWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ff890-op-2015-default.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ff890-op-2015-default.spec.ts deleted file mode 100644 index a41f2fa6c..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ff890-op-2015-default.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuFf890Op2015Default from './sku-ff890-op-2015-default'; - -describe(`with skuFf890Op2015Default preset and default-warehouse channel`, () => { - it(`should return a skuFf890Op2015Default preset`, () => { - const skuFf890Op2015DefaultPreset = - skuFf890Op2015Default().build(); - expect(skuFf890Op2015DefaultPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "ff890-op-2015-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "ff890-op-2015", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuFf890Op2015Default preset when built for graphql`, () => { - const skuFf890Op2015DefaultPresetGraphql = - skuFf890Op2015Default().buildGraphql(); - expect(skuFf890Op2015DefaultPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "ff890-op-2015-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "ff890-op-2015", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ff890-op-2015-default.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ff890-op-2015-default.ts deleted file mode 100644 index a08ea6721..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ff890-op-2015-default.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const defaultWarehouse = ChannelDraft.presets.sampleDataB2B - .defaultWarehouse() - .build(); - -const ff890Op01 = ProductVariantDraft.presets.sampleDataB2B - .ff890Op01() - .build(); - -const skuFf890Op2015Default = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${ff890Op01.sku}-${defaultWarehouse.key}`) - .sku(ff890Op01.sku!) - .quantityOnStock(1000) - .supplyChannel( - KeyReferenceDraft.presets.channel().key(defaultWarehouse.key) - ); - -export default skuFf890Op2015Default; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ff890-op-2015-eu.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ff890-op-2015-eu.spec.ts deleted file mode 100644 index 4786ae2d2..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ff890-op-2015-eu.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuFf890Op2015Eu from './sku-ff890-op-2015-eu'; - -describe(`with skuFf890Op2015Eu preset and eu-warehouse channel`, () => { - it(`should return a skuFf890Op2015Eu preset`, () => { - const skuFf890Op2015EuPreset = - skuFf890Op2015Eu().build(); - expect(skuFf890Op2015EuPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "ff890-op-2015-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "ff890-op-2015", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuFf890Op2015Eu preset when built for graphql`, () => { - const skuFf890Op2015EuPresetGraphql = - skuFf890Op2015Eu().buildGraphql(); - expect(skuFf890Op2015EuPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "ff890-op-2015-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "ff890-op-2015", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ff890-op-2015-eu.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ff890-op-2015-eu.ts deleted file mode 100644 index a09569310..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ff890-op-2015-eu.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const euWarehouse = ChannelDraft.presets.sampleDataB2B - .euWarehouse() - .build(); - -const ff890Op01 = ProductVariantDraft.presets.sampleDataB2B - .ff890Op01() - .build(); - -const skuFf890Op2015Eu = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${ff890Op01.sku}-${euWarehouse.key}`) - .sku(ff890Op01.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(euWarehouse.key)); - -export default skuFf890Op2015Eu; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ff890-op-2015-us.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ff890-op-2015-us.spec.ts deleted file mode 100644 index 910fefa26..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ff890-op-2015-us.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuFf890Op2015Us from './sku-ff890-op-2015-us'; - -describe(`with skuFf890Op2015Us preset and us-warehouse channel`, () => { - it(`should return a skuFf890Op2015Us preset`, () => { - const skuFf890Op2015UsPreset = - skuFf890Op2015Us().build(); - expect(skuFf890Op2015UsPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "ff890-op-2015-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "ff890-op-2015", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuFf890Op2015Us preset when built for graphql`, () => { - const skuFf890Op2015UsPresetGraphql = - skuFf890Op2015Us().buildGraphql(); - expect(skuFf890Op2015UsPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "ff890-op-2015-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "ff890-op-2015", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ff890-op-2015-us.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ff890-op-2015-us.ts deleted file mode 100644 index 209184eb2..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ff890-op-2015-us.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const usWarehouse = ChannelDraft.presets.sampleDataB2B - .usWarehouse() - .build(); - -const ff890Op01 = ProductVariantDraft.presets.sampleDataB2B - .ff890Op01() - .build(); - -const skuFf890Op2015Us = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${ff890Op01.sku}-${usWarehouse.key}`) - .sku(ff890Op01.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(usWarehouse.key)); - -export default skuFf890Op2015Us; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ff890-op-2019-default.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ff890-op-2019-default.spec.ts deleted file mode 100644 index 8b3998991..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ff890-op-2019-default.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuFf890Op2019Default from './sku-ff890-op-2019-default'; - -describe(`with skuFf890Op2019Default preset and default-warehouse channel`, () => { - it(`should return a skuFf890Op2019Default preset`, () => { - const skuFf890Op2019DefaultPreset = - skuFf890Op2019Default().build(); - expect(skuFf890Op2019DefaultPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "ff890-op-2019-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "ff890-op-2019", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuFf890Op2019Default preset when built for graphql`, () => { - const skuFf890Op2019DefaultPresetGraphql = - skuFf890Op2019Default().buildGraphql(); - expect(skuFf890Op2019DefaultPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "ff890-op-2019-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "ff890-op-2019", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ff890-op-2019-default.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ff890-op-2019-default.ts deleted file mode 100644 index e20c88e1f..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ff890-op-2019-default.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const defaultWarehouse = ChannelDraft.presets.sampleDataB2B - .defaultWarehouse() - .build(); - -const ff890Op02 = ProductVariantDraft.presets.sampleDataB2B - .ff890Op02() - .build(); - -const skuFf890Op2019Default = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${ff890Op02.sku}-${defaultWarehouse.key}`) - .sku(ff890Op02.sku!) - .quantityOnStock(1000) - .supplyChannel( - KeyReferenceDraft.presets.channel().key(defaultWarehouse.key) - ); - -export default skuFf890Op2019Default; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ff890-op-2019-eu.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ff890-op-2019-eu.spec.ts deleted file mode 100644 index b132522bc..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ff890-op-2019-eu.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuFf890Op2019Eu from './sku-ff890-op-2019-eu'; - -describe(`with skuFf890Op2019Eu preset and eu-warehouse channel`, () => { - it(`should return a skuFf890Op2019Eu preset`, () => { - const skuFf890Op2019EuPreset = - skuFf890Op2019Eu().build(); - expect(skuFf890Op2019EuPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "ff890-op-2019-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "ff890-op-2019", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuFf890Op2019Eu preset when built for graphql`, () => { - const skuFf890Op2019EuPresetGraphql = - skuFf890Op2019Eu().buildGraphql(); - expect(skuFf890Op2019EuPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "ff890-op-2019-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "ff890-op-2019", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ff890-op-2019-eu.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ff890-op-2019-eu.ts deleted file mode 100644 index c90cb4ff8..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ff890-op-2019-eu.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const euWarehouse = ChannelDraft.presets.sampleDataB2B - .euWarehouse() - .build(); - -const ff890Op02 = ProductVariantDraft.presets.sampleDataB2B - .ff890Op02() - .build(); - -const skuFf890Op2019Eu = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${ff890Op02.sku}-${euWarehouse.key}`) - .sku(ff890Op02.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(euWarehouse.key)); - -export default skuFf890Op2019Eu; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ff890-op-2019-us.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ff890-op-2019-us.spec.ts deleted file mode 100644 index 844c77a33..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ff890-op-2019-us.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuFf890Op2019Us from './sku-ff890-op-2019-us'; - -describe(`with skuFf890Op2019Us preset and us-warehouse channel`, () => { - it(`should return a skuFf890Op2019Us preset`, () => { - const skuFf890Op2019UsPreset = - skuFf890Op2019Us().build(); - expect(skuFf890Op2019UsPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "ff890-op-2019-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "ff890-op-2019", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuFf890Op2019Us preset when built for graphql`, () => { - const skuFf890Op2019UsPresetGraphql = - skuFf890Op2019Us().buildGraphql(); - expect(skuFf890Op2019UsPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "ff890-op-2019-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "ff890-op-2019", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ff890-op-2019-us.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ff890-op-2019-us.ts deleted file mode 100644 index 414cde9d1..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ff890-op-2019-us.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const usWarehouse = ChannelDraft.presets.sampleDataB2B - .usWarehouse() - .build(); - -const ff890Op02 = ProductVariantDraft.presets.sampleDataB2B - .ff890Op02() - .build(); - -const skuFf890Op2019Us = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${ff890Op02.sku}-${usWarehouse.key}`) - .sku(ff890Op02.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(usWarehouse.key)); - -export default skuFf890Op2019Us; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ff890-op-2023-default.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ff890-op-2023-default.spec.ts deleted file mode 100644 index 4efefbd7d..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ff890-op-2023-default.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuFf890Op2023Default from './sku-ff890-op-2023-default'; - -describe(`with skuFf890Op2023Default preset and default-warehouse channel`, () => { - it(`should return a skuFf890Op2023Default preset`, () => { - const skuFf890Op2023DefaultPreset = - skuFf890Op2023Default().build(); - expect(skuFf890Op2023DefaultPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "ff890-op-2023-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "ff890-op-2023", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuFf890Op2023Default preset when built for graphql`, () => { - const skuFf890Op2023DefaultPresetGraphql = - skuFf890Op2023Default().buildGraphql(); - expect(skuFf890Op2023DefaultPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "ff890-op-2023-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "ff890-op-2023", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ff890-op-2023-default.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ff890-op-2023-default.ts deleted file mode 100644 index 757577e01..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ff890-op-2023-default.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const defaultWarehouse = ChannelDraft.presets.sampleDataB2B - .defaultWarehouse() - .build(); - -const ff890Op03 = ProductVariantDraft.presets.sampleDataB2B - .ff890Op03() - .build(); - -const skuFf890Op2023Default = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${ff890Op03.sku}-${defaultWarehouse.key}`) - .sku(ff890Op03.sku!) - .quantityOnStock(1000) - .supplyChannel( - KeyReferenceDraft.presets.channel().key(defaultWarehouse.key) - ); - -export default skuFf890Op2023Default; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ff890-op-2023-eu.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ff890-op-2023-eu.spec.ts deleted file mode 100644 index 00447c351..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ff890-op-2023-eu.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuFf890Op2023Eu from './sku-ff890-op-2023-eu'; - -describe(`with skuFf890Op2023Eu preset and eu-warehouse channel`, () => { - it(`should return a skuFf890Op2023Eu preset`, () => { - const skuFf890Op2023EuPreset = - skuFf890Op2023Eu().build(); - expect(skuFf890Op2023EuPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "ff890-op-2023-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "ff890-op-2023", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuFf890Op2023Eu preset when built for graphql`, () => { - const skuFf890Op2023EuPresetGraphql = - skuFf890Op2023Eu().buildGraphql(); - expect(skuFf890Op2023EuPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "ff890-op-2023-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "ff890-op-2023", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ff890-op-2023-eu.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ff890-op-2023-eu.ts deleted file mode 100644 index adbae5e71..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ff890-op-2023-eu.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const euWarehouse = ChannelDraft.presets.sampleDataB2B - .euWarehouse() - .build(); - -const ff890Op03 = ProductVariantDraft.presets.sampleDataB2B - .ff890Op03() - .build(); - -const skuFf890Op2023Eu = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${ff890Op03.sku}-${euWarehouse.key}`) - .sku(ff890Op03.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(euWarehouse.key)); - -export default skuFf890Op2023Eu; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ff890-op-2023-us.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ff890-op-2023-us.spec.ts deleted file mode 100644 index ff15d71d1..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ff890-op-2023-us.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuFf890Op2023Us from './sku-ff890-op-2023-us'; - -describe(`with skuFf890Op2023Us preset and us-warehouse channel`, () => { - it(`should return a skuFf890Op2023Us preset`, () => { - const skuFf890Op2023UsPreset = - skuFf890Op2023Us().build(); - expect(skuFf890Op2023UsPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "ff890-op-2023-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "ff890-op-2023", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuFf890Op2023Us preset when built for graphql`, () => { - const skuFf890Op2023UsPresetGraphql = - skuFf890Op2023Us().buildGraphql(); - expect(skuFf890Op2023UsPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "ff890-op-2023-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "ff890-op-2023", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ff890-op-2023-us.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ff890-op-2023-us.ts deleted file mode 100644 index 8c4f29462..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ff890-op-2023-us.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const usWarehouse = ChannelDraft.presets.sampleDataB2B - .usWarehouse() - .build(); - -const ff890Op03 = ProductVariantDraft.presets.sampleDataB2B - .ff890Op03() - .build(); - -const skuFf890Op2023Us = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${ff890Op03.sku}-${usWarehouse.key}`) - .sku(ff890Op03.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(usWarehouse.key)); - -export default skuFf890Op2023Us; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-fff-456-st-blue-default-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-fff-456-st-blue-default-warehouse.spec.ts new file mode 100644 index 000000000..7dedb1d23 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-fff-456-st-blue-default-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuFff456StBlueDefaultWarehouse preset`, () => { + it(`should return a skuFff456StBlueDefaultWarehouse preset when built for rest`, () => { + const skuFff456StBlueDefaultWarehousePreset = + InventoryEntryDraftRest.presets.skuFff456StBlueDefaultWarehouse().build(); + expect(skuFff456StBlueDefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuFff456StBlueDefaultWarehouse preset when built for graphql`, () => { + const skuFff456StBlueDefaultWarehousePreset = + InventoryEntryDraftGraphql.presets + .skuFff456StBlueDefaultWarehouse() + .build(); + expect(skuFff456StBlueDefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuFff456StBlueDefaultWarehouse preset when built for legacy rest`, () => { + const skuFff456StBlueDefaultWarehousePreset = InventoryEntryDraft.presets + .skuFff456StBlueDefaultWarehouse() + .buildRest(); + expect(skuFff456StBlueDefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuFff456StBlueDefaultWarehouse preset when built for legacy graphql`, () => { + const skuFff456StBlueDefaultWarehousePreset = InventoryEntryDraft.presets + .skuFff456StBlueDefaultWarehouse() + .buildGraphql(); + expect(skuFff456StBlueDefaultWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-fff-456-st-blue-default-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-fff-456-st-blue-default-warehouse.ts new file mode 100644 index 000000000..0499d2b04 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-fff-456-st-blue-default-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .defaultWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .fff456St02() + .build(); + +const skuFff456StBlueDefaultWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('fff456-st-blue-default-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuFff456StBlueDefaultWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-fff-456-st-blue-eu-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-fff-456-st-blue-eu-warehouse.spec.ts new file mode 100644 index 000000000..7d589c4d4 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-fff-456-st-blue-eu-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuFff456StBlueEuWarehouse preset`, () => { + it(`should return a skuFff456StBlueEuWarehouse preset when built for rest`, () => { + const skuFff456StBlueEuWarehousePreset = InventoryEntryDraftRest.presets + .skuFff456StBlueEuWarehouse() + .build(); + expect(skuFff456StBlueEuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuFff456StBlueEuWarehouse preset when built for graphql`, () => { + const skuFff456StBlueEuWarehousePreset = InventoryEntryDraftGraphql.presets + .skuFff456StBlueEuWarehouse() + .build(); + expect(skuFff456StBlueEuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuFff456StBlueEuWarehouse preset when built for legacy rest`, () => { + const skuFff456StBlueEuWarehousePreset = InventoryEntryDraft.presets + .skuFff456StBlueEuWarehouse() + .buildRest(); + expect(skuFff456StBlueEuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuFff456StBlueEuWarehouse preset when built for legacy graphql`, () => { + const skuFff456StBlueEuWarehousePreset = InventoryEntryDraft.presets + .skuFff456StBlueEuWarehouse() + .buildGraphql(); + expect(skuFff456StBlueEuWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-fff-456-st-blue-eu-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-fff-456-st-blue-eu-warehouse.ts new file mode 100644 index 000000000..fb90edd93 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-fff-456-st-blue-eu-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .euWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .fff456St02() + .build(); + +const skuFff456StBlueEuWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('fff456-st-blue-eu-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuFff456StBlueEuWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-fff-456-st-blue-us-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-fff-456-st-blue-us-warehouse.spec.ts new file mode 100644 index 000000000..e8d7c9a42 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-fff-456-st-blue-us-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuFff456StBlueUsWarehouse preset`, () => { + it(`should return a skuFff456StBlueUsWarehouse preset when built for rest`, () => { + const skuFff456StBlueUsWarehousePreset = InventoryEntryDraftRest.presets + .skuFff456StBlueUsWarehouse() + .build(); + expect(skuFff456StBlueUsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuFff456StBlueUsWarehouse preset when built for graphql`, () => { + const skuFff456StBlueUsWarehousePreset = InventoryEntryDraftGraphql.presets + .skuFff456StBlueUsWarehouse() + .build(); + expect(skuFff456StBlueUsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuFff456StBlueUsWarehouse preset when built for legacy rest`, () => { + const skuFff456StBlueUsWarehousePreset = InventoryEntryDraft.presets + .skuFff456StBlueUsWarehouse() + .buildRest(); + expect(skuFff456StBlueUsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuFff456StBlueUsWarehouse preset when built for legacy graphql`, () => { + const skuFff456StBlueUsWarehousePreset = InventoryEntryDraft.presets + .skuFff456StBlueUsWarehouse() + .buildGraphql(); + expect(skuFff456StBlueUsWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-fff-456-st-blue-us-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-fff-456-st-blue-us-warehouse.ts new file mode 100644 index 000000000..e166d3bc0 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-fff-456-st-blue-us-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .usWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .fff456St02() + .build(); + +const skuFff456StBlueUsWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('fff456-st-blue-us-warehouse') + .sku(variant.sku!) + .quantityOnStock(999) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuFff456StBlueUsWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-fff-456-st-green-default-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-fff-456-st-green-default-warehouse.spec.ts new file mode 100644 index 000000000..fbacbd37f --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-fff-456-st-green-default-warehouse.spec.ts @@ -0,0 +1,41 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuFff456StGreenDefaultWarehouse preset`, () => { + it(`should return a skuFff456StGreenDefaultWarehouse preset when built for rest`, () => { + const skuFff456StGreenDefaultWarehousePreset = + InventoryEntryDraftRest.presets + .skuFff456StGreenDefaultWarehouse() + .build(); + expect(skuFff456StGreenDefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuFff456StGreenDefaultWarehouse preset when built for graphql`, () => { + const skuFff456StGreenDefaultWarehousePreset = + InventoryEntryDraftGraphql.presets + .skuFff456StGreenDefaultWarehouse() + .build(); + expect(skuFff456StGreenDefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuFff456StGreenDefaultWarehouse preset when built for legacy rest`, () => { + const skuFff456StGreenDefaultWarehousePreset = InventoryEntryDraft.presets + .skuFff456StGreenDefaultWarehouse() + .buildRest(); + expect(skuFff456StGreenDefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuFff456StGreenDefaultWarehouse preset when built for legacy graphql`, () => { + const skuFff456StGreenDefaultWarehousePreset = InventoryEntryDraft.presets + .skuFff456StGreenDefaultWarehouse() + .buildGraphql(); + expect(skuFff456StGreenDefaultWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-fff-456-st-green-default-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-fff-456-st-green-default-warehouse.ts new file mode 100644 index 000000000..010b3fe2c --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-fff-456-st-green-default-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .defaultWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .fff456St03() + .build(); + +const skuFff456StGreenDefaultWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('fff456-st-green-default-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuFff456StGreenDefaultWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-fff-456-st-green-eu-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-fff-456-st-green-eu-warehouse.spec.ts new file mode 100644 index 000000000..39f18f9d2 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-fff-456-st-green-eu-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuFff456StGreenEuWarehouse preset`, () => { + it(`should return a skuFff456StGreenEuWarehouse preset when built for rest`, () => { + const skuFff456StGreenEuWarehousePreset = InventoryEntryDraftRest.presets + .skuFff456StGreenEuWarehouse() + .build(); + expect(skuFff456StGreenEuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuFff456StGreenEuWarehouse preset when built for graphql`, () => { + const skuFff456StGreenEuWarehousePreset = InventoryEntryDraftGraphql.presets + .skuFff456StGreenEuWarehouse() + .build(); + expect(skuFff456StGreenEuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuFff456StGreenEuWarehouse preset when built for legacy rest`, () => { + const skuFff456StGreenEuWarehousePreset = InventoryEntryDraft.presets + .skuFff456StGreenEuWarehouse() + .buildRest(); + expect(skuFff456StGreenEuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuFff456StGreenEuWarehouse preset when built for legacy graphql`, () => { + const skuFff456StGreenEuWarehousePreset = InventoryEntryDraft.presets + .skuFff456StGreenEuWarehouse() + .buildGraphql(); + expect(skuFff456StGreenEuWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-fff-456-st-green-eu-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-fff-456-st-green-eu-warehouse.ts new file mode 100644 index 000000000..6715902dd --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-fff-456-st-green-eu-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .euWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .fff456St03() + .build(); + +const skuFff456StGreenEuWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('fff456-st-green-eu-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuFff456StGreenEuWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-fff-456-st-green-us-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-fff-456-st-green-us-warehouse.spec.ts new file mode 100644 index 000000000..56b19dab9 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-fff-456-st-green-us-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuFff456StGreenUsWarehouse preset`, () => { + it(`should return a skuFff456StGreenUsWarehouse preset when built for rest`, () => { + const skuFff456StGreenUsWarehousePreset = InventoryEntryDraftRest.presets + .skuFff456StGreenUsWarehouse() + .build(); + expect(skuFff456StGreenUsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuFff456StGreenUsWarehouse preset when built for graphql`, () => { + const skuFff456StGreenUsWarehousePreset = InventoryEntryDraftGraphql.presets + .skuFff456StGreenUsWarehouse() + .build(); + expect(skuFff456StGreenUsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuFff456StGreenUsWarehouse preset when built for legacy rest`, () => { + const skuFff456StGreenUsWarehousePreset = InventoryEntryDraft.presets + .skuFff456StGreenUsWarehouse() + .buildRest(); + expect(skuFff456StGreenUsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuFff456StGreenUsWarehouse preset when built for legacy graphql`, () => { + const skuFff456StGreenUsWarehousePreset = InventoryEntryDraft.presets + .skuFff456StGreenUsWarehouse() + .buildGraphql(); + expect(skuFff456StGreenUsWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-fff-456-st-green-us-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-fff-456-st-green-us-warehouse.ts new file mode 100644 index 000000000..e1ef89d44 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-fff-456-st-green-us-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .usWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .fff456St03() + .build(); + +const skuFff456StGreenUsWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('fff456-st-green-us-warehouse') + .sku(variant.sku!) + .quantityOnStock(999) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuFff456StGreenUsWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-fff-456-st-red-default-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-fff-456-st-red-default-warehouse.spec.ts new file mode 100644 index 000000000..dc2074a9b --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-fff-456-st-red-default-warehouse.spec.ts @@ -0,0 +1,40 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuFff456StRedDefaultWarehouse preset`, () => { + it(`should return a skuFff456StRedDefaultWarehouse preset when built for rest`, () => { + const skuFff456StRedDefaultWarehousePreset = InventoryEntryDraftRest.presets + .skuFff456StRedDefaultWarehouse() + .build(); + expect(skuFff456StRedDefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuFff456StRedDefaultWarehouse preset when built for graphql`, () => { + const skuFff456StRedDefaultWarehousePreset = + InventoryEntryDraftGraphql.presets + .skuFff456StRedDefaultWarehouse() + .build(); + expect(skuFff456StRedDefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuFff456StRedDefaultWarehouse preset when built for legacy rest`, () => { + const skuFff456StRedDefaultWarehousePreset = InventoryEntryDraft.presets + .skuFff456StRedDefaultWarehouse() + .buildRest(); + expect(skuFff456StRedDefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuFff456StRedDefaultWarehouse preset when built for legacy graphql`, () => { + const skuFff456StRedDefaultWarehousePreset = InventoryEntryDraft.presets + .skuFff456StRedDefaultWarehouse() + .buildGraphql(); + expect(skuFff456StRedDefaultWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-fff-456-st-red-default-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-fff-456-st-red-default-warehouse.ts new file mode 100644 index 000000000..927368b27 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-fff-456-st-red-default-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .defaultWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .fff456St01() + .build(); + +const skuFff456StRedDefaultWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('fff456-st-red-default-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuFff456StRedDefaultWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-fff-456-st-red-eu-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-fff-456-st-red-eu-warehouse.spec.ts new file mode 100644 index 000000000..35a76ded3 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-fff-456-st-red-eu-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuFff456StRedEuWarehouse preset`, () => { + it(`should return a skuFff456StRedEuWarehouse preset when built for rest`, () => { + const skuFff456StRedEuWarehousePreset = InventoryEntryDraftRest.presets + .skuFff456StRedEuWarehouse() + .build(); + expect(skuFff456StRedEuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuFff456StRedEuWarehouse preset when built for graphql`, () => { + const skuFff456StRedEuWarehousePreset = InventoryEntryDraftGraphql.presets + .skuFff456StRedEuWarehouse() + .build(); + expect(skuFff456StRedEuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuFff456StRedEuWarehouse preset when built for legacy rest`, () => { + const skuFff456StRedEuWarehousePreset = InventoryEntryDraft.presets + .skuFff456StRedEuWarehouse() + .buildRest(); + expect(skuFff456StRedEuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuFff456StRedEuWarehouse preset when built for legacy graphql`, () => { + const skuFff456StRedEuWarehousePreset = InventoryEntryDraft.presets + .skuFff456StRedEuWarehouse() + .buildGraphql(); + expect(skuFff456StRedEuWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-fff-456-st-red-eu-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-fff-456-st-red-eu-warehouse.ts new file mode 100644 index 000000000..b8634fec3 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-fff-456-st-red-eu-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .euWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .fff456St01() + .build(); + +const skuFff456StRedEuWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('fff456-st-red-eu-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuFff456StRedEuWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-fff-456-st-red-us-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-fff-456-st-red-us-warehouse.spec.ts new file mode 100644 index 000000000..8991bee74 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-fff-456-st-red-us-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuFff456StRedUsWarehouse preset`, () => { + it(`should return a skuFff456StRedUsWarehouse preset when built for rest`, () => { + const skuFff456StRedUsWarehousePreset = InventoryEntryDraftRest.presets + .skuFff456StRedUsWarehouse() + .build(); + expect(skuFff456StRedUsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuFff456StRedUsWarehouse preset when built for graphql`, () => { + const skuFff456StRedUsWarehousePreset = InventoryEntryDraftGraphql.presets + .skuFff456StRedUsWarehouse() + .build(); + expect(skuFff456StRedUsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuFff456StRedUsWarehouse preset when built for legacy rest`, () => { + const skuFff456StRedUsWarehousePreset = InventoryEntryDraft.presets + .skuFff456StRedUsWarehouse() + .buildRest(); + expect(skuFff456StRedUsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuFff456StRedUsWarehouse preset when built for legacy graphql`, () => { + const skuFff456StRedUsWarehousePreset = InventoryEntryDraft.presets + .skuFff456StRedUsWarehouse() + .buildGraphql(); + expect(skuFff456StRedUsWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-fff-456-st-red-us-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-fff-456-st-red-us-warehouse.ts new file mode 100644 index 000000000..279615457 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-fff-456-st-red-us-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .usWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .fff456St01() + .build(); + +const skuFff456StRedUsWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('fff456-st-red-us-warehouse') + .sku(variant.sku!) + .quantityOnStock(999) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuFff456StRedUsWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-fff456-st-blue-default.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-fff456-st-blue-default.spec.ts deleted file mode 100644 index e228a9e98..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-fff456-st-blue-default.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuFff456StBlueDefault from './sku-fff456-st-blue-default'; - -describe(`with skuFff456StBlueDefault preset and default-warehouse channel`, () => { - it(`should return a skuFff456StBlueDefault preset`, () => { - const skuFff456StBlueDefaultPreset = - skuFff456StBlueDefault().build(); - expect(skuFff456StBlueDefaultPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "fff456-st-blue-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "fff456-st-blue", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuFff456StBlueDefault preset when built for graphql`, () => { - const skuFff456StBlueDefaultPresetGraphql = - skuFff456StBlueDefault().buildGraphql(); - expect(skuFff456StBlueDefaultPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "fff456-st-blue-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "fff456-st-blue", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-fff456-st-blue-default.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-fff456-st-blue-default.ts deleted file mode 100644 index 7629242d5..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-fff456-st-blue-default.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const defaultWarehouse = ChannelDraft.presets.sampleDataB2B - .defaultWarehouse() - .build(); - -const fff456St02 = ProductVariantDraft.presets.sampleDataB2B - .fff456St02() - .build(); - -const skuFff456StBlueDefault = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${fff456St02.sku}-${defaultWarehouse.key}`) - .sku(fff456St02.sku!) - .quantityOnStock(1000) - .supplyChannel( - KeyReferenceDraft.presets.channel().key(defaultWarehouse.key) - ); - -export default skuFff456StBlueDefault; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-fff456-st-blue-eu.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-fff456-st-blue-eu.spec.ts deleted file mode 100644 index dca1b290f..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-fff456-st-blue-eu.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuFff456StBlueEu from './sku-fff456-st-blue-eu'; - -describe(`with skuFff456StBlueEu preset and eu-warehouse channel`, () => { - it(`should return a skuFff456StBlueEu preset`, () => { - const skuFff456StBlueEuPreset = - skuFff456StBlueEu().build(); - expect(skuFff456StBlueEuPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "fff456-st-blue-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "fff456-st-blue", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuFff456StBlueEu preset when built for graphql`, () => { - const skuFff456StBlueEuPresetGraphql = - skuFff456StBlueEu().buildGraphql(); - expect(skuFff456StBlueEuPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "fff456-st-blue-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "fff456-st-blue", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-fff456-st-blue-eu.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-fff456-st-blue-eu.ts deleted file mode 100644 index 3efb32ec1..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-fff456-st-blue-eu.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const euWarehouse = ChannelDraft.presets.sampleDataB2B - .euWarehouse() - .build(); - -const fff456St02 = ProductVariantDraft.presets.sampleDataB2B - .fff456St02() - .build(); - -const skuFff456StBlueEu = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${fff456St02.sku}-${euWarehouse.key}`) - .sku(fff456St02.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(euWarehouse.key)); - -export default skuFff456StBlueEu; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-fff456-st-blue-us.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-fff456-st-blue-us.spec.ts deleted file mode 100644 index b276185df..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-fff456-st-blue-us.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuFff456StBlueUs from './sku-fff456-st-blue-us'; - -describe(`with skuFff456StBlueUs preset and us-warehouse channel`, () => { - it(`should return a skuFff456StBlueUs preset`, () => { - const skuFff456StBlueUsPreset = - skuFff456StBlueUs().build(); - expect(skuFff456StBlueUsPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "fff456-st-blue-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "fff456-st-blue", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuFff456StBlueUs preset when built for graphql`, () => { - const skuFff456StBlueUsPresetGraphql = - skuFff456StBlueUs().buildGraphql(); - expect(skuFff456StBlueUsPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "fff456-st-blue-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "fff456-st-blue", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-fff456-st-blue-us.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-fff456-st-blue-us.ts deleted file mode 100644 index ce70aca4f..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-fff456-st-blue-us.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const usWarehouse = ChannelDraft.presets.sampleDataB2B - .usWarehouse() - .build(); - -const fff456St02 = ProductVariantDraft.presets.sampleDataB2B - .fff456St02() - .build(); - -const skuFff456StBlueUs = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${fff456St02.sku}-${usWarehouse.key}`) - .sku(fff456St02.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(usWarehouse.key)); - -export default skuFff456StBlueUs; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-fff456-st-green-default.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-fff456-st-green-default.spec.ts deleted file mode 100644 index 2601ef803..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-fff456-st-green-default.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuFff456StGreenDefault from './sku-fff456-st-green-default'; - -describe(`with skuFff456StGreenDefault preset and default-warehouse channel`, () => { - it(`should return a skuFff456StGreenDefault preset`, () => { - const skuFff456StGreenDefaultPreset = - skuFff456StGreenDefault().build(); - expect(skuFff456StGreenDefaultPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "fff456-st-green-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "fff456-st-green", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuFff456StGreenDefault preset when built for graphql`, () => { - const skuFff456StGreenDefaultPresetGraphql = - skuFff456StGreenDefault().buildGraphql(); - expect(skuFff456StGreenDefaultPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "fff456-st-green-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "fff456-st-green", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-fff456-st-green-default.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-fff456-st-green-default.ts deleted file mode 100644 index 9cb453e4b..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-fff456-st-green-default.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const defaultWarehouse = ChannelDraft.presets.sampleDataB2B - .defaultWarehouse() - .build(); - -const fff456St03 = ProductVariantDraft.presets.sampleDataB2B - .fff456St03() - .build(); - -const skuFff456StGreenDefault = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${fff456St03.sku}-${defaultWarehouse.key}`) - .sku(fff456St03.sku!) - .quantityOnStock(1000) - .supplyChannel( - KeyReferenceDraft.presets.channel().key(defaultWarehouse.key) - ); - -export default skuFff456StGreenDefault; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-fff456-st-green-eu.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-fff456-st-green-eu.spec.ts deleted file mode 100644 index 08b720e27..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-fff456-st-green-eu.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuFff456StGreenEu from './sku-fff456-st-green-eu'; - -describe(`with skuFff456StGreenEu preset and eu-warehouse channel`, () => { - it(`should return a skuFff456StGreenEu preset`, () => { - const skuFff456StGreenEuPreset = - skuFff456StGreenEu().build(); - expect(skuFff456StGreenEuPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "fff456-st-green-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "fff456-st-green", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuFff456StGreenEu preset when built for graphql`, () => { - const skuFff456StGreenEuPresetGraphql = - skuFff456StGreenEu().buildGraphql(); - expect(skuFff456StGreenEuPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "fff456-st-green-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "fff456-st-green", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-fff456-st-green-eu.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-fff456-st-green-eu.ts deleted file mode 100644 index ca59c5b2a..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-fff456-st-green-eu.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const euWarehouse = ChannelDraft.presets.sampleDataB2B - .euWarehouse() - .build(); - -const fff456St03 = ProductVariantDraft.presets.sampleDataB2B - .fff456St03() - .build(); - -const skuFff456StGreenEu = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${fff456St03.sku}-${euWarehouse.key}`) - .sku(fff456St03.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(euWarehouse.key)); - -export default skuFff456StGreenEu; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-fff456-st-green-us.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-fff456-st-green-us.spec.ts deleted file mode 100644 index f008c4b0f..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-fff456-st-green-us.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuFff456StGreenUs from './sku-fff456-st-green-us'; - -describe(`with skuFff456StGreenUs preset and us-warehouse channel`, () => { - it(`should return a skuFff456StGreenUs preset`, () => { - const skuFff456StGreenUsPreset = - skuFff456StGreenUs().build(); - expect(skuFff456StGreenUsPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "fff456-st-green-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "fff456-st-green", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuFff456StGreenUs preset when built for graphql`, () => { - const skuFff456StGreenUsPresetGraphql = - skuFff456StGreenUs().buildGraphql(); - expect(skuFff456StGreenUsPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "fff456-st-green-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "fff456-st-green", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-fff456-st-green-us.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-fff456-st-green-us.ts deleted file mode 100644 index 55a995345..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-fff456-st-green-us.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const usWarehouse = ChannelDraft.presets.sampleDataB2B - .usWarehouse() - .build(); - -const fff456St03 = ProductVariantDraft.presets.sampleDataB2B - .fff456St03() - .build(); - -const skuFff456StGreenUs = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${fff456St03.sku}-${usWarehouse.key}`) - .sku(fff456St03.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(usWarehouse.key)); - -export default skuFff456StGreenUs; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-fff456-st-red-default.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-fff456-st-red-default.spec.ts deleted file mode 100644 index 5ff64b60c..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-fff456-st-red-default.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuFff456StRedDefault from './sku-fff456-st-red-default'; - -describe(`with skuFff456StRedDefault preset and default-warehouse channel`, () => { - it(`should return a skuFff456StRedDefault preset`, () => { - const skuFff456StRedDefaultPreset = - skuFff456StRedDefault().build(); - expect(skuFff456StRedDefaultPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "fff456-st-red-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "fff456-st-red", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuFff456StRedDefault preset when built for graphql`, () => { - const skuFff456StRedDefaultPresetGraphql = - skuFff456StRedDefault().buildGraphql(); - expect(skuFff456StRedDefaultPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "fff456-st-red-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "fff456-st-red", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-fff456-st-red-default.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-fff456-st-red-default.ts deleted file mode 100644 index 1063d0da7..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-fff456-st-red-default.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const defaultWarehouse = ChannelDraft.presets.sampleDataB2B - .defaultWarehouse() - .build(); - -const fff456St01 = ProductVariantDraft.presets.sampleDataB2B - .fff456St01() - .build(); - -const skuFff456StRedDefault = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${fff456St01.sku}-${defaultWarehouse.key}`) - .sku(fff456St01.sku!) - .quantityOnStock(1000) - .supplyChannel( - KeyReferenceDraft.presets.channel().key(defaultWarehouse.key) - ); - -export default skuFff456StRedDefault; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-fff456-st-red-eu.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-fff456-st-red-eu.spec.ts deleted file mode 100644 index 2bfb2d657..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-fff456-st-red-eu.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuFff456StRedEu from './sku-fff456-st-red-eu'; - -describe(`with skuFff456StRedEu preset and eu-warehouse channel`, () => { - it(`should return a skuFff456StRedEu preset`, () => { - const skuFff456StRedEuPreset = - skuFff456StRedEu().build(); - expect(skuFff456StRedEuPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "fff456-st-red-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "fff456-st-red", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuFff456StRedEu preset when built for graphql`, () => { - const skuFff456StRedEuPresetGraphql = - skuFff456StRedEu().buildGraphql(); - expect(skuFff456StRedEuPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "fff456-st-red-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "fff456-st-red", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-fff456-st-red-eu.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-fff456-st-red-eu.ts deleted file mode 100644 index acd64aab6..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-fff456-st-red-eu.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const euWarehouse = ChannelDraft.presets.sampleDataB2B - .euWarehouse() - .build(); - -const fff456St01 = ProductVariantDraft.presets.sampleDataB2B - .fff456St01() - .build(); - -const skuFff456StRedEu = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${fff456St01.sku}-${euWarehouse.key}`) - .sku(fff456St01.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(euWarehouse.key)); - -export default skuFff456StRedEu; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-fff456-st-red-us.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-fff456-st-red-us.spec.ts deleted file mode 100644 index 74cf33e91..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-fff456-st-red-us.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuFff456StRedUs from './sku-fff456-st-red-us'; - -describe(`with skuFff456StRedUs preset and us-warehouse channel`, () => { - it(`should return a skuFff456StRedUs preset`, () => { - const skuFff456StRedUsPreset = - skuFff456StRedUs().build(); - expect(skuFff456StRedUsPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "fff456-st-red-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "fff456-st-red", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuFff456StRedUs preset when built for graphql`, () => { - const skuFff456StRedUsPresetGraphql = - skuFff456StRedUs().buildGraphql(); - expect(skuFff456StRedUsPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "fff456-st-red-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "fff456-st-red", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-fff456-st-red-us.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-fff456-st-red-us.ts deleted file mode 100644 index f2e1b2ffb..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-fff456-st-red-us.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const usWarehouse = ChannelDraft.presets.sampleDataB2B - .usWarehouse() - .build(); - -const fff456St01 = ProductVariantDraft.presets.sampleDataB2B - .fff456St01() - .build(); - -const skuFff456StRedUs = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${fff456St01.sku}-${usWarehouse.key}`) - .sku(fff456St01.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(usWarehouse.key)); - -export default skuFff456StRedUs; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-fuel-filter-default-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-fuel-filter-default-warehouse.spec.ts new file mode 100644 index 000000000..f58d2e13c --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-fuel-filter-default-warehouse.spec.ts @@ -0,0 +1,40 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuFuelFilterDefaultWarehouse preset`, () => { + it(`should return a skuFuelFilterDefaultWarehouse preset when built for rest`, () => { + const skuFuelFilterDefaultWarehousePreset = InventoryEntryDraftRest.presets + .skuFuelFilterDefaultWarehouse() + .build(); + expect(skuFuelFilterDefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuFuelFilterDefaultWarehouse preset when built for graphql`, () => { + const skuFuelFilterDefaultWarehousePreset = + InventoryEntryDraftGraphql.presets + .skuFuelFilterDefaultWarehouse() + .build(); + expect(skuFuelFilterDefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuFuelFilterDefaultWarehouse preset when built for legacy rest`, () => { + const skuFuelFilterDefaultWarehousePreset = InventoryEntryDraft.presets + .skuFuelFilterDefaultWarehouse() + .buildRest(); + expect(skuFuelFilterDefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuFuelFilterDefaultWarehouse preset when built for legacy graphql`, () => { + const skuFuelFilterDefaultWarehousePreset = InventoryEntryDraft.presets + .skuFuelFilterDefaultWarehouse() + .buildGraphql(); + expect(skuFuelFilterDefaultWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-fuel-filter-default-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-fuel-filter-default-warehouse.ts new file mode 100644 index 000000000..2e81d790b --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-fuel-filter-default-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .defaultWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .fuelFilter01() + .build(); + +const skuFuelFilterDefaultWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('fuel-filter-default-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuFuelFilterDefaultWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-fuel-filter-default.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-fuel-filter-default.spec.ts deleted file mode 100644 index beb8690f0..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-fuel-filter-default.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuFuelFilterDefault from './sku-fuel-filter-default'; - -describe(`with skuFuelFilterDefault preset and default-warehouse channel`, () => { - it(`should return a skuFuelFilterDefault preset`, () => { - const skuFuelFilterDefaultPreset = - skuFuelFilterDefault().build(); - expect(skuFuelFilterDefaultPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "fuel-filter-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "fuel-filter", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuFuelFilterDefault preset when built for graphql`, () => { - const skuFuelFilterDefaultPresetGraphql = - skuFuelFilterDefault().buildGraphql(); - expect(skuFuelFilterDefaultPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "fuel-filter-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "fuel-filter", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-fuel-filter-default.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-fuel-filter-default.ts deleted file mode 100644 index cca097903..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-fuel-filter-default.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const defaultWarehouse = ChannelDraft.presets.sampleDataB2B - .defaultWarehouse() - .build(); - -const fuelFilter01 = ProductVariantDraft.presets.sampleDataB2B - .fuelFilter01() - .build(); - -const skuFuelFilterDefault = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${fuelFilter01.sku}-${defaultWarehouse.key}`) - .sku(fuelFilter01.sku!) - .quantityOnStock(1000) - .supplyChannel( - KeyReferenceDraft.presets.channel().key(defaultWarehouse.key) - ); - -export default skuFuelFilterDefault; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-fuel-filter-eu-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-fuel-filter-eu-warehouse.spec.ts new file mode 100644 index 000000000..92e53928f --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-fuel-filter-eu-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuFuelFilterEuWarehouse preset`, () => { + it(`should return a skuFuelFilterEuWarehouse preset when built for rest`, () => { + const skuFuelFilterEuWarehousePreset = InventoryEntryDraftRest.presets + .skuFuelFilterEuWarehouse() + .build(); + expect(skuFuelFilterEuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuFuelFilterEuWarehouse preset when built for graphql`, () => { + const skuFuelFilterEuWarehousePreset = InventoryEntryDraftGraphql.presets + .skuFuelFilterEuWarehouse() + .build(); + expect(skuFuelFilterEuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuFuelFilterEuWarehouse preset when built for legacy rest`, () => { + const skuFuelFilterEuWarehousePreset = InventoryEntryDraft.presets + .skuFuelFilterEuWarehouse() + .buildRest(); + expect(skuFuelFilterEuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuFuelFilterEuWarehouse preset when built for legacy graphql`, () => { + const skuFuelFilterEuWarehousePreset = InventoryEntryDraft.presets + .skuFuelFilterEuWarehouse() + .buildGraphql(); + expect(skuFuelFilterEuWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-fuel-filter-eu-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-fuel-filter-eu-warehouse.ts new file mode 100644 index 000000000..5056618e4 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-fuel-filter-eu-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .euWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .fuelFilter01() + .build(); + +const skuFuelFilterEuWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('fuel-filter-eu-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuFuelFilterEuWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-fuel-filter-eu.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-fuel-filter-eu.spec.ts deleted file mode 100644 index 7e605588f..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-fuel-filter-eu.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuFuelFilterEu from './sku-fuel-filter-eu'; - -describe(`with skuFuelFilterEu preset and eu-warehouse channel`, () => { - it(`should return a skuFuelFilterEu preset`, () => { - const skuFuelFilterEuPreset = - skuFuelFilterEu().build(); - expect(skuFuelFilterEuPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "fuel-filter-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "fuel-filter", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuFuelFilterEu preset when built for graphql`, () => { - const skuFuelFilterEuPresetGraphql = - skuFuelFilterEu().buildGraphql(); - expect(skuFuelFilterEuPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "fuel-filter-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "fuel-filter", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-fuel-filter-eu.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-fuel-filter-eu.ts deleted file mode 100644 index 9923a44f9..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-fuel-filter-eu.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const euWarehouse = ChannelDraft.presets.sampleDataB2B - .euWarehouse() - .build(); - -const fuelFilter01 = ProductVariantDraft.presets.sampleDataB2B - .fuelFilter01() - .build(); - -const skuFuelFilterEu = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${fuelFilter01.sku}-${euWarehouse.key}`) - .sku(fuelFilter01.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(euWarehouse.key)); - -export default skuFuelFilterEu; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-fuel-filter-us-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-fuel-filter-us-warehouse.spec.ts new file mode 100644 index 000000000..1b5afc43a --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-fuel-filter-us-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuFuelFilterUsWarehouse preset`, () => { + it(`should return a skuFuelFilterUsWarehouse preset when built for rest`, () => { + const skuFuelFilterUsWarehousePreset = InventoryEntryDraftRest.presets + .skuFuelFilterUsWarehouse() + .build(); + expect(skuFuelFilterUsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuFuelFilterUsWarehouse preset when built for graphql`, () => { + const skuFuelFilterUsWarehousePreset = InventoryEntryDraftGraphql.presets + .skuFuelFilterUsWarehouse() + .build(); + expect(skuFuelFilterUsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuFuelFilterUsWarehouse preset when built for legacy rest`, () => { + const skuFuelFilterUsWarehousePreset = InventoryEntryDraft.presets + .skuFuelFilterUsWarehouse() + .buildRest(); + expect(skuFuelFilterUsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuFuelFilterUsWarehouse preset when built for legacy graphql`, () => { + const skuFuelFilterUsWarehousePreset = InventoryEntryDraft.presets + .skuFuelFilterUsWarehouse() + .buildGraphql(); + expect(skuFuelFilterUsWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-fuel-filter-us-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-fuel-filter-us-warehouse.ts new file mode 100644 index 000000000..27772725f --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-fuel-filter-us-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .usWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .fuelFilter01() + .build(); + +const skuFuelFilterUsWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('fuel-filter-us-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuFuelFilterUsWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-fuel-filter-us.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-fuel-filter-us.spec.ts deleted file mode 100644 index 411bf1ad7..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-fuel-filter-us.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuFuelFilterUs from './sku-fuel-filter-us'; - -describe(`with skuFuelFilterUs preset and us-warehouse channel`, () => { - it(`should return a skuFuelFilterUs preset`, () => { - const skuFuelFilterUsPreset = - skuFuelFilterUs().build(); - expect(skuFuelFilterUsPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "fuel-filter-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "fuel-filter", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuFuelFilterUs preset when built for graphql`, () => { - const skuFuelFilterUsPresetGraphql = - skuFuelFilterUs().buildGraphql(); - expect(skuFuelFilterUsPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "fuel-filter-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "fuel-filter", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-fuel-filter-us.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-fuel-filter-us.ts deleted file mode 100644 index f7fe75a7a..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-fuel-filter-us.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const usWarehouse = ChannelDraft.presets.sampleDataB2B - .usWarehouse() - .build(); - -const fuelFilter01 = ProductVariantDraft.presets.sampleDataB2B - .fuelFilter01() - .build(); - -const skuFuelFilterUs = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${fuelFilter01.sku}-${usWarehouse.key}`) - .sku(fuelFilter01.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(usWarehouse.key)); - -export default skuFuelFilterUs; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-g-123-qr-2015-default-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-g-123-qr-2015-default-warehouse.spec.ts new file mode 100644 index 000000000..c7f97ab59 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-g-123-qr-2015-default-warehouse.spec.ts @@ -0,0 +1,40 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuG123Qr2015DefaultWarehouse preset`, () => { + it(`should return a skuG123Qr2015DefaultWarehouse preset when built for rest`, () => { + const skuG123Qr2015DefaultWarehousePreset = InventoryEntryDraftRest.presets + .skuG123Qr2015DefaultWarehouse() + .build(); + expect(skuG123Qr2015DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuG123Qr2015DefaultWarehouse preset when built for graphql`, () => { + const skuG123Qr2015DefaultWarehousePreset = + InventoryEntryDraftGraphql.presets + .skuG123Qr2015DefaultWarehouse() + .build(); + expect(skuG123Qr2015DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuG123Qr2015DefaultWarehouse preset when built for legacy rest`, () => { + const skuG123Qr2015DefaultWarehousePreset = InventoryEntryDraft.presets + .skuG123Qr2015DefaultWarehouse() + .buildRest(); + expect(skuG123Qr2015DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuG123Qr2015DefaultWarehouse preset when built for legacy graphql`, () => { + const skuG123Qr2015DefaultWarehousePreset = InventoryEntryDraft.presets + .skuG123Qr2015DefaultWarehouse() + .buildGraphql(); + expect(skuG123Qr2015DefaultWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-g-123-qr-2015-default-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-g-123-qr-2015-default-warehouse.ts new file mode 100644 index 000000000..1f8bd3819 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-g-123-qr-2015-default-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .defaultWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .g123Qr01() + .build(); + +const skuG123Qr2015DefaultWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('g123-qr-2015-default-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuG123Qr2015DefaultWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-g-123-qr-2015-eu-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-g-123-qr-2015-eu-warehouse.spec.ts new file mode 100644 index 000000000..3e01f1159 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-g-123-qr-2015-eu-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuG123Qr2015EuWarehouse preset`, () => { + it(`should return a skuG123Qr2015EuWarehouse preset when built for rest`, () => { + const skuG123Qr2015EuWarehousePreset = InventoryEntryDraftRest.presets + .skuG123Qr2015EuWarehouse() + .build(); + expect(skuG123Qr2015EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuG123Qr2015EuWarehouse preset when built for graphql`, () => { + const skuG123Qr2015EuWarehousePreset = InventoryEntryDraftGraphql.presets + .skuG123Qr2015EuWarehouse() + .build(); + expect(skuG123Qr2015EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuG123Qr2015EuWarehouse preset when built for legacy rest`, () => { + const skuG123Qr2015EuWarehousePreset = InventoryEntryDraft.presets + .skuG123Qr2015EuWarehouse() + .buildRest(); + expect(skuG123Qr2015EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuG123Qr2015EuWarehouse preset when built for legacy graphql`, () => { + const skuG123Qr2015EuWarehousePreset = InventoryEntryDraft.presets + .skuG123Qr2015EuWarehouse() + .buildGraphql(); + expect(skuG123Qr2015EuWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-g-123-qr-2015-eu-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-g-123-qr-2015-eu-warehouse.ts new file mode 100644 index 000000000..7304fd192 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-g-123-qr-2015-eu-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .euWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .g123Qr01() + .build(); + +const skuG123Qr2015EuWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('g123-qr-2015-eu-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuG123Qr2015EuWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-g-123-qr-2015-us-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-g-123-qr-2015-us-warehouse.spec.ts new file mode 100644 index 000000000..2bd92b92e --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-g-123-qr-2015-us-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuG123Qr2015UsWarehouse preset`, () => { + it(`should return a skuG123Qr2015UsWarehouse preset when built for rest`, () => { + const skuG123Qr2015UsWarehousePreset = InventoryEntryDraftRest.presets + .skuG123Qr2015UsWarehouse() + .build(); + expect(skuG123Qr2015UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuG123Qr2015UsWarehouse preset when built for graphql`, () => { + const skuG123Qr2015UsWarehousePreset = InventoryEntryDraftGraphql.presets + .skuG123Qr2015UsWarehouse() + .build(); + expect(skuG123Qr2015UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuG123Qr2015UsWarehouse preset when built for legacy rest`, () => { + const skuG123Qr2015UsWarehousePreset = InventoryEntryDraft.presets + .skuG123Qr2015UsWarehouse() + .buildRest(); + expect(skuG123Qr2015UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuG123Qr2015UsWarehouse preset when built for legacy graphql`, () => { + const skuG123Qr2015UsWarehousePreset = InventoryEntryDraft.presets + .skuG123Qr2015UsWarehouse() + .buildGraphql(); + expect(skuG123Qr2015UsWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-g-123-qr-2015-us-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-g-123-qr-2015-us-warehouse.ts new file mode 100644 index 000000000..cffa6a83d --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-g-123-qr-2015-us-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .usWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .g123Qr01() + .build(); + +const skuG123Qr2015UsWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('g123-qr-2015-us-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuG123Qr2015UsWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-g-123-qr-2019-default-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-g-123-qr-2019-default-warehouse.spec.ts new file mode 100644 index 000000000..ba138d00a --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-g-123-qr-2019-default-warehouse.spec.ts @@ -0,0 +1,40 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuG123Qr2019DefaultWarehouse preset`, () => { + it(`should return a skuG123Qr2019DefaultWarehouse preset when built for rest`, () => { + const skuG123Qr2019DefaultWarehousePreset = InventoryEntryDraftRest.presets + .skuG123Qr2019DefaultWarehouse() + .build(); + expect(skuG123Qr2019DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuG123Qr2019DefaultWarehouse preset when built for graphql`, () => { + const skuG123Qr2019DefaultWarehousePreset = + InventoryEntryDraftGraphql.presets + .skuG123Qr2019DefaultWarehouse() + .build(); + expect(skuG123Qr2019DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuG123Qr2019DefaultWarehouse preset when built for legacy rest`, () => { + const skuG123Qr2019DefaultWarehousePreset = InventoryEntryDraft.presets + .skuG123Qr2019DefaultWarehouse() + .buildRest(); + expect(skuG123Qr2019DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuG123Qr2019DefaultWarehouse preset when built for legacy graphql`, () => { + const skuG123Qr2019DefaultWarehousePreset = InventoryEntryDraft.presets + .skuG123Qr2019DefaultWarehouse() + .buildGraphql(); + expect(skuG123Qr2019DefaultWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-g-123-qr-2019-default-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-g-123-qr-2019-default-warehouse.ts new file mode 100644 index 000000000..12bb342d7 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-g-123-qr-2019-default-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .defaultWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .g123Qr02() + .build(); + +const skuG123Qr2019DefaultWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('g123-qr-2019-default-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuG123Qr2019DefaultWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-g-123-qr-2019-eu-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-g-123-qr-2019-eu-warehouse.spec.ts new file mode 100644 index 000000000..3508449d8 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-g-123-qr-2019-eu-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuG123Qr2019EuWarehouse preset`, () => { + it(`should return a skuG123Qr2019EuWarehouse preset when built for rest`, () => { + const skuG123Qr2019EuWarehousePreset = InventoryEntryDraftRest.presets + .skuG123Qr2019EuWarehouse() + .build(); + expect(skuG123Qr2019EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuG123Qr2019EuWarehouse preset when built for graphql`, () => { + const skuG123Qr2019EuWarehousePreset = InventoryEntryDraftGraphql.presets + .skuG123Qr2019EuWarehouse() + .build(); + expect(skuG123Qr2019EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuG123Qr2019EuWarehouse preset when built for legacy rest`, () => { + const skuG123Qr2019EuWarehousePreset = InventoryEntryDraft.presets + .skuG123Qr2019EuWarehouse() + .buildRest(); + expect(skuG123Qr2019EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuG123Qr2019EuWarehouse preset when built for legacy graphql`, () => { + const skuG123Qr2019EuWarehousePreset = InventoryEntryDraft.presets + .skuG123Qr2019EuWarehouse() + .buildGraphql(); + expect(skuG123Qr2019EuWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-g-123-qr-2019-eu-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-g-123-qr-2019-eu-warehouse.ts new file mode 100644 index 000000000..85d2de5b6 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-g-123-qr-2019-eu-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .euWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .g123Qr02() + .build(); + +const skuG123Qr2019EuWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('g123-qr-2019-eu-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuG123Qr2019EuWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-g-123-qr-2019-us-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-g-123-qr-2019-us-warehouse.spec.ts new file mode 100644 index 000000000..b2b801e82 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-g-123-qr-2019-us-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuG123Qr2019UsWarehouse preset`, () => { + it(`should return a skuG123Qr2019UsWarehouse preset when built for rest`, () => { + const skuG123Qr2019UsWarehousePreset = InventoryEntryDraftRest.presets + .skuG123Qr2019UsWarehouse() + .build(); + expect(skuG123Qr2019UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuG123Qr2019UsWarehouse preset when built for graphql`, () => { + const skuG123Qr2019UsWarehousePreset = InventoryEntryDraftGraphql.presets + .skuG123Qr2019UsWarehouse() + .build(); + expect(skuG123Qr2019UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuG123Qr2019UsWarehouse preset when built for legacy rest`, () => { + const skuG123Qr2019UsWarehousePreset = InventoryEntryDraft.presets + .skuG123Qr2019UsWarehouse() + .buildRest(); + expect(skuG123Qr2019UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuG123Qr2019UsWarehouse preset when built for legacy graphql`, () => { + const skuG123Qr2019UsWarehousePreset = InventoryEntryDraft.presets + .skuG123Qr2019UsWarehouse() + .buildGraphql(); + expect(skuG123Qr2019UsWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-g-123-qr-2019-us-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-g-123-qr-2019-us-warehouse.ts new file mode 100644 index 000000000..95ed9ebc1 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-g-123-qr-2019-us-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .usWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .g123Qr02() + .build(); + +const skuG123Qr2019UsWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('g123-qr-2019-us-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuG123Qr2019UsWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-g-123-qr-2023-default-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-g-123-qr-2023-default-warehouse.spec.ts new file mode 100644 index 000000000..e682cb7e7 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-g-123-qr-2023-default-warehouse.spec.ts @@ -0,0 +1,40 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuG123Qr2023DefaultWarehouse preset`, () => { + it(`should return a skuG123Qr2023DefaultWarehouse preset when built for rest`, () => { + const skuG123Qr2023DefaultWarehousePreset = InventoryEntryDraftRest.presets + .skuG123Qr2023DefaultWarehouse() + .build(); + expect(skuG123Qr2023DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuG123Qr2023DefaultWarehouse preset when built for graphql`, () => { + const skuG123Qr2023DefaultWarehousePreset = + InventoryEntryDraftGraphql.presets + .skuG123Qr2023DefaultWarehouse() + .build(); + expect(skuG123Qr2023DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuG123Qr2023DefaultWarehouse preset when built for legacy rest`, () => { + const skuG123Qr2023DefaultWarehousePreset = InventoryEntryDraft.presets + .skuG123Qr2023DefaultWarehouse() + .buildRest(); + expect(skuG123Qr2023DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuG123Qr2023DefaultWarehouse preset when built for legacy graphql`, () => { + const skuG123Qr2023DefaultWarehousePreset = InventoryEntryDraft.presets + .skuG123Qr2023DefaultWarehouse() + .buildGraphql(); + expect(skuG123Qr2023DefaultWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-g-123-qr-2023-default-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-g-123-qr-2023-default-warehouse.ts new file mode 100644 index 000000000..0dd2b201e --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-g-123-qr-2023-default-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .defaultWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .g123Qr03() + .build(); + +const skuG123Qr2023DefaultWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('g123-qr-2023-default-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuG123Qr2023DefaultWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-g-123-qr-2023-eu-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-g-123-qr-2023-eu-warehouse.spec.ts new file mode 100644 index 000000000..e932a8e1c --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-g-123-qr-2023-eu-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuG123Qr2023EuWarehouse preset`, () => { + it(`should return a skuG123Qr2023EuWarehouse preset when built for rest`, () => { + const skuG123Qr2023EuWarehousePreset = InventoryEntryDraftRest.presets + .skuG123Qr2023EuWarehouse() + .build(); + expect(skuG123Qr2023EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuG123Qr2023EuWarehouse preset when built for graphql`, () => { + const skuG123Qr2023EuWarehousePreset = InventoryEntryDraftGraphql.presets + .skuG123Qr2023EuWarehouse() + .build(); + expect(skuG123Qr2023EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuG123Qr2023EuWarehouse preset when built for legacy rest`, () => { + const skuG123Qr2023EuWarehousePreset = InventoryEntryDraft.presets + .skuG123Qr2023EuWarehouse() + .buildRest(); + expect(skuG123Qr2023EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuG123Qr2023EuWarehouse preset when built for legacy graphql`, () => { + const skuG123Qr2023EuWarehousePreset = InventoryEntryDraft.presets + .skuG123Qr2023EuWarehouse() + .buildGraphql(); + expect(skuG123Qr2023EuWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-g-123-qr-2023-eu-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-g-123-qr-2023-eu-warehouse.ts new file mode 100644 index 000000000..13e1c8462 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-g-123-qr-2023-eu-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .euWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .g123Qr03() + .build(); + +const skuG123Qr2023EuWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('g123-qr-2023-eu-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuG123Qr2023EuWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-g-123-qr-2023-us-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-g-123-qr-2023-us-warehouse.spec.ts new file mode 100644 index 000000000..3069ff637 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-g-123-qr-2023-us-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuG123Qr2023UsWarehouse preset`, () => { + it(`should return a skuG123Qr2023UsWarehouse preset when built for rest`, () => { + const skuG123Qr2023UsWarehousePreset = InventoryEntryDraftRest.presets + .skuG123Qr2023UsWarehouse() + .build(); + expect(skuG123Qr2023UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuG123Qr2023UsWarehouse preset when built for graphql`, () => { + const skuG123Qr2023UsWarehousePreset = InventoryEntryDraftGraphql.presets + .skuG123Qr2023UsWarehouse() + .build(); + expect(skuG123Qr2023UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuG123Qr2023UsWarehouse preset when built for legacy rest`, () => { + const skuG123Qr2023UsWarehousePreset = InventoryEntryDraft.presets + .skuG123Qr2023UsWarehouse() + .buildRest(); + expect(skuG123Qr2023UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuG123Qr2023UsWarehouse preset when built for legacy graphql`, () => { + const skuG123Qr2023UsWarehousePreset = InventoryEntryDraft.presets + .skuG123Qr2023UsWarehouse() + .buildGraphql(); + expect(skuG123Qr2023UsWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-g-123-qr-2023-us-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-g-123-qr-2023-us-warehouse.ts new file mode 100644 index 000000000..dab70dbf5 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-g-123-qr-2023-us-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .usWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .g123Qr03() + .build(); + +const skuG123Qr2023UsWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('g123-qr-2023-us-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuG123Qr2023UsWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-g123-qr-2015-default.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-g123-qr-2015-default.spec.ts deleted file mode 100644 index 1467d1d75..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-g123-qr-2015-default.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuG123Qr2015Default from './sku-g123-qr-2015-default'; - -describe(`with skuG123Qr2015Default preset and default-warehouse channel`, () => { - it(`should return a skuG123Qr2015Default preset`, () => { - const skuG123Qr2015DefaultPreset = - skuG123Qr2015Default().build(); - expect(skuG123Qr2015DefaultPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "g123-qr-2015-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "g123-qr-2015", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuG123Qr2015Default preset when built for graphql`, () => { - const skuG123Qr2015DefaultPresetGraphql = - skuG123Qr2015Default().buildGraphql(); - expect(skuG123Qr2015DefaultPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "g123-qr-2015-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "g123-qr-2015", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-g123-qr-2015-default.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-g123-qr-2015-default.ts deleted file mode 100644 index 155aa9d02..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-g123-qr-2015-default.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const defaultWarehouse = ChannelDraft.presets.sampleDataB2B - .defaultWarehouse() - .build(); - -const g123Qr01 = ProductVariantDraft.presets.sampleDataB2B - .g123Qr01() - .build(); - -const skuG123Qr2015Default = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${g123Qr01.sku}-${defaultWarehouse.key}`) - .sku(g123Qr01.sku!) - .quantityOnStock(1000) - .supplyChannel( - KeyReferenceDraft.presets.channel().key(defaultWarehouse.key) - ); - -export default skuG123Qr2015Default; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-g123-qr-2015-eu.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-g123-qr-2015-eu.spec.ts deleted file mode 100644 index a41da9ae1..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-g123-qr-2015-eu.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuG123Qr2015Eu from './sku-g123-qr-2015-eu'; - -describe(`with skuG123Qr2015Eu preset and eu-warehouse channel`, () => { - it(`should return a skuG123Qr2015Eu preset`, () => { - const skuG123Qr2015EuPreset = - skuG123Qr2015Eu().build(); - expect(skuG123Qr2015EuPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "g123-qr-2015-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "g123-qr-2015", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuG123Qr2015Eu preset when built for graphql`, () => { - const skuG123Qr2015EuPresetGraphql = - skuG123Qr2015Eu().buildGraphql(); - expect(skuG123Qr2015EuPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "g123-qr-2015-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "g123-qr-2015", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-g123-qr-2015-eu.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-g123-qr-2015-eu.ts deleted file mode 100644 index a48449383..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-g123-qr-2015-eu.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const euWarehouse = ChannelDraft.presets.sampleDataB2B - .euWarehouse() - .build(); - -const g123Qr01 = ProductVariantDraft.presets.sampleDataB2B - .g123Qr01() - .build(); - -const skuG123Qr2015Eu = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${g123Qr01.sku}-${euWarehouse.key}`) - .sku(g123Qr01.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(euWarehouse.key)); - -export default skuG123Qr2015Eu; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-g123-qr-2015-us.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-g123-qr-2015-us.spec.ts deleted file mode 100644 index 65ba470e4..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-g123-qr-2015-us.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuG123Qr2015Us from './sku-g123-qr-2015-us'; - -describe(`with skuG123Qr2015Us preset and us-warehouse channel`, () => { - it(`should return a skuG123Qr2015Us preset`, () => { - const skuG123Qr2015UsPreset = - skuG123Qr2015Us().build(); - expect(skuG123Qr2015UsPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "g123-qr-2015-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "g123-qr-2015", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuG123Qr2015Us preset when built for graphql`, () => { - const skuG123Qr2015UsPresetGraphql = - skuG123Qr2015Us().buildGraphql(); - expect(skuG123Qr2015UsPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "g123-qr-2015-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "g123-qr-2015", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-g123-qr-2015-us.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-g123-qr-2015-us.ts deleted file mode 100644 index e67de8b6c..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-g123-qr-2015-us.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const usWarehouse = ChannelDraft.presets.sampleDataB2B - .usWarehouse() - .build(); - -const g123Qr01 = ProductVariantDraft.presets.sampleDataB2B - .g123Qr01() - .build(); - -const skuG123Qr2015Us = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${g123Qr01.sku}-${usWarehouse.key}`) - .sku(g123Qr01.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(usWarehouse.key)); - -export default skuG123Qr2015Us; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-g123-qr-2019-default.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-g123-qr-2019-default.spec.ts deleted file mode 100644 index 83663435d..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-g123-qr-2019-default.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuG123Qr2019Default from './sku-g123-qr-2019-default'; - -describe(`with skuG123Qr2019Default preset and default-warehouse channel`, () => { - it(`should return a skuG123Qr2019Default preset`, () => { - const skuG123Qr2019DefaultPreset = - skuG123Qr2019Default().build(); - expect(skuG123Qr2019DefaultPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "g123-qr-2019-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "g123-qr-2019", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuG123Qr2019Default preset when built for graphql`, () => { - const skuG123Qr2019DefaultPresetGraphql = - skuG123Qr2019Default().buildGraphql(); - expect(skuG123Qr2019DefaultPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "g123-qr-2019-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "g123-qr-2019", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-g123-qr-2019-default.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-g123-qr-2019-default.ts deleted file mode 100644 index 989950c0e..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-g123-qr-2019-default.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const defaultWarehouse = ChannelDraft.presets.sampleDataB2B - .defaultWarehouse() - .build(); - -const g123Qr02 = ProductVariantDraft.presets.sampleDataB2B - .g123Qr02() - .build(); - -const skuG123Qr2019Default = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${g123Qr02.sku}-${defaultWarehouse.key}`) - .sku(g123Qr02.sku!) - .quantityOnStock(1000) - .supplyChannel( - KeyReferenceDraft.presets.channel().key(defaultWarehouse.key) - ); - -export default skuG123Qr2019Default; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-g123-qr-2019-eu.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-g123-qr-2019-eu.spec.ts deleted file mode 100644 index fb63ba26c..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-g123-qr-2019-eu.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuG123Qr2019Eu from './sku-g123-qr-2019-eu'; - -describe(`with skuG123Qr2019Eu preset and eu-warehouse channel`, () => { - it(`should return a skuG123Qr2019Eu preset`, () => { - const skuG123Qr2019EuPreset = - skuG123Qr2019Eu().build(); - expect(skuG123Qr2019EuPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "g123-qr-2019-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "g123-qr-2019", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuG123Qr2019Eu preset when built for graphql`, () => { - const skuG123Qr2019EuPresetGraphql = - skuG123Qr2019Eu().buildGraphql(); - expect(skuG123Qr2019EuPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "g123-qr-2019-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "g123-qr-2019", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-g123-qr-2019-eu.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-g123-qr-2019-eu.ts deleted file mode 100644 index 846d82c08..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-g123-qr-2019-eu.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const euWarehouse = ChannelDraft.presets.sampleDataB2B - .euWarehouse() - .build(); - -const g123Qr02 = ProductVariantDraft.presets.sampleDataB2B - .g123Qr02() - .build(); - -const skuG123Qr2019Eu = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${g123Qr02.sku}-${euWarehouse.key}`) - .sku(g123Qr02.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(euWarehouse.key)); - -export default skuG123Qr2019Eu; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-g123-qr-2019-us.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-g123-qr-2019-us.spec.ts deleted file mode 100644 index c420fd3fa..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-g123-qr-2019-us.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuG123Qr2019Us from './sku-g123-qr-2019-us'; - -describe(`with skuG123Qr2019Us preset and us-warehouse channel`, () => { - it(`should return a skuG123Qr2019Us preset`, () => { - const skuG123Qr2019UsPreset = - skuG123Qr2019Us().build(); - expect(skuG123Qr2019UsPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "g123-qr-2019-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "g123-qr-2019", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuG123Qr2019Us preset when built for graphql`, () => { - const skuG123Qr2019UsPresetGraphql = - skuG123Qr2019Us().buildGraphql(); - expect(skuG123Qr2019UsPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "g123-qr-2019-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "g123-qr-2019", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-g123-qr-2019-us.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-g123-qr-2019-us.ts deleted file mode 100644 index cf24cc09a..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-g123-qr-2019-us.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const usWarehouse = ChannelDraft.presets.sampleDataB2B - .usWarehouse() - .build(); - -const g123Qr02 = ProductVariantDraft.presets.sampleDataB2B - .g123Qr02() - .build(); - -const skuG123Qr2019Us = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${g123Qr02.sku}-${usWarehouse.key}`) - .sku(g123Qr02.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(usWarehouse.key)); - -export default skuG123Qr2019Us; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-g123-qr-2023-default.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-g123-qr-2023-default.spec.ts deleted file mode 100644 index 171fc3ec8..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-g123-qr-2023-default.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuG123Qr2023Default from './sku-g123-qr-2023-default'; - -describe(`with skuG123Qr2023Default preset and default-warehouse channel`, () => { - it(`should return a skuG123Qr2023Default preset`, () => { - const skuG123Qr2023DefaultPreset = - skuG123Qr2023Default().build(); - expect(skuG123Qr2023DefaultPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "g123-qr-2023-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "g123-qr-2023", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuG123Qr2023Default preset when built for graphql`, () => { - const skuG123Qr2023DefaultPresetGraphql = - skuG123Qr2023Default().buildGraphql(); - expect(skuG123Qr2023DefaultPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "g123-qr-2023-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "g123-qr-2023", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-g123-qr-2023-default.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-g123-qr-2023-default.ts deleted file mode 100644 index b3c66abf7..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-g123-qr-2023-default.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const defaultWarehouse = ChannelDraft.presets.sampleDataB2B - .defaultWarehouse() - .build(); - -const g123Qr03 = ProductVariantDraft.presets.sampleDataB2B - .g123Qr03() - .build(); - -const skuG123Qr2023Default = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${g123Qr03.sku}-${defaultWarehouse.key}`) - .sku(g123Qr03.sku!) - .quantityOnStock(1000) - .supplyChannel( - KeyReferenceDraft.presets.channel().key(defaultWarehouse.key) - ); - -export default skuG123Qr2023Default; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-g123-qr-2023-eu.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-g123-qr-2023-eu.spec.ts deleted file mode 100644 index 38abb79f0..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-g123-qr-2023-eu.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuG123Qr2023Eu from './sku-g123-qr-2023-eu'; - -describe(`with skuG123Qr2023Eu preset and eu-warehouse channel`, () => { - it(`should return a skuG123Qr2023Eu preset`, () => { - const skuG123Qr2023EuPreset = - skuG123Qr2023Eu().build(); - expect(skuG123Qr2023EuPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "g123-qr-2023-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "g123-qr-2023", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuG123Qr2023Eu preset when built for graphql`, () => { - const skuG123Qr2023EuPresetGraphql = - skuG123Qr2023Eu().buildGraphql(); - expect(skuG123Qr2023EuPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "g123-qr-2023-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "g123-qr-2023", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-g123-qr-2023-eu.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-g123-qr-2023-eu.ts deleted file mode 100644 index 2274894eb..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-g123-qr-2023-eu.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const euWarehouse = ChannelDraft.presets.sampleDataB2B - .euWarehouse() - .build(); - -const g123Qr03 = ProductVariantDraft.presets.sampleDataB2B - .g123Qr03() - .build(); - -const skuG123Qr2023Eu = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${g123Qr03.sku}-${euWarehouse.key}`) - .sku(g123Qr03.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(euWarehouse.key)); - -export default skuG123Qr2023Eu; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-g123-qr-2023-us.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-g123-qr-2023-us.spec.ts deleted file mode 100644 index 5f94d2fb0..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-g123-qr-2023-us.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuG123Qr2023Us from './sku-g123-qr-2023-us'; - -describe(`with skuG123Qr2023Us preset and us-warehouse channel`, () => { - it(`should return a skuG123Qr2023Us preset`, () => { - const skuG123Qr2023UsPreset = - skuG123Qr2023Us().build(); - expect(skuG123Qr2023UsPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "g123-qr-2023-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "g123-qr-2023", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuG123Qr2023Us preset when built for graphql`, () => { - const skuG123Qr2023UsPresetGraphql = - skuG123Qr2023Us().buildGraphql(); - expect(skuG123Qr2023UsPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "g123-qr-2023-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "g123-qr-2023", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-g123-qr-2023-us.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-g123-qr-2023-us.ts deleted file mode 100644 index d53e4cac3..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-g123-qr-2023-us.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const usWarehouse = ChannelDraft.presets.sampleDataB2B - .usWarehouse() - .build(); - -const g123Qr03 = ProductVariantDraft.presets.sampleDataB2B - .g123Qr03() - .build(); - -const skuG123Qr2023Us = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${g123Qr03.sku}-${usWarehouse.key}`) - .sku(g123Qr03.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(usWarehouse.key)); - -export default skuG123Qr2023Us; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-gg-123-qr-2015-default-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-gg-123-qr-2015-default-warehouse.spec.ts new file mode 100644 index 000000000..4d4d4f96a --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-gg-123-qr-2015-default-warehouse.spec.ts @@ -0,0 +1,40 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuGg123Qr2015DefaultWarehouse preset`, () => { + it(`should return a skuGg123Qr2015DefaultWarehouse preset when built for rest`, () => { + const skuGg123Qr2015DefaultWarehousePreset = InventoryEntryDraftRest.presets + .skuGg123Qr2015DefaultWarehouse() + .build(); + expect(skuGg123Qr2015DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuGg123Qr2015DefaultWarehouse preset when built for graphql`, () => { + const skuGg123Qr2015DefaultWarehousePreset = + InventoryEntryDraftGraphql.presets + .skuGg123Qr2015DefaultWarehouse() + .build(); + expect(skuGg123Qr2015DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuGg123Qr2015DefaultWarehouse preset when built for legacy rest`, () => { + const skuGg123Qr2015DefaultWarehousePreset = InventoryEntryDraft.presets + .skuGg123Qr2015DefaultWarehouse() + .buildRest(); + expect(skuGg123Qr2015DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuGg123Qr2015DefaultWarehouse preset when built for legacy graphql`, () => { + const skuGg123Qr2015DefaultWarehousePreset = InventoryEntryDraft.presets + .skuGg123Qr2015DefaultWarehouse() + .buildGraphql(); + expect(skuGg123Qr2015DefaultWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-gg-123-qr-2015-default-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-gg-123-qr-2015-default-warehouse.ts new file mode 100644 index 000000000..f120a8284 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-gg-123-qr-2015-default-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .defaultWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .gg123Qr01() + .build(); + +const skuGg123Qr2015DefaultWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('gg123-qr-2015-default-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuGg123Qr2015DefaultWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-gg-123-qr-2015-eu-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-gg-123-qr-2015-eu-warehouse.spec.ts new file mode 100644 index 000000000..d50e3a4e4 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-gg-123-qr-2015-eu-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuGg123Qr2015EuWarehouse preset`, () => { + it(`should return a skuGg123Qr2015EuWarehouse preset when built for rest`, () => { + const skuGg123Qr2015EuWarehousePreset = InventoryEntryDraftRest.presets + .skuGg123Qr2015EuWarehouse() + .build(); + expect(skuGg123Qr2015EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuGg123Qr2015EuWarehouse preset when built for graphql`, () => { + const skuGg123Qr2015EuWarehousePreset = InventoryEntryDraftGraphql.presets + .skuGg123Qr2015EuWarehouse() + .build(); + expect(skuGg123Qr2015EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuGg123Qr2015EuWarehouse preset when built for legacy rest`, () => { + const skuGg123Qr2015EuWarehousePreset = InventoryEntryDraft.presets + .skuGg123Qr2015EuWarehouse() + .buildRest(); + expect(skuGg123Qr2015EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuGg123Qr2015EuWarehouse preset when built for legacy graphql`, () => { + const skuGg123Qr2015EuWarehousePreset = InventoryEntryDraft.presets + .skuGg123Qr2015EuWarehouse() + .buildGraphql(); + expect(skuGg123Qr2015EuWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-gg-123-qr-2015-eu-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-gg-123-qr-2015-eu-warehouse.ts new file mode 100644 index 000000000..438f19d99 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-gg-123-qr-2015-eu-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .euWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .gg123Qr01() + .build(); + +const skuGg123Qr2015EuWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('gg123-qr-2015-eu-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuGg123Qr2015EuWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-gg-123-qr-2015-us-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-gg-123-qr-2015-us-warehouse.spec.ts new file mode 100644 index 000000000..4d2dbdeeb --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-gg-123-qr-2015-us-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuGg123Qr2015UsWarehouse preset`, () => { + it(`should return a skuGg123Qr2015UsWarehouse preset when built for rest`, () => { + const skuGg123Qr2015UsWarehousePreset = InventoryEntryDraftRest.presets + .skuGg123Qr2015UsWarehouse() + .build(); + expect(skuGg123Qr2015UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuGg123Qr2015UsWarehouse preset when built for graphql`, () => { + const skuGg123Qr2015UsWarehousePreset = InventoryEntryDraftGraphql.presets + .skuGg123Qr2015UsWarehouse() + .build(); + expect(skuGg123Qr2015UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuGg123Qr2015UsWarehouse preset when built for legacy rest`, () => { + const skuGg123Qr2015UsWarehousePreset = InventoryEntryDraft.presets + .skuGg123Qr2015UsWarehouse() + .buildRest(); + expect(skuGg123Qr2015UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuGg123Qr2015UsWarehouse preset when built for legacy graphql`, () => { + const skuGg123Qr2015UsWarehousePreset = InventoryEntryDraft.presets + .skuGg123Qr2015UsWarehouse() + .buildGraphql(); + expect(skuGg123Qr2015UsWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-gg-123-qr-2015-us-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-gg-123-qr-2015-us-warehouse.ts new file mode 100644 index 000000000..4a9158538 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-gg-123-qr-2015-us-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .usWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .gg123Qr01() + .build(); + +const skuGg123Qr2015UsWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('gg123-qr-2015-us-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuGg123Qr2015UsWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-gg-123-qr-2019-default-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-gg-123-qr-2019-default-warehouse.spec.ts new file mode 100644 index 000000000..47c87ceff --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-gg-123-qr-2019-default-warehouse.spec.ts @@ -0,0 +1,40 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuGg123Qr2019DefaultWarehouse preset`, () => { + it(`should return a skuGg123Qr2019DefaultWarehouse preset when built for rest`, () => { + const skuGg123Qr2019DefaultWarehousePreset = InventoryEntryDraftRest.presets + .skuGg123Qr2019DefaultWarehouse() + .build(); + expect(skuGg123Qr2019DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuGg123Qr2019DefaultWarehouse preset when built for graphql`, () => { + const skuGg123Qr2019DefaultWarehousePreset = + InventoryEntryDraftGraphql.presets + .skuGg123Qr2019DefaultWarehouse() + .build(); + expect(skuGg123Qr2019DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuGg123Qr2019DefaultWarehouse preset when built for legacy rest`, () => { + const skuGg123Qr2019DefaultWarehousePreset = InventoryEntryDraft.presets + .skuGg123Qr2019DefaultWarehouse() + .buildRest(); + expect(skuGg123Qr2019DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuGg123Qr2019DefaultWarehouse preset when built for legacy graphql`, () => { + const skuGg123Qr2019DefaultWarehousePreset = InventoryEntryDraft.presets + .skuGg123Qr2019DefaultWarehouse() + .buildGraphql(); + expect(skuGg123Qr2019DefaultWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-gg-123-qr-2019-default-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-gg-123-qr-2019-default-warehouse.ts new file mode 100644 index 000000000..3eb655788 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-gg-123-qr-2019-default-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .defaultWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .gg123Qr02() + .build(); + +const skuGg123Qr2019DefaultWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('gg123-qr-2019-default-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuGg123Qr2019DefaultWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-gg-123-qr-2019-eu-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-gg-123-qr-2019-eu-warehouse.spec.ts new file mode 100644 index 000000000..5e299da2f --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-gg-123-qr-2019-eu-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuGg123Qr2019EuWarehouse preset`, () => { + it(`should return a skuGg123Qr2019EuWarehouse preset when built for rest`, () => { + const skuGg123Qr2019EuWarehousePreset = InventoryEntryDraftRest.presets + .skuGg123Qr2019EuWarehouse() + .build(); + expect(skuGg123Qr2019EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuGg123Qr2019EuWarehouse preset when built for graphql`, () => { + const skuGg123Qr2019EuWarehousePreset = InventoryEntryDraftGraphql.presets + .skuGg123Qr2019EuWarehouse() + .build(); + expect(skuGg123Qr2019EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuGg123Qr2019EuWarehouse preset when built for legacy rest`, () => { + const skuGg123Qr2019EuWarehousePreset = InventoryEntryDraft.presets + .skuGg123Qr2019EuWarehouse() + .buildRest(); + expect(skuGg123Qr2019EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuGg123Qr2019EuWarehouse preset when built for legacy graphql`, () => { + const skuGg123Qr2019EuWarehousePreset = InventoryEntryDraft.presets + .skuGg123Qr2019EuWarehouse() + .buildGraphql(); + expect(skuGg123Qr2019EuWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-gg-123-qr-2019-eu-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-gg-123-qr-2019-eu-warehouse.ts new file mode 100644 index 000000000..6cf7c7202 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-gg-123-qr-2019-eu-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .euWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .gg123Qr02() + .build(); + +const skuGg123Qr2019EuWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('gg123-qr-2019-eu-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuGg123Qr2019EuWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-gg-123-qr-2019-us-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-gg-123-qr-2019-us-warehouse.spec.ts new file mode 100644 index 000000000..34a1330b4 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-gg-123-qr-2019-us-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuGg123Qr2019UsWarehouse preset`, () => { + it(`should return a skuGg123Qr2019UsWarehouse preset when built for rest`, () => { + const skuGg123Qr2019UsWarehousePreset = InventoryEntryDraftRest.presets + .skuGg123Qr2019UsWarehouse() + .build(); + expect(skuGg123Qr2019UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuGg123Qr2019UsWarehouse preset when built for graphql`, () => { + const skuGg123Qr2019UsWarehousePreset = InventoryEntryDraftGraphql.presets + .skuGg123Qr2019UsWarehouse() + .build(); + expect(skuGg123Qr2019UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuGg123Qr2019UsWarehouse preset when built for legacy rest`, () => { + const skuGg123Qr2019UsWarehousePreset = InventoryEntryDraft.presets + .skuGg123Qr2019UsWarehouse() + .buildRest(); + expect(skuGg123Qr2019UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuGg123Qr2019UsWarehouse preset when built for legacy graphql`, () => { + const skuGg123Qr2019UsWarehousePreset = InventoryEntryDraft.presets + .skuGg123Qr2019UsWarehouse() + .buildGraphql(); + expect(skuGg123Qr2019UsWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-gg-123-qr-2019-us-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-gg-123-qr-2019-us-warehouse.ts new file mode 100644 index 000000000..3851578bf --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-gg-123-qr-2019-us-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .usWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .gg123Qr02() + .build(); + +const skuGg123Qr2019UsWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('gg123-qr-2019-us-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuGg123Qr2019UsWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-gg-123-qr-2023-default-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-gg-123-qr-2023-default-warehouse.spec.ts new file mode 100644 index 000000000..4eee3ee76 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-gg-123-qr-2023-default-warehouse.spec.ts @@ -0,0 +1,40 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuGg123Qr2023DefaultWarehouse preset`, () => { + it(`should return a skuGg123Qr2023DefaultWarehouse preset when built for rest`, () => { + const skuGg123Qr2023DefaultWarehousePreset = InventoryEntryDraftRest.presets + .skuGg123Qr2023DefaultWarehouse() + .build(); + expect(skuGg123Qr2023DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuGg123Qr2023DefaultWarehouse preset when built for graphql`, () => { + const skuGg123Qr2023DefaultWarehousePreset = + InventoryEntryDraftGraphql.presets + .skuGg123Qr2023DefaultWarehouse() + .build(); + expect(skuGg123Qr2023DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuGg123Qr2023DefaultWarehouse preset when built for legacy rest`, () => { + const skuGg123Qr2023DefaultWarehousePreset = InventoryEntryDraft.presets + .skuGg123Qr2023DefaultWarehouse() + .buildRest(); + expect(skuGg123Qr2023DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuGg123Qr2023DefaultWarehouse preset when built for legacy graphql`, () => { + const skuGg123Qr2023DefaultWarehousePreset = InventoryEntryDraft.presets + .skuGg123Qr2023DefaultWarehouse() + .buildGraphql(); + expect(skuGg123Qr2023DefaultWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-gg-123-qr-2023-default-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-gg-123-qr-2023-default-warehouse.ts new file mode 100644 index 000000000..51ce3ea3a --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-gg-123-qr-2023-default-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .defaultWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .gg123Qr03() + .build(); + +const skuGg123Qr2023DefaultWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('gg123-qr-2023-default-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuGg123Qr2023DefaultWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-gg-123-qr-2023-eu-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-gg-123-qr-2023-eu-warehouse.spec.ts new file mode 100644 index 000000000..15dc1bac4 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-gg-123-qr-2023-eu-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuGg123Qr2023EuWarehouse preset`, () => { + it(`should return a skuGg123Qr2023EuWarehouse preset when built for rest`, () => { + const skuGg123Qr2023EuWarehousePreset = InventoryEntryDraftRest.presets + .skuGg123Qr2023EuWarehouse() + .build(); + expect(skuGg123Qr2023EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuGg123Qr2023EuWarehouse preset when built for graphql`, () => { + const skuGg123Qr2023EuWarehousePreset = InventoryEntryDraftGraphql.presets + .skuGg123Qr2023EuWarehouse() + .build(); + expect(skuGg123Qr2023EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuGg123Qr2023EuWarehouse preset when built for legacy rest`, () => { + const skuGg123Qr2023EuWarehousePreset = InventoryEntryDraft.presets + .skuGg123Qr2023EuWarehouse() + .buildRest(); + expect(skuGg123Qr2023EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuGg123Qr2023EuWarehouse preset when built for legacy graphql`, () => { + const skuGg123Qr2023EuWarehousePreset = InventoryEntryDraft.presets + .skuGg123Qr2023EuWarehouse() + .buildGraphql(); + expect(skuGg123Qr2023EuWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-gg-123-qr-2023-eu-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-gg-123-qr-2023-eu-warehouse.ts new file mode 100644 index 000000000..9f335c527 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-gg-123-qr-2023-eu-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .euWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .gg123Qr03() + .build(); + +const skuGg123Qr2023EuWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('gg123-qr-2023-eu-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuGg123Qr2023EuWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-gg-123-qr-2023-us-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-gg-123-qr-2023-us-warehouse.spec.ts new file mode 100644 index 000000000..00d89ebb6 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-gg-123-qr-2023-us-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuGg123Qr2023UsWarehouse preset`, () => { + it(`should return a skuGg123Qr2023UsWarehouse preset when built for rest`, () => { + const skuGg123Qr2023UsWarehousePreset = InventoryEntryDraftRest.presets + .skuGg123Qr2023UsWarehouse() + .build(); + expect(skuGg123Qr2023UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuGg123Qr2023UsWarehouse preset when built for graphql`, () => { + const skuGg123Qr2023UsWarehousePreset = InventoryEntryDraftGraphql.presets + .skuGg123Qr2023UsWarehouse() + .build(); + expect(skuGg123Qr2023UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuGg123Qr2023UsWarehouse preset when built for legacy rest`, () => { + const skuGg123Qr2023UsWarehousePreset = InventoryEntryDraft.presets + .skuGg123Qr2023UsWarehouse() + .buildRest(); + expect(skuGg123Qr2023UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuGg123Qr2023UsWarehouse preset when built for legacy graphql`, () => { + const skuGg123Qr2023UsWarehousePreset = InventoryEntryDraft.presets + .skuGg123Qr2023UsWarehouse() + .buildGraphql(); + expect(skuGg123Qr2023UsWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-gg-123-qr-2023-us-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-gg-123-qr-2023-us-warehouse.ts new file mode 100644 index 000000000..945cf9afc --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-gg-123-qr-2023-us-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .usWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .gg123Qr03() + .build(); + +const skuGg123Qr2023UsWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('gg123-qr-2023-us-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuGg123Qr2023UsWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-gg123-qr-2015-default.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-gg123-qr-2015-default.spec.ts deleted file mode 100644 index e86adb132..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-gg123-qr-2015-default.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuGg123Qr2015Default from './sku-gg123-qr-2015-default'; - -describe(`with skuGg123Qr2015Default preset and default-warehouse channel`, () => { - it(`should return a skuGg123Qr2015Default preset`, () => { - const skuGg123Qr2015DefaultPreset = - skuGg123Qr2015Default().build(); - expect(skuGg123Qr2015DefaultPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "gg123-qr-2015-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "gg123-qr-2015", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuGg123Qr2015Default preset when built for graphql`, () => { - const skuGg123Qr2015DefaultPresetGraphql = - skuGg123Qr2015Default().buildGraphql(); - expect(skuGg123Qr2015DefaultPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "gg123-qr-2015-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "gg123-qr-2015", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-gg123-qr-2015-default.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-gg123-qr-2015-default.ts deleted file mode 100644 index 5ca46e90b..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-gg123-qr-2015-default.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const defaultWarehouse = ChannelDraft.presets.sampleDataB2B - .defaultWarehouse() - .build(); - -const gg123Qr01 = ProductVariantDraft.presets.sampleDataB2B - .gg123Qr01() - .build(); - -const skuGg123Qr2015Default = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${gg123Qr01.sku}-${defaultWarehouse.key}`) - .sku(gg123Qr01.sku!) - .quantityOnStock(1000) - .supplyChannel( - KeyReferenceDraft.presets.channel().key(defaultWarehouse.key) - ); - -export default skuGg123Qr2015Default; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-gg123-qr-2015-eu.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-gg123-qr-2015-eu.spec.ts deleted file mode 100644 index 211142f74..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-gg123-qr-2015-eu.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuGg123Qr2015Eu from './sku-gg123-qr-2015-eu'; - -describe(`with skuGg123Qr2015Eu preset and eu-warehouse channel`, () => { - it(`should return a skuGg123Qr2015Eu preset`, () => { - const skuGg123Qr2015EuPreset = - skuGg123Qr2015Eu().build(); - expect(skuGg123Qr2015EuPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "gg123-qr-2015-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "gg123-qr-2015", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuGg123Qr2015Eu preset when built for graphql`, () => { - const skuGg123Qr2015EuPresetGraphql = - skuGg123Qr2015Eu().buildGraphql(); - expect(skuGg123Qr2015EuPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "gg123-qr-2015-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "gg123-qr-2015", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-gg123-qr-2015-eu.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-gg123-qr-2015-eu.ts deleted file mode 100644 index 326dba969..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-gg123-qr-2015-eu.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const euWarehouse = ChannelDraft.presets.sampleDataB2B - .euWarehouse() - .build(); - -const gg123Qr01 = ProductVariantDraft.presets.sampleDataB2B - .gg123Qr01() - .build(); - -const skuGg123Qr2015Eu = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${gg123Qr01.sku}-${euWarehouse.key}`) - .sku(gg123Qr01.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(euWarehouse.key)); - -export default skuGg123Qr2015Eu; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-gg123-qr-2015-us.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-gg123-qr-2015-us.spec.ts deleted file mode 100644 index 2004615e0..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-gg123-qr-2015-us.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuGg123Qr2015Us from './sku-gg123-qr-2015-us'; - -describe(`with skuGg123Qr2015Us preset and us-warehouse channel`, () => { - it(`should return a skuGg123Qr2015Us preset`, () => { - const skuGg123Qr2015UsPreset = - skuGg123Qr2015Us().build(); - expect(skuGg123Qr2015UsPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "gg123-qr-2015-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "gg123-qr-2015", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuGg123Qr2015Us preset when built for graphql`, () => { - const skuGg123Qr2015UsPresetGraphql = - skuGg123Qr2015Us().buildGraphql(); - expect(skuGg123Qr2015UsPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "gg123-qr-2015-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "gg123-qr-2015", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-gg123-qr-2015-us.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-gg123-qr-2015-us.ts deleted file mode 100644 index 5fd9b1fc6..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-gg123-qr-2015-us.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const usWarehouse = ChannelDraft.presets.sampleDataB2B - .usWarehouse() - .build(); - -const gg123Qr01 = ProductVariantDraft.presets.sampleDataB2B - .gg123Qr01() - .build(); - -const skuGg123Qr2015Us = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${gg123Qr01.sku}-${usWarehouse.key}`) - .sku(gg123Qr01.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(usWarehouse.key)); - -export default skuGg123Qr2015Us; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-gg123-qr-2019-default.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-gg123-qr-2019-default.spec.ts deleted file mode 100644 index c69b511e8..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-gg123-qr-2019-default.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuGg123Qr2019Default from './sku-gg123-qr-2019-default'; - -describe(`with skuGg123Qr2019Default preset and default-warehouse channel`, () => { - it(`should return a skuGg123Qr2019Default preset`, () => { - const skuGg123Qr2019DefaultPreset = - skuGg123Qr2019Default().build(); - expect(skuGg123Qr2019DefaultPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "gg123-qr-2019-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "gg123-qr-2019", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuGg123Qr2019Default preset when built for graphql`, () => { - const skuGg123Qr2019DefaultPresetGraphql = - skuGg123Qr2019Default().buildGraphql(); - expect(skuGg123Qr2019DefaultPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "gg123-qr-2019-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "gg123-qr-2019", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-gg123-qr-2019-default.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-gg123-qr-2019-default.ts deleted file mode 100644 index 25fead881..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-gg123-qr-2019-default.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const defaultWarehouse = ChannelDraft.presets.sampleDataB2B - .defaultWarehouse() - .build(); - -const gg123Qr02 = ProductVariantDraft.presets.sampleDataB2B - .gg123Qr02() - .build(); - -const skuGg123Qr2019Default = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${gg123Qr02.sku}-${defaultWarehouse.key}`) - .sku(gg123Qr02.sku!) - .quantityOnStock(1000) - .supplyChannel( - KeyReferenceDraft.presets.channel().key(defaultWarehouse.key) - ); - -export default skuGg123Qr2019Default; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-gg123-qr-2019-eu.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-gg123-qr-2019-eu.spec.ts deleted file mode 100644 index 27e8dcfa0..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-gg123-qr-2019-eu.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuGg123Qr2019Eu from './sku-gg123-qr-2019-eu'; - -describe(`with skuGg123Qr2019Eu preset and eu-warehouse channel`, () => { - it(`should return a skuGg123Qr2019Eu preset`, () => { - const skuGg123Qr2019EuPreset = - skuGg123Qr2019Eu().build(); - expect(skuGg123Qr2019EuPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "gg123-qr-2019-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "gg123-qr-2019", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuGg123Qr2019Eu preset when built for graphql`, () => { - const skuGg123Qr2019EuPresetGraphql = - skuGg123Qr2019Eu().buildGraphql(); - expect(skuGg123Qr2019EuPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "gg123-qr-2019-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "gg123-qr-2019", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-gg123-qr-2019-eu.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-gg123-qr-2019-eu.ts deleted file mode 100644 index 853b8b009..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-gg123-qr-2019-eu.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const euWarehouse = ChannelDraft.presets.sampleDataB2B - .euWarehouse() - .build(); - -const gg123Qr02 = ProductVariantDraft.presets.sampleDataB2B - .gg123Qr02() - .build(); - -const skuGg123Qr2019Eu = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${gg123Qr02.sku}-${euWarehouse.key}`) - .sku(gg123Qr02.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(euWarehouse.key)); - -export default skuGg123Qr2019Eu; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-gg123-qr-2019-us.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-gg123-qr-2019-us.spec.ts deleted file mode 100644 index 9b9b58af6..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-gg123-qr-2019-us.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuGg123Qr2019Us from './sku-gg123-qr-2019-us'; - -describe(`with skuGg123Qr2019Us preset and us-warehouse channel`, () => { - it(`should return a skuGg123Qr2019Us preset`, () => { - const skuGg123Qr2019UsPreset = - skuGg123Qr2019Us().build(); - expect(skuGg123Qr2019UsPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "gg123-qr-2019-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "gg123-qr-2019", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuGg123Qr2019Us preset when built for graphql`, () => { - const skuGg123Qr2019UsPresetGraphql = - skuGg123Qr2019Us().buildGraphql(); - expect(skuGg123Qr2019UsPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "gg123-qr-2019-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "gg123-qr-2019", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-gg123-qr-2019-us.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-gg123-qr-2019-us.ts deleted file mode 100644 index 58640255a..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-gg123-qr-2019-us.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const usWarehouse = ChannelDraft.presets.sampleDataB2B - .usWarehouse() - .build(); - -const gg123Qr02 = ProductVariantDraft.presets.sampleDataB2B - .gg123Qr02() - .build(); - -const skuGg123Qr2019Us = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${gg123Qr02.sku}-${usWarehouse.key}`) - .sku(gg123Qr02.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(usWarehouse.key)); - -export default skuGg123Qr2019Us; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-gg123-qr-2023-default.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-gg123-qr-2023-default.spec.ts deleted file mode 100644 index 0390d3975..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-gg123-qr-2023-default.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuGg123Qr2023Default from './sku-gg123-qr-2023-default'; - -describe(`with skuGg123Qr2023Default preset and default-warehouse channel`, () => { - it(`should return a skuGg123Qr2023Default preset`, () => { - const skuGg123Qr2023DefaultPreset = - skuGg123Qr2023Default().build(); - expect(skuGg123Qr2023DefaultPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "gg123-qr-2023-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "gg123-qr-2023", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuGg123Qr2023Default preset when built for graphql`, () => { - const skuGg123Qr2023DefaultPresetGraphql = - skuGg123Qr2023Default().buildGraphql(); - expect(skuGg123Qr2023DefaultPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "gg123-qr-2023-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "gg123-qr-2023", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-gg123-qr-2023-default.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-gg123-qr-2023-default.ts deleted file mode 100644 index aab43f42c..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-gg123-qr-2023-default.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const defaultWarehouse = ChannelDraft.presets.sampleDataB2B - .defaultWarehouse() - .build(); - -const gg123Qr03 = ProductVariantDraft.presets.sampleDataB2B - .gg123Qr03() - .build(); - -const skuGg123Qr2023Default = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${gg123Qr03.sku}-${defaultWarehouse.key}`) - .sku(gg123Qr03.sku!) - .quantityOnStock(1000) - .supplyChannel( - KeyReferenceDraft.presets.channel().key(defaultWarehouse.key) - ); - -export default skuGg123Qr2023Default; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-gg123-qr-2023-eu.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-gg123-qr-2023-eu.spec.ts deleted file mode 100644 index 92bbd03d5..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-gg123-qr-2023-eu.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuGg123Qr2023Eu from './sku-gg123-qr-2023-eu'; - -describe(`with skuGg123Qr2023Eu preset and eu-warehouse channel`, () => { - it(`should return a skuGg123Qr2023Eu preset`, () => { - const skuGg123Qr2023EuPreset = - skuGg123Qr2023Eu().build(); - expect(skuGg123Qr2023EuPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "gg123-qr-2023-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "gg123-qr-2023", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuGg123Qr2023Eu preset when built for graphql`, () => { - const skuGg123Qr2023EuPresetGraphql = - skuGg123Qr2023Eu().buildGraphql(); - expect(skuGg123Qr2023EuPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "gg123-qr-2023-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "gg123-qr-2023", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-gg123-qr-2023-eu.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-gg123-qr-2023-eu.ts deleted file mode 100644 index 263ef28f5..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-gg123-qr-2023-eu.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const euWarehouse = ChannelDraft.presets.sampleDataB2B - .euWarehouse() - .build(); - -const gg123Qr03 = ProductVariantDraft.presets.sampleDataB2B - .gg123Qr03() - .build(); - -const skuGg123Qr2023Eu = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${gg123Qr03.sku}-${euWarehouse.key}`) - .sku(gg123Qr03.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(euWarehouse.key)); - -export default skuGg123Qr2023Eu; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-gg123-qr-2023-us.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-gg123-qr-2023-us.spec.ts deleted file mode 100644 index 615f50efa..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-gg123-qr-2023-us.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuGg123Qr2023Us from './sku-gg123-qr-2023-us'; - -describe(`with skuGg123Qr2023Us preset and us-warehouse channel`, () => { - it(`should return a skuGg123Qr2023Us preset`, () => { - const skuGg123Qr2023UsPreset = - skuGg123Qr2023Us().build(); - expect(skuGg123Qr2023UsPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "gg123-qr-2023-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "gg123-qr-2023", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuGg123Qr2023Us preset when built for graphql`, () => { - const skuGg123Qr2023UsPresetGraphql = - skuGg123Qr2023Us().buildGraphql(); - expect(skuGg123Qr2023UsPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "gg123-qr-2023-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "gg123-qr-2023", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-gg123-qr-2023-us.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-gg123-qr-2023-us.ts deleted file mode 100644 index b1e07220d..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-gg123-qr-2023-us.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const usWarehouse = ChannelDraft.presets.sampleDataB2B - .usWarehouse() - .build(); - -const gg123Qr03 = ProductVariantDraft.presets.sampleDataB2B - .gg123Qr03() - .build(); - -const skuGg123Qr2023Us = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${gg123Qr03.sku}-${usWarehouse.key}`) - .sku(gg123Qr03.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(usWarehouse.key)); - -export default skuGg123Qr2023Us; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ggg-789-uv-blue-default-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ggg-789-uv-blue-default-warehouse.spec.ts new file mode 100644 index 000000000..5ae67f91b --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ggg-789-uv-blue-default-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuGgg789UvBlueDefaultWarehouse preset`, () => { + it(`should return a skuGgg789UvBlueDefaultWarehouse preset when built for rest`, () => { + const skuGgg789UvBlueDefaultWarehousePreset = + InventoryEntryDraftRest.presets.skuGgg789UvBlueDefaultWarehouse().build(); + expect(skuGgg789UvBlueDefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuGgg789UvBlueDefaultWarehouse preset when built for graphql`, () => { + const skuGgg789UvBlueDefaultWarehousePreset = + InventoryEntryDraftGraphql.presets + .skuGgg789UvBlueDefaultWarehouse() + .build(); + expect(skuGgg789UvBlueDefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuGgg789UvBlueDefaultWarehouse preset when built for legacy rest`, () => { + const skuGgg789UvBlueDefaultWarehousePreset = InventoryEntryDraft.presets + .skuGgg789UvBlueDefaultWarehouse() + .buildRest(); + expect(skuGgg789UvBlueDefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuGgg789UvBlueDefaultWarehouse preset when built for legacy graphql`, () => { + const skuGgg789UvBlueDefaultWarehousePreset = InventoryEntryDraft.presets + .skuGgg789UvBlueDefaultWarehouse() + .buildGraphql(); + expect(skuGgg789UvBlueDefaultWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ggg-789-uv-blue-default-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ggg-789-uv-blue-default-warehouse.ts new file mode 100644 index 000000000..58548d4fc --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ggg-789-uv-blue-default-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .defaultWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .ggg789Uv02() + .build(); + +const skuGgg789UvBlueDefaultWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('ggg789-uv-blue-default-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuGgg789UvBlueDefaultWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ggg-789-uv-blue-eu-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ggg-789-uv-blue-eu-warehouse.spec.ts new file mode 100644 index 000000000..fad39f920 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ggg-789-uv-blue-eu-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuGgg789UvBlueEuWarehouse preset`, () => { + it(`should return a skuGgg789UvBlueEuWarehouse preset when built for rest`, () => { + const skuGgg789UvBlueEuWarehousePreset = InventoryEntryDraftRest.presets + .skuGgg789UvBlueEuWarehouse() + .build(); + expect(skuGgg789UvBlueEuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuGgg789UvBlueEuWarehouse preset when built for graphql`, () => { + const skuGgg789UvBlueEuWarehousePreset = InventoryEntryDraftGraphql.presets + .skuGgg789UvBlueEuWarehouse() + .build(); + expect(skuGgg789UvBlueEuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuGgg789UvBlueEuWarehouse preset when built for legacy rest`, () => { + const skuGgg789UvBlueEuWarehousePreset = InventoryEntryDraft.presets + .skuGgg789UvBlueEuWarehouse() + .buildRest(); + expect(skuGgg789UvBlueEuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuGgg789UvBlueEuWarehouse preset when built for legacy graphql`, () => { + const skuGgg789UvBlueEuWarehousePreset = InventoryEntryDraft.presets + .skuGgg789UvBlueEuWarehouse() + .buildGraphql(); + expect(skuGgg789UvBlueEuWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ggg-789-uv-blue-eu-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ggg-789-uv-blue-eu-warehouse.ts new file mode 100644 index 000000000..b1e9c93eb --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ggg-789-uv-blue-eu-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .euWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .ggg789Uv02() + .build(); + +const skuGgg789UvBlueEuWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('ggg789-uv-blue-eu-warehouse') + .sku(variant.sku!) + .quantityOnStock(999) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuGgg789UvBlueEuWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ggg-789-uv-blue-us-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ggg-789-uv-blue-us-warehouse.spec.ts new file mode 100644 index 000000000..ef6f4b09f --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ggg-789-uv-blue-us-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuGgg789UvBlueUsWarehouse preset`, () => { + it(`should return a skuGgg789UvBlueUsWarehouse preset when built for rest`, () => { + const skuGgg789UvBlueUsWarehousePreset = InventoryEntryDraftRest.presets + .skuGgg789UvBlueUsWarehouse() + .build(); + expect(skuGgg789UvBlueUsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuGgg789UvBlueUsWarehouse preset when built for graphql`, () => { + const skuGgg789UvBlueUsWarehousePreset = InventoryEntryDraftGraphql.presets + .skuGgg789UvBlueUsWarehouse() + .build(); + expect(skuGgg789UvBlueUsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuGgg789UvBlueUsWarehouse preset when built for legacy rest`, () => { + const skuGgg789UvBlueUsWarehousePreset = InventoryEntryDraft.presets + .skuGgg789UvBlueUsWarehouse() + .buildRest(); + expect(skuGgg789UvBlueUsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuGgg789UvBlueUsWarehouse preset when built for legacy graphql`, () => { + const skuGgg789UvBlueUsWarehousePreset = InventoryEntryDraft.presets + .skuGgg789UvBlueUsWarehouse() + .buildGraphql(); + expect(skuGgg789UvBlueUsWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ggg-789-uv-blue-us-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ggg-789-uv-blue-us-warehouse.ts new file mode 100644 index 000000000..88c11c4f5 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ggg-789-uv-blue-us-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .usWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .ggg789Uv02() + .build(); + +const skuGgg789UvBlueUsWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('ggg789-uv-blue-us-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuGgg789UvBlueUsWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ggg-789-uv-green-default-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ggg-789-uv-green-default-warehouse.spec.ts new file mode 100644 index 000000000..b93ec4839 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ggg-789-uv-green-default-warehouse.spec.ts @@ -0,0 +1,41 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuGgg789UvGreenDefaultWarehouse preset`, () => { + it(`should return a skuGgg789UvGreenDefaultWarehouse preset when built for rest`, () => { + const skuGgg789UvGreenDefaultWarehousePreset = + InventoryEntryDraftRest.presets + .skuGgg789UvGreenDefaultWarehouse() + .build(); + expect(skuGgg789UvGreenDefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuGgg789UvGreenDefaultWarehouse preset when built for graphql`, () => { + const skuGgg789UvGreenDefaultWarehousePreset = + InventoryEntryDraftGraphql.presets + .skuGgg789UvGreenDefaultWarehouse() + .build(); + expect(skuGgg789UvGreenDefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuGgg789UvGreenDefaultWarehouse preset when built for legacy rest`, () => { + const skuGgg789UvGreenDefaultWarehousePreset = InventoryEntryDraft.presets + .skuGgg789UvGreenDefaultWarehouse() + .buildRest(); + expect(skuGgg789UvGreenDefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuGgg789UvGreenDefaultWarehouse preset when built for legacy graphql`, () => { + const skuGgg789UvGreenDefaultWarehousePreset = InventoryEntryDraft.presets + .skuGgg789UvGreenDefaultWarehouse() + .buildGraphql(); + expect(skuGgg789UvGreenDefaultWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ggg-789-uv-green-default-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ggg-789-uv-green-default-warehouse.ts new file mode 100644 index 000000000..1c9a5a57e --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ggg-789-uv-green-default-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .defaultWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .ggg789Uv03() + .build(); + +const skuGgg789UvGreenDefaultWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('ggg789-uv-green-default-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuGgg789UvGreenDefaultWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ggg-789-uv-green-eu-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ggg-789-uv-green-eu-warehouse.spec.ts new file mode 100644 index 000000000..f59c85c47 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ggg-789-uv-green-eu-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuGgg789UvGreenEuWarehouse preset`, () => { + it(`should return a skuGgg789UvGreenEuWarehouse preset when built for rest`, () => { + const skuGgg789UvGreenEuWarehousePreset = InventoryEntryDraftRest.presets + .skuGgg789UvGreenEuWarehouse() + .build(); + expect(skuGgg789UvGreenEuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuGgg789UvGreenEuWarehouse preset when built for graphql`, () => { + const skuGgg789UvGreenEuWarehousePreset = InventoryEntryDraftGraphql.presets + .skuGgg789UvGreenEuWarehouse() + .build(); + expect(skuGgg789UvGreenEuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuGgg789UvGreenEuWarehouse preset when built for legacy rest`, () => { + const skuGgg789UvGreenEuWarehousePreset = InventoryEntryDraft.presets + .skuGgg789UvGreenEuWarehouse() + .buildRest(); + expect(skuGgg789UvGreenEuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuGgg789UvGreenEuWarehouse preset when built for legacy graphql`, () => { + const skuGgg789UvGreenEuWarehousePreset = InventoryEntryDraft.presets + .skuGgg789UvGreenEuWarehouse() + .buildGraphql(); + expect(skuGgg789UvGreenEuWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ggg-789-uv-green-eu-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ggg-789-uv-green-eu-warehouse.ts new file mode 100644 index 000000000..f01d5b281 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ggg-789-uv-green-eu-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .euWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .ggg789Uv03() + .build(); + +const skuGgg789UvGreenEuWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('ggg789-uv-green-eu-warehouse') + .sku(variant.sku!) + .quantityOnStock(999) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuGgg789UvGreenEuWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ggg-789-uv-green-us-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ggg-789-uv-green-us-warehouse.spec.ts new file mode 100644 index 000000000..797bf194b --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ggg-789-uv-green-us-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuGgg789UvGreenUsWarehouse preset`, () => { + it(`should return a skuGgg789UvGreenUsWarehouse preset when built for rest`, () => { + const skuGgg789UvGreenUsWarehousePreset = InventoryEntryDraftRest.presets + .skuGgg789UvGreenUsWarehouse() + .build(); + expect(skuGgg789UvGreenUsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuGgg789UvGreenUsWarehouse preset when built for graphql`, () => { + const skuGgg789UvGreenUsWarehousePreset = InventoryEntryDraftGraphql.presets + .skuGgg789UvGreenUsWarehouse() + .build(); + expect(skuGgg789UvGreenUsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuGgg789UvGreenUsWarehouse preset when built for legacy rest`, () => { + const skuGgg789UvGreenUsWarehousePreset = InventoryEntryDraft.presets + .skuGgg789UvGreenUsWarehouse() + .buildRest(); + expect(skuGgg789UvGreenUsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuGgg789UvGreenUsWarehouse preset when built for legacy graphql`, () => { + const skuGgg789UvGreenUsWarehousePreset = InventoryEntryDraft.presets + .skuGgg789UvGreenUsWarehouse() + .buildGraphql(); + expect(skuGgg789UvGreenUsWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ggg-789-uv-green-us-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ggg-789-uv-green-us-warehouse.ts new file mode 100644 index 000000000..ecbdd45d3 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ggg-789-uv-green-us-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .usWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .ggg789Uv03() + .build(); + +const skuGgg789UvGreenUsWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('ggg789-uv-green-us-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuGgg789UvGreenUsWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ggg-789-uv-red-default-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ggg-789-uv-red-default-warehouse.spec.ts new file mode 100644 index 000000000..ab30680cb --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ggg-789-uv-red-default-warehouse.spec.ts @@ -0,0 +1,40 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuGgg789UvRedDefaultWarehouse preset`, () => { + it(`should return a skuGgg789UvRedDefaultWarehouse preset when built for rest`, () => { + const skuGgg789UvRedDefaultWarehousePreset = InventoryEntryDraftRest.presets + .skuGgg789UvRedDefaultWarehouse() + .build(); + expect(skuGgg789UvRedDefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuGgg789UvRedDefaultWarehouse preset when built for graphql`, () => { + const skuGgg789UvRedDefaultWarehousePreset = + InventoryEntryDraftGraphql.presets + .skuGgg789UvRedDefaultWarehouse() + .build(); + expect(skuGgg789UvRedDefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuGgg789UvRedDefaultWarehouse preset when built for legacy rest`, () => { + const skuGgg789UvRedDefaultWarehousePreset = InventoryEntryDraft.presets + .skuGgg789UvRedDefaultWarehouse() + .buildRest(); + expect(skuGgg789UvRedDefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuGgg789UvRedDefaultWarehouse preset when built for legacy graphql`, () => { + const skuGgg789UvRedDefaultWarehousePreset = InventoryEntryDraft.presets + .skuGgg789UvRedDefaultWarehouse() + .buildGraphql(); + expect(skuGgg789UvRedDefaultWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ggg-789-uv-red-default-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ggg-789-uv-red-default-warehouse.ts new file mode 100644 index 000000000..edc1ba63b --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ggg-789-uv-red-default-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .defaultWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .ggg789Uv01() + .build(); + +const skuGgg789UvRedDefaultWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('ggg789-uv-red-default-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuGgg789UvRedDefaultWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ggg-789-uv-red-eu-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ggg-789-uv-red-eu-warehouse.spec.ts new file mode 100644 index 000000000..9ae584398 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ggg-789-uv-red-eu-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuGgg789UvRedEuWarehouse preset`, () => { + it(`should return a skuGgg789UvRedEuWarehouse preset when built for rest`, () => { + const skuGgg789UvRedEuWarehousePreset = InventoryEntryDraftRest.presets + .skuGgg789UvRedEuWarehouse() + .build(); + expect(skuGgg789UvRedEuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuGgg789UvRedEuWarehouse preset when built for graphql`, () => { + const skuGgg789UvRedEuWarehousePreset = InventoryEntryDraftGraphql.presets + .skuGgg789UvRedEuWarehouse() + .build(); + expect(skuGgg789UvRedEuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuGgg789UvRedEuWarehouse preset when built for legacy rest`, () => { + const skuGgg789UvRedEuWarehousePreset = InventoryEntryDraft.presets + .skuGgg789UvRedEuWarehouse() + .buildRest(); + expect(skuGgg789UvRedEuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuGgg789UvRedEuWarehouse preset when built for legacy graphql`, () => { + const skuGgg789UvRedEuWarehousePreset = InventoryEntryDraft.presets + .skuGgg789UvRedEuWarehouse() + .buildGraphql(); + expect(skuGgg789UvRedEuWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ggg-789-uv-red-eu-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ggg-789-uv-red-eu-warehouse.ts new file mode 100644 index 000000000..f526ec53f --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ggg-789-uv-red-eu-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .euWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .ggg789Uv01() + .build(); + +const skuGgg789UvRedEuWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('ggg789-uv-red-eu-warehouse') + .sku(variant.sku!) + .quantityOnStock(999) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuGgg789UvRedEuWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ggg-789-uv-red-us-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ggg-789-uv-red-us-warehouse.spec.ts new file mode 100644 index 000000000..ca241626c --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ggg-789-uv-red-us-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuGgg789UvRedUsWarehouse preset`, () => { + it(`should return a skuGgg789UvRedUsWarehouse preset when built for rest`, () => { + const skuGgg789UvRedUsWarehousePreset = InventoryEntryDraftRest.presets + .skuGgg789UvRedUsWarehouse() + .build(); + expect(skuGgg789UvRedUsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuGgg789UvRedUsWarehouse preset when built for graphql`, () => { + const skuGgg789UvRedUsWarehousePreset = InventoryEntryDraftGraphql.presets + .skuGgg789UvRedUsWarehouse() + .build(); + expect(skuGgg789UvRedUsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuGgg789UvRedUsWarehouse preset when built for legacy rest`, () => { + const skuGgg789UvRedUsWarehousePreset = InventoryEntryDraft.presets + .skuGgg789UvRedUsWarehouse() + .buildRest(); + expect(skuGgg789UvRedUsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuGgg789UvRedUsWarehouse preset when built for legacy graphql`, () => { + const skuGgg789UvRedUsWarehousePreset = InventoryEntryDraft.presets + .skuGgg789UvRedUsWarehouse() + .buildGraphql(); + expect(skuGgg789UvRedUsWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ggg-789-uv-red-us-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ggg-789-uv-red-us-warehouse.ts new file mode 100644 index 000000000..c8b8c2088 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ggg-789-uv-red-us-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .usWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .ggg789Uv01() + .build(); + +const skuGgg789UvRedUsWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('ggg789-uv-red-us-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuGgg789UvRedUsWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ggg789-uv-blue-default.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ggg789-uv-blue-default.spec.ts deleted file mode 100644 index f8adac476..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ggg789-uv-blue-default.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuGgg789UvBlueDefault from './sku-ggg789-uv-blue-default'; - -describe(`with skuGgg789UvBlueDefault preset and default-warehouse channel`, () => { - it(`should return a skuGgg789UvBlueDefault preset`, () => { - const skuGgg789UvBlueDefaultPreset = - skuGgg789UvBlueDefault().build(); - expect(skuGgg789UvBlueDefaultPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "ggg789-uv-blue-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "ggg789-uv-blue", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuGgg789UvBlueDefault preset when built for graphql`, () => { - const skuGgg789UvBlueDefaultPresetGraphql = - skuGgg789UvBlueDefault().buildGraphql(); - expect(skuGgg789UvBlueDefaultPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "ggg789-uv-blue-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "ggg789-uv-blue", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ggg789-uv-blue-default.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ggg789-uv-blue-default.ts deleted file mode 100644 index 072ff6981..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ggg789-uv-blue-default.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const defaultWarehouse = ChannelDraft.presets.sampleDataB2B - .defaultWarehouse() - .build(); - -const ggg789Uv02 = ProductVariantDraft.presets.sampleDataB2B - .ggg789Uv02() - .build(); - -const skuGgg789UvBlueDefault = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${ggg789Uv02.sku}-${defaultWarehouse.key}`) - .sku(ggg789Uv02.sku!) - .quantityOnStock(1000) - .supplyChannel( - KeyReferenceDraft.presets.channel().key(defaultWarehouse.key) - ); - -export default skuGgg789UvBlueDefault; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ggg789-uv-blue-eu.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ggg789-uv-blue-eu.spec.ts deleted file mode 100644 index ec42e9898..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ggg789-uv-blue-eu.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuGgg789UvBlueEu from './sku-ggg789-uv-blue-eu'; - -describe(`with skuGgg789UvBlueEu preset and eu-warehouse channel`, () => { - it(`should return a skuGgg789UvBlueEu preset`, () => { - const skuGgg789UvBlueEuPreset = - skuGgg789UvBlueEu().build(); - expect(skuGgg789UvBlueEuPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "ggg789-uv-blue-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "ggg789-uv-blue", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuGgg789UvBlueEu preset when built for graphql`, () => { - const skuGgg789UvBlueEuPresetGraphql = - skuGgg789UvBlueEu().buildGraphql(); - expect(skuGgg789UvBlueEuPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "ggg789-uv-blue-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "ggg789-uv-blue", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ggg789-uv-blue-eu.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ggg789-uv-blue-eu.ts deleted file mode 100644 index 71754c0a5..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ggg789-uv-blue-eu.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const euWarehouse = ChannelDraft.presets.sampleDataB2B - .euWarehouse() - .build(); - -const ggg789Uv02 = ProductVariantDraft.presets.sampleDataB2B - .ggg789Uv02() - .build(); - -const skuGgg789UvBlueEu = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${ggg789Uv02.sku}-${euWarehouse.key}`) - .sku(ggg789Uv02.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(euWarehouse.key)); - -export default skuGgg789UvBlueEu; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ggg789-uv-blue-us.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ggg789-uv-blue-us.spec.ts deleted file mode 100644 index ef285e37d..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ggg789-uv-blue-us.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuGgg789UvBlueUs from './sku-ggg789-uv-blue-us'; - -describe(`with skuGgg789UvBlueUs preset and us-warehouse channel`, () => { - it(`should return a skuGgg789UvBlueUs preset`, () => { - const skuGgg789UvBlueUsPreset = - skuGgg789UvBlueUs().build(); - expect(skuGgg789UvBlueUsPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "ggg789-uv-blue-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "ggg789-uv-blue", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuGgg789UvBlueUs preset when built for graphql`, () => { - const skuGgg789UvBlueUsPresetGraphql = - skuGgg789UvBlueUs().buildGraphql(); - expect(skuGgg789UvBlueUsPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "ggg789-uv-blue-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "ggg789-uv-blue", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ggg789-uv-blue-us.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ggg789-uv-blue-us.ts deleted file mode 100644 index 9013c7fd7..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ggg789-uv-blue-us.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const usWarehouse = ChannelDraft.presets.sampleDataB2B - .usWarehouse() - .build(); - -const ggg789Uv02 = ProductVariantDraft.presets.sampleDataB2B - .ggg789Uv02() - .build(); - -const skuGgg789UvBlueUs = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${ggg789Uv02.sku}-${usWarehouse.key}`) - .sku(ggg789Uv02.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(usWarehouse.key)); - -export default skuGgg789UvBlueUs; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ggg789-uv-green-default.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ggg789-uv-green-default.spec.ts deleted file mode 100644 index e9b19769c..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ggg789-uv-green-default.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuGgg789UvGreenDefault from './sku-ggg789-uv-green-default'; - -describe(`with skuGgg789UvGreenDefault preset and default-warehouse channel`, () => { - it(`should return a skuGgg789UvGreenDefault preset`, () => { - const skuGgg789UvGreenDefaultPreset = - skuGgg789UvGreenDefault().build(); - expect(skuGgg789UvGreenDefaultPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "ggg789-uv-green-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "ggg789-uv-green", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuGgg789UvGreenDefault preset when built for graphql`, () => { - const skuGgg789UvGreenDefaultPresetGraphql = - skuGgg789UvGreenDefault().buildGraphql(); - expect(skuGgg789UvGreenDefaultPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "ggg789-uv-green-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "ggg789-uv-green", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ggg789-uv-green-default.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ggg789-uv-green-default.ts deleted file mode 100644 index e4c9409f3..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ggg789-uv-green-default.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const defaultWarehouse = ChannelDraft.presets.sampleDataB2B - .defaultWarehouse() - .build(); - -const ggg789Uv03 = ProductVariantDraft.presets.sampleDataB2B - .ggg789Uv03() - .build(); - -const skuGgg789UvGreenDefault = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${ggg789Uv03.sku}-${defaultWarehouse.key}`) - .sku(ggg789Uv03.sku!) - .quantityOnStock(1000) - .supplyChannel( - KeyReferenceDraft.presets.channel().key(defaultWarehouse.key) - ); - -export default skuGgg789UvGreenDefault; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ggg789-uv-green-eu.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ggg789-uv-green-eu.spec.ts deleted file mode 100644 index 8bcc94662..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ggg789-uv-green-eu.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuGgg789UvGreenEu from './sku-ggg789-uv-green-eu'; - -describe(`with skuGgg789UvGreenEu preset and eu-warehouse channel`, () => { - it(`should return a skuGgg789UvGreenEu preset`, () => { - const skuGgg789UvGreenEuPreset = - skuGgg789UvGreenEu().build(); - expect(skuGgg789UvGreenEuPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "ggg789-uv-green-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "ggg789-uv-green", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuGgg789UvGreenEu preset when built for graphql`, () => { - const skuGgg789UvGreenEuPresetGraphql = - skuGgg789UvGreenEu().buildGraphql(); - expect(skuGgg789UvGreenEuPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "ggg789-uv-green-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "ggg789-uv-green", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ggg789-uv-green-eu.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ggg789-uv-green-eu.ts deleted file mode 100644 index 00255ef2e..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ggg789-uv-green-eu.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const euWarehouse = ChannelDraft.presets.sampleDataB2B - .euWarehouse() - .build(); - -const ggg789Uv03 = ProductVariantDraft.presets.sampleDataB2B - .ggg789Uv03() - .build(); - -const skuGgg789UvGreenEu = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${ggg789Uv03.sku}-${euWarehouse.key}`) - .sku(ggg789Uv03.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(euWarehouse.key)); - -export default skuGgg789UvGreenEu; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ggg789-uv-green-us.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ggg789-uv-green-us.spec.ts deleted file mode 100644 index aaf8f8141..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ggg789-uv-green-us.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuGgg789UvGreenUs from './sku-ggg789-uv-green-us'; - -describe(`with skuGgg789UvGreenUs preset and us-warehouse channel`, () => { - it(`should return a skuGgg789UvGreenUs preset`, () => { - const skuGgg789UvGreenUsPreset = - skuGgg789UvGreenUs().build(); - expect(skuGgg789UvGreenUsPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "ggg789-uv-green-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "ggg789-uv-green", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuGgg789UvGreenUs preset when built for graphql`, () => { - const skuGgg789UvGreenUsPresetGraphql = - skuGgg789UvGreenUs().buildGraphql(); - expect(skuGgg789UvGreenUsPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "ggg789-uv-green-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "ggg789-uv-green", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ggg789-uv-green-us.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ggg789-uv-green-us.ts deleted file mode 100644 index e6ac25048..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ggg789-uv-green-us.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const usWarehouse = ChannelDraft.presets.sampleDataB2B - .usWarehouse() - .build(); - -const ggg789Uv03 = ProductVariantDraft.presets.sampleDataB2B - .ggg789Uv03() - .build(); - -const skuGgg789UvGreenUs = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${ggg789Uv03.sku}-${usWarehouse.key}`) - .sku(ggg789Uv03.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(usWarehouse.key)); - -export default skuGgg789UvGreenUs; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ggg789-uv-red-default.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ggg789-uv-red-default.spec.ts deleted file mode 100644 index b07b775c2..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ggg789-uv-red-default.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuGgg789UvRedDefault from './sku-ggg789-uv-red-default'; - -describe(`with skuGgg789UvRedDefault preset and default-warehouse channel`, () => { - it(`should return a skuGgg789UvRedDefault preset`, () => { - const skuGgg789UvRedDefaultPreset = - skuGgg789UvRedDefault().build(); - expect(skuGgg789UvRedDefaultPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "ggg789-uv-red-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "ggg789-uv-red", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuGgg789UvRedDefault preset when built for graphql`, () => { - const skuGgg789UvRedDefaultPresetGraphql = - skuGgg789UvRedDefault().buildGraphql(); - expect(skuGgg789UvRedDefaultPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "ggg789-uv-red-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "ggg789-uv-red", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ggg789-uv-red-default.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ggg789-uv-red-default.ts deleted file mode 100644 index 22bd6fcdc..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ggg789-uv-red-default.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const defaultWarehouse = ChannelDraft.presets.sampleDataB2B - .defaultWarehouse() - .build(); - -const ggg789Uv01 = ProductVariantDraft.presets.sampleDataB2B - .ggg789Uv01() - .build(); - -const skuGgg789UvRedDefault = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${ggg789Uv01.sku}-${defaultWarehouse.key}`) - .sku(ggg789Uv01.sku!) - .quantityOnStock(1000) - .supplyChannel( - KeyReferenceDraft.presets.channel().key(defaultWarehouse.key) - ); - -export default skuGgg789UvRedDefault; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ggg789-uv-red-eu.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ggg789-uv-red-eu.spec.ts deleted file mode 100644 index 4e5619ad0..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ggg789-uv-red-eu.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuGgg789UvRedEu from './sku-ggg789-uv-red-eu'; - -describe(`with skuGgg789UvRedEu preset and eu-warehouse channel`, () => { - it(`should return a skuGgg789UvRedEu preset`, () => { - const skuGgg789UvRedEuPreset = - skuGgg789UvRedEu().build(); - expect(skuGgg789UvRedEuPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "ggg789-uv-red-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "ggg789-uv-red", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuGgg789UvRedEu preset when built for graphql`, () => { - const skuGgg789UvRedEuPresetGraphql = - skuGgg789UvRedEu().buildGraphql(); - expect(skuGgg789UvRedEuPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "ggg789-uv-red-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "ggg789-uv-red", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ggg789-uv-red-eu.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ggg789-uv-red-eu.ts deleted file mode 100644 index dabc310a0..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ggg789-uv-red-eu.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const euWarehouse = ChannelDraft.presets.sampleDataB2B - .euWarehouse() - .build(); - -const ggg789Uv01 = ProductVariantDraft.presets.sampleDataB2B - .ggg789Uv01() - .build(); - -const skuGgg789UvRedEu = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${ggg789Uv01.sku}-${euWarehouse.key}`) - .sku(ggg789Uv01.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(euWarehouse.key)); - -export default skuGgg789UvRedEu; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ggg789-uv-red-us.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ggg789-uv-red-us.spec.ts deleted file mode 100644 index a25811d86..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ggg789-uv-red-us.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuGgg789UvRedUs from './sku-ggg789-uv-red-us'; - -describe(`with skuGgg789UvRedUs preset and us-warehouse channel`, () => { - it(`should return a skuGgg789UvRedUs preset`, () => { - const skuGgg789UvRedUsPreset = - skuGgg789UvRedUs().build(); - expect(skuGgg789UvRedUsPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "ggg789-uv-red-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "ggg789-uv-red", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuGgg789UvRedUs preset when built for graphql`, () => { - const skuGgg789UvRedUsPresetGraphql = - skuGgg789UvRedUs().buildGraphql(); - expect(skuGgg789UvRedUsPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "ggg789-uv-red-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "ggg789-uv-red", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ggg789-uv-red-us.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ggg789-uv-red-us.ts deleted file mode 100644 index 7b690c037..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ggg789-uv-red-us.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const usWarehouse = ChannelDraft.presets.sampleDataB2B - .usWarehouse() - .build(); - -const ggg789Uv01 = ProductVariantDraft.presets.sampleDataB2B - .ggg789Uv01() - .build(); - -const skuGgg789UvRedUs = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${ggg789Uv01.sku}-${usWarehouse.key}`) - .sku(ggg789Uv01.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(usWarehouse.key)); - -export default skuGgg789UvRedUs; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-h-456-st-2015-default-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-h-456-st-2015-default-warehouse.spec.ts new file mode 100644 index 000000000..74537d819 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-h-456-st-2015-default-warehouse.spec.ts @@ -0,0 +1,40 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuH456St2015DefaultWarehouse preset`, () => { + it(`should return a skuH456St2015DefaultWarehouse preset when built for rest`, () => { + const skuH456St2015DefaultWarehousePreset = InventoryEntryDraftRest.presets + .skuH456St2015DefaultWarehouse() + .build(); + expect(skuH456St2015DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuH456St2015DefaultWarehouse preset when built for graphql`, () => { + const skuH456St2015DefaultWarehousePreset = + InventoryEntryDraftGraphql.presets + .skuH456St2015DefaultWarehouse() + .build(); + expect(skuH456St2015DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuH456St2015DefaultWarehouse preset when built for legacy rest`, () => { + const skuH456St2015DefaultWarehousePreset = InventoryEntryDraft.presets + .skuH456St2015DefaultWarehouse() + .buildRest(); + expect(skuH456St2015DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuH456St2015DefaultWarehouse preset when built for legacy graphql`, () => { + const skuH456St2015DefaultWarehousePreset = InventoryEntryDraft.presets + .skuH456St2015DefaultWarehouse() + .buildGraphql(); + expect(skuH456St2015DefaultWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-h-456-st-2015-default-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-h-456-st-2015-default-warehouse.ts new file mode 100644 index 000000000..fb57306f4 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-h-456-st-2015-default-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .defaultWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .h456St01() + .build(); + +const skuH456St2015DefaultWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('h456-st-2015-default-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuH456St2015DefaultWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-h-456-st-2015-eu-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-h-456-st-2015-eu-warehouse.spec.ts new file mode 100644 index 000000000..eafb5de31 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-h-456-st-2015-eu-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuH456St2015EuWarehouse preset`, () => { + it(`should return a skuH456St2015EuWarehouse preset when built for rest`, () => { + const skuH456St2015EuWarehousePreset = InventoryEntryDraftRest.presets + .skuH456St2015EuWarehouse() + .build(); + expect(skuH456St2015EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuH456St2015EuWarehouse preset when built for graphql`, () => { + const skuH456St2015EuWarehousePreset = InventoryEntryDraftGraphql.presets + .skuH456St2015EuWarehouse() + .build(); + expect(skuH456St2015EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuH456St2015EuWarehouse preset when built for legacy rest`, () => { + const skuH456St2015EuWarehousePreset = InventoryEntryDraft.presets + .skuH456St2015EuWarehouse() + .buildRest(); + expect(skuH456St2015EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuH456St2015EuWarehouse preset when built for legacy graphql`, () => { + const skuH456St2015EuWarehousePreset = InventoryEntryDraft.presets + .skuH456St2015EuWarehouse() + .buildGraphql(); + expect(skuH456St2015EuWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-h-456-st-2015-eu-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-h-456-st-2015-eu-warehouse.ts new file mode 100644 index 000000000..595a5b72a --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-h-456-st-2015-eu-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .euWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .h456St01() + .build(); + +const skuH456St2015EuWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('h456-st-2015-eu-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuH456St2015EuWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-h-456-st-2015-us-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-h-456-st-2015-us-warehouse.spec.ts new file mode 100644 index 000000000..ef5f51161 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-h-456-st-2015-us-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuH456St2015UsWarehouse preset`, () => { + it(`should return a skuH456St2015UsWarehouse preset when built for rest`, () => { + const skuH456St2015UsWarehousePreset = InventoryEntryDraftRest.presets + .skuH456St2015UsWarehouse() + .build(); + expect(skuH456St2015UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuH456St2015UsWarehouse preset when built for graphql`, () => { + const skuH456St2015UsWarehousePreset = InventoryEntryDraftGraphql.presets + .skuH456St2015UsWarehouse() + .build(); + expect(skuH456St2015UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuH456St2015UsWarehouse preset when built for legacy rest`, () => { + const skuH456St2015UsWarehousePreset = InventoryEntryDraft.presets + .skuH456St2015UsWarehouse() + .buildRest(); + expect(skuH456St2015UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuH456St2015UsWarehouse preset when built for legacy graphql`, () => { + const skuH456St2015UsWarehousePreset = InventoryEntryDraft.presets + .skuH456St2015UsWarehouse() + .buildGraphql(); + expect(skuH456St2015UsWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-h-456-st-2015-us-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-h-456-st-2015-us-warehouse.ts new file mode 100644 index 000000000..97619b967 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-h-456-st-2015-us-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .usWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .h456St01() + .build(); + +const skuH456St2015UsWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('h456-st-2015-us-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuH456St2015UsWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-h-456-st-2019-default-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-h-456-st-2019-default-warehouse.spec.ts new file mode 100644 index 000000000..93ea8685e --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-h-456-st-2019-default-warehouse.spec.ts @@ -0,0 +1,40 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuH456St2019DefaultWarehouse preset`, () => { + it(`should return a skuH456St2019DefaultWarehouse preset when built for rest`, () => { + const skuH456St2019DefaultWarehousePreset = InventoryEntryDraftRest.presets + .skuH456St2019DefaultWarehouse() + .build(); + expect(skuH456St2019DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuH456St2019DefaultWarehouse preset when built for graphql`, () => { + const skuH456St2019DefaultWarehousePreset = + InventoryEntryDraftGraphql.presets + .skuH456St2019DefaultWarehouse() + .build(); + expect(skuH456St2019DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuH456St2019DefaultWarehouse preset when built for legacy rest`, () => { + const skuH456St2019DefaultWarehousePreset = InventoryEntryDraft.presets + .skuH456St2019DefaultWarehouse() + .buildRest(); + expect(skuH456St2019DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuH456St2019DefaultWarehouse preset when built for legacy graphql`, () => { + const skuH456St2019DefaultWarehousePreset = InventoryEntryDraft.presets + .skuH456St2019DefaultWarehouse() + .buildGraphql(); + expect(skuH456St2019DefaultWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-h-456-st-2019-default-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-h-456-st-2019-default-warehouse.ts new file mode 100644 index 000000000..0cc0330ed --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-h-456-st-2019-default-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .defaultWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .h456St02() + .build(); + +const skuH456St2019DefaultWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('h456-st-2019-default-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuH456St2019DefaultWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-h-456-st-2019-eu-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-h-456-st-2019-eu-warehouse.spec.ts new file mode 100644 index 000000000..341cd4df0 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-h-456-st-2019-eu-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuH456St2019EuWarehouse preset`, () => { + it(`should return a skuH456St2019EuWarehouse preset when built for rest`, () => { + const skuH456St2019EuWarehousePreset = InventoryEntryDraftRest.presets + .skuH456St2019EuWarehouse() + .build(); + expect(skuH456St2019EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuH456St2019EuWarehouse preset when built for graphql`, () => { + const skuH456St2019EuWarehousePreset = InventoryEntryDraftGraphql.presets + .skuH456St2019EuWarehouse() + .build(); + expect(skuH456St2019EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuH456St2019EuWarehouse preset when built for legacy rest`, () => { + const skuH456St2019EuWarehousePreset = InventoryEntryDraft.presets + .skuH456St2019EuWarehouse() + .buildRest(); + expect(skuH456St2019EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuH456St2019EuWarehouse preset when built for legacy graphql`, () => { + const skuH456St2019EuWarehousePreset = InventoryEntryDraft.presets + .skuH456St2019EuWarehouse() + .buildGraphql(); + expect(skuH456St2019EuWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-h-456-st-2019-eu-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-h-456-st-2019-eu-warehouse.ts new file mode 100644 index 000000000..a0e98fab9 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-h-456-st-2019-eu-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .euWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .h456St02() + .build(); + +const skuH456St2019EuWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('h456-st-2019-eu-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuH456St2019EuWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-h-456-st-2019-us-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-h-456-st-2019-us-warehouse.spec.ts new file mode 100644 index 000000000..2d68ca0da --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-h-456-st-2019-us-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuH456St2019UsWarehouse preset`, () => { + it(`should return a skuH456St2019UsWarehouse preset when built for rest`, () => { + const skuH456St2019UsWarehousePreset = InventoryEntryDraftRest.presets + .skuH456St2019UsWarehouse() + .build(); + expect(skuH456St2019UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuH456St2019UsWarehouse preset when built for graphql`, () => { + const skuH456St2019UsWarehousePreset = InventoryEntryDraftGraphql.presets + .skuH456St2019UsWarehouse() + .build(); + expect(skuH456St2019UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuH456St2019UsWarehouse preset when built for legacy rest`, () => { + const skuH456St2019UsWarehousePreset = InventoryEntryDraft.presets + .skuH456St2019UsWarehouse() + .buildRest(); + expect(skuH456St2019UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuH456St2019UsWarehouse preset when built for legacy graphql`, () => { + const skuH456St2019UsWarehousePreset = InventoryEntryDraft.presets + .skuH456St2019UsWarehouse() + .buildGraphql(); + expect(skuH456St2019UsWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-h-456-st-2019-us-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-h-456-st-2019-us-warehouse.ts new file mode 100644 index 000000000..9c1ea95b4 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-h-456-st-2019-us-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .usWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .h456St02() + .build(); + +const skuH456St2019UsWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('h456-st-2019-us-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuH456St2019UsWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-h-456-st-2023-default-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-h-456-st-2023-default-warehouse.spec.ts new file mode 100644 index 000000000..80b75ef7e --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-h-456-st-2023-default-warehouse.spec.ts @@ -0,0 +1,40 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuH456St2023DefaultWarehouse preset`, () => { + it(`should return a skuH456St2023DefaultWarehouse preset when built for rest`, () => { + const skuH456St2023DefaultWarehousePreset = InventoryEntryDraftRest.presets + .skuH456St2023DefaultWarehouse() + .build(); + expect(skuH456St2023DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuH456St2023DefaultWarehouse preset when built for graphql`, () => { + const skuH456St2023DefaultWarehousePreset = + InventoryEntryDraftGraphql.presets + .skuH456St2023DefaultWarehouse() + .build(); + expect(skuH456St2023DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuH456St2023DefaultWarehouse preset when built for legacy rest`, () => { + const skuH456St2023DefaultWarehousePreset = InventoryEntryDraft.presets + .skuH456St2023DefaultWarehouse() + .buildRest(); + expect(skuH456St2023DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuH456St2023DefaultWarehouse preset when built for legacy graphql`, () => { + const skuH456St2023DefaultWarehousePreset = InventoryEntryDraft.presets + .skuH456St2023DefaultWarehouse() + .buildGraphql(); + expect(skuH456St2023DefaultWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-h-456-st-2023-default-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-h-456-st-2023-default-warehouse.ts new file mode 100644 index 000000000..ce327cbfa --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-h-456-st-2023-default-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .defaultWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .h456St03() + .build(); + +const skuH456St2023DefaultWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('h456-st-2023-default-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuH456St2023DefaultWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-h-456-st-2023-eu-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-h-456-st-2023-eu-warehouse.spec.ts new file mode 100644 index 000000000..d737e85a2 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-h-456-st-2023-eu-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuH456St2023EuWarehouse preset`, () => { + it(`should return a skuH456St2023EuWarehouse preset when built for rest`, () => { + const skuH456St2023EuWarehousePreset = InventoryEntryDraftRest.presets + .skuH456St2023EuWarehouse() + .build(); + expect(skuH456St2023EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuH456St2023EuWarehouse preset when built for graphql`, () => { + const skuH456St2023EuWarehousePreset = InventoryEntryDraftGraphql.presets + .skuH456St2023EuWarehouse() + .build(); + expect(skuH456St2023EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuH456St2023EuWarehouse preset when built for legacy rest`, () => { + const skuH456St2023EuWarehousePreset = InventoryEntryDraft.presets + .skuH456St2023EuWarehouse() + .buildRest(); + expect(skuH456St2023EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuH456St2023EuWarehouse preset when built for legacy graphql`, () => { + const skuH456St2023EuWarehousePreset = InventoryEntryDraft.presets + .skuH456St2023EuWarehouse() + .buildGraphql(); + expect(skuH456St2023EuWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-h-456-st-2023-eu-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-h-456-st-2023-eu-warehouse.ts new file mode 100644 index 000000000..862e14d92 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-h-456-st-2023-eu-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .euWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .h456St03() + .build(); + +const skuH456St2023EuWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('h456-st-2023-eu-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuH456St2023EuWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-h-456-st-2023-us-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-h-456-st-2023-us-warehouse.spec.ts new file mode 100644 index 000000000..02c6a9d0d --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-h-456-st-2023-us-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuH456St2023UsWarehouse preset`, () => { + it(`should return a skuH456St2023UsWarehouse preset when built for rest`, () => { + const skuH456St2023UsWarehousePreset = InventoryEntryDraftRest.presets + .skuH456St2023UsWarehouse() + .build(); + expect(skuH456St2023UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuH456St2023UsWarehouse preset when built for graphql`, () => { + const skuH456St2023UsWarehousePreset = InventoryEntryDraftGraphql.presets + .skuH456St2023UsWarehouse() + .build(); + expect(skuH456St2023UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuH456St2023UsWarehouse preset when built for legacy rest`, () => { + const skuH456St2023UsWarehousePreset = InventoryEntryDraft.presets + .skuH456St2023UsWarehouse() + .buildRest(); + expect(skuH456St2023UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuH456St2023UsWarehouse preset when built for legacy graphql`, () => { + const skuH456St2023UsWarehousePreset = InventoryEntryDraft.presets + .skuH456St2023UsWarehouse() + .buildGraphql(); + expect(skuH456St2023UsWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-h-456-st-2023-us-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-h-456-st-2023-us-warehouse.ts new file mode 100644 index 000000000..e8603b218 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-h-456-st-2023-us-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .usWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .h456St03() + .build(); + +const skuH456St2023UsWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('h456-st-2023-us-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuH456St2023UsWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-h456-st-2015-default.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-h456-st-2015-default.spec.ts deleted file mode 100644 index 4caa6c153..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-h456-st-2015-default.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuH456St2015Default from './sku-h456-st-2015-default'; - -describe(`with skuH456St2015Default preset and default-warehouse channel`, () => { - it(`should return a skuH456St2015Default preset`, () => { - const skuH456St2015DefaultPreset = - skuH456St2015Default().build(); - expect(skuH456St2015DefaultPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "h456-st-2015-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "h456-st-2015", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuH456St2015Default preset when built for graphql`, () => { - const skuH456St2015DefaultPresetGraphql = - skuH456St2015Default().buildGraphql(); - expect(skuH456St2015DefaultPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "h456-st-2015-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "h456-st-2015", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-h456-st-2015-default.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-h456-st-2015-default.ts deleted file mode 100644 index 9ac6ec2aa..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-h456-st-2015-default.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const defaultWarehouse = ChannelDraft.presets.sampleDataB2B - .defaultWarehouse() - .build(); - -const h456St01 = ProductVariantDraft.presets.sampleDataB2B - .h456St01() - .build(); - -const skuH456St2015Default = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${h456St01.sku}-${defaultWarehouse.key}`) - .sku(h456St01.sku!) - .quantityOnStock(1000) - .supplyChannel( - KeyReferenceDraft.presets.channel().key(defaultWarehouse.key) - ); - -export default skuH456St2015Default; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-h456-st-2015-eu.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-h456-st-2015-eu.spec.ts deleted file mode 100644 index 3f8f09a97..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-h456-st-2015-eu.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuH456St2015Eu from './sku-h456-st-2015-eu'; - -describe(`with skuH456St2015Eu preset and eu-warehouse channel`, () => { - it(`should return a skuH456St2015Eu preset`, () => { - const skuH456St2015EuPreset = - skuH456St2015Eu().build(); - expect(skuH456St2015EuPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "h456-st-2015-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "h456-st-2015", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuH456St2015Eu preset when built for graphql`, () => { - const skuH456St2015EuPresetGraphql = - skuH456St2015Eu().buildGraphql(); - expect(skuH456St2015EuPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "h456-st-2015-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "h456-st-2015", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-h456-st-2015-eu.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-h456-st-2015-eu.ts deleted file mode 100644 index 6c907b032..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-h456-st-2015-eu.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const euWarehouse = ChannelDraft.presets.sampleDataB2B - .euWarehouse() - .build(); - -const h456St01 = ProductVariantDraft.presets.sampleDataB2B - .h456St01() - .build(); - -const skuH456St2015Eu = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${h456St01.sku}-${euWarehouse.key}`) - .sku(h456St01.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(euWarehouse.key)); - -export default skuH456St2015Eu; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-h456-st-2015-us.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-h456-st-2015-us.spec.ts deleted file mode 100644 index 6b61d7531..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-h456-st-2015-us.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuH456St2015Us from './sku-h456-st-2015-us'; - -describe(`with skuH456St2015Us preset and us-warehouse channel`, () => { - it(`should return a skuH456St2015Us preset`, () => { - const skuH456St2015UsPreset = - skuH456St2015Us().build(); - expect(skuH456St2015UsPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "h456-st-2015-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "h456-st-2015", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuH456St2015Us preset when built for graphql`, () => { - const skuH456St2015UsPresetGraphql = - skuH456St2015Us().buildGraphql(); - expect(skuH456St2015UsPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "h456-st-2015-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "h456-st-2015", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-h456-st-2015-us.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-h456-st-2015-us.ts deleted file mode 100644 index f892d7da0..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-h456-st-2015-us.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const usWarehouse = ChannelDraft.presets.sampleDataB2B - .usWarehouse() - .build(); - -const h456St01 = ProductVariantDraft.presets.sampleDataB2B - .h456St01() - .build(); - -const skuH456St2015Us = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${h456St01.sku}-${usWarehouse.key}`) - .sku(h456St01.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(usWarehouse.key)); - -export default skuH456St2015Us; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-h456-st-2019-default.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-h456-st-2019-default.spec.ts deleted file mode 100644 index c74c6d413..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-h456-st-2019-default.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuH456St2019Default from './sku-h456-st-2019-default'; - -describe(`with skuH456St2019Default preset and default-warehouse channel`, () => { - it(`should return a skuH456St2019Default preset`, () => { - const skuH456St2019DefaultPreset = - skuH456St2019Default().build(); - expect(skuH456St2019DefaultPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "h456-st-2019-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "h456-st-2019", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuH456St2019Default preset when built for graphql`, () => { - const skuH456St2019DefaultPresetGraphql = - skuH456St2019Default().buildGraphql(); - expect(skuH456St2019DefaultPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "h456-st-2019-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "h456-st-2019", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-h456-st-2019-default.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-h456-st-2019-default.ts deleted file mode 100644 index fa83618d7..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-h456-st-2019-default.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const defaultWarehouse = ChannelDraft.presets.sampleDataB2B - .defaultWarehouse() - .build(); - -const h456St02 = ProductVariantDraft.presets.sampleDataB2B - .h456St02() - .build(); - -const skuH456St2019Default = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${h456St02.sku}-${defaultWarehouse.key}`) - .sku(h456St02.sku!) - .quantityOnStock(1000) - .supplyChannel( - KeyReferenceDraft.presets.channel().key(defaultWarehouse.key) - ); - -export default skuH456St2019Default; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-h456-st-2019-eu.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-h456-st-2019-eu.spec.ts deleted file mode 100644 index cdca3f52e..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-h456-st-2019-eu.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuH456St2019Eu from './sku-h456-st-2019-eu'; - -describe(`with skuH456St2019Eu preset and eu-warehouse channel`, () => { - it(`should return a skuH456St2019Eu preset`, () => { - const skuH456St2019EuPreset = - skuH456St2019Eu().build(); - expect(skuH456St2019EuPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "h456-st-2019-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "h456-st-2019", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuH456St2019Eu preset when built for graphql`, () => { - const skuH456St2019EuPresetGraphql = - skuH456St2019Eu().buildGraphql(); - expect(skuH456St2019EuPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "h456-st-2019-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "h456-st-2019", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-h456-st-2019-eu.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-h456-st-2019-eu.ts deleted file mode 100644 index 19cbae34e..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-h456-st-2019-eu.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const euWarehouse = ChannelDraft.presets.sampleDataB2B - .euWarehouse() - .build(); - -const h456St02 = ProductVariantDraft.presets.sampleDataB2B - .h456St02() - .build(); - -const skuH456St2019Eu = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${h456St02.sku}-${euWarehouse.key}`) - .sku(h456St02.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(euWarehouse.key)); - -export default skuH456St2019Eu; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-h456-st-2019-us.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-h456-st-2019-us.spec.ts deleted file mode 100644 index 282ff592e..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-h456-st-2019-us.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuH456St2019Us from './sku-h456-st-2019-us'; - -describe(`with skuH456St2019Us preset and us-warehouse channel`, () => { - it(`should return a skuH456St2019Us preset`, () => { - const skuH456St2019UsPreset = - skuH456St2019Us().build(); - expect(skuH456St2019UsPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "h456-st-2019-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "h456-st-2019", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuH456St2019Us preset when built for graphql`, () => { - const skuH456St2019UsPresetGraphql = - skuH456St2019Us().buildGraphql(); - expect(skuH456St2019UsPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "h456-st-2019-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "h456-st-2019", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-h456-st-2019-us.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-h456-st-2019-us.ts deleted file mode 100644 index c96bd5c86..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-h456-st-2019-us.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const usWarehouse = ChannelDraft.presets.sampleDataB2B - .usWarehouse() - .build(); - -const h456St02 = ProductVariantDraft.presets.sampleDataB2B - .h456St02() - .build(); - -const skuH456St2019Us = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${h456St02.sku}-${usWarehouse.key}`) - .sku(h456St02.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(usWarehouse.key)); - -export default skuH456St2019Us; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-h456-st-2023-default.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-h456-st-2023-default.spec.ts deleted file mode 100644 index ed01b57a6..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-h456-st-2023-default.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuH456St2023Default from './sku-h456-st-2023-default'; - -describe(`with skuH456St2023Default preset and default-warehouse channel`, () => { - it(`should return a skuH456St2023Default preset`, () => { - const skuH456St2023DefaultPreset = - skuH456St2023Default().build(); - expect(skuH456St2023DefaultPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "h456-st-2023-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "h456-st-2023", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuH456St2023Default preset when built for graphql`, () => { - const skuH456St2023DefaultPresetGraphql = - skuH456St2023Default().buildGraphql(); - expect(skuH456St2023DefaultPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "h456-st-2023-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "h456-st-2023", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-h456-st-2023-default.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-h456-st-2023-default.ts deleted file mode 100644 index fbb652442..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-h456-st-2023-default.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const defaultWarehouse = ChannelDraft.presets.sampleDataB2B - .defaultWarehouse() - .build(); - -const h456St03 = ProductVariantDraft.presets.sampleDataB2B - .h456St03() - .build(); - -const skuH456St2023Default = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${h456St03.sku}-${defaultWarehouse.key}`) - .sku(h456St03.sku!) - .quantityOnStock(1000) - .supplyChannel( - KeyReferenceDraft.presets.channel().key(defaultWarehouse.key) - ); - -export default skuH456St2023Default; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-h456-st-2023-eu.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-h456-st-2023-eu.spec.ts deleted file mode 100644 index f1d60c3b7..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-h456-st-2023-eu.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuH456St2023Eu from './sku-h456-st-2023-eu'; - -describe(`with skuH456St2023Eu preset and eu-warehouse channel`, () => { - it(`should return a skuH456St2023Eu preset`, () => { - const skuH456St2023EuPreset = - skuH456St2023Eu().build(); - expect(skuH456St2023EuPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "h456-st-2023-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "h456-st-2023", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuH456St2023Eu preset when built for graphql`, () => { - const skuH456St2023EuPresetGraphql = - skuH456St2023Eu().buildGraphql(); - expect(skuH456St2023EuPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "h456-st-2023-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "h456-st-2023", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-h456-st-2023-eu.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-h456-st-2023-eu.ts deleted file mode 100644 index f886c990d..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-h456-st-2023-eu.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const euWarehouse = ChannelDraft.presets.sampleDataB2B - .euWarehouse() - .build(); - -const h456St03 = ProductVariantDraft.presets.sampleDataB2B - .h456St03() - .build(); - -const skuH456St2023Eu = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${h456St03.sku}-${euWarehouse.key}`) - .sku(h456St03.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(euWarehouse.key)); - -export default skuH456St2023Eu; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-h456-st-2023-us.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-h456-st-2023-us.spec.ts deleted file mode 100644 index f7da5ed05..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-h456-st-2023-us.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuH456St2023Us from './sku-h456-st-2023-us'; - -describe(`with skuH456St2023Us preset and us-warehouse channel`, () => { - it(`should return a skuH456St2023Us preset`, () => { - const skuH456St2023UsPreset = - skuH456St2023Us().build(); - expect(skuH456St2023UsPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "h456-st-2023-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "h456-st-2023", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuH456St2023Us preset when built for graphql`, () => { - const skuH456St2023UsPresetGraphql = - skuH456St2023Us().buildGraphql(); - expect(skuH456St2023UsPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "h456-st-2023-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "h456-st-2023", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-h456-st-2023-us.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-h456-st-2023-us.ts deleted file mode 100644 index 17af235cb..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-h456-st-2023-us.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const usWarehouse = ChannelDraft.presets.sampleDataB2B - .usWarehouse() - .build(); - -const h456St03 = ProductVariantDraft.presets.sampleDataB2B - .h456St03() - .build(); - -const skuH456St2023Us = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${h456St03.sku}-${usWarehouse.key}`) - .sku(h456St03.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(usWarehouse.key)); - -export default skuH456St2023Us; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hh-456-st-2015-default-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hh-456-st-2015-default-warehouse.spec.ts new file mode 100644 index 000000000..b877b2492 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hh-456-st-2015-default-warehouse.spec.ts @@ -0,0 +1,40 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuHh456St2015DefaultWarehouse preset`, () => { + it(`should return a skuHh456St2015DefaultWarehouse preset when built for rest`, () => { + const skuHh456St2015DefaultWarehousePreset = InventoryEntryDraftRest.presets + .skuHh456St2015DefaultWarehouse() + .build(); + expect(skuHh456St2015DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuHh456St2015DefaultWarehouse preset when built for graphql`, () => { + const skuHh456St2015DefaultWarehousePreset = + InventoryEntryDraftGraphql.presets + .skuHh456St2015DefaultWarehouse() + .build(); + expect(skuHh456St2015DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuHh456St2015DefaultWarehouse preset when built for legacy rest`, () => { + const skuHh456St2015DefaultWarehousePreset = InventoryEntryDraft.presets + .skuHh456St2015DefaultWarehouse() + .buildRest(); + expect(skuHh456St2015DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuHh456St2015DefaultWarehouse preset when built for legacy graphql`, () => { + const skuHh456St2015DefaultWarehousePreset = InventoryEntryDraft.presets + .skuHh456St2015DefaultWarehouse() + .buildGraphql(); + expect(skuHh456St2015DefaultWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hh-456-st-2015-default-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hh-456-st-2015-default-warehouse.ts new file mode 100644 index 000000000..b4c37aa76 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hh-456-st-2015-default-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .defaultWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .hh456St01() + .build(); + +const skuHh456St2015DefaultWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('hh456-st-2015-default-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuHh456St2015DefaultWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hh-456-st-2015-eu-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hh-456-st-2015-eu-warehouse.spec.ts new file mode 100644 index 000000000..848dd2e82 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hh-456-st-2015-eu-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuHh456St2015EuWarehouse preset`, () => { + it(`should return a skuHh456St2015EuWarehouse preset when built for rest`, () => { + const skuHh456St2015EuWarehousePreset = InventoryEntryDraftRest.presets + .skuHh456St2015EuWarehouse() + .build(); + expect(skuHh456St2015EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuHh456St2015EuWarehouse preset when built for graphql`, () => { + const skuHh456St2015EuWarehousePreset = InventoryEntryDraftGraphql.presets + .skuHh456St2015EuWarehouse() + .build(); + expect(skuHh456St2015EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuHh456St2015EuWarehouse preset when built for legacy rest`, () => { + const skuHh456St2015EuWarehousePreset = InventoryEntryDraft.presets + .skuHh456St2015EuWarehouse() + .buildRest(); + expect(skuHh456St2015EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuHh456St2015EuWarehouse preset when built for legacy graphql`, () => { + const skuHh456St2015EuWarehousePreset = InventoryEntryDraft.presets + .skuHh456St2015EuWarehouse() + .buildGraphql(); + expect(skuHh456St2015EuWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hh-456-st-2015-eu-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hh-456-st-2015-eu-warehouse.ts new file mode 100644 index 000000000..3c2ed748c --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hh-456-st-2015-eu-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .euWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .hh456St01() + .build(); + +const skuHh456St2015EuWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('hh456-st-2015-eu-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuHh456St2015EuWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hh-456-st-2015-us-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hh-456-st-2015-us-warehouse.spec.ts new file mode 100644 index 000000000..f6fa2b688 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hh-456-st-2015-us-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuHh456St2015UsWarehouse preset`, () => { + it(`should return a skuHh456St2015UsWarehouse preset when built for rest`, () => { + const skuHh456St2015UsWarehousePreset = InventoryEntryDraftRest.presets + .skuHh456St2015UsWarehouse() + .build(); + expect(skuHh456St2015UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuHh456St2015UsWarehouse preset when built for graphql`, () => { + const skuHh456St2015UsWarehousePreset = InventoryEntryDraftGraphql.presets + .skuHh456St2015UsWarehouse() + .build(); + expect(skuHh456St2015UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuHh456St2015UsWarehouse preset when built for legacy rest`, () => { + const skuHh456St2015UsWarehousePreset = InventoryEntryDraft.presets + .skuHh456St2015UsWarehouse() + .buildRest(); + expect(skuHh456St2015UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuHh456St2015UsWarehouse preset when built for legacy graphql`, () => { + const skuHh456St2015UsWarehousePreset = InventoryEntryDraft.presets + .skuHh456St2015UsWarehouse() + .buildGraphql(); + expect(skuHh456St2015UsWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hh-456-st-2015-us-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hh-456-st-2015-us-warehouse.ts new file mode 100644 index 000000000..f0e7f70e4 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hh-456-st-2015-us-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .usWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .hh456St01() + .build(); + +const skuHh456St2015UsWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('hh456-st-2015-us-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuHh456St2015UsWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hh-456-st-2019-default-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hh-456-st-2019-default-warehouse.spec.ts new file mode 100644 index 000000000..cd35bfaf0 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hh-456-st-2019-default-warehouse.spec.ts @@ -0,0 +1,40 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuHh456St2019DefaultWarehouse preset`, () => { + it(`should return a skuHh456St2019DefaultWarehouse preset when built for rest`, () => { + const skuHh456St2019DefaultWarehousePreset = InventoryEntryDraftRest.presets + .skuHh456St2019DefaultWarehouse() + .build(); + expect(skuHh456St2019DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuHh456St2019DefaultWarehouse preset when built for graphql`, () => { + const skuHh456St2019DefaultWarehousePreset = + InventoryEntryDraftGraphql.presets + .skuHh456St2019DefaultWarehouse() + .build(); + expect(skuHh456St2019DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuHh456St2019DefaultWarehouse preset when built for legacy rest`, () => { + const skuHh456St2019DefaultWarehousePreset = InventoryEntryDraft.presets + .skuHh456St2019DefaultWarehouse() + .buildRest(); + expect(skuHh456St2019DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuHh456St2019DefaultWarehouse preset when built for legacy graphql`, () => { + const skuHh456St2019DefaultWarehousePreset = InventoryEntryDraft.presets + .skuHh456St2019DefaultWarehouse() + .buildGraphql(); + expect(skuHh456St2019DefaultWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hh-456-st-2019-default-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hh-456-st-2019-default-warehouse.ts new file mode 100644 index 000000000..fb017dc00 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hh-456-st-2019-default-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .defaultWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .hh456St02() + .build(); + +const skuHh456St2019DefaultWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('hh456-st-2019-default-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuHh456St2019DefaultWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hh-456-st-2019-eu-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hh-456-st-2019-eu-warehouse.spec.ts new file mode 100644 index 000000000..2207dd7a4 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hh-456-st-2019-eu-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuHh456St2019EuWarehouse preset`, () => { + it(`should return a skuHh456St2019EuWarehouse preset when built for rest`, () => { + const skuHh456St2019EuWarehousePreset = InventoryEntryDraftRest.presets + .skuHh456St2019EuWarehouse() + .build(); + expect(skuHh456St2019EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuHh456St2019EuWarehouse preset when built for graphql`, () => { + const skuHh456St2019EuWarehousePreset = InventoryEntryDraftGraphql.presets + .skuHh456St2019EuWarehouse() + .build(); + expect(skuHh456St2019EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuHh456St2019EuWarehouse preset when built for legacy rest`, () => { + const skuHh456St2019EuWarehousePreset = InventoryEntryDraft.presets + .skuHh456St2019EuWarehouse() + .buildRest(); + expect(skuHh456St2019EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuHh456St2019EuWarehouse preset when built for legacy graphql`, () => { + const skuHh456St2019EuWarehousePreset = InventoryEntryDraft.presets + .skuHh456St2019EuWarehouse() + .buildGraphql(); + expect(skuHh456St2019EuWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hh-456-st-2019-eu-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hh-456-st-2019-eu-warehouse.ts new file mode 100644 index 000000000..25430cea7 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hh-456-st-2019-eu-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .euWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .hh456St02() + .build(); + +const skuHh456St2019EuWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('hh456-st-2019-eu-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuHh456St2019EuWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hh-456-st-2019-us-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hh-456-st-2019-us-warehouse.spec.ts new file mode 100644 index 000000000..71d22bc87 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hh-456-st-2019-us-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuHh456St2019UsWarehouse preset`, () => { + it(`should return a skuHh456St2019UsWarehouse preset when built for rest`, () => { + const skuHh456St2019UsWarehousePreset = InventoryEntryDraftRest.presets + .skuHh456St2019UsWarehouse() + .build(); + expect(skuHh456St2019UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuHh456St2019UsWarehouse preset when built for graphql`, () => { + const skuHh456St2019UsWarehousePreset = InventoryEntryDraftGraphql.presets + .skuHh456St2019UsWarehouse() + .build(); + expect(skuHh456St2019UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuHh456St2019UsWarehouse preset when built for legacy rest`, () => { + const skuHh456St2019UsWarehousePreset = InventoryEntryDraft.presets + .skuHh456St2019UsWarehouse() + .buildRest(); + expect(skuHh456St2019UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuHh456St2019UsWarehouse preset when built for legacy graphql`, () => { + const skuHh456St2019UsWarehousePreset = InventoryEntryDraft.presets + .skuHh456St2019UsWarehouse() + .buildGraphql(); + expect(skuHh456St2019UsWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hh-456-st-2019-us-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hh-456-st-2019-us-warehouse.ts new file mode 100644 index 000000000..1fe60d5c6 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hh-456-st-2019-us-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .usWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .hh456St02() + .build(); + +const skuHh456St2019UsWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('hh456-st-2019-us-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuHh456St2019UsWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hh-456-st-2023-default-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hh-456-st-2023-default-warehouse.spec.ts new file mode 100644 index 000000000..0c46e09b5 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hh-456-st-2023-default-warehouse.spec.ts @@ -0,0 +1,40 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuHh456St2023DefaultWarehouse preset`, () => { + it(`should return a skuHh456St2023DefaultWarehouse preset when built for rest`, () => { + const skuHh456St2023DefaultWarehousePreset = InventoryEntryDraftRest.presets + .skuHh456St2023DefaultWarehouse() + .build(); + expect(skuHh456St2023DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuHh456St2023DefaultWarehouse preset when built for graphql`, () => { + const skuHh456St2023DefaultWarehousePreset = + InventoryEntryDraftGraphql.presets + .skuHh456St2023DefaultWarehouse() + .build(); + expect(skuHh456St2023DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuHh456St2023DefaultWarehouse preset when built for legacy rest`, () => { + const skuHh456St2023DefaultWarehousePreset = InventoryEntryDraft.presets + .skuHh456St2023DefaultWarehouse() + .buildRest(); + expect(skuHh456St2023DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuHh456St2023DefaultWarehouse preset when built for legacy graphql`, () => { + const skuHh456St2023DefaultWarehousePreset = InventoryEntryDraft.presets + .skuHh456St2023DefaultWarehouse() + .buildGraphql(); + expect(skuHh456St2023DefaultWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hh-456-st-2023-default-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hh-456-st-2023-default-warehouse.ts new file mode 100644 index 000000000..c1560d5cd --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hh-456-st-2023-default-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .defaultWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .hh456St03() + .build(); + +const skuHh456St2023DefaultWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('hh456-st-2023-default-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuHh456St2023DefaultWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hh-456-st-2023-eu-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hh-456-st-2023-eu-warehouse.spec.ts new file mode 100644 index 000000000..d36e96906 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hh-456-st-2023-eu-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuHh456St2023EuWarehouse preset`, () => { + it(`should return a skuHh456St2023EuWarehouse preset when built for rest`, () => { + const skuHh456St2023EuWarehousePreset = InventoryEntryDraftRest.presets + .skuHh456St2023EuWarehouse() + .build(); + expect(skuHh456St2023EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuHh456St2023EuWarehouse preset when built for graphql`, () => { + const skuHh456St2023EuWarehousePreset = InventoryEntryDraftGraphql.presets + .skuHh456St2023EuWarehouse() + .build(); + expect(skuHh456St2023EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuHh456St2023EuWarehouse preset when built for legacy rest`, () => { + const skuHh456St2023EuWarehousePreset = InventoryEntryDraft.presets + .skuHh456St2023EuWarehouse() + .buildRest(); + expect(skuHh456St2023EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuHh456St2023EuWarehouse preset when built for legacy graphql`, () => { + const skuHh456St2023EuWarehousePreset = InventoryEntryDraft.presets + .skuHh456St2023EuWarehouse() + .buildGraphql(); + expect(skuHh456St2023EuWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hh-456-st-2023-eu-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hh-456-st-2023-eu-warehouse.ts new file mode 100644 index 000000000..a24c91307 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hh-456-st-2023-eu-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .euWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .hh456St03() + .build(); + +const skuHh456St2023EuWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('hh456-st-2023-eu-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuHh456St2023EuWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hh-456-st-2023-us-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hh-456-st-2023-us-warehouse.spec.ts new file mode 100644 index 000000000..c7cd306c8 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hh-456-st-2023-us-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuHh456St2023UsWarehouse preset`, () => { + it(`should return a skuHh456St2023UsWarehouse preset when built for rest`, () => { + const skuHh456St2023UsWarehousePreset = InventoryEntryDraftRest.presets + .skuHh456St2023UsWarehouse() + .build(); + expect(skuHh456St2023UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuHh456St2023UsWarehouse preset when built for graphql`, () => { + const skuHh456St2023UsWarehousePreset = InventoryEntryDraftGraphql.presets + .skuHh456St2023UsWarehouse() + .build(); + expect(skuHh456St2023UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuHh456St2023UsWarehouse preset when built for legacy rest`, () => { + const skuHh456St2023UsWarehousePreset = InventoryEntryDraft.presets + .skuHh456St2023UsWarehouse() + .buildRest(); + expect(skuHh456St2023UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuHh456St2023UsWarehouse preset when built for legacy graphql`, () => { + const skuHh456St2023UsWarehousePreset = InventoryEntryDraft.presets + .skuHh456St2023UsWarehouse() + .buildGraphql(); + expect(skuHh456St2023UsWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hh-456-st-2023-us-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hh-456-st-2023-us-warehouse.ts new file mode 100644 index 000000000..3e9db94b9 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hh-456-st-2023-us-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .usWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .hh456St03() + .build(); + +const skuHh456St2023UsWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('hh456-st-2023-us-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuHh456St2023UsWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hh456-st-2015-default.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hh456-st-2015-default.spec.ts deleted file mode 100644 index 8b1ce29d8..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hh456-st-2015-default.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuHh456St2015Default from './sku-hh456-st-2015-default'; - -describe(`with skuHh456St2015Default preset and default-warehouse channel`, () => { - it(`should return a skuHh456St2015Default preset`, () => { - const skuHh456St2015DefaultPreset = - skuHh456St2015Default().build(); - expect(skuHh456St2015DefaultPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "hh456-st-2015-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "hh456-st-2015", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuHh456St2015Default preset when built for graphql`, () => { - const skuHh456St2015DefaultPresetGraphql = - skuHh456St2015Default().buildGraphql(); - expect(skuHh456St2015DefaultPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "hh456-st-2015-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "hh456-st-2015", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hh456-st-2015-default.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hh456-st-2015-default.ts deleted file mode 100644 index e7b14916e..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hh456-st-2015-default.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const defaultWarehouse = ChannelDraft.presets.sampleDataB2B - .defaultWarehouse() - .build(); - -const hh456St01 = ProductVariantDraft.presets.sampleDataB2B - .hh456St01() - .build(); - -const skuHh456St2015Default = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${hh456St01.sku}-${defaultWarehouse.key}`) - .sku(hh456St01.sku!) - .quantityOnStock(1000) - .supplyChannel( - KeyReferenceDraft.presets.channel().key(defaultWarehouse.key) - ); - -export default skuHh456St2015Default; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hh456-st-2015-eu.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hh456-st-2015-eu.spec.ts deleted file mode 100644 index dd0c6f122..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hh456-st-2015-eu.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuHh456St2015Eu from './sku-hh456-st-2015-eu'; - -describe(`with skuHh456St2015Eu preset and eu-warehouse channel`, () => { - it(`should return a skuHh456St2015Eu preset`, () => { - const skuHh456St2015EuPreset = - skuHh456St2015Eu().build(); - expect(skuHh456St2015EuPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "hh456-st-2015-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "hh456-st-2015", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuHh456St2015Eu preset when built for graphql`, () => { - const skuHh456St2015EuPresetGraphql = - skuHh456St2015Eu().buildGraphql(); - expect(skuHh456St2015EuPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "hh456-st-2015-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "hh456-st-2015", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hh456-st-2015-eu.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hh456-st-2015-eu.ts deleted file mode 100644 index 55b1d5749..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hh456-st-2015-eu.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const euWarehouse = ChannelDraft.presets.sampleDataB2B - .euWarehouse() - .build(); - -const hh456St01 = ProductVariantDraft.presets.sampleDataB2B - .hh456St01() - .build(); - -const skuHh456St2015Eu = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${hh456St01.sku}-${euWarehouse.key}`) - .sku(hh456St01.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(euWarehouse.key)); - -export default skuHh456St2015Eu; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hh456-st-2015-us.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hh456-st-2015-us.spec.ts deleted file mode 100644 index 2ca873531..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hh456-st-2015-us.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuHh456St2015Us from './sku-hh456-st-2015-us'; - -describe(`with skuHh456St2015Us preset and us-warehouse channel`, () => { - it(`should return a skuHh456St2015Us preset`, () => { - const skuHh456St2015UsPreset = - skuHh456St2015Us().build(); - expect(skuHh456St2015UsPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "hh456-st-2015-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "hh456-st-2015", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuHh456St2015Us preset when built for graphql`, () => { - const skuHh456St2015UsPresetGraphql = - skuHh456St2015Us().buildGraphql(); - expect(skuHh456St2015UsPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "hh456-st-2015-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "hh456-st-2015", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hh456-st-2015-us.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hh456-st-2015-us.ts deleted file mode 100644 index 1a1e8fc7d..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hh456-st-2015-us.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const usWarehouse = ChannelDraft.presets.sampleDataB2B - .usWarehouse() - .build(); - -const hh456St01 = ProductVariantDraft.presets.sampleDataB2B - .hh456St01() - .build(); - -const skuHh456St2015Us = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${hh456St01.sku}-${usWarehouse.key}`) - .sku(hh456St01.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(usWarehouse.key)); - -export default skuHh456St2015Us; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hh456-st-2019-default.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hh456-st-2019-default.spec.ts deleted file mode 100644 index 7a134efa1..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hh456-st-2019-default.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuHh456St2019Default from './sku-hh456-st-2019-default'; - -describe(`with skuHh456St2019Default preset and default-warehouse channel`, () => { - it(`should return a skuHh456St2019Default preset`, () => { - const skuHh456St2019DefaultPreset = - skuHh456St2019Default().build(); - expect(skuHh456St2019DefaultPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "hh456-st-2019-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "hh456-st-2019", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuHh456St2019Default preset when built for graphql`, () => { - const skuHh456St2019DefaultPresetGraphql = - skuHh456St2019Default().buildGraphql(); - expect(skuHh456St2019DefaultPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "hh456-st-2019-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "hh456-st-2019", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hh456-st-2019-default.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hh456-st-2019-default.ts deleted file mode 100644 index 6acba8f8f..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hh456-st-2019-default.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const defaultWarehouse = ChannelDraft.presets.sampleDataB2B - .defaultWarehouse() - .build(); - -const hh456St02 = ProductVariantDraft.presets.sampleDataB2B - .hh456St02() - .build(); - -const skuHh456St2019Default = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${hh456St02.sku}-${defaultWarehouse.key}`) - .sku(hh456St02.sku!) - .quantityOnStock(1000) - .supplyChannel( - KeyReferenceDraft.presets.channel().key(defaultWarehouse.key) - ); - -export default skuHh456St2019Default; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hh456-st-2019-eu.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hh456-st-2019-eu.spec.ts deleted file mode 100644 index 724b39b17..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hh456-st-2019-eu.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuHh456St2019Eu from './sku-hh456-st-2019-eu'; - -describe(`with skuHh456St2019Eu preset and eu-warehouse channel`, () => { - it(`should return a skuHh456St2019Eu preset`, () => { - const skuHh456St2019EuPreset = - skuHh456St2019Eu().build(); - expect(skuHh456St2019EuPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "hh456-st-2019-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "hh456-st-2019", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuHh456St2019Eu preset when built for graphql`, () => { - const skuHh456St2019EuPresetGraphql = - skuHh456St2019Eu().buildGraphql(); - expect(skuHh456St2019EuPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "hh456-st-2019-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "hh456-st-2019", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hh456-st-2019-eu.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hh456-st-2019-eu.ts deleted file mode 100644 index d38cf2a78..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hh456-st-2019-eu.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const euWarehouse = ChannelDraft.presets.sampleDataB2B - .euWarehouse() - .build(); - -const hh456St02 = ProductVariantDraft.presets.sampleDataB2B - .hh456St02() - .build(); - -const skuHh456St2019Eu = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${hh456St02.sku}-${euWarehouse.key}`) - .sku(hh456St02.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(euWarehouse.key)); - -export default skuHh456St2019Eu; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hh456-st-2019-us.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hh456-st-2019-us.spec.ts deleted file mode 100644 index 1c02f388e..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hh456-st-2019-us.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuHh456St2019Us from './sku-hh456-st-2019-us'; - -describe(`with skuHh456St2019Us preset and us-warehouse channel`, () => { - it(`should return a skuHh456St2019Us preset`, () => { - const skuHh456St2019UsPreset = - skuHh456St2019Us().build(); - expect(skuHh456St2019UsPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "hh456-st-2019-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "hh456-st-2019", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuHh456St2019Us preset when built for graphql`, () => { - const skuHh456St2019UsPresetGraphql = - skuHh456St2019Us().buildGraphql(); - expect(skuHh456St2019UsPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "hh456-st-2019-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "hh456-st-2019", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hh456-st-2019-us.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hh456-st-2019-us.ts deleted file mode 100644 index 4f39cac16..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hh456-st-2019-us.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const usWarehouse = ChannelDraft.presets.sampleDataB2B - .usWarehouse() - .build(); - -const hh456St02 = ProductVariantDraft.presets.sampleDataB2B - .hh456St02() - .build(); - -const skuHh456St2019Us = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${hh456St02.sku}-${usWarehouse.key}`) - .sku(hh456St02.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(usWarehouse.key)); - -export default skuHh456St2019Us; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hh456-st-2023-default.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hh456-st-2023-default.spec.ts deleted file mode 100644 index aa3c6cba9..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hh456-st-2023-default.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuHh456St2023Default from './sku-hh456-st-2023-default'; - -describe(`with skuHh456St2023Default preset and default-warehouse channel`, () => { - it(`should return a skuHh456St2023Default preset`, () => { - const skuHh456St2023DefaultPreset = - skuHh456St2023Default().build(); - expect(skuHh456St2023DefaultPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "hh456-st-2023-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "hh456-st-2023", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuHh456St2023Default preset when built for graphql`, () => { - const skuHh456St2023DefaultPresetGraphql = - skuHh456St2023Default().buildGraphql(); - expect(skuHh456St2023DefaultPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "hh456-st-2023-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "hh456-st-2023", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hh456-st-2023-default.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hh456-st-2023-default.ts deleted file mode 100644 index 025ba3e4d..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hh456-st-2023-default.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const defaultWarehouse = ChannelDraft.presets.sampleDataB2B - .defaultWarehouse() - .build(); - -const hh456St03 = ProductVariantDraft.presets.sampleDataB2B - .hh456St03() - .build(); - -const skuHh456St2023Default = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${hh456St03.sku}-${defaultWarehouse.key}`) - .sku(hh456St03.sku!) - .quantityOnStock(1000) - .supplyChannel( - KeyReferenceDraft.presets.channel().key(defaultWarehouse.key) - ); - -export default skuHh456St2023Default; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hh456-st-2023-eu.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hh456-st-2023-eu.spec.ts deleted file mode 100644 index a6a3b779d..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hh456-st-2023-eu.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuHh456St2023Eu from './sku-hh456-st-2023-eu'; - -describe(`with skuHh456St2023Eu preset and eu-warehouse channel`, () => { - it(`should return a skuHh456St2023Eu preset`, () => { - const skuHh456St2023EuPreset = - skuHh456St2023Eu().build(); - expect(skuHh456St2023EuPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "hh456-st-2023-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "hh456-st-2023", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuHh456St2023Eu preset when built for graphql`, () => { - const skuHh456St2023EuPresetGraphql = - skuHh456St2023Eu().buildGraphql(); - expect(skuHh456St2023EuPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "hh456-st-2023-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "hh456-st-2023", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hh456-st-2023-eu.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hh456-st-2023-eu.ts deleted file mode 100644 index 59af2acad..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hh456-st-2023-eu.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const euWarehouse = ChannelDraft.presets.sampleDataB2B - .euWarehouse() - .build(); - -const hh456St03 = ProductVariantDraft.presets.sampleDataB2B - .hh456St03() - .build(); - -const skuHh456St2023Eu = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${hh456St03.sku}-${euWarehouse.key}`) - .sku(hh456St03.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(euWarehouse.key)); - -export default skuHh456St2023Eu; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hh456-st-2023-us.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hh456-st-2023-us.spec.ts deleted file mode 100644 index e5d98aec3..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hh456-st-2023-us.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuHh456St2023Us from './sku-hh456-st-2023-us'; - -describe(`with skuHh456St2023Us preset and us-warehouse channel`, () => { - it(`should return a skuHh456St2023Us preset`, () => { - const skuHh456St2023UsPreset = - skuHh456St2023Us().build(); - expect(skuHh456St2023UsPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "hh456-st-2023-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "hh456-st-2023", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuHh456St2023Us preset when built for graphql`, () => { - const skuHh456St2023UsPresetGraphql = - skuHh456St2023Us().buildGraphql(); - expect(skuHh456St2023UsPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "hh456-st-2023-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "hh456-st-2023", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hh456-st-2023-us.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hh456-st-2023-us.ts deleted file mode 100644 index 9054f4762..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hh456-st-2023-us.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const usWarehouse = ChannelDraft.presets.sampleDataB2B - .usWarehouse() - .build(); - -const hh456St03 = ProductVariantDraft.presets.sampleDataB2B - .hh456St03() - .build(); - -const skuHh456St2023Us = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${hh456St03.sku}-${usWarehouse.key}`) - .sku(hh456St03.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(usWarehouse.key)); - -export default skuHh456St2023Us; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hhh-234-wx-blue-default-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hhh-234-wx-blue-default-warehouse.spec.ts new file mode 100644 index 000000000..a85aaef5b --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hhh-234-wx-blue-default-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuHhh234WxBlueDefaultWarehouse preset`, () => { + it(`should return a skuHhh234WxBlueDefaultWarehouse preset when built for rest`, () => { + const skuHhh234WxBlueDefaultWarehousePreset = + InventoryEntryDraftRest.presets.skuHhh234WxBlueDefaultWarehouse().build(); + expect(skuHhh234WxBlueDefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuHhh234WxBlueDefaultWarehouse preset when built for graphql`, () => { + const skuHhh234WxBlueDefaultWarehousePreset = + InventoryEntryDraftGraphql.presets + .skuHhh234WxBlueDefaultWarehouse() + .build(); + expect(skuHhh234WxBlueDefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuHhh234WxBlueDefaultWarehouse preset when built for legacy rest`, () => { + const skuHhh234WxBlueDefaultWarehousePreset = InventoryEntryDraft.presets + .skuHhh234WxBlueDefaultWarehouse() + .buildRest(); + expect(skuHhh234WxBlueDefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuHhh234WxBlueDefaultWarehouse preset when built for legacy graphql`, () => { + const skuHhh234WxBlueDefaultWarehousePreset = InventoryEntryDraft.presets + .skuHhh234WxBlueDefaultWarehouse() + .buildGraphql(); + expect(skuHhh234WxBlueDefaultWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hhh-234-wx-blue-default-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hhh-234-wx-blue-default-warehouse.ts new file mode 100644 index 000000000..cc1198d2c --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hhh-234-wx-blue-default-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .defaultWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .hhh234Wx02() + .build(); + +const skuHhh234WxBlueDefaultWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('hhh234-wx-blue-default-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuHhh234WxBlueDefaultWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hhh-234-wx-blue-eu-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hhh-234-wx-blue-eu-warehouse.spec.ts new file mode 100644 index 000000000..8e87994e4 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hhh-234-wx-blue-eu-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuHhh234WxBlueEuWarehouse preset`, () => { + it(`should return a skuHhh234WxBlueEuWarehouse preset when built for rest`, () => { + const skuHhh234WxBlueEuWarehousePreset = InventoryEntryDraftRest.presets + .skuHhh234WxBlueEuWarehouse() + .build(); + expect(skuHhh234WxBlueEuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuHhh234WxBlueEuWarehouse preset when built for graphql`, () => { + const skuHhh234WxBlueEuWarehousePreset = InventoryEntryDraftGraphql.presets + .skuHhh234WxBlueEuWarehouse() + .build(); + expect(skuHhh234WxBlueEuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuHhh234WxBlueEuWarehouse preset when built for legacy rest`, () => { + const skuHhh234WxBlueEuWarehousePreset = InventoryEntryDraft.presets + .skuHhh234WxBlueEuWarehouse() + .buildRest(); + expect(skuHhh234WxBlueEuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuHhh234WxBlueEuWarehouse preset when built for legacy graphql`, () => { + const skuHhh234WxBlueEuWarehousePreset = InventoryEntryDraft.presets + .skuHhh234WxBlueEuWarehouse() + .buildGraphql(); + expect(skuHhh234WxBlueEuWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hhh-234-wx-blue-eu-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hhh-234-wx-blue-eu-warehouse.ts new file mode 100644 index 000000000..6e9a16788 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hhh-234-wx-blue-eu-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .euWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .hhh234Wx02() + .build(); + +const skuHhh234WxBlueEuWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('hhh234-wx-blue-eu-warehouse') + .sku(variant.sku!) + .quantityOnStock(999) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuHhh234WxBlueEuWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hhh-234-wx-blue-us-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hhh-234-wx-blue-us-warehouse.spec.ts new file mode 100644 index 000000000..72b0ef7b6 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hhh-234-wx-blue-us-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuHhh234WxBlueUsWarehouse preset`, () => { + it(`should return a skuHhh234WxBlueUsWarehouse preset when built for rest`, () => { + const skuHhh234WxBlueUsWarehousePreset = InventoryEntryDraftRest.presets + .skuHhh234WxBlueUsWarehouse() + .build(); + expect(skuHhh234WxBlueUsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuHhh234WxBlueUsWarehouse preset when built for graphql`, () => { + const skuHhh234WxBlueUsWarehousePreset = InventoryEntryDraftGraphql.presets + .skuHhh234WxBlueUsWarehouse() + .build(); + expect(skuHhh234WxBlueUsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuHhh234WxBlueUsWarehouse preset when built for legacy rest`, () => { + const skuHhh234WxBlueUsWarehousePreset = InventoryEntryDraft.presets + .skuHhh234WxBlueUsWarehouse() + .buildRest(); + expect(skuHhh234WxBlueUsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuHhh234WxBlueUsWarehouse preset when built for legacy graphql`, () => { + const skuHhh234WxBlueUsWarehousePreset = InventoryEntryDraft.presets + .skuHhh234WxBlueUsWarehouse() + .buildGraphql(); + expect(skuHhh234WxBlueUsWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hhh-234-wx-blue-us-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hhh-234-wx-blue-us-warehouse.ts new file mode 100644 index 000000000..fca3f56b2 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hhh-234-wx-blue-us-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .usWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .hhh234Wx02() + .build(); + +const skuHhh234WxBlueUsWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('hhh234-wx-blue-us-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuHhh234WxBlueUsWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hhh-234-wx-green-default-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hhh-234-wx-green-default-warehouse.spec.ts new file mode 100644 index 000000000..a6646d8b9 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hhh-234-wx-green-default-warehouse.spec.ts @@ -0,0 +1,41 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuHhh234WxGreenDefaultWarehouse preset`, () => { + it(`should return a skuHhh234WxGreenDefaultWarehouse preset when built for rest`, () => { + const skuHhh234WxGreenDefaultWarehousePreset = + InventoryEntryDraftRest.presets + .skuHhh234WxGreenDefaultWarehouse() + .build(); + expect(skuHhh234WxGreenDefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuHhh234WxGreenDefaultWarehouse preset when built for graphql`, () => { + const skuHhh234WxGreenDefaultWarehousePreset = + InventoryEntryDraftGraphql.presets + .skuHhh234WxGreenDefaultWarehouse() + .build(); + expect(skuHhh234WxGreenDefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuHhh234WxGreenDefaultWarehouse preset when built for legacy rest`, () => { + const skuHhh234WxGreenDefaultWarehousePreset = InventoryEntryDraft.presets + .skuHhh234WxGreenDefaultWarehouse() + .buildRest(); + expect(skuHhh234WxGreenDefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuHhh234WxGreenDefaultWarehouse preset when built for legacy graphql`, () => { + const skuHhh234WxGreenDefaultWarehousePreset = InventoryEntryDraft.presets + .skuHhh234WxGreenDefaultWarehouse() + .buildGraphql(); + expect(skuHhh234WxGreenDefaultWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hhh-234-wx-green-default-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hhh-234-wx-green-default-warehouse.ts new file mode 100644 index 000000000..2d68f6ddf --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hhh-234-wx-green-default-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .defaultWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .hhh234Wx03() + .build(); + +const skuHhh234WxGreenDefaultWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('hhh234-wx-green-default-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuHhh234WxGreenDefaultWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hhh-234-wx-green-eu-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hhh-234-wx-green-eu-warehouse.spec.ts new file mode 100644 index 000000000..a25616824 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hhh-234-wx-green-eu-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuHhh234WxGreenEuWarehouse preset`, () => { + it(`should return a skuHhh234WxGreenEuWarehouse preset when built for rest`, () => { + const skuHhh234WxGreenEuWarehousePreset = InventoryEntryDraftRest.presets + .skuHhh234WxGreenEuWarehouse() + .build(); + expect(skuHhh234WxGreenEuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuHhh234WxGreenEuWarehouse preset when built for graphql`, () => { + const skuHhh234WxGreenEuWarehousePreset = InventoryEntryDraftGraphql.presets + .skuHhh234WxGreenEuWarehouse() + .build(); + expect(skuHhh234WxGreenEuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuHhh234WxGreenEuWarehouse preset when built for legacy rest`, () => { + const skuHhh234WxGreenEuWarehousePreset = InventoryEntryDraft.presets + .skuHhh234WxGreenEuWarehouse() + .buildRest(); + expect(skuHhh234WxGreenEuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuHhh234WxGreenEuWarehouse preset when built for legacy graphql`, () => { + const skuHhh234WxGreenEuWarehousePreset = InventoryEntryDraft.presets + .skuHhh234WxGreenEuWarehouse() + .buildGraphql(); + expect(skuHhh234WxGreenEuWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hhh-234-wx-green-eu-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hhh-234-wx-green-eu-warehouse.ts new file mode 100644 index 000000000..95b01be0e --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hhh-234-wx-green-eu-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .euWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .hhh234Wx03() + .build(); + +const skuHhh234WxGreenEuWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('hhh234-wx-green-eu-warehouse') + .sku(variant.sku!) + .quantityOnStock(999) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuHhh234WxGreenEuWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hhh-234-wx-green-us-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hhh-234-wx-green-us-warehouse.spec.ts new file mode 100644 index 000000000..8a7ebba35 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hhh-234-wx-green-us-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuHhh234WxGreenUsWarehouse preset`, () => { + it(`should return a skuHhh234WxGreenUsWarehouse preset when built for rest`, () => { + const skuHhh234WxGreenUsWarehousePreset = InventoryEntryDraftRest.presets + .skuHhh234WxGreenUsWarehouse() + .build(); + expect(skuHhh234WxGreenUsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuHhh234WxGreenUsWarehouse preset when built for graphql`, () => { + const skuHhh234WxGreenUsWarehousePreset = InventoryEntryDraftGraphql.presets + .skuHhh234WxGreenUsWarehouse() + .build(); + expect(skuHhh234WxGreenUsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuHhh234WxGreenUsWarehouse preset when built for legacy rest`, () => { + const skuHhh234WxGreenUsWarehousePreset = InventoryEntryDraft.presets + .skuHhh234WxGreenUsWarehouse() + .buildRest(); + expect(skuHhh234WxGreenUsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuHhh234WxGreenUsWarehouse preset when built for legacy graphql`, () => { + const skuHhh234WxGreenUsWarehousePreset = InventoryEntryDraft.presets + .skuHhh234WxGreenUsWarehouse() + .buildGraphql(); + expect(skuHhh234WxGreenUsWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hhh-234-wx-green-us-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hhh-234-wx-green-us-warehouse.ts new file mode 100644 index 000000000..b1b119cb9 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hhh-234-wx-green-us-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .usWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .hhh234Wx03() + .build(); + +const skuHhh234WxGreenUsWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('hhh234-wx-green-us-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuHhh234WxGreenUsWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hhh-234-wx-red-default-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hhh-234-wx-red-default-warehouse.spec.ts new file mode 100644 index 000000000..4d68122ae --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hhh-234-wx-red-default-warehouse.spec.ts @@ -0,0 +1,40 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuHhh234WxRedDefaultWarehouse preset`, () => { + it(`should return a skuHhh234WxRedDefaultWarehouse preset when built for rest`, () => { + const skuHhh234WxRedDefaultWarehousePreset = InventoryEntryDraftRest.presets + .skuHhh234WxRedDefaultWarehouse() + .build(); + expect(skuHhh234WxRedDefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuHhh234WxRedDefaultWarehouse preset when built for graphql`, () => { + const skuHhh234WxRedDefaultWarehousePreset = + InventoryEntryDraftGraphql.presets + .skuHhh234WxRedDefaultWarehouse() + .build(); + expect(skuHhh234WxRedDefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuHhh234WxRedDefaultWarehouse preset when built for legacy rest`, () => { + const skuHhh234WxRedDefaultWarehousePreset = InventoryEntryDraft.presets + .skuHhh234WxRedDefaultWarehouse() + .buildRest(); + expect(skuHhh234WxRedDefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuHhh234WxRedDefaultWarehouse preset when built for legacy graphql`, () => { + const skuHhh234WxRedDefaultWarehousePreset = InventoryEntryDraft.presets + .skuHhh234WxRedDefaultWarehouse() + .buildGraphql(); + expect(skuHhh234WxRedDefaultWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hhh-234-wx-red-default-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hhh-234-wx-red-default-warehouse.ts new file mode 100644 index 000000000..8a979c221 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hhh-234-wx-red-default-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .defaultWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .hhh234Wx01() + .build(); + +const skuHhh234WxRedDefaultWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('hhh234-wx-red-default-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuHhh234WxRedDefaultWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hhh-234-wx-red-eu-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hhh-234-wx-red-eu-warehouse.spec.ts new file mode 100644 index 000000000..d1797f679 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hhh-234-wx-red-eu-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuHhh234WxRedEuWarehouse preset`, () => { + it(`should return a skuHhh234WxRedEuWarehouse preset when built for rest`, () => { + const skuHhh234WxRedEuWarehousePreset = InventoryEntryDraftRest.presets + .skuHhh234WxRedEuWarehouse() + .build(); + expect(skuHhh234WxRedEuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuHhh234WxRedEuWarehouse preset when built for graphql`, () => { + const skuHhh234WxRedEuWarehousePreset = InventoryEntryDraftGraphql.presets + .skuHhh234WxRedEuWarehouse() + .build(); + expect(skuHhh234WxRedEuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuHhh234WxRedEuWarehouse preset when built for legacy rest`, () => { + const skuHhh234WxRedEuWarehousePreset = InventoryEntryDraft.presets + .skuHhh234WxRedEuWarehouse() + .buildRest(); + expect(skuHhh234WxRedEuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuHhh234WxRedEuWarehouse preset when built for legacy graphql`, () => { + const skuHhh234WxRedEuWarehousePreset = InventoryEntryDraft.presets + .skuHhh234WxRedEuWarehouse() + .buildGraphql(); + expect(skuHhh234WxRedEuWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hhh-234-wx-red-eu-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hhh-234-wx-red-eu-warehouse.ts new file mode 100644 index 000000000..ea147d9fd --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hhh-234-wx-red-eu-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .euWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .hhh234Wx01() + .build(); + +const skuHhh234WxRedEuWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('hhh234-wx-red-eu-warehouse') + .sku(variant.sku!) + .quantityOnStock(999) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuHhh234WxRedEuWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hhh-234-wx-red-us-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hhh-234-wx-red-us-warehouse.spec.ts new file mode 100644 index 000000000..f949754ec --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hhh-234-wx-red-us-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuHhh234WxRedUsWarehouse preset`, () => { + it(`should return a skuHhh234WxRedUsWarehouse preset when built for rest`, () => { + const skuHhh234WxRedUsWarehousePreset = InventoryEntryDraftRest.presets + .skuHhh234WxRedUsWarehouse() + .build(); + expect(skuHhh234WxRedUsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuHhh234WxRedUsWarehouse preset when built for graphql`, () => { + const skuHhh234WxRedUsWarehousePreset = InventoryEntryDraftGraphql.presets + .skuHhh234WxRedUsWarehouse() + .build(); + expect(skuHhh234WxRedUsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuHhh234WxRedUsWarehouse preset when built for legacy rest`, () => { + const skuHhh234WxRedUsWarehousePreset = InventoryEntryDraft.presets + .skuHhh234WxRedUsWarehouse() + .buildRest(); + expect(skuHhh234WxRedUsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuHhh234WxRedUsWarehouse preset when built for legacy graphql`, () => { + const skuHhh234WxRedUsWarehousePreset = InventoryEntryDraft.presets + .skuHhh234WxRedUsWarehouse() + .buildGraphql(); + expect(skuHhh234WxRedUsWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hhh-234-wx-red-us-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hhh-234-wx-red-us-warehouse.ts new file mode 100644 index 000000000..4e229ca7c --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hhh-234-wx-red-us-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .usWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .hhh234Wx01() + .build(); + +const skuHhh234WxRedUsWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('hhh234-wx-red-us-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuHhh234WxRedUsWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hhh234-wx-blue-default.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hhh234-wx-blue-default.spec.ts deleted file mode 100644 index 929f03f87..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hhh234-wx-blue-default.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuHhh234WxBlueDefault from './sku-hhh234-wx-blue-default'; - -describe(`with skuHhh234WxBlueDefault preset and default-warehouse channel`, () => { - it(`should return a skuHhh234WxBlueDefault preset`, () => { - const skuHhh234WxBlueDefaultPreset = - skuHhh234WxBlueDefault().build(); - expect(skuHhh234WxBlueDefaultPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "hhh234-wx-blue-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "hhh234-wx-blue", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuHhh234WxBlueDefault preset when built for graphql`, () => { - const skuHhh234WxBlueDefaultPresetGraphql = - skuHhh234WxBlueDefault().buildGraphql(); - expect(skuHhh234WxBlueDefaultPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "hhh234-wx-blue-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "hhh234-wx-blue", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hhh234-wx-blue-default.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hhh234-wx-blue-default.ts deleted file mode 100644 index 8d4a90287..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hhh234-wx-blue-default.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const defaultWarehouse = ChannelDraft.presets.sampleDataB2B - .defaultWarehouse() - .build(); - -const hhh234Wx02 = ProductVariantDraft.presets.sampleDataB2B - .hhh234Wx02() - .build(); - -const skuHhh234WxBlueDefault = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${hhh234Wx02.sku}-${defaultWarehouse.key}`) - .sku(hhh234Wx02.sku!) - .quantityOnStock(1000) - .supplyChannel( - KeyReferenceDraft.presets.channel().key(defaultWarehouse.key) - ); - -export default skuHhh234WxBlueDefault; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hhh234-wx-blue-eu.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hhh234-wx-blue-eu.spec.ts deleted file mode 100644 index c79d3d23c..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hhh234-wx-blue-eu.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuHhh234WxBlueEu from './sku-hhh234-wx-blue-eu'; - -describe(`with skuHhh234WxBlueEu preset and eu-warehouse channel`, () => { - it(`should return a skuHhh234WxBlueEu preset`, () => { - const skuHhh234WxBlueEuPreset = - skuHhh234WxBlueEu().build(); - expect(skuHhh234WxBlueEuPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "hhh234-wx-blue-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "hhh234-wx-blue", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuHhh234WxBlueEu preset when built for graphql`, () => { - const skuHhh234WxBlueEuPresetGraphql = - skuHhh234WxBlueEu().buildGraphql(); - expect(skuHhh234WxBlueEuPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "hhh234-wx-blue-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "hhh234-wx-blue", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hhh234-wx-blue-eu.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hhh234-wx-blue-eu.ts deleted file mode 100644 index 7debe1157..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hhh234-wx-blue-eu.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const euWarehouse = ChannelDraft.presets.sampleDataB2B - .euWarehouse() - .build(); - -const hhh234Wx02 = ProductVariantDraft.presets.sampleDataB2B - .hhh234Wx02() - .build(); - -const skuHhh234WxBlueEu = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${hhh234Wx02.sku}-${euWarehouse.key}`) - .sku(hhh234Wx02.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(euWarehouse.key)); - -export default skuHhh234WxBlueEu; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hhh234-wx-blue-us.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hhh234-wx-blue-us.spec.ts deleted file mode 100644 index d8dbf8d35..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hhh234-wx-blue-us.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuHhh234WxBlueUs from './sku-hhh234-wx-blue-us'; - -describe(`with skuHhh234WxBlueUs preset and us-warehouse channel`, () => { - it(`should return a skuHhh234WxBlueUs preset`, () => { - const skuHhh234WxBlueUsPreset = - skuHhh234WxBlueUs().build(); - expect(skuHhh234WxBlueUsPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "hhh234-wx-blue-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "hhh234-wx-blue", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuHhh234WxBlueUs preset when built for graphql`, () => { - const skuHhh234WxBlueUsPresetGraphql = - skuHhh234WxBlueUs().buildGraphql(); - expect(skuHhh234WxBlueUsPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "hhh234-wx-blue-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "hhh234-wx-blue", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hhh234-wx-blue-us.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hhh234-wx-blue-us.ts deleted file mode 100644 index f4fde4be5..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hhh234-wx-blue-us.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const usWarehouse = ChannelDraft.presets.sampleDataB2B - .usWarehouse() - .build(); - -const hhh234Wx02 = ProductVariantDraft.presets.sampleDataB2B - .hhh234Wx02() - .build(); - -const skuHhh234WxBlueUs = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${hhh234Wx02.sku}-${usWarehouse.key}`) - .sku(hhh234Wx02.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(usWarehouse.key)); - -export default skuHhh234WxBlueUs; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hhh234-wx-green-default.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hhh234-wx-green-default.spec.ts deleted file mode 100644 index 6250bca32..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hhh234-wx-green-default.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuHhh234WxGreenDefault from './sku-hhh234-wx-green-default'; - -describe(`with skuHhh234WxGreenDefault preset and default-warehouse channel`, () => { - it(`should return a skuHhh234WxGreenDefault preset`, () => { - const skuHhh234WxGreenDefaultPreset = - skuHhh234WxGreenDefault().build(); - expect(skuHhh234WxGreenDefaultPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "hhh234-wx-green-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "hhh234-wx-green", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuHhh234WxGreenDefault preset when built for graphql`, () => { - const skuHhh234WxGreenDefaultPresetGraphql = - skuHhh234WxGreenDefault().buildGraphql(); - expect(skuHhh234WxGreenDefaultPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "hhh234-wx-green-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "hhh234-wx-green", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hhh234-wx-green-default.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hhh234-wx-green-default.ts deleted file mode 100644 index 22ddda7ce..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hhh234-wx-green-default.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const defaultWarehouse = ChannelDraft.presets.sampleDataB2B - .defaultWarehouse() - .build(); - -const hhh234Wx03 = ProductVariantDraft.presets.sampleDataB2B - .hhh234Wx03() - .build(); - -const skuHhh234WxGreenDefault = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${hhh234Wx03.sku}-${defaultWarehouse.key}`) - .sku(hhh234Wx03.sku!) - .quantityOnStock(1000) - .supplyChannel( - KeyReferenceDraft.presets.channel().key(defaultWarehouse.key) - ); - -export default skuHhh234WxGreenDefault; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hhh234-wx-green-eu.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hhh234-wx-green-eu.spec.ts deleted file mode 100644 index fc6da8b70..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hhh234-wx-green-eu.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuHhh234WxGreenEu from './sku-hhh234-wx-green-eu'; - -describe(`with skuHhh234WxGreenEu preset and eu-warehouse channel`, () => { - it(`should return a skuHhh234WxGreenEu preset`, () => { - const skuHhh234WxGreenEuPreset = - skuHhh234WxGreenEu().build(); - expect(skuHhh234WxGreenEuPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "hhh234-wx-green-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "hhh234-wx-green", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuHhh234WxGreenEu preset when built for graphql`, () => { - const skuHhh234WxGreenEuPresetGraphql = - skuHhh234WxGreenEu().buildGraphql(); - expect(skuHhh234WxGreenEuPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "hhh234-wx-green-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "hhh234-wx-green", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hhh234-wx-green-eu.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hhh234-wx-green-eu.ts deleted file mode 100644 index fda529ac9..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hhh234-wx-green-eu.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const euWarehouse = ChannelDraft.presets.sampleDataB2B - .euWarehouse() - .build(); - -const hhh234Wx03 = ProductVariantDraft.presets.sampleDataB2B - .hhh234Wx03() - .build(); - -const skuHhh234WxGreenEu = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${hhh234Wx03.sku}-${euWarehouse.key}`) - .sku(hhh234Wx03.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(euWarehouse.key)); - -export default skuHhh234WxGreenEu; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hhh234-wx-green-us.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hhh234-wx-green-us.spec.ts deleted file mode 100644 index f52fe7d5d..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hhh234-wx-green-us.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuHhh234WxGreenUs from './sku-hhh234-wx-green-us'; - -describe(`with skuHhh234WxGreenUs preset and us-warehouse channel`, () => { - it(`should return a skuHhh234WxGreenUs preset`, () => { - const skuHhh234WxGreenUsPreset = - skuHhh234WxGreenUs().build(); - expect(skuHhh234WxGreenUsPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "hhh234-wx-green-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "hhh234-wx-green", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuHhh234WxGreenUs preset when built for graphql`, () => { - const skuHhh234WxGreenUsPresetGraphql = - skuHhh234WxGreenUs().buildGraphql(); - expect(skuHhh234WxGreenUsPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "hhh234-wx-green-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "hhh234-wx-green", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hhh234-wx-green-us.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hhh234-wx-green-us.ts deleted file mode 100644 index 37bcaa66e..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hhh234-wx-green-us.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const usWarehouse = ChannelDraft.presets.sampleDataB2B - .usWarehouse() - .build(); - -const hhh234Wx03 = ProductVariantDraft.presets.sampleDataB2B - .hhh234Wx03() - .build(); - -const skuHhh234WxGreenUs = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${hhh234Wx03.sku}-${usWarehouse.key}`) - .sku(hhh234Wx03.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(usWarehouse.key)); - -export default skuHhh234WxGreenUs; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hhh234-wx-red-default.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hhh234-wx-red-default.spec.ts deleted file mode 100644 index 3f44915c5..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hhh234-wx-red-default.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuHhh234WxRedDefault from './sku-hhh234-wx-red-default'; - -describe(`with skuHhh234WxRedDefault preset and default-warehouse channel`, () => { - it(`should return a skuHhh234WxRedDefault preset`, () => { - const skuHhh234WxRedDefaultPreset = - skuHhh234WxRedDefault().build(); - expect(skuHhh234WxRedDefaultPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "hhh234-wx-red-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "hhh234-wx-red", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuHhh234WxRedDefault preset when built for graphql`, () => { - const skuHhh234WxRedDefaultPresetGraphql = - skuHhh234WxRedDefault().buildGraphql(); - expect(skuHhh234WxRedDefaultPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "hhh234-wx-red-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "hhh234-wx-red", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hhh234-wx-red-default.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hhh234-wx-red-default.ts deleted file mode 100644 index 268d60475..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hhh234-wx-red-default.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const defaultWarehouse = ChannelDraft.presets.sampleDataB2B - .defaultWarehouse() - .build(); - -const hhh234Wx01 = ProductVariantDraft.presets.sampleDataB2B - .hhh234Wx01() - .build(); - -const skuHhh234WxRedDefault = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${hhh234Wx01.sku}-${defaultWarehouse.key}`) - .sku(hhh234Wx01.sku!) - .quantityOnStock(1000) - .supplyChannel( - KeyReferenceDraft.presets.channel().key(defaultWarehouse.key) - ); - -export default skuHhh234WxRedDefault; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hhh234-wx-red-eu.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hhh234-wx-red-eu.spec.ts deleted file mode 100644 index c150de44b..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hhh234-wx-red-eu.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuHhh234WxRedEu from './sku-hhh234-wx-red-eu'; - -describe(`with skuHhh234WxRedEu preset and eu-warehouse channel`, () => { - it(`should return a skuHhh234WxRedEu preset`, () => { - const skuHhh234WxRedEuPreset = - skuHhh234WxRedEu().build(); - expect(skuHhh234WxRedEuPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "hhh234-wx-red-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "hhh234-wx-red", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuHhh234WxRedEu preset when built for graphql`, () => { - const skuHhh234WxRedEuPresetGraphql = - skuHhh234WxRedEu().buildGraphql(); - expect(skuHhh234WxRedEuPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "hhh234-wx-red-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "hhh234-wx-red", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hhh234-wx-red-eu.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hhh234-wx-red-eu.ts deleted file mode 100644 index 4740fa030..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hhh234-wx-red-eu.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const euWarehouse = ChannelDraft.presets.sampleDataB2B - .euWarehouse() - .build(); - -const hhh234Wx01 = ProductVariantDraft.presets.sampleDataB2B - .hhh234Wx01() - .build(); - -const skuHhh234WxRedEu = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${hhh234Wx01.sku}-${euWarehouse.key}`) - .sku(hhh234Wx01.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(euWarehouse.key)); - -export default skuHhh234WxRedEu; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hhh234-wx-red-us.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hhh234-wx-red-us.spec.ts deleted file mode 100644 index a2e96c705..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hhh234-wx-red-us.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuHhh234WxRedUs from './sku-hhh234-wx-red-us'; - -describe(`with skuHhh234WxRedUs preset and us-warehouse channel`, () => { - it(`should return a skuHhh234WxRedUs preset`, () => { - const skuHhh234WxRedUsPreset = - skuHhh234WxRedUs().build(); - expect(skuHhh234WxRedUsPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "hhh234-wx-red-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "hhh234-wx-red", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuHhh234WxRedUs preset when built for graphql`, () => { - const skuHhh234WxRedUsPresetGraphql = - skuHhh234WxRedUs().buildGraphql(); - expect(skuHhh234WxRedUsPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "hhh234-wx-red-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "hhh234-wx-red", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hhh234-wx-red-us.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hhh234-wx-red-us.ts deleted file mode 100644 index 8480c7048..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hhh234-wx-red-us.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const usWarehouse = ChannelDraft.presets.sampleDataB2B - .usWarehouse() - .build(); - -const hhh234Wx01 = ProductVariantDraft.presets.sampleDataB2B - .hhh234Wx01() - .build(); - -const skuHhh234WxRedUs = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${hhh234Wx01.sku}-${usWarehouse.key}`) - .sku(hhh234Wx01.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(usWarehouse.key)); - -export default skuHhh234WxRedUs; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hydraulic-hose-default-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hydraulic-hose-default-warehouse.spec.ts new file mode 100644 index 000000000..4bebc5def --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hydraulic-hose-default-warehouse.spec.ts @@ -0,0 +1,41 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuHydraulicHoseDefaultWarehouse preset`, () => { + it(`should return a skuHydraulicHoseDefaultWarehouse preset when built for rest`, () => { + const skuHydraulicHoseDefaultWarehousePreset = + InventoryEntryDraftRest.presets + .skuHydraulicHoseDefaultWarehouse() + .build(); + expect(skuHydraulicHoseDefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuHydraulicHoseDefaultWarehouse preset when built for graphql`, () => { + const skuHydraulicHoseDefaultWarehousePreset = + InventoryEntryDraftGraphql.presets + .skuHydraulicHoseDefaultWarehouse() + .build(); + expect(skuHydraulicHoseDefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuHydraulicHoseDefaultWarehouse preset when built for legacy rest`, () => { + const skuHydraulicHoseDefaultWarehousePreset = InventoryEntryDraft.presets + .skuHydraulicHoseDefaultWarehouse() + .buildRest(); + expect(skuHydraulicHoseDefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuHydraulicHoseDefaultWarehouse preset when built for legacy graphql`, () => { + const skuHydraulicHoseDefaultWarehousePreset = InventoryEntryDraft.presets + .skuHydraulicHoseDefaultWarehouse() + .buildGraphql(); + expect(skuHydraulicHoseDefaultWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hydraulic-hose-default-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hydraulic-hose-default-warehouse.ts new file mode 100644 index 000000000..62614c005 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hydraulic-hose-default-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .defaultWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .hydraulicHose01() + .build(); + +const skuHydraulicHoseDefaultWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('hydraulic-hose-default-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuHydraulicHoseDefaultWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hydraulic-hose-default.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hydraulic-hose-default.spec.ts deleted file mode 100644 index 2a405013a..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hydraulic-hose-default.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuHydraulicHoseDefault from './sku-hydraulic-hose-default'; - -describe(`with skuHydraulicHoseDefault preset and default-warehouse channel`, () => { - it(`should return a skuHydraulicHoseDefault preset`, () => { - const skuHydraulicHoseDefaultPreset = - skuHydraulicHoseDefault().build(); - expect(skuHydraulicHoseDefaultPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "hydraulic-hose-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "hydraulic-hose", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuHydraulicHoseDefault preset when built for graphql`, () => { - const skuHydraulicHoseDefaultPresetGraphql = - skuHydraulicHoseDefault().buildGraphql(); - expect(skuHydraulicHoseDefaultPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "hydraulic-hose-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "hydraulic-hose", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hydraulic-hose-default.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hydraulic-hose-default.ts deleted file mode 100644 index debc28148..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hydraulic-hose-default.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const defaultWarehouse = ChannelDraft.presets.sampleDataB2B - .defaultWarehouse() - .build(); - -const hydraulicHose01 = ProductVariantDraft.presets.sampleDataB2B - .hydraulicHose01() - .build(); - -const skuHydraulicHoseDefault = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${hydraulicHose01.sku}-${defaultWarehouse.key}`) - .sku(hydraulicHose01.sku!) - .quantityOnStock(1000) - .supplyChannel( - KeyReferenceDraft.presets.channel().key(defaultWarehouse.key) - ); - -export default skuHydraulicHoseDefault; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hydraulic-hose-eu-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hydraulic-hose-eu-warehouse.spec.ts new file mode 100644 index 000000000..e474c977c --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hydraulic-hose-eu-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuHydraulicHoseEuWarehouse preset`, () => { + it(`should return a skuHydraulicHoseEuWarehouse preset when built for rest`, () => { + const skuHydraulicHoseEuWarehousePreset = InventoryEntryDraftRest.presets + .skuHydraulicHoseEuWarehouse() + .build(); + expect(skuHydraulicHoseEuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuHydraulicHoseEuWarehouse preset when built for graphql`, () => { + const skuHydraulicHoseEuWarehousePreset = InventoryEntryDraftGraphql.presets + .skuHydraulicHoseEuWarehouse() + .build(); + expect(skuHydraulicHoseEuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuHydraulicHoseEuWarehouse preset when built for legacy rest`, () => { + const skuHydraulicHoseEuWarehousePreset = InventoryEntryDraft.presets + .skuHydraulicHoseEuWarehouse() + .buildRest(); + expect(skuHydraulicHoseEuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuHydraulicHoseEuWarehouse preset when built for legacy graphql`, () => { + const skuHydraulicHoseEuWarehousePreset = InventoryEntryDraft.presets + .skuHydraulicHoseEuWarehouse() + .buildGraphql(); + expect(skuHydraulicHoseEuWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hydraulic-hose-eu-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hydraulic-hose-eu-warehouse.ts new file mode 100644 index 000000000..272aff6f2 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hydraulic-hose-eu-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .euWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .hydraulicHose01() + .build(); + +const skuHydraulicHoseEuWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('hydraulic-hose-eu-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuHydraulicHoseEuWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hydraulic-hose-eu.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hydraulic-hose-eu.spec.ts deleted file mode 100644 index 50104e0bf..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hydraulic-hose-eu.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuHydraulicHoseEu from './sku-hydraulic-hose-eu'; - -describe(`with skuHydraulicHoseEu preset and eu-warehouse channel`, () => { - it(`should return a skuHydraulicHoseEu preset`, () => { - const skuHydraulicHoseEuPreset = - skuHydraulicHoseEu().build(); - expect(skuHydraulicHoseEuPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "hydraulic-hose-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "hydraulic-hose", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuHydraulicHoseEu preset when built for graphql`, () => { - const skuHydraulicHoseEuPresetGraphql = - skuHydraulicHoseEu().buildGraphql(); - expect(skuHydraulicHoseEuPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "hydraulic-hose-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "hydraulic-hose", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hydraulic-hose-eu.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hydraulic-hose-eu.ts deleted file mode 100644 index 692fb4139..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hydraulic-hose-eu.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const euWarehouse = ChannelDraft.presets.sampleDataB2B - .euWarehouse() - .build(); - -const hydraulicHose01 = ProductVariantDraft.presets.sampleDataB2B - .hydraulicHose01() - .build(); - -const skuHydraulicHoseEu = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${hydraulicHose01.sku}-${euWarehouse.key}`) - .sku(hydraulicHose01.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(euWarehouse.key)); - -export default skuHydraulicHoseEu; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hydraulic-hose-us-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hydraulic-hose-us-warehouse.spec.ts new file mode 100644 index 000000000..20c4f8d5b --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hydraulic-hose-us-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuHydraulicHoseUsWarehouse preset`, () => { + it(`should return a skuHydraulicHoseUsWarehouse preset when built for rest`, () => { + const skuHydraulicHoseUsWarehousePreset = InventoryEntryDraftRest.presets + .skuHydraulicHoseUsWarehouse() + .build(); + expect(skuHydraulicHoseUsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuHydraulicHoseUsWarehouse preset when built for graphql`, () => { + const skuHydraulicHoseUsWarehousePreset = InventoryEntryDraftGraphql.presets + .skuHydraulicHoseUsWarehouse() + .build(); + expect(skuHydraulicHoseUsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuHydraulicHoseUsWarehouse preset when built for legacy rest`, () => { + const skuHydraulicHoseUsWarehousePreset = InventoryEntryDraft.presets + .skuHydraulicHoseUsWarehouse() + .buildRest(); + expect(skuHydraulicHoseUsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuHydraulicHoseUsWarehouse preset when built for legacy graphql`, () => { + const skuHydraulicHoseUsWarehousePreset = InventoryEntryDraft.presets + .skuHydraulicHoseUsWarehouse() + .buildGraphql(); + expect(skuHydraulicHoseUsWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hydraulic-hose-us-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hydraulic-hose-us-warehouse.ts new file mode 100644 index 000000000..0a050b5de --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hydraulic-hose-us-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .usWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .hydraulicHose01() + .build(); + +const skuHydraulicHoseUsWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('hydraulic-hose-us-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuHydraulicHoseUsWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hydraulic-hose-us.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hydraulic-hose-us.spec.ts deleted file mode 100644 index cb114b67e..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hydraulic-hose-us.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuHydraulicHoseUs from './sku-hydraulic-hose-us'; - -describe(`with skuHydraulicHoseUs preset and us-warehouse channel`, () => { - it(`should return a skuHydraulicHoseUs preset`, () => { - const skuHydraulicHoseUsPreset = - skuHydraulicHoseUs().build(); - expect(skuHydraulicHoseUsPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "hydraulic-hose-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "hydraulic-hose", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuHydraulicHoseUs preset when built for graphql`, () => { - const skuHydraulicHoseUsPresetGraphql = - skuHydraulicHoseUs().buildGraphql(); - expect(skuHydraulicHoseUsPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "hydraulic-hose-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "hydraulic-hose", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hydraulic-hose-us.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hydraulic-hose-us.ts deleted file mode 100644 index bf1c93500..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-hydraulic-hose-us.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const usWarehouse = ChannelDraft.presets.sampleDataB2B - .usWarehouse() - .build(); - -const hydraulicHose01 = ProductVariantDraft.presets.sampleDataB2B - .hydraulicHose01() - .build(); - -const skuHydraulicHoseUs = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${hydraulicHose01.sku}-${usWarehouse.key}`) - .sku(hydraulicHose01.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(usWarehouse.key)); - -export default skuHydraulicHoseUs; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-i-789-uv-2015-default-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-i-789-uv-2015-default-warehouse.spec.ts new file mode 100644 index 000000000..842933f6c --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-i-789-uv-2015-default-warehouse.spec.ts @@ -0,0 +1,40 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuI789Uv2015DefaultWarehouse preset`, () => { + it(`should return a skuI789Uv2015DefaultWarehouse preset when built for rest`, () => { + const skuI789Uv2015DefaultWarehousePreset = InventoryEntryDraftRest.presets + .skuI789Uv2015DefaultWarehouse() + .build(); + expect(skuI789Uv2015DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuI789Uv2015DefaultWarehouse preset when built for graphql`, () => { + const skuI789Uv2015DefaultWarehousePreset = + InventoryEntryDraftGraphql.presets + .skuI789Uv2015DefaultWarehouse() + .build(); + expect(skuI789Uv2015DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuI789Uv2015DefaultWarehouse preset when built for legacy rest`, () => { + const skuI789Uv2015DefaultWarehousePreset = InventoryEntryDraft.presets + .skuI789Uv2015DefaultWarehouse() + .buildRest(); + expect(skuI789Uv2015DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuI789Uv2015DefaultWarehouse preset when built for legacy graphql`, () => { + const skuI789Uv2015DefaultWarehousePreset = InventoryEntryDraft.presets + .skuI789Uv2015DefaultWarehouse() + .buildGraphql(); + expect(skuI789Uv2015DefaultWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-i-789-uv-2015-default-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-i-789-uv-2015-default-warehouse.ts new file mode 100644 index 000000000..8d6941900 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-i-789-uv-2015-default-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .defaultWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .i789Uv01() + .build(); + +const skuI789Uv2015DefaultWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('i789-uv-2015-default-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuI789Uv2015DefaultWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-i-789-uv-2015-eu-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-i-789-uv-2015-eu-warehouse.spec.ts new file mode 100644 index 000000000..7f116ace6 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-i-789-uv-2015-eu-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuI789Uv2015EuWarehouse preset`, () => { + it(`should return a skuI789Uv2015EuWarehouse preset when built for rest`, () => { + const skuI789Uv2015EuWarehousePreset = InventoryEntryDraftRest.presets + .skuI789Uv2015EuWarehouse() + .build(); + expect(skuI789Uv2015EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuI789Uv2015EuWarehouse preset when built for graphql`, () => { + const skuI789Uv2015EuWarehousePreset = InventoryEntryDraftGraphql.presets + .skuI789Uv2015EuWarehouse() + .build(); + expect(skuI789Uv2015EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuI789Uv2015EuWarehouse preset when built for legacy rest`, () => { + const skuI789Uv2015EuWarehousePreset = InventoryEntryDraft.presets + .skuI789Uv2015EuWarehouse() + .buildRest(); + expect(skuI789Uv2015EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuI789Uv2015EuWarehouse preset when built for legacy graphql`, () => { + const skuI789Uv2015EuWarehousePreset = InventoryEntryDraft.presets + .skuI789Uv2015EuWarehouse() + .buildGraphql(); + expect(skuI789Uv2015EuWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-i-789-uv-2015-eu-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-i-789-uv-2015-eu-warehouse.ts new file mode 100644 index 000000000..7797333bd --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-i-789-uv-2015-eu-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .euWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .i789Uv01() + .build(); + +const skuI789Uv2015EuWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('i789-uv-2015-eu-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuI789Uv2015EuWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-i-789-uv-2015-us-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-i-789-uv-2015-us-warehouse.spec.ts new file mode 100644 index 000000000..71b973e3a --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-i-789-uv-2015-us-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuI789Uv2015UsWarehouse preset`, () => { + it(`should return a skuI789Uv2015UsWarehouse preset when built for rest`, () => { + const skuI789Uv2015UsWarehousePreset = InventoryEntryDraftRest.presets + .skuI789Uv2015UsWarehouse() + .build(); + expect(skuI789Uv2015UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuI789Uv2015UsWarehouse preset when built for graphql`, () => { + const skuI789Uv2015UsWarehousePreset = InventoryEntryDraftGraphql.presets + .skuI789Uv2015UsWarehouse() + .build(); + expect(skuI789Uv2015UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuI789Uv2015UsWarehouse preset when built for legacy rest`, () => { + const skuI789Uv2015UsWarehousePreset = InventoryEntryDraft.presets + .skuI789Uv2015UsWarehouse() + .buildRest(); + expect(skuI789Uv2015UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuI789Uv2015UsWarehouse preset when built for legacy graphql`, () => { + const skuI789Uv2015UsWarehousePreset = InventoryEntryDraft.presets + .skuI789Uv2015UsWarehouse() + .buildGraphql(); + expect(skuI789Uv2015UsWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-i-789-uv-2015-us-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-i-789-uv-2015-us-warehouse.ts new file mode 100644 index 000000000..fd27349ad --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-i-789-uv-2015-us-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .usWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .i789Uv01() + .build(); + +const skuI789Uv2015UsWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('i789-uv-2015-us-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuI789Uv2015UsWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-i-789-uv-2019-default-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-i-789-uv-2019-default-warehouse.spec.ts new file mode 100644 index 000000000..df2bfcf7a --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-i-789-uv-2019-default-warehouse.spec.ts @@ -0,0 +1,40 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuI789Uv2019DefaultWarehouse preset`, () => { + it(`should return a skuI789Uv2019DefaultWarehouse preset when built for rest`, () => { + const skuI789Uv2019DefaultWarehousePreset = InventoryEntryDraftRest.presets + .skuI789Uv2019DefaultWarehouse() + .build(); + expect(skuI789Uv2019DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuI789Uv2019DefaultWarehouse preset when built for graphql`, () => { + const skuI789Uv2019DefaultWarehousePreset = + InventoryEntryDraftGraphql.presets + .skuI789Uv2019DefaultWarehouse() + .build(); + expect(skuI789Uv2019DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuI789Uv2019DefaultWarehouse preset when built for legacy rest`, () => { + const skuI789Uv2019DefaultWarehousePreset = InventoryEntryDraft.presets + .skuI789Uv2019DefaultWarehouse() + .buildRest(); + expect(skuI789Uv2019DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuI789Uv2019DefaultWarehouse preset when built for legacy graphql`, () => { + const skuI789Uv2019DefaultWarehousePreset = InventoryEntryDraft.presets + .skuI789Uv2019DefaultWarehouse() + .buildGraphql(); + expect(skuI789Uv2019DefaultWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-i-789-uv-2019-default-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-i-789-uv-2019-default-warehouse.ts new file mode 100644 index 000000000..91f1b4d62 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-i-789-uv-2019-default-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .defaultWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .i789Uv02() + .build(); + +const skuI789Uv2019DefaultWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('i789-uv-2019-default-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuI789Uv2019DefaultWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-i-789-uv-2019-eu-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-i-789-uv-2019-eu-warehouse.spec.ts new file mode 100644 index 000000000..f99d394f7 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-i-789-uv-2019-eu-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuI789Uv2019EuWarehouse preset`, () => { + it(`should return a skuI789Uv2019EuWarehouse preset when built for rest`, () => { + const skuI789Uv2019EuWarehousePreset = InventoryEntryDraftRest.presets + .skuI789Uv2019EuWarehouse() + .build(); + expect(skuI789Uv2019EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuI789Uv2019EuWarehouse preset when built for graphql`, () => { + const skuI789Uv2019EuWarehousePreset = InventoryEntryDraftGraphql.presets + .skuI789Uv2019EuWarehouse() + .build(); + expect(skuI789Uv2019EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuI789Uv2019EuWarehouse preset when built for legacy rest`, () => { + const skuI789Uv2019EuWarehousePreset = InventoryEntryDraft.presets + .skuI789Uv2019EuWarehouse() + .buildRest(); + expect(skuI789Uv2019EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuI789Uv2019EuWarehouse preset when built for legacy graphql`, () => { + const skuI789Uv2019EuWarehousePreset = InventoryEntryDraft.presets + .skuI789Uv2019EuWarehouse() + .buildGraphql(); + expect(skuI789Uv2019EuWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-i-789-uv-2019-eu-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-i-789-uv-2019-eu-warehouse.ts new file mode 100644 index 000000000..9b3748bfd --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-i-789-uv-2019-eu-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .euWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .i789Uv02() + .build(); + +const skuI789Uv2019EuWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('i789-uv-2019-eu-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuI789Uv2019EuWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-i-789-uv-2019-us-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-i-789-uv-2019-us-warehouse.spec.ts new file mode 100644 index 000000000..9eeb3c00d --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-i-789-uv-2019-us-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuI789Uv2019UsWarehouse preset`, () => { + it(`should return a skuI789Uv2019UsWarehouse preset when built for rest`, () => { + const skuI789Uv2019UsWarehousePreset = InventoryEntryDraftRest.presets + .skuI789Uv2019UsWarehouse() + .build(); + expect(skuI789Uv2019UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuI789Uv2019UsWarehouse preset when built for graphql`, () => { + const skuI789Uv2019UsWarehousePreset = InventoryEntryDraftGraphql.presets + .skuI789Uv2019UsWarehouse() + .build(); + expect(skuI789Uv2019UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuI789Uv2019UsWarehouse preset when built for legacy rest`, () => { + const skuI789Uv2019UsWarehousePreset = InventoryEntryDraft.presets + .skuI789Uv2019UsWarehouse() + .buildRest(); + expect(skuI789Uv2019UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuI789Uv2019UsWarehouse preset when built for legacy graphql`, () => { + const skuI789Uv2019UsWarehousePreset = InventoryEntryDraft.presets + .skuI789Uv2019UsWarehouse() + .buildGraphql(); + expect(skuI789Uv2019UsWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-i-789-uv-2019-us-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-i-789-uv-2019-us-warehouse.ts new file mode 100644 index 000000000..4c309f1b8 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-i-789-uv-2019-us-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .usWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .i789Uv02() + .build(); + +const skuI789Uv2019UsWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('i789-uv-2019-us-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuI789Uv2019UsWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-i-789-uv-2023-default-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-i-789-uv-2023-default-warehouse.spec.ts new file mode 100644 index 000000000..7c6a7b9c3 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-i-789-uv-2023-default-warehouse.spec.ts @@ -0,0 +1,40 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuI789Uv2023DefaultWarehouse preset`, () => { + it(`should return a skuI789Uv2023DefaultWarehouse preset when built for rest`, () => { + const skuI789Uv2023DefaultWarehousePreset = InventoryEntryDraftRest.presets + .skuI789Uv2023DefaultWarehouse() + .build(); + expect(skuI789Uv2023DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuI789Uv2023DefaultWarehouse preset when built for graphql`, () => { + const skuI789Uv2023DefaultWarehousePreset = + InventoryEntryDraftGraphql.presets + .skuI789Uv2023DefaultWarehouse() + .build(); + expect(skuI789Uv2023DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuI789Uv2023DefaultWarehouse preset when built for legacy rest`, () => { + const skuI789Uv2023DefaultWarehousePreset = InventoryEntryDraft.presets + .skuI789Uv2023DefaultWarehouse() + .buildRest(); + expect(skuI789Uv2023DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuI789Uv2023DefaultWarehouse preset when built for legacy graphql`, () => { + const skuI789Uv2023DefaultWarehousePreset = InventoryEntryDraft.presets + .skuI789Uv2023DefaultWarehouse() + .buildGraphql(); + expect(skuI789Uv2023DefaultWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-i-789-uv-2023-default-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-i-789-uv-2023-default-warehouse.ts new file mode 100644 index 000000000..2afce8fe7 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-i-789-uv-2023-default-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .defaultWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .i789Uv03() + .build(); + +const skuI789Uv2023DefaultWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('i789-uv-2023-default-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuI789Uv2023DefaultWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-i-789-uv-2023-eu-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-i-789-uv-2023-eu-warehouse.spec.ts new file mode 100644 index 000000000..244ba0aea --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-i-789-uv-2023-eu-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuI789Uv2023EuWarehouse preset`, () => { + it(`should return a skuI789Uv2023EuWarehouse preset when built for rest`, () => { + const skuI789Uv2023EuWarehousePreset = InventoryEntryDraftRest.presets + .skuI789Uv2023EuWarehouse() + .build(); + expect(skuI789Uv2023EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuI789Uv2023EuWarehouse preset when built for graphql`, () => { + const skuI789Uv2023EuWarehousePreset = InventoryEntryDraftGraphql.presets + .skuI789Uv2023EuWarehouse() + .build(); + expect(skuI789Uv2023EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuI789Uv2023EuWarehouse preset when built for legacy rest`, () => { + const skuI789Uv2023EuWarehousePreset = InventoryEntryDraft.presets + .skuI789Uv2023EuWarehouse() + .buildRest(); + expect(skuI789Uv2023EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuI789Uv2023EuWarehouse preset when built for legacy graphql`, () => { + const skuI789Uv2023EuWarehousePreset = InventoryEntryDraft.presets + .skuI789Uv2023EuWarehouse() + .buildGraphql(); + expect(skuI789Uv2023EuWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-i-789-uv-2023-eu-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-i-789-uv-2023-eu-warehouse.ts new file mode 100644 index 000000000..ac2cf737c --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-i-789-uv-2023-eu-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .euWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .i789Uv03() + .build(); + +const skuI789Uv2023EuWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('i789-uv-2023-eu-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuI789Uv2023EuWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-i-789-uv-2023-us-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-i-789-uv-2023-us-warehouse.spec.ts new file mode 100644 index 000000000..ac6375a1b --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-i-789-uv-2023-us-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuI789Uv2023UsWarehouse preset`, () => { + it(`should return a skuI789Uv2023UsWarehouse preset when built for rest`, () => { + const skuI789Uv2023UsWarehousePreset = InventoryEntryDraftRest.presets + .skuI789Uv2023UsWarehouse() + .build(); + expect(skuI789Uv2023UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuI789Uv2023UsWarehouse preset when built for graphql`, () => { + const skuI789Uv2023UsWarehousePreset = InventoryEntryDraftGraphql.presets + .skuI789Uv2023UsWarehouse() + .build(); + expect(skuI789Uv2023UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuI789Uv2023UsWarehouse preset when built for legacy rest`, () => { + const skuI789Uv2023UsWarehousePreset = InventoryEntryDraft.presets + .skuI789Uv2023UsWarehouse() + .buildRest(); + expect(skuI789Uv2023UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuI789Uv2023UsWarehouse preset when built for legacy graphql`, () => { + const skuI789Uv2023UsWarehousePreset = InventoryEntryDraft.presets + .skuI789Uv2023UsWarehouse() + .buildGraphql(); + expect(skuI789Uv2023UsWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-i-789-uv-2023-us-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-i-789-uv-2023-us-warehouse.ts new file mode 100644 index 000000000..bec687d2d --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-i-789-uv-2023-us-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .usWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .i789Uv03() + .build(); + +const skuI789Uv2023UsWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('i789-uv-2023-us-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuI789Uv2023UsWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-i789-uv-2015-default.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-i789-uv-2015-default.spec.ts deleted file mode 100644 index 09b1e50a0..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-i789-uv-2015-default.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuI789Uv2015Default from './sku-i789-uv-2015-default'; - -describe(`with skuI789Uv2015Default preset and default-warehouse channel`, () => { - it(`should return a skuI789Uv2015Default preset`, () => { - const skuI789Uv2015DefaultPreset = - skuI789Uv2015Default().build(); - expect(skuI789Uv2015DefaultPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "i789-uv-2015-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "i789-uv-2015", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuI789Uv2015Default preset when built for graphql`, () => { - const skuI789Uv2015DefaultPresetGraphql = - skuI789Uv2015Default().buildGraphql(); - expect(skuI789Uv2015DefaultPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "i789-uv-2015-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "i789-uv-2015", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-i789-uv-2015-default.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-i789-uv-2015-default.ts deleted file mode 100644 index 1cd93c422..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-i789-uv-2015-default.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const defaultWarehouse = ChannelDraft.presets.sampleDataB2B - .defaultWarehouse() - .build(); - -const i789Uv01 = ProductVariantDraft.presets.sampleDataB2B - .i789Uv01() - .build(); - -const skuI789Uv2015Default = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${i789Uv01.sku}-${defaultWarehouse.key}`) - .sku(i789Uv01.sku!) - .quantityOnStock(1000) - .supplyChannel( - KeyReferenceDraft.presets.channel().key(defaultWarehouse.key) - ); - -export default skuI789Uv2015Default; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-i789-uv-2015-eu.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-i789-uv-2015-eu.spec.ts deleted file mode 100644 index 6172dd9b5..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-i789-uv-2015-eu.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuI789Uv2015Eu from './sku-i789-uv-2015-eu'; - -describe(`with skuI789Uv2015Eu preset and eu-warehouse channel`, () => { - it(`should return a skuI789Uv2015Eu preset`, () => { - const skuI789Uv2015EuPreset = - skuI789Uv2015Eu().build(); - expect(skuI789Uv2015EuPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "i789-uv-2015-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "i789-uv-2015", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuI789Uv2015Eu preset when built for graphql`, () => { - const skuI789Uv2015EuPresetGraphql = - skuI789Uv2015Eu().buildGraphql(); - expect(skuI789Uv2015EuPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "i789-uv-2015-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "i789-uv-2015", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-i789-uv-2015-eu.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-i789-uv-2015-eu.ts deleted file mode 100644 index cbe88b2f6..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-i789-uv-2015-eu.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const euWarehouse = ChannelDraft.presets.sampleDataB2B - .euWarehouse() - .build(); - -const i789Uv01 = ProductVariantDraft.presets.sampleDataB2B - .i789Uv01() - .build(); - -const skuI789Uv2015Eu = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${i789Uv01.sku}-${euWarehouse.key}`) - .sku(i789Uv01.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(euWarehouse.key)); - -export default skuI789Uv2015Eu; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-i789-uv-2015-us.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-i789-uv-2015-us.spec.ts deleted file mode 100644 index 5321cb6c1..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-i789-uv-2015-us.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuI789Uv2015Us from './sku-i789-uv-2015-us'; - -describe(`with skuI789Uv2015Us preset and us-warehouse channel`, () => { - it(`should return a skuI789Uv2015Us preset`, () => { - const skuI789Uv2015UsPreset = - skuI789Uv2015Us().build(); - expect(skuI789Uv2015UsPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "i789-uv-2015-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "i789-uv-2015", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuI789Uv2015Us preset when built for graphql`, () => { - const skuI789Uv2015UsPresetGraphql = - skuI789Uv2015Us().buildGraphql(); - expect(skuI789Uv2015UsPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "i789-uv-2015-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "i789-uv-2015", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-i789-uv-2015-us.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-i789-uv-2015-us.ts deleted file mode 100644 index 42d83dc4b..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-i789-uv-2015-us.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const usWarehouse = ChannelDraft.presets.sampleDataB2B - .usWarehouse() - .build(); - -const i789Uv01 = ProductVariantDraft.presets.sampleDataB2B - .i789Uv01() - .build(); - -const skuI789Uv2015Us = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${i789Uv01.sku}-${usWarehouse.key}`) - .sku(i789Uv01.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(usWarehouse.key)); - -export default skuI789Uv2015Us; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-i789-uv-2019-default.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-i789-uv-2019-default.spec.ts deleted file mode 100644 index 4937f8fa9..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-i789-uv-2019-default.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuI789Uv2019Default from './sku-i789-uv-2019-default'; - -describe(`with skuI789Uv2019Default preset and default-warehouse channel`, () => { - it(`should return a skuI789Uv2019Default preset`, () => { - const skuI789Uv2019DefaultPreset = - skuI789Uv2019Default().build(); - expect(skuI789Uv2019DefaultPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "i789-uv-2019-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "i789-uv-2019", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuI789Uv2019Default preset when built for graphql`, () => { - const skuI789Uv2019DefaultPresetGraphql = - skuI789Uv2019Default().buildGraphql(); - expect(skuI789Uv2019DefaultPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "i789-uv-2019-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "i789-uv-2019", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-i789-uv-2019-default.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-i789-uv-2019-default.ts deleted file mode 100644 index 63c2b0b96..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-i789-uv-2019-default.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const defaultWarehouse = ChannelDraft.presets.sampleDataB2B - .defaultWarehouse() - .build(); - -const i789Uv02 = ProductVariantDraft.presets.sampleDataB2B - .i789Uv02() - .build(); - -const skuI789Uv2019Default = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${i789Uv02.sku}-${defaultWarehouse.key}`) - .sku(i789Uv02.sku!) - .quantityOnStock(1000) - .supplyChannel( - KeyReferenceDraft.presets.channel().key(defaultWarehouse.key) - ); - -export default skuI789Uv2019Default; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-i789-uv-2019-eu.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-i789-uv-2019-eu.spec.ts deleted file mode 100644 index 9d8a55869..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-i789-uv-2019-eu.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuI789Uv2019Eu from './sku-i789-uv-2019-eu'; - -describe(`with skuI789Uv2019Eu preset and eu-warehouse channel`, () => { - it(`should return a skuI789Uv2019Eu preset`, () => { - const skuI789Uv2019EuPreset = - skuI789Uv2019Eu().build(); - expect(skuI789Uv2019EuPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "i789-uv-2019-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "i789-uv-2019", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuI789Uv2019Eu preset when built for graphql`, () => { - const skuI789Uv2019EuPresetGraphql = - skuI789Uv2019Eu().buildGraphql(); - expect(skuI789Uv2019EuPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "i789-uv-2019-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "i789-uv-2019", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-i789-uv-2019-eu.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-i789-uv-2019-eu.ts deleted file mode 100644 index caca4c9cd..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-i789-uv-2019-eu.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const euWarehouse = ChannelDraft.presets.sampleDataB2B - .euWarehouse() - .build(); - -const i789Uv02 = ProductVariantDraft.presets.sampleDataB2B - .i789Uv02() - .build(); - -const skuI789Uv2019Eu = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${i789Uv02.sku}-${euWarehouse.key}`) - .sku(i789Uv02.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(euWarehouse.key)); - -export default skuI789Uv2019Eu; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-i789-uv-2019-us.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-i789-uv-2019-us.spec.ts deleted file mode 100644 index 233efb5cd..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-i789-uv-2019-us.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuI789Uv2019Us from './sku-i789-uv-2019-us'; - -describe(`with skuI789Uv2019Us preset and us-warehouse channel`, () => { - it(`should return a skuI789Uv2019Us preset`, () => { - const skuI789Uv2019UsPreset = - skuI789Uv2019Us().build(); - expect(skuI789Uv2019UsPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "i789-uv-2019-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "i789-uv-2019", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuI789Uv2019Us preset when built for graphql`, () => { - const skuI789Uv2019UsPresetGraphql = - skuI789Uv2019Us().buildGraphql(); - expect(skuI789Uv2019UsPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "i789-uv-2019-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "i789-uv-2019", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-i789-uv-2019-us.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-i789-uv-2019-us.ts deleted file mode 100644 index ce3e977dc..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-i789-uv-2019-us.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const usWarehouse = ChannelDraft.presets.sampleDataB2B - .usWarehouse() - .build(); - -const i789Uv02 = ProductVariantDraft.presets.sampleDataB2B - .i789Uv02() - .build(); - -const skuI789Uv2019Us = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${i789Uv02.sku}-${usWarehouse.key}`) - .sku(i789Uv02.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(usWarehouse.key)); - -export default skuI789Uv2019Us; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-i789-uv-2023-default.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-i789-uv-2023-default.spec.ts deleted file mode 100644 index b99c751cb..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-i789-uv-2023-default.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuI789Uv2023Default from './sku-i789-uv-2023-default'; - -describe(`with skuI789Uv2023Default preset and default-warehouse channel`, () => { - it(`should return a skuI789Uv2023Default preset`, () => { - const skuI789Uv2023DefaultPreset = - skuI789Uv2023Default().build(); - expect(skuI789Uv2023DefaultPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "i789-uv-2023-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "i789-uv-2023", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuI789Uv2023Default preset when built for graphql`, () => { - const skuI789Uv2023DefaultPresetGraphql = - skuI789Uv2023Default().buildGraphql(); - expect(skuI789Uv2023DefaultPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "i789-uv-2023-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "i789-uv-2023", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-i789-uv-2023-default.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-i789-uv-2023-default.ts deleted file mode 100644 index cd61b0d9e..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-i789-uv-2023-default.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const defaultWarehouse = ChannelDraft.presets.sampleDataB2B - .defaultWarehouse() - .build(); - -const i789Uv03 = ProductVariantDraft.presets.sampleDataB2B - .i789Uv03() - .build(); - -const skuI789Uv2023Default = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${i789Uv03.sku}-${defaultWarehouse.key}`) - .sku(i789Uv03.sku!) - .quantityOnStock(1000) - .supplyChannel( - KeyReferenceDraft.presets.channel().key(defaultWarehouse.key) - ); - -export default skuI789Uv2023Default; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-i789-uv-2023-eu.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-i789-uv-2023-eu.spec.ts deleted file mode 100644 index 28d132ac8..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-i789-uv-2023-eu.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuI789Uv2023Eu from './sku-i789-uv-2023-eu'; - -describe(`with skuI789Uv2023Eu preset and eu-warehouse channel`, () => { - it(`should return a skuI789Uv2023Eu preset`, () => { - const skuI789Uv2023EuPreset = - skuI789Uv2023Eu().build(); - expect(skuI789Uv2023EuPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "i789-uv-2023-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "i789-uv-2023", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuI789Uv2023Eu preset when built for graphql`, () => { - const skuI789Uv2023EuPresetGraphql = - skuI789Uv2023Eu().buildGraphql(); - expect(skuI789Uv2023EuPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "i789-uv-2023-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "i789-uv-2023", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-i789-uv-2023-eu.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-i789-uv-2023-eu.ts deleted file mode 100644 index 4664440e0..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-i789-uv-2023-eu.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const euWarehouse = ChannelDraft.presets.sampleDataB2B - .euWarehouse() - .build(); - -const i789Uv03 = ProductVariantDraft.presets.sampleDataB2B - .i789Uv03() - .build(); - -const skuI789Uv2023Eu = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${i789Uv03.sku}-${euWarehouse.key}`) - .sku(i789Uv03.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(euWarehouse.key)); - -export default skuI789Uv2023Eu; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-i789-uv-2023-us.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-i789-uv-2023-us.spec.ts deleted file mode 100644 index 88e39cd2f..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-i789-uv-2023-us.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuI789Uv2023Us from './sku-i789-uv-2023-us'; - -describe(`with skuI789Uv2023Us preset and us-warehouse channel`, () => { - it(`should return a skuI789Uv2023Us preset`, () => { - const skuI789Uv2023UsPreset = - skuI789Uv2023Us().build(); - expect(skuI789Uv2023UsPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "i789-uv-2023-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "i789-uv-2023", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuI789Uv2023Us preset when built for graphql`, () => { - const skuI789Uv2023UsPresetGraphql = - skuI789Uv2023Us().buildGraphql(); - expect(skuI789Uv2023UsPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "i789-uv-2023-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "i789-uv-2023", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-i789-uv-2023-us.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-i789-uv-2023-us.ts deleted file mode 100644 index 9b03c3879..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-i789-uv-2023-us.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const usWarehouse = ChannelDraft.presets.sampleDataB2B - .usWarehouse() - .build(); - -const i789Uv03 = ProductVariantDraft.presets.sampleDataB2B - .i789Uv03() - .build(); - -const skuI789Uv2023Us = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${i789Uv03.sku}-${usWarehouse.key}`) - .sku(i789Uv03.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(usWarehouse.key)); - -export default skuI789Uv2023Us; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ii-789-uv-2015-default-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ii-789-uv-2015-default-warehouse.spec.ts new file mode 100644 index 000000000..0424d55b0 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ii-789-uv-2015-default-warehouse.spec.ts @@ -0,0 +1,40 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuIi789Uv2015DefaultWarehouse preset`, () => { + it(`should return a skuIi789Uv2015DefaultWarehouse preset when built for rest`, () => { + const skuIi789Uv2015DefaultWarehousePreset = InventoryEntryDraftRest.presets + .skuIi789Uv2015DefaultWarehouse() + .build(); + expect(skuIi789Uv2015DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuIi789Uv2015DefaultWarehouse preset when built for graphql`, () => { + const skuIi789Uv2015DefaultWarehousePreset = + InventoryEntryDraftGraphql.presets + .skuIi789Uv2015DefaultWarehouse() + .build(); + expect(skuIi789Uv2015DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuIi789Uv2015DefaultWarehouse preset when built for legacy rest`, () => { + const skuIi789Uv2015DefaultWarehousePreset = InventoryEntryDraft.presets + .skuIi789Uv2015DefaultWarehouse() + .buildRest(); + expect(skuIi789Uv2015DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuIi789Uv2015DefaultWarehouse preset when built for legacy graphql`, () => { + const skuIi789Uv2015DefaultWarehousePreset = InventoryEntryDraft.presets + .skuIi789Uv2015DefaultWarehouse() + .buildGraphql(); + expect(skuIi789Uv2015DefaultWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ii-789-uv-2015-default-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ii-789-uv-2015-default-warehouse.ts new file mode 100644 index 000000000..d8c4f5acb --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ii-789-uv-2015-default-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .defaultWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .ii789Uv01() + .build(); + +const skuIi789Uv2015DefaultWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('ii789-uv-2015-default-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuIi789Uv2015DefaultWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ii-789-uv-2015-eu-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ii-789-uv-2015-eu-warehouse.spec.ts new file mode 100644 index 000000000..9b0a7fa04 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ii-789-uv-2015-eu-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuIi789Uv2015EuWarehouse preset`, () => { + it(`should return a skuIi789Uv2015EuWarehouse preset when built for rest`, () => { + const skuIi789Uv2015EuWarehousePreset = InventoryEntryDraftRest.presets + .skuIi789Uv2015EuWarehouse() + .build(); + expect(skuIi789Uv2015EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuIi789Uv2015EuWarehouse preset when built for graphql`, () => { + const skuIi789Uv2015EuWarehousePreset = InventoryEntryDraftGraphql.presets + .skuIi789Uv2015EuWarehouse() + .build(); + expect(skuIi789Uv2015EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuIi789Uv2015EuWarehouse preset when built for legacy rest`, () => { + const skuIi789Uv2015EuWarehousePreset = InventoryEntryDraft.presets + .skuIi789Uv2015EuWarehouse() + .buildRest(); + expect(skuIi789Uv2015EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuIi789Uv2015EuWarehouse preset when built for legacy graphql`, () => { + const skuIi789Uv2015EuWarehousePreset = InventoryEntryDraft.presets + .skuIi789Uv2015EuWarehouse() + .buildGraphql(); + expect(skuIi789Uv2015EuWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ii-789-uv-2015-eu-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ii-789-uv-2015-eu-warehouse.ts new file mode 100644 index 000000000..d583f4165 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ii-789-uv-2015-eu-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .euWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .ii789Uv01() + .build(); + +const skuIi789Uv2015EuWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('ii789-uv-2015-eu-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuIi789Uv2015EuWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ii-789-uv-2015-us-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ii-789-uv-2015-us-warehouse.spec.ts new file mode 100644 index 000000000..97fa869f2 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ii-789-uv-2015-us-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuIi789Uv2015UsWarehouse preset`, () => { + it(`should return a skuIi789Uv2015UsWarehouse preset when built for rest`, () => { + const skuIi789Uv2015UsWarehousePreset = InventoryEntryDraftRest.presets + .skuIi789Uv2015UsWarehouse() + .build(); + expect(skuIi789Uv2015UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuIi789Uv2015UsWarehouse preset when built for graphql`, () => { + const skuIi789Uv2015UsWarehousePreset = InventoryEntryDraftGraphql.presets + .skuIi789Uv2015UsWarehouse() + .build(); + expect(skuIi789Uv2015UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuIi789Uv2015UsWarehouse preset when built for legacy rest`, () => { + const skuIi789Uv2015UsWarehousePreset = InventoryEntryDraft.presets + .skuIi789Uv2015UsWarehouse() + .buildRest(); + expect(skuIi789Uv2015UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuIi789Uv2015UsWarehouse preset when built for legacy graphql`, () => { + const skuIi789Uv2015UsWarehousePreset = InventoryEntryDraft.presets + .skuIi789Uv2015UsWarehouse() + .buildGraphql(); + expect(skuIi789Uv2015UsWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ii-789-uv-2015-us-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ii-789-uv-2015-us-warehouse.ts new file mode 100644 index 000000000..45b072e37 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ii-789-uv-2015-us-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .usWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .ii789Uv01() + .build(); + +const skuIi789Uv2015UsWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('ii789-uv-2015-us-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuIi789Uv2015UsWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ii-789-uv-2019-default-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ii-789-uv-2019-default-warehouse.spec.ts new file mode 100644 index 000000000..9d8c42858 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ii-789-uv-2019-default-warehouse.spec.ts @@ -0,0 +1,40 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuIi789Uv2019DefaultWarehouse preset`, () => { + it(`should return a skuIi789Uv2019DefaultWarehouse preset when built for rest`, () => { + const skuIi789Uv2019DefaultWarehousePreset = InventoryEntryDraftRest.presets + .skuIi789Uv2019DefaultWarehouse() + .build(); + expect(skuIi789Uv2019DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuIi789Uv2019DefaultWarehouse preset when built for graphql`, () => { + const skuIi789Uv2019DefaultWarehousePreset = + InventoryEntryDraftGraphql.presets + .skuIi789Uv2019DefaultWarehouse() + .build(); + expect(skuIi789Uv2019DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuIi789Uv2019DefaultWarehouse preset when built for legacy rest`, () => { + const skuIi789Uv2019DefaultWarehousePreset = InventoryEntryDraft.presets + .skuIi789Uv2019DefaultWarehouse() + .buildRest(); + expect(skuIi789Uv2019DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuIi789Uv2019DefaultWarehouse preset when built for legacy graphql`, () => { + const skuIi789Uv2019DefaultWarehousePreset = InventoryEntryDraft.presets + .skuIi789Uv2019DefaultWarehouse() + .buildGraphql(); + expect(skuIi789Uv2019DefaultWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ii-789-uv-2019-default-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ii-789-uv-2019-default-warehouse.ts new file mode 100644 index 000000000..ff49e3973 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ii-789-uv-2019-default-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .defaultWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .ii789Uv02() + .build(); + +const skuIi789Uv2019DefaultWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('ii789-uv-2019-default-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuIi789Uv2019DefaultWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ii-789-uv-2019-eu-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ii-789-uv-2019-eu-warehouse.spec.ts new file mode 100644 index 000000000..fb59b0311 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ii-789-uv-2019-eu-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuIi789Uv2019EuWarehouse preset`, () => { + it(`should return a skuIi789Uv2019EuWarehouse preset when built for rest`, () => { + const skuIi789Uv2019EuWarehousePreset = InventoryEntryDraftRest.presets + .skuIi789Uv2019EuWarehouse() + .build(); + expect(skuIi789Uv2019EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuIi789Uv2019EuWarehouse preset when built for graphql`, () => { + const skuIi789Uv2019EuWarehousePreset = InventoryEntryDraftGraphql.presets + .skuIi789Uv2019EuWarehouse() + .build(); + expect(skuIi789Uv2019EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuIi789Uv2019EuWarehouse preset when built for legacy rest`, () => { + const skuIi789Uv2019EuWarehousePreset = InventoryEntryDraft.presets + .skuIi789Uv2019EuWarehouse() + .buildRest(); + expect(skuIi789Uv2019EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuIi789Uv2019EuWarehouse preset when built for legacy graphql`, () => { + const skuIi789Uv2019EuWarehousePreset = InventoryEntryDraft.presets + .skuIi789Uv2019EuWarehouse() + .buildGraphql(); + expect(skuIi789Uv2019EuWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ii-789-uv-2019-eu-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ii-789-uv-2019-eu-warehouse.ts new file mode 100644 index 000000000..7d04fed7b --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ii-789-uv-2019-eu-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .euWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .ii789Uv02() + .build(); + +const skuIi789Uv2019EuWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('ii789-uv-2019-eu-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuIi789Uv2019EuWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ii-789-uv-2019-us-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ii-789-uv-2019-us-warehouse.spec.ts new file mode 100644 index 000000000..6ea39dd91 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ii-789-uv-2019-us-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuIi789Uv2019UsWarehouse preset`, () => { + it(`should return a skuIi789Uv2019UsWarehouse preset when built for rest`, () => { + const skuIi789Uv2019UsWarehousePreset = InventoryEntryDraftRest.presets + .skuIi789Uv2019UsWarehouse() + .build(); + expect(skuIi789Uv2019UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuIi789Uv2019UsWarehouse preset when built for graphql`, () => { + const skuIi789Uv2019UsWarehousePreset = InventoryEntryDraftGraphql.presets + .skuIi789Uv2019UsWarehouse() + .build(); + expect(skuIi789Uv2019UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuIi789Uv2019UsWarehouse preset when built for legacy rest`, () => { + const skuIi789Uv2019UsWarehousePreset = InventoryEntryDraft.presets + .skuIi789Uv2019UsWarehouse() + .buildRest(); + expect(skuIi789Uv2019UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuIi789Uv2019UsWarehouse preset when built for legacy graphql`, () => { + const skuIi789Uv2019UsWarehousePreset = InventoryEntryDraft.presets + .skuIi789Uv2019UsWarehouse() + .buildGraphql(); + expect(skuIi789Uv2019UsWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ii-789-uv-2019-us-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ii-789-uv-2019-us-warehouse.ts new file mode 100644 index 000000000..8ae9b27ff --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ii-789-uv-2019-us-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .usWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .ii789Uv02() + .build(); + +const skuIi789Uv2019UsWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('ii789-uv-2019-us-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuIi789Uv2019UsWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ii-789-uv-2023-default-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ii-789-uv-2023-default-warehouse.spec.ts new file mode 100644 index 000000000..88ed179ad --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ii-789-uv-2023-default-warehouse.spec.ts @@ -0,0 +1,40 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuIi789Uv2023DefaultWarehouse preset`, () => { + it(`should return a skuIi789Uv2023DefaultWarehouse preset when built for rest`, () => { + const skuIi789Uv2023DefaultWarehousePreset = InventoryEntryDraftRest.presets + .skuIi789Uv2023DefaultWarehouse() + .build(); + expect(skuIi789Uv2023DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuIi789Uv2023DefaultWarehouse preset when built for graphql`, () => { + const skuIi789Uv2023DefaultWarehousePreset = + InventoryEntryDraftGraphql.presets + .skuIi789Uv2023DefaultWarehouse() + .build(); + expect(skuIi789Uv2023DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuIi789Uv2023DefaultWarehouse preset when built for legacy rest`, () => { + const skuIi789Uv2023DefaultWarehousePreset = InventoryEntryDraft.presets + .skuIi789Uv2023DefaultWarehouse() + .buildRest(); + expect(skuIi789Uv2023DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuIi789Uv2023DefaultWarehouse preset when built for legacy graphql`, () => { + const skuIi789Uv2023DefaultWarehousePreset = InventoryEntryDraft.presets + .skuIi789Uv2023DefaultWarehouse() + .buildGraphql(); + expect(skuIi789Uv2023DefaultWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ii-789-uv-2023-default-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ii-789-uv-2023-default-warehouse.ts new file mode 100644 index 000000000..148f7f84c --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ii-789-uv-2023-default-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .defaultWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .ii789Uv03() + .build(); + +const skuIi789Uv2023DefaultWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('ii789-uv-2023-default-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuIi789Uv2023DefaultWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ii-789-uv-2023-eu-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ii-789-uv-2023-eu-warehouse.spec.ts new file mode 100644 index 000000000..0a95ee112 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ii-789-uv-2023-eu-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuIi789Uv2023EuWarehouse preset`, () => { + it(`should return a skuIi789Uv2023EuWarehouse preset when built for rest`, () => { + const skuIi789Uv2023EuWarehousePreset = InventoryEntryDraftRest.presets + .skuIi789Uv2023EuWarehouse() + .build(); + expect(skuIi789Uv2023EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuIi789Uv2023EuWarehouse preset when built for graphql`, () => { + const skuIi789Uv2023EuWarehousePreset = InventoryEntryDraftGraphql.presets + .skuIi789Uv2023EuWarehouse() + .build(); + expect(skuIi789Uv2023EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuIi789Uv2023EuWarehouse preset when built for legacy rest`, () => { + const skuIi789Uv2023EuWarehousePreset = InventoryEntryDraft.presets + .skuIi789Uv2023EuWarehouse() + .buildRest(); + expect(skuIi789Uv2023EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuIi789Uv2023EuWarehouse preset when built for legacy graphql`, () => { + const skuIi789Uv2023EuWarehousePreset = InventoryEntryDraft.presets + .skuIi789Uv2023EuWarehouse() + .buildGraphql(); + expect(skuIi789Uv2023EuWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ii-789-uv-2023-eu-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ii-789-uv-2023-eu-warehouse.ts new file mode 100644 index 000000000..fb9bd2337 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ii-789-uv-2023-eu-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .euWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .ii789Uv03() + .build(); + +const skuIi789Uv2023EuWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('ii789-uv-2023-eu-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuIi789Uv2023EuWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ii-789-uv-2023-us-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ii-789-uv-2023-us-warehouse.spec.ts new file mode 100644 index 000000000..54932d726 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ii-789-uv-2023-us-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuIi789Uv2023UsWarehouse preset`, () => { + it(`should return a skuIi789Uv2023UsWarehouse preset when built for rest`, () => { + const skuIi789Uv2023UsWarehousePreset = InventoryEntryDraftRest.presets + .skuIi789Uv2023UsWarehouse() + .build(); + expect(skuIi789Uv2023UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuIi789Uv2023UsWarehouse preset when built for graphql`, () => { + const skuIi789Uv2023UsWarehousePreset = InventoryEntryDraftGraphql.presets + .skuIi789Uv2023UsWarehouse() + .build(); + expect(skuIi789Uv2023UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuIi789Uv2023UsWarehouse preset when built for legacy rest`, () => { + const skuIi789Uv2023UsWarehousePreset = InventoryEntryDraft.presets + .skuIi789Uv2023UsWarehouse() + .buildRest(); + expect(skuIi789Uv2023UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuIi789Uv2023UsWarehouse preset when built for legacy graphql`, () => { + const skuIi789Uv2023UsWarehousePreset = InventoryEntryDraft.presets + .skuIi789Uv2023UsWarehouse() + .buildGraphql(); + expect(skuIi789Uv2023UsWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ii-789-uv-2023-us-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ii-789-uv-2023-us-warehouse.ts new file mode 100644 index 000000000..c260b14ab --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ii-789-uv-2023-us-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .usWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .ii789Uv03() + .build(); + +const skuIi789Uv2023UsWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('ii789-uv-2023-us-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuIi789Uv2023UsWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ii789-uv-2015-default.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ii789-uv-2015-default.spec.ts deleted file mode 100644 index e916708a7..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ii789-uv-2015-default.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuIi789Uv2015Default from './sku-ii789-uv-2015-default'; - -describe(`with skuIi789Uv2015Default preset and default-warehouse channel`, () => { - it(`should return a skuIi789Uv2015Default preset`, () => { - const skuIi789Uv2015DefaultPreset = - skuIi789Uv2015Default().build(); - expect(skuIi789Uv2015DefaultPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "ii789-uv-2015-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "ii789-uv-2015", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuIi789Uv2015Default preset when built for graphql`, () => { - const skuIi789Uv2015DefaultPresetGraphql = - skuIi789Uv2015Default().buildGraphql(); - expect(skuIi789Uv2015DefaultPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "ii789-uv-2015-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "ii789-uv-2015", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ii789-uv-2015-default.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ii789-uv-2015-default.ts deleted file mode 100644 index c49ec7dc7..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ii789-uv-2015-default.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const defaultWarehouse = ChannelDraft.presets.sampleDataB2B - .defaultWarehouse() - .build(); - -const ii789Uv01 = ProductVariantDraft.presets.sampleDataB2B - .ii789Uv01() - .build(); - -const skuIi789Uv2015Default = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${ii789Uv01.sku}-${defaultWarehouse.key}`) - .sku(ii789Uv01.sku!) - .quantityOnStock(1000) - .supplyChannel( - KeyReferenceDraft.presets.channel().key(defaultWarehouse.key) - ); - -export default skuIi789Uv2015Default; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ii789-uv-2015-eu.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ii789-uv-2015-eu.spec.ts deleted file mode 100644 index 53159b7de..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ii789-uv-2015-eu.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuIi789Uv2015Eu from './sku-ii789-uv-2015-eu'; - -describe(`with skuIi789Uv2015Eu preset and eu-warehouse channel`, () => { - it(`should return a skuIi789Uv2015Eu preset`, () => { - const skuIi789Uv2015EuPreset = - skuIi789Uv2015Eu().build(); - expect(skuIi789Uv2015EuPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "ii789-uv-2015-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "ii789-uv-2015", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuIi789Uv2015Eu preset when built for graphql`, () => { - const skuIi789Uv2015EuPresetGraphql = - skuIi789Uv2015Eu().buildGraphql(); - expect(skuIi789Uv2015EuPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "ii789-uv-2015-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "ii789-uv-2015", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ii789-uv-2015-eu.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ii789-uv-2015-eu.ts deleted file mode 100644 index 5c25321b5..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ii789-uv-2015-eu.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const euWarehouse = ChannelDraft.presets.sampleDataB2B - .euWarehouse() - .build(); - -const ii789Uv01 = ProductVariantDraft.presets.sampleDataB2B - .ii789Uv01() - .build(); - -const skuIi789Uv2015Eu = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${ii789Uv01.sku}-${euWarehouse.key}`) - .sku(ii789Uv01.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(euWarehouse.key)); - -export default skuIi789Uv2015Eu; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ii789-uv-2015-us.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ii789-uv-2015-us.spec.ts deleted file mode 100644 index 2a952c199..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ii789-uv-2015-us.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuIi789Uv2015Us from './sku-ii789-uv-2015-us'; - -describe(`with skuIi789Uv2015Us preset and us-warehouse channel`, () => { - it(`should return a skuIi789Uv2015Us preset`, () => { - const skuIi789Uv2015UsPreset = - skuIi789Uv2015Us().build(); - expect(skuIi789Uv2015UsPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "ii789-uv-2015-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "ii789-uv-2015", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuIi789Uv2015Us preset when built for graphql`, () => { - const skuIi789Uv2015UsPresetGraphql = - skuIi789Uv2015Us().buildGraphql(); - expect(skuIi789Uv2015UsPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "ii789-uv-2015-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "ii789-uv-2015", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ii789-uv-2015-us.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ii789-uv-2015-us.ts deleted file mode 100644 index 8ce51c068..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ii789-uv-2015-us.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const usWarehouse = ChannelDraft.presets.sampleDataB2B - .usWarehouse() - .build(); - -const ii789Uv01 = ProductVariantDraft.presets.sampleDataB2B - .ii789Uv01() - .build(); - -const skuIi789Uv2015Us = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${ii789Uv01.sku}-${usWarehouse.key}`) - .sku(ii789Uv01.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(usWarehouse.key)); - -export default skuIi789Uv2015Us; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ii789-uv-2019-default.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ii789-uv-2019-default.spec.ts deleted file mode 100644 index ebff83728..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ii789-uv-2019-default.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuIi789Uv2019Default from './sku-ii789-uv-2019-default'; - -describe(`with skuIi789Uv2019Default preset and default-warehouse channel`, () => { - it(`should return a skuIi789Uv2019Default preset`, () => { - const skuIi789Uv2019DefaultPreset = - skuIi789Uv2019Default().build(); - expect(skuIi789Uv2019DefaultPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "ii789-uv-2019-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "ii789-uv-2019", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuIi789Uv2019Default preset when built for graphql`, () => { - const skuIi789Uv2019DefaultPresetGraphql = - skuIi789Uv2019Default().buildGraphql(); - expect(skuIi789Uv2019DefaultPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "ii789-uv-2019-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "ii789-uv-2019", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ii789-uv-2019-default.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ii789-uv-2019-default.ts deleted file mode 100644 index 905487a25..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ii789-uv-2019-default.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const defaultWarehouse = ChannelDraft.presets.sampleDataB2B - .defaultWarehouse() - .build(); - -const ii789Uv02 = ProductVariantDraft.presets.sampleDataB2B - .ii789Uv02() - .build(); - -const skuIi789Uv2019Default = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${ii789Uv02.sku}-${defaultWarehouse.key}`) - .sku(ii789Uv02.sku!) - .quantityOnStock(1000) - .supplyChannel( - KeyReferenceDraft.presets.channel().key(defaultWarehouse.key) - ); - -export default skuIi789Uv2019Default; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ii789-uv-2019-eu.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ii789-uv-2019-eu.spec.ts deleted file mode 100644 index 92e1022aa..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ii789-uv-2019-eu.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuIi789Uv2019Eu from './sku-ii789-uv-2019-eu'; - -describe(`with skuIi789Uv2019Eu preset and eu-warehouse channel`, () => { - it(`should return a skuIi789Uv2019Eu preset`, () => { - const skuIi789Uv2019EuPreset = - skuIi789Uv2019Eu().build(); - expect(skuIi789Uv2019EuPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "ii789-uv-2019-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "ii789-uv-2019", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuIi789Uv2019Eu preset when built for graphql`, () => { - const skuIi789Uv2019EuPresetGraphql = - skuIi789Uv2019Eu().buildGraphql(); - expect(skuIi789Uv2019EuPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "ii789-uv-2019-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "ii789-uv-2019", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ii789-uv-2019-eu.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ii789-uv-2019-eu.ts deleted file mode 100644 index c299af5a8..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ii789-uv-2019-eu.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const euWarehouse = ChannelDraft.presets.sampleDataB2B - .euWarehouse() - .build(); - -const ii789Uv02 = ProductVariantDraft.presets.sampleDataB2B - .ii789Uv02() - .build(); - -const skuIi789Uv2019Eu = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${ii789Uv02.sku}-${euWarehouse.key}`) - .sku(ii789Uv02.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(euWarehouse.key)); - -export default skuIi789Uv2019Eu; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ii789-uv-2019-us.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ii789-uv-2019-us.spec.ts deleted file mode 100644 index a4682a8e1..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ii789-uv-2019-us.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuIi789Uv2019Us from './sku-ii789-uv-2019-us'; - -describe(`with skuIi789Uv2019Us preset and us-warehouse channel`, () => { - it(`should return a skuIi789Uv2019Us preset`, () => { - const skuIi789Uv2019UsPreset = - skuIi789Uv2019Us().build(); - expect(skuIi789Uv2019UsPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "ii789-uv-2019-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "ii789-uv-2019", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuIi789Uv2019Us preset when built for graphql`, () => { - const skuIi789Uv2019UsPresetGraphql = - skuIi789Uv2019Us().buildGraphql(); - expect(skuIi789Uv2019UsPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "ii789-uv-2019-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "ii789-uv-2019", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ii789-uv-2019-us.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ii789-uv-2019-us.ts deleted file mode 100644 index 1c0a4423e..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ii789-uv-2019-us.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const usWarehouse = ChannelDraft.presets.sampleDataB2B - .usWarehouse() - .build(); - -const ii789Uv02 = ProductVariantDraft.presets.sampleDataB2B - .ii789Uv02() - .build(); - -const skuIi789Uv2019Us = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${ii789Uv02.sku}-${usWarehouse.key}`) - .sku(ii789Uv02.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(usWarehouse.key)); - -export default skuIi789Uv2019Us; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ii789-uv-2023-default.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ii789-uv-2023-default.spec.ts deleted file mode 100644 index cea962219..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ii789-uv-2023-default.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuIi789Uv2023Default from './sku-ii789-uv-2023-default'; - -describe(`with skuIi789Uv2023Default preset and default-warehouse channel`, () => { - it(`should return a skuIi789Uv2023Default preset`, () => { - const skuIi789Uv2023DefaultPreset = - skuIi789Uv2023Default().build(); - expect(skuIi789Uv2023DefaultPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "ii789-uv-2023-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "ii789-uv-2023", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuIi789Uv2023Default preset when built for graphql`, () => { - const skuIi789Uv2023DefaultPresetGraphql = - skuIi789Uv2023Default().buildGraphql(); - expect(skuIi789Uv2023DefaultPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "ii789-uv-2023-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "ii789-uv-2023", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ii789-uv-2023-default.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ii789-uv-2023-default.ts deleted file mode 100644 index 5c926db32..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ii789-uv-2023-default.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const defaultWarehouse = ChannelDraft.presets.sampleDataB2B - .defaultWarehouse() - .build(); - -const ii789Uv03 = ProductVariantDraft.presets.sampleDataB2B - .ii789Uv03() - .build(); - -const skuIi789Uv2023Default = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${ii789Uv03.sku}-${defaultWarehouse.key}`) - .sku(ii789Uv03.sku!) - .quantityOnStock(1000) - .supplyChannel( - KeyReferenceDraft.presets.channel().key(defaultWarehouse.key) - ); - -export default skuIi789Uv2023Default; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ii789-uv-2023-eu.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ii789-uv-2023-eu.spec.ts deleted file mode 100644 index 25ce9fd75..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ii789-uv-2023-eu.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuIi789Uv2023Eu from './sku-ii789-uv-2023-eu'; - -describe(`with skuIi789Uv2023Eu preset and eu-warehouse channel`, () => { - it(`should return a skuIi789Uv2023Eu preset`, () => { - const skuIi789Uv2023EuPreset = - skuIi789Uv2023Eu().build(); - expect(skuIi789Uv2023EuPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "ii789-uv-2023-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "ii789-uv-2023", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuIi789Uv2023Eu preset when built for graphql`, () => { - const skuIi789Uv2023EuPresetGraphql = - skuIi789Uv2023Eu().buildGraphql(); - expect(skuIi789Uv2023EuPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "ii789-uv-2023-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "ii789-uv-2023", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ii789-uv-2023-eu.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ii789-uv-2023-eu.ts deleted file mode 100644 index 1f52bd571..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ii789-uv-2023-eu.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const euWarehouse = ChannelDraft.presets.sampleDataB2B - .euWarehouse() - .build(); - -const ii789Uv03 = ProductVariantDraft.presets.sampleDataB2B - .ii789Uv03() - .build(); - -const skuIi789Uv2023Eu = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${ii789Uv03.sku}-${euWarehouse.key}`) - .sku(ii789Uv03.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(euWarehouse.key)); - -export default skuIi789Uv2023Eu; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ii789-uv-2023-us.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ii789-uv-2023-us.spec.ts deleted file mode 100644 index a38512aa8..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ii789-uv-2023-us.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuIi789Uv2023Us from './sku-ii789-uv-2023-us'; - -describe(`with skuIi789Uv2023Us preset and us-warehouse channel`, () => { - it(`should return a skuIi789Uv2023Us preset`, () => { - const skuIi789Uv2023UsPreset = - skuIi789Uv2023Us().build(); - expect(skuIi789Uv2023UsPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "ii789-uv-2023-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "ii789-uv-2023", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuIi789Uv2023Us preset when built for graphql`, () => { - const skuIi789Uv2023UsPresetGraphql = - skuIi789Uv2023Us().buildGraphql(); - expect(skuIi789Uv2023UsPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "ii789-uv-2023-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "ii789-uv-2023", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ii789-uv-2023-us.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ii789-uv-2023-us.ts deleted file mode 100644 index 8fede18ba..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ii789-uv-2023-us.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const usWarehouse = ChannelDraft.presets.sampleDataB2B - .usWarehouse() - .build(); - -const ii789Uv03 = ProductVariantDraft.presets.sampleDataB2B - .ii789Uv03() - .build(); - -const skuIi789Uv2023Us = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${ii789Uv03.sku}-${usWarehouse.key}`) - .sku(ii789Uv03.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(usWarehouse.key)); - -export default skuIi789Uv2023Us; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-iii-567-yz-blue-default-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-iii-567-yz-blue-default-warehouse.spec.ts new file mode 100644 index 000000000..1b47a4ba1 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-iii-567-yz-blue-default-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuIii567YzBlueDefaultWarehouse preset`, () => { + it(`should return a skuIii567YzBlueDefaultWarehouse preset when built for rest`, () => { + const skuIii567YzBlueDefaultWarehousePreset = + InventoryEntryDraftRest.presets.skuIii567YzBlueDefaultWarehouse().build(); + expect(skuIii567YzBlueDefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuIii567YzBlueDefaultWarehouse preset when built for graphql`, () => { + const skuIii567YzBlueDefaultWarehousePreset = + InventoryEntryDraftGraphql.presets + .skuIii567YzBlueDefaultWarehouse() + .build(); + expect(skuIii567YzBlueDefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuIii567YzBlueDefaultWarehouse preset when built for legacy rest`, () => { + const skuIii567YzBlueDefaultWarehousePreset = InventoryEntryDraft.presets + .skuIii567YzBlueDefaultWarehouse() + .buildRest(); + expect(skuIii567YzBlueDefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuIii567YzBlueDefaultWarehouse preset when built for legacy graphql`, () => { + const skuIii567YzBlueDefaultWarehousePreset = InventoryEntryDraft.presets + .skuIii567YzBlueDefaultWarehouse() + .buildGraphql(); + expect(skuIii567YzBlueDefaultWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-iii-567-yz-blue-default-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-iii-567-yz-blue-default-warehouse.ts new file mode 100644 index 000000000..4a4824393 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-iii-567-yz-blue-default-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .defaultWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .iii567Yz02() + .build(); + +const skuIii567YzBlueDefaultWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('iii567-yz-blue-default-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuIii567YzBlueDefaultWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-iii-567-yz-blue-eu-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-iii-567-yz-blue-eu-warehouse.spec.ts new file mode 100644 index 000000000..e7bd0334d --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-iii-567-yz-blue-eu-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuIii567YzBlueEuWarehouse preset`, () => { + it(`should return a skuIii567YzBlueEuWarehouse preset when built for rest`, () => { + const skuIii567YzBlueEuWarehousePreset = InventoryEntryDraftRest.presets + .skuIii567YzBlueEuWarehouse() + .build(); + expect(skuIii567YzBlueEuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuIii567YzBlueEuWarehouse preset when built for graphql`, () => { + const skuIii567YzBlueEuWarehousePreset = InventoryEntryDraftGraphql.presets + .skuIii567YzBlueEuWarehouse() + .build(); + expect(skuIii567YzBlueEuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuIii567YzBlueEuWarehouse preset when built for legacy rest`, () => { + const skuIii567YzBlueEuWarehousePreset = InventoryEntryDraft.presets + .skuIii567YzBlueEuWarehouse() + .buildRest(); + expect(skuIii567YzBlueEuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuIii567YzBlueEuWarehouse preset when built for legacy graphql`, () => { + const skuIii567YzBlueEuWarehousePreset = InventoryEntryDraft.presets + .skuIii567YzBlueEuWarehouse() + .buildGraphql(); + expect(skuIii567YzBlueEuWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-iii-567-yz-blue-eu-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-iii-567-yz-blue-eu-warehouse.ts new file mode 100644 index 000000000..e4e5a3454 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-iii-567-yz-blue-eu-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .euWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .iii567Yz02() + .build(); + +const skuIii567YzBlueEuWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('iii567-yz-blue-eu-warehouse') + .sku(variant.sku!) + .quantityOnStock(999) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuIii567YzBlueEuWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-iii-567-yz-blue-us-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-iii-567-yz-blue-us-warehouse.spec.ts new file mode 100644 index 000000000..042d84760 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-iii-567-yz-blue-us-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuIii567YzBlueUsWarehouse preset`, () => { + it(`should return a skuIii567YzBlueUsWarehouse preset when built for rest`, () => { + const skuIii567YzBlueUsWarehousePreset = InventoryEntryDraftRest.presets + .skuIii567YzBlueUsWarehouse() + .build(); + expect(skuIii567YzBlueUsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuIii567YzBlueUsWarehouse preset when built for graphql`, () => { + const skuIii567YzBlueUsWarehousePreset = InventoryEntryDraftGraphql.presets + .skuIii567YzBlueUsWarehouse() + .build(); + expect(skuIii567YzBlueUsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuIii567YzBlueUsWarehouse preset when built for legacy rest`, () => { + const skuIii567YzBlueUsWarehousePreset = InventoryEntryDraft.presets + .skuIii567YzBlueUsWarehouse() + .buildRest(); + expect(skuIii567YzBlueUsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuIii567YzBlueUsWarehouse preset when built for legacy graphql`, () => { + const skuIii567YzBlueUsWarehousePreset = InventoryEntryDraft.presets + .skuIii567YzBlueUsWarehouse() + .buildGraphql(); + expect(skuIii567YzBlueUsWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-iii-567-yz-blue-us-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-iii-567-yz-blue-us-warehouse.ts new file mode 100644 index 000000000..4744ad3b4 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-iii-567-yz-blue-us-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .usWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .iii567Yz02() + .build(); + +const skuIii567YzBlueUsWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('iii567-yz-blue-us-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuIii567YzBlueUsWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-iii-567-yz-green-default-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-iii-567-yz-green-default-warehouse.spec.ts new file mode 100644 index 000000000..8cf69c331 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-iii-567-yz-green-default-warehouse.spec.ts @@ -0,0 +1,41 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuIii567YzGreenDefaultWarehouse preset`, () => { + it(`should return a skuIii567YzGreenDefaultWarehouse preset when built for rest`, () => { + const skuIii567YzGreenDefaultWarehousePreset = + InventoryEntryDraftRest.presets + .skuIii567YzGreenDefaultWarehouse() + .build(); + expect(skuIii567YzGreenDefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuIii567YzGreenDefaultWarehouse preset when built for graphql`, () => { + const skuIii567YzGreenDefaultWarehousePreset = + InventoryEntryDraftGraphql.presets + .skuIii567YzGreenDefaultWarehouse() + .build(); + expect(skuIii567YzGreenDefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuIii567YzGreenDefaultWarehouse preset when built for legacy rest`, () => { + const skuIii567YzGreenDefaultWarehousePreset = InventoryEntryDraft.presets + .skuIii567YzGreenDefaultWarehouse() + .buildRest(); + expect(skuIii567YzGreenDefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuIii567YzGreenDefaultWarehouse preset when built for legacy graphql`, () => { + const skuIii567YzGreenDefaultWarehousePreset = InventoryEntryDraft.presets + .skuIii567YzGreenDefaultWarehouse() + .buildGraphql(); + expect(skuIii567YzGreenDefaultWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-iii-567-yz-green-default-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-iii-567-yz-green-default-warehouse.ts new file mode 100644 index 000000000..2501ad022 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-iii-567-yz-green-default-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .defaultWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .iii567Yz03() + .build(); + +const skuIii567YzGreenDefaultWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('iii567-yz-green-default-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuIii567YzGreenDefaultWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-iii-567-yz-green-eu-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-iii-567-yz-green-eu-warehouse.spec.ts new file mode 100644 index 000000000..9ed09310d --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-iii-567-yz-green-eu-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuIii567YzGreenEuWarehouse preset`, () => { + it(`should return a skuIii567YzGreenEuWarehouse preset when built for rest`, () => { + const skuIii567YzGreenEuWarehousePreset = InventoryEntryDraftRest.presets + .skuIii567YzGreenEuWarehouse() + .build(); + expect(skuIii567YzGreenEuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuIii567YzGreenEuWarehouse preset when built for graphql`, () => { + const skuIii567YzGreenEuWarehousePreset = InventoryEntryDraftGraphql.presets + .skuIii567YzGreenEuWarehouse() + .build(); + expect(skuIii567YzGreenEuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuIii567YzGreenEuWarehouse preset when built for legacy rest`, () => { + const skuIii567YzGreenEuWarehousePreset = InventoryEntryDraft.presets + .skuIii567YzGreenEuWarehouse() + .buildRest(); + expect(skuIii567YzGreenEuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuIii567YzGreenEuWarehouse preset when built for legacy graphql`, () => { + const skuIii567YzGreenEuWarehousePreset = InventoryEntryDraft.presets + .skuIii567YzGreenEuWarehouse() + .buildGraphql(); + expect(skuIii567YzGreenEuWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-iii-567-yz-green-eu-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-iii-567-yz-green-eu-warehouse.ts new file mode 100644 index 000000000..870bdd707 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-iii-567-yz-green-eu-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .euWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .iii567Yz03() + .build(); + +const skuIii567YzGreenEuWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('iii567-yz-green-eu-warehouse') + .sku(variant.sku!) + .quantityOnStock(999) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuIii567YzGreenEuWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-iii-567-yz-green-us-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-iii-567-yz-green-us-warehouse.spec.ts new file mode 100644 index 000000000..b66830b71 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-iii-567-yz-green-us-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuIii567YzGreenUsWarehouse preset`, () => { + it(`should return a skuIii567YzGreenUsWarehouse preset when built for rest`, () => { + const skuIii567YzGreenUsWarehousePreset = InventoryEntryDraftRest.presets + .skuIii567YzGreenUsWarehouse() + .build(); + expect(skuIii567YzGreenUsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuIii567YzGreenUsWarehouse preset when built for graphql`, () => { + const skuIii567YzGreenUsWarehousePreset = InventoryEntryDraftGraphql.presets + .skuIii567YzGreenUsWarehouse() + .build(); + expect(skuIii567YzGreenUsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuIii567YzGreenUsWarehouse preset when built for legacy rest`, () => { + const skuIii567YzGreenUsWarehousePreset = InventoryEntryDraft.presets + .skuIii567YzGreenUsWarehouse() + .buildRest(); + expect(skuIii567YzGreenUsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuIii567YzGreenUsWarehouse preset when built for legacy graphql`, () => { + const skuIii567YzGreenUsWarehousePreset = InventoryEntryDraft.presets + .skuIii567YzGreenUsWarehouse() + .buildGraphql(); + expect(skuIii567YzGreenUsWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-iii-567-yz-green-us-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-iii-567-yz-green-us-warehouse.ts new file mode 100644 index 000000000..7f43bd397 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-iii-567-yz-green-us-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .usWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .iii567Yz03() + .build(); + +const skuIii567YzGreenUsWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('iii567-yz-green-us-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuIii567YzGreenUsWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-iii-567-yz-red-default-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-iii-567-yz-red-default-warehouse.spec.ts new file mode 100644 index 000000000..19ce77131 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-iii-567-yz-red-default-warehouse.spec.ts @@ -0,0 +1,40 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuIii567YzRedDefaultWarehouse preset`, () => { + it(`should return a skuIii567YzRedDefaultWarehouse preset when built for rest`, () => { + const skuIii567YzRedDefaultWarehousePreset = InventoryEntryDraftRest.presets + .skuIii567YzRedDefaultWarehouse() + .build(); + expect(skuIii567YzRedDefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuIii567YzRedDefaultWarehouse preset when built for graphql`, () => { + const skuIii567YzRedDefaultWarehousePreset = + InventoryEntryDraftGraphql.presets + .skuIii567YzRedDefaultWarehouse() + .build(); + expect(skuIii567YzRedDefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuIii567YzRedDefaultWarehouse preset when built for legacy rest`, () => { + const skuIii567YzRedDefaultWarehousePreset = InventoryEntryDraft.presets + .skuIii567YzRedDefaultWarehouse() + .buildRest(); + expect(skuIii567YzRedDefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuIii567YzRedDefaultWarehouse preset when built for legacy graphql`, () => { + const skuIii567YzRedDefaultWarehousePreset = InventoryEntryDraft.presets + .skuIii567YzRedDefaultWarehouse() + .buildGraphql(); + expect(skuIii567YzRedDefaultWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-iii-567-yz-red-default-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-iii-567-yz-red-default-warehouse.ts new file mode 100644 index 000000000..f1aee00d5 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-iii-567-yz-red-default-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .defaultWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .iii567Yz01() + .build(); + +const skuIii567YzRedDefaultWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('iii567-yz-red-default-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuIii567YzRedDefaultWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-iii-567-yz-red-eu-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-iii-567-yz-red-eu-warehouse.spec.ts new file mode 100644 index 000000000..d72907804 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-iii-567-yz-red-eu-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuIii567YzRedEuWarehouse preset`, () => { + it(`should return a skuIii567YzRedEuWarehouse preset when built for rest`, () => { + const skuIii567YzRedEuWarehousePreset = InventoryEntryDraftRest.presets + .skuIii567YzRedEuWarehouse() + .build(); + expect(skuIii567YzRedEuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuIii567YzRedEuWarehouse preset when built for graphql`, () => { + const skuIii567YzRedEuWarehousePreset = InventoryEntryDraftGraphql.presets + .skuIii567YzRedEuWarehouse() + .build(); + expect(skuIii567YzRedEuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuIii567YzRedEuWarehouse preset when built for legacy rest`, () => { + const skuIii567YzRedEuWarehousePreset = InventoryEntryDraft.presets + .skuIii567YzRedEuWarehouse() + .buildRest(); + expect(skuIii567YzRedEuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuIii567YzRedEuWarehouse preset when built for legacy graphql`, () => { + const skuIii567YzRedEuWarehousePreset = InventoryEntryDraft.presets + .skuIii567YzRedEuWarehouse() + .buildGraphql(); + expect(skuIii567YzRedEuWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-iii-567-yz-red-eu-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-iii-567-yz-red-eu-warehouse.ts new file mode 100644 index 000000000..04ddf5d61 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-iii-567-yz-red-eu-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .euWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .iii567Yz01() + .build(); + +const skuIii567YzRedEuWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('iii567-yz-red-eu-warehouse') + .sku(variant.sku!) + .quantityOnStock(999) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuIii567YzRedEuWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-iii-567-yz-red-us-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-iii-567-yz-red-us-warehouse.spec.ts new file mode 100644 index 000000000..8af986931 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-iii-567-yz-red-us-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuIii567YzRedUsWarehouse preset`, () => { + it(`should return a skuIii567YzRedUsWarehouse preset when built for rest`, () => { + const skuIii567YzRedUsWarehousePreset = InventoryEntryDraftRest.presets + .skuIii567YzRedUsWarehouse() + .build(); + expect(skuIii567YzRedUsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuIii567YzRedUsWarehouse preset when built for graphql`, () => { + const skuIii567YzRedUsWarehousePreset = InventoryEntryDraftGraphql.presets + .skuIii567YzRedUsWarehouse() + .build(); + expect(skuIii567YzRedUsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuIii567YzRedUsWarehouse preset when built for legacy rest`, () => { + const skuIii567YzRedUsWarehousePreset = InventoryEntryDraft.presets + .skuIii567YzRedUsWarehouse() + .buildRest(); + expect(skuIii567YzRedUsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuIii567YzRedUsWarehouse preset when built for legacy graphql`, () => { + const skuIii567YzRedUsWarehousePreset = InventoryEntryDraft.presets + .skuIii567YzRedUsWarehouse() + .buildGraphql(); + expect(skuIii567YzRedUsWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-iii-567-yz-red-us-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-iii-567-yz-red-us-warehouse.ts new file mode 100644 index 000000000..aa31f8fa6 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-iii-567-yz-red-us-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .usWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .iii567Yz01() + .build(); + +const skuIii567YzRedUsWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('iii567-yz-red-us-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuIii567YzRedUsWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-iii567-yz-blue-default.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-iii567-yz-blue-default.spec.ts deleted file mode 100644 index 840319831..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-iii567-yz-blue-default.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuIii567YzBlueDefault from './sku-iii567-yz-blue-default'; - -describe(`with skuIii567YzBlueDefault preset and default-warehouse channel`, () => { - it(`should return a skuIii567YzBlueDefault preset`, () => { - const skuIii567YzBlueDefaultPreset = - skuIii567YzBlueDefault().build(); - expect(skuIii567YzBlueDefaultPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "iii567-yz-blue-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "iii567-yz-blue", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuIii567YzBlueDefault preset when built for graphql`, () => { - const skuIii567YzBlueDefaultPresetGraphql = - skuIii567YzBlueDefault().buildGraphql(); - expect(skuIii567YzBlueDefaultPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "iii567-yz-blue-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "iii567-yz-blue", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-iii567-yz-blue-default.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-iii567-yz-blue-default.ts deleted file mode 100644 index b26f8a77b..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-iii567-yz-blue-default.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const defaultWarehouse = ChannelDraft.presets.sampleDataB2B - .defaultWarehouse() - .build(); - -const iii567Yz02 = ProductVariantDraft.presets.sampleDataB2B - .iii567Yz02() - .build(); - -const skuIii567YzBlueDefault = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${iii567Yz02.sku}-${defaultWarehouse.key}`) - .sku(iii567Yz02.sku!) - .quantityOnStock(1000) - .supplyChannel( - KeyReferenceDraft.presets.channel().key(defaultWarehouse.key) - ); - -export default skuIii567YzBlueDefault; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-iii567-yz-blue-eu.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-iii567-yz-blue-eu.spec.ts deleted file mode 100644 index 0a01128c0..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-iii567-yz-blue-eu.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuIii567YzBlueEu from './sku-iii567-yz-blue-eu'; - -describe(`with skuIii567YzBlueEu preset and eu-warehouse channel`, () => { - it(`should return a skuIii567YzBlueEu preset`, () => { - const skuIii567YzBlueEuPreset = - skuIii567YzBlueEu().build(); - expect(skuIii567YzBlueEuPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "iii567-yz-blue-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "iii567-yz-blue", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuIii567YzBlueEu preset when built for graphql`, () => { - const skuIii567YzBlueEuPresetGraphql = - skuIii567YzBlueEu().buildGraphql(); - expect(skuIii567YzBlueEuPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "iii567-yz-blue-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "iii567-yz-blue", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-iii567-yz-blue-eu.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-iii567-yz-blue-eu.ts deleted file mode 100644 index 4340101bd..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-iii567-yz-blue-eu.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const euWarehouse = ChannelDraft.presets.sampleDataB2B - .euWarehouse() - .build(); - -const iii567Yz02 = ProductVariantDraft.presets.sampleDataB2B - .iii567Yz02() - .build(); - -const skuIii567YzBlueEu = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${iii567Yz02.sku}-${euWarehouse.key}`) - .sku(iii567Yz02.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(euWarehouse.key)); - -export default skuIii567YzBlueEu; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-iii567-yz-blue-us.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-iii567-yz-blue-us.spec.ts deleted file mode 100644 index 4d73d3a0c..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-iii567-yz-blue-us.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuIii567YzBlueUs from './sku-iii567-yz-blue-us'; - -describe(`with skuIii567YzBlueUs preset and us-warehouse channel`, () => { - it(`should return a skuIii567YzBlueUs preset`, () => { - const skuIii567YzBlueUsPreset = - skuIii567YzBlueUs().build(); - expect(skuIii567YzBlueUsPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "iii567-yz-blue-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "iii567-yz-blue", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuIii567YzBlueUs preset when built for graphql`, () => { - const skuIii567YzBlueUsPresetGraphql = - skuIii567YzBlueUs().buildGraphql(); - expect(skuIii567YzBlueUsPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "iii567-yz-blue-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "iii567-yz-blue", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-iii567-yz-blue-us.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-iii567-yz-blue-us.ts deleted file mode 100644 index 5537972f0..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-iii567-yz-blue-us.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const usWarehouse = ChannelDraft.presets.sampleDataB2B - .usWarehouse() - .build(); - -const iii567Yz02 = ProductVariantDraft.presets.sampleDataB2B - .iii567Yz02() - .build(); - -const skuIii567YzBlueUs = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${iii567Yz02.sku}-${usWarehouse.key}`) - .sku(iii567Yz02.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(usWarehouse.key)); - -export default skuIii567YzBlueUs; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-iii567-yz-green-default.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-iii567-yz-green-default.spec.ts deleted file mode 100644 index 73b3e3a19..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-iii567-yz-green-default.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuIii567YzGreenDefault from './sku-iii567-yz-green-default'; - -describe(`with skuIii567YzGreenDefault preset and default-warehouse channel`, () => { - it(`should return a skuIii567YzGreenDefault preset`, () => { - const skuIii567YzGreenDefaultPreset = - skuIii567YzGreenDefault().build(); - expect(skuIii567YzGreenDefaultPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "iii567-yz-green-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "iii567-yz-green", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuIii567YzGreenDefault preset when built for graphql`, () => { - const skuIii567YzGreenDefaultPresetGraphql = - skuIii567YzGreenDefault().buildGraphql(); - expect(skuIii567YzGreenDefaultPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "iii567-yz-green-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "iii567-yz-green", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-iii567-yz-green-default.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-iii567-yz-green-default.ts deleted file mode 100644 index 317d004e5..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-iii567-yz-green-default.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const defaultWarehouse = ChannelDraft.presets.sampleDataB2B - .defaultWarehouse() - .build(); - -const iii567Yz03 = ProductVariantDraft.presets.sampleDataB2B - .iii567Yz03() - .build(); - -const skuIii567YzGreenDefault = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${iii567Yz03.sku}-${defaultWarehouse.key}`) - .sku(iii567Yz03.sku!) - .quantityOnStock(1000) - .supplyChannel( - KeyReferenceDraft.presets.channel().key(defaultWarehouse.key) - ); - -export default skuIii567YzGreenDefault; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-iii567-yz-green-eu.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-iii567-yz-green-eu.spec.ts deleted file mode 100644 index 104a3f404..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-iii567-yz-green-eu.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuIii567YzGreenEu from './sku-iii567-yz-green-eu'; - -describe(`with skuIii567YzGreenEu preset and eu-warehouse channel`, () => { - it(`should return a skuIii567YzGreenEu preset`, () => { - const skuIii567YzGreenEuPreset = - skuIii567YzGreenEu().build(); - expect(skuIii567YzGreenEuPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "iii567-yz-green-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "iii567-yz-green", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuIii567YzGreenEu preset when built for graphql`, () => { - const skuIii567YzGreenEuPresetGraphql = - skuIii567YzGreenEu().buildGraphql(); - expect(skuIii567YzGreenEuPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "iii567-yz-green-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "iii567-yz-green", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-iii567-yz-green-eu.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-iii567-yz-green-eu.ts deleted file mode 100644 index 8e5d6c114..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-iii567-yz-green-eu.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const euWarehouse = ChannelDraft.presets.sampleDataB2B - .euWarehouse() - .build(); - -const iii567Yz03 = ProductVariantDraft.presets.sampleDataB2B - .iii567Yz03() - .build(); - -const skuIii567YzGreenEu = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${iii567Yz03.sku}-${euWarehouse.key}`) - .sku(iii567Yz03.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(euWarehouse.key)); - -export default skuIii567YzGreenEu; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-iii567-yz-green-us.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-iii567-yz-green-us.spec.ts deleted file mode 100644 index 8c46174be..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-iii567-yz-green-us.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuIii567YzGreenUs from './sku-iii567-yz-green-us'; - -describe(`with skuIii567YzGreenUs preset and us-warehouse channel`, () => { - it(`should return a skuIii567YzGreenUs preset`, () => { - const skuIii567YzGreenUsPreset = - skuIii567YzGreenUs().build(); - expect(skuIii567YzGreenUsPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "iii567-yz-green-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "iii567-yz-green", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuIii567YzGreenUs preset when built for graphql`, () => { - const skuIii567YzGreenUsPresetGraphql = - skuIii567YzGreenUs().buildGraphql(); - expect(skuIii567YzGreenUsPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "iii567-yz-green-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "iii567-yz-green", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-iii567-yz-green-us.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-iii567-yz-green-us.ts deleted file mode 100644 index 667c4df17..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-iii567-yz-green-us.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const usWarehouse = ChannelDraft.presets.sampleDataB2B - .usWarehouse() - .build(); - -const iii567Yz03 = ProductVariantDraft.presets.sampleDataB2B - .iii567Yz03() - .build(); - -const skuIii567YzGreenUs = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${iii567Yz03.sku}-${usWarehouse.key}`) - .sku(iii567Yz03.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(usWarehouse.key)); - -export default skuIii567YzGreenUs; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-iii567-yz-red-default.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-iii567-yz-red-default.spec.ts deleted file mode 100644 index 07c2d92dc..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-iii567-yz-red-default.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuIii567YzRedDefault from './sku-iii567-yz-red-default'; - -describe(`with skuIii567YzRedDefault preset and default-warehouse channel`, () => { - it(`should return a skuIii567YzRedDefault preset`, () => { - const skuIii567YzRedDefaultPreset = - skuIii567YzRedDefault().build(); - expect(skuIii567YzRedDefaultPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "iii567-yz-red-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "iii567-yz-red", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuIii567YzRedDefault preset when built for graphql`, () => { - const skuIii567YzRedDefaultPresetGraphql = - skuIii567YzRedDefault().buildGraphql(); - expect(skuIii567YzRedDefaultPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "iii567-yz-red-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "iii567-yz-red", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-iii567-yz-red-default.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-iii567-yz-red-default.ts deleted file mode 100644 index 1f4a5e1e0..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-iii567-yz-red-default.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const defaultWarehouse = ChannelDraft.presets.sampleDataB2B - .defaultWarehouse() - .build(); - -const iii567Yz01 = ProductVariantDraft.presets.sampleDataB2B - .iii567Yz01() - .build(); - -const skuIii567YzRedDefault = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${iii567Yz01.sku}-${defaultWarehouse.key}`) - .sku(iii567Yz01.sku!) - .quantityOnStock(1000) - .supplyChannel( - KeyReferenceDraft.presets.channel().key(defaultWarehouse.key) - ); - -export default skuIii567YzRedDefault; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-iii567-yz-red-eu.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-iii567-yz-red-eu.spec.ts deleted file mode 100644 index 603726c1a..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-iii567-yz-red-eu.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuIii567YzRedEu from './sku-iii567-yz-red-eu'; - -describe(`with skuIii567YzRedEu preset and eu-warehouse channel`, () => { - it(`should return a skuIii567YzRedEu preset`, () => { - const skuIii567YzRedEuPreset = - skuIii567YzRedEu().build(); - expect(skuIii567YzRedEuPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "iii567-yz-red-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "iii567-yz-red", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuIii567YzRedEu preset when built for graphql`, () => { - const skuIii567YzRedEuPresetGraphql = - skuIii567YzRedEu().buildGraphql(); - expect(skuIii567YzRedEuPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "iii567-yz-red-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "iii567-yz-red", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-iii567-yz-red-eu.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-iii567-yz-red-eu.ts deleted file mode 100644 index 17911f08f..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-iii567-yz-red-eu.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const euWarehouse = ChannelDraft.presets.sampleDataB2B - .euWarehouse() - .build(); - -const iii567Yz01 = ProductVariantDraft.presets.sampleDataB2B - .iii567Yz01() - .build(); - -const skuIii567YzRedEu = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${iii567Yz01.sku}-${euWarehouse.key}`) - .sku(iii567Yz01.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(euWarehouse.key)); - -export default skuIii567YzRedEu; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-iii567-yz-red-us.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-iii567-yz-red-us.spec.ts deleted file mode 100644 index c759ffeea..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-iii567-yz-red-us.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuIii567YzRedUs from './sku-iii567-yz-red-us'; - -describe(`with skuIii567YzRedUs preset and us-warehouse channel`, () => { - it(`should return a skuIii567YzRedUs preset`, () => { - const skuIii567YzRedUsPreset = - skuIii567YzRedUs().build(); - expect(skuIii567YzRedUsPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "iii567-yz-red-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "iii567-yz-red", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuIii567YzRedUs preset when built for graphql`, () => { - const skuIii567YzRedUsPresetGraphql = - skuIii567YzRedUs().buildGraphql(); - expect(skuIii567YzRedUsPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "iii567-yz-red-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "iii567-yz-red", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-iii567-yz-red-us.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-iii567-yz-red-us.ts deleted file mode 100644 index 7a820e8b4..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-iii567-yz-red-us.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const usWarehouse = ChannelDraft.presets.sampleDataB2B - .usWarehouse() - .build(); - -const iii567Yz01 = ProductVariantDraft.presets.sampleDataB2B - .iii567Yz01() - .build(); - -const skuIii567YzRedUs = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${iii567Yz01.sku}-${usWarehouse.key}`) - .sku(iii567Yz01.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(usWarehouse.key)); - -export default skuIii567YzRedUs; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-j-234-wx-2015-default-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-j-234-wx-2015-default-warehouse.spec.ts new file mode 100644 index 000000000..95faa082e --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-j-234-wx-2015-default-warehouse.spec.ts @@ -0,0 +1,40 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuJ234Wx2015DefaultWarehouse preset`, () => { + it(`should return a skuJ234Wx2015DefaultWarehouse preset when built for rest`, () => { + const skuJ234Wx2015DefaultWarehousePreset = InventoryEntryDraftRest.presets + .skuJ234Wx2015DefaultWarehouse() + .build(); + expect(skuJ234Wx2015DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuJ234Wx2015DefaultWarehouse preset when built for graphql`, () => { + const skuJ234Wx2015DefaultWarehousePreset = + InventoryEntryDraftGraphql.presets + .skuJ234Wx2015DefaultWarehouse() + .build(); + expect(skuJ234Wx2015DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuJ234Wx2015DefaultWarehouse preset when built for legacy rest`, () => { + const skuJ234Wx2015DefaultWarehousePreset = InventoryEntryDraft.presets + .skuJ234Wx2015DefaultWarehouse() + .buildRest(); + expect(skuJ234Wx2015DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuJ234Wx2015DefaultWarehouse preset when built for legacy graphql`, () => { + const skuJ234Wx2015DefaultWarehousePreset = InventoryEntryDraft.presets + .skuJ234Wx2015DefaultWarehouse() + .buildGraphql(); + expect(skuJ234Wx2015DefaultWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-j-234-wx-2015-default-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-j-234-wx-2015-default-warehouse.ts new file mode 100644 index 000000000..dc96f03ad --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-j-234-wx-2015-default-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .defaultWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .j234Wx01() + .build(); + +const skuJ234Wx2015DefaultWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('j234-wx-2015-default-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuJ234Wx2015DefaultWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-j-234-wx-2015-eu-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-j-234-wx-2015-eu-warehouse.spec.ts new file mode 100644 index 000000000..a603ec420 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-j-234-wx-2015-eu-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuJ234Wx2015EuWarehouse preset`, () => { + it(`should return a skuJ234Wx2015EuWarehouse preset when built for rest`, () => { + const skuJ234Wx2015EuWarehousePreset = InventoryEntryDraftRest.presets + .skuJ234Wx2015EuWarehouse() + .build(); + expect(skuJ234Wx2015EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuJ234Wx2015EuWarehouse preset when built for graphql`, () => { + const skuJ234Wx2015EuWarehousePreset = InventoryEntryDraftGraphql.presets + .skuJ234Wx2015EuWarehouse() + .build(); + expect(skuJ234Wx2015EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuJ234Wx2015EuWarehouse preset when built for legacy rest`, () => { + const skuJ234Wx2015EuWarehousePreset = InventoryEntryDraft.presets + .skuJ234Wx2015EuWarehouse() + .buildRest(); + expect(skuJ234Wx2015EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuJ234Wx2015EuWarehouse preset when built for legacy graphql`, () => { + const skuJ234Wx2015EuWarehousePreset = InventoryEntryDraft.presets + .skuJ234Wx2015EuWarehouse() + .buildGraphql(); + expect(skuJ234Wx2015EuWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-j-234-wx-2015-eu-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-j-234-wx-2015-eu-warehouse.ts new file mode 100644 index 000000000..33792f5cf --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-j-234-wx-2015-eu-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .euWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .j234Wx01() + .build(); + +const skuJ234Wx2015EuWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('j234-wx-2015-eu-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuJ234Wx2015EuWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-j-234-wx-2015-us-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-j-234-wx-2015-us-warehouse.spec.ts new file mode 100644 index 000000000..76fae54cf --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-j-234-wx-2015-us-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuJ234Wx2015UsWarehouse preset`, () => { + it(`should return a skuJ234Wx2015UsWarehouse preset when built for rest`, () => { + const skuJ234Wx2015UsWarehousePreset = InventoryEntryDraftRest.presets + .skuJ234Wx2015UsWarehouse() + .build(); + expect(skuJ234Wx2015UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuJ234Wx2015UsWarehouse preset when built for graphql`, () => { + const skuJ234Wx2015UsWarehousePreset = InventoryEntryDraftGraphql.presets + .skuJ234Wx2015UsWarehouse() + .build(); + expect(skuJ234Wx2015UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuJ234Wx2015UsWarehouse preset when built for legacy rest`, () => { + const skuJ234Wx2015UsWarehousePreset = InventoryEntryDraft.presets + .skuJ234Wx2015UsWarehouse() + .buildRest(); + expect(skuJ234Wx2015UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuJ234Wx2015UsWarehouse preset when built for legacy graphql`, () => { + const skuJ234Wx2015UsWarehousePreset = InventoryEntryDraft.presets + .skuJ234Wx2015UsWarehouse() + .buildGraphql(); + expect(skuJ234Wx2015UsWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-j-234-wx-2015-us-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-j-234-wx-2015-us-warehouse.ts new file mode 100644 index 000000000..917434aaa --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-j-234-wx-2015-us-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .usWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .j234Wx01() + .build(); + +const skuJ234Wx2015UsWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('j234-wx-2015-us-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuJ234Wx2015UsWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-j-234-wx-2019-default-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-j-234-wx-2019-default-warehouse.spec.ts new file mode 100644 index 000000000..40b0b48a5 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-j-234-wx-2019-default-warehouse.spec.ts @@ -0,0 +1,40 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuJ234Wx2019DefaultWarehouse preset`, () => { + it(`should return a skuJ234Wx2019DefaultWarehouse preset when built for rest`, () => { + const skuJ234Wx2019DefaultWarehousePreset = InventoryEntryDraftRest.presets + .skuJ234Wx2019DefaultWarehouse() + .build(); + expect(skuJ234Wx2019DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuJ234Wx2019DefaultWarehouse preset when built for graphql`, () => { + const skuJ234Wx2019DefaultWarehousePreset = + InventoryEntryDraftGraphql.presets + .skuJ234Wx2019DefaultWarehouse() + .build(); + expect(skuJ234Wx2019DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuJ234Wx2019DefaultWarehouse preset when built for legacy rest`, () => { + const skuJ234Wx2019DefaultWarehousePreset = InventoryEntryDraft.presets + .skuJ234Wx2019DefaultWarehouse() + .buildRest(); + expect(skuJ234Wx2019DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuJ234Wx2019DefaultWarehouse preset when built for legacy graphql`, () => { + const skuJ234Wx2019DefaultWarehousePreset = InventoryEntryDraft.presets + .skuJ234Wx2019DefaultWarehouse() + .buildGraphql(); + expect(skuJ234Wx2019DefaultWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-j-234-wx-2019-default-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-j-234-wx-2019-default-warehouse.ts new file mode 100644 index 000000000..800ad0ba3 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-j-234-wx-2019-default-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .defaultWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .j234Wx02() + .build(); + +const skuJ234Wx2019DefaultWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('j234-wx-2019-default-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuJ234Wx2019DefaultWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-j-234-wx-2019-eu-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-j-234-wx-2019-eu-warehouse.spec.ts new file mode 100644 index 000000000..a16bd0e84 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-j-234-wx-2019-eu-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuJ234Wx2019EuWarehouse preset`, () => { + it(`should return a skuJ234Wx2019EuWarehouse preset when built for rest`, () => { + const skuJ234Wx2019EuWarehousePreset = InventoryEntryDraftRest.presets + .skuJ234Wx2019EuWarehouse() + .build(); + expect(skuJ234Wx2019EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuJ234Wx2019EuWarehouse preset when built for graphql`, () => { + const skuJ234Wx2019EuWarehousePreset = InventoryEntryDraftGraphql.presets + .skuJ234Wx2019EuWarehouse() + .build(); + expect(skuJ234Wx2019EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuJ234Wx2019EuWarehouse preset when built for legacy rest`, () => { + const skuJ234Wx2019EuWarehousePreset = InventoryEntryDraft.presets + .skuJ234Wx2019EuWarehouse() + .buildRest(); + expect(skuJ234Wx2019EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuJ234Wx2019EuWarehouse preset when built for legacy graphql`, () => { + const skuJ234Wx2019EuWarehousePreset = InventoryEntryDraft.presets + .skuJ234Wx2019EuWarehouse() + .buildGraphql(); + expect(skuJ234Wx2019EuWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-j-234-wx-2019-eu-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-j-234-wx-2019-eu-warehouse.ts new file mode 100644 index 000000000..4bb4aa546 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-j-234-wx-2019-eu-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .euWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .j234Wx02() + .build(); + +const skuJ234Wx2019EuWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('j234-wx-2019-eu-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuJ234Wx2019EuWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-j-234-wx-2019-us-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-j-234-wx-2019-us-warehouse.spec.ts new file mode 100644 index 000000000..f1c084d32 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-j-234-wx-2019-us-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuJ234Wx2019UsWarehouse preset`, () => { + it(`should return a skuJ234Wx2019UsWarehouse preset when built for rest`, () => { + const skuJ234Wx2019UsWarehousePreset = InventoryEntryDraftRest.presets + .skuJ234Wx2019UsWarehouse() + .build(); + expect(skuJ234Wx2019UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuJ234Wx2019UsWarehouse preset when built for graphql`, () => { + const skuJ234Wx2019UsWarehousePreset = InventoryEntryDraftGraphql.presets + .skuJ234Wx2019UsWarehouse() + .build(); + expect(skuJ234Wx2019UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuJ234Wx2019UsWarehouse preset when built for legacy rest`, () => { + const skuJ234Wx2019UsWarehousePreset = InventoryEntryDraft.presets + .skuJ234Wx2019UsWarehouse() + .buildRest(); + expect(skuJ234Wx2019UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuJ234Wx2019UsWarehouse preset when built for legacy graphql`, () => { + const skuJ234Wx2019UsWarehousePreset = InventoryEntryDraft.presets + .skuJ234Wx2019UsWarehouse() + .buildGraphql(); + expect(skuJ234Wx2019UsWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-j-234-wx-2019-us-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-j-234-wx-2019-us-warehouse.ts new file mode 100644 index 000000000..e94b06268 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-j-234-wx-2019-us-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .usWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .j234Wx02() + .build(); + +const skuJ234Wx2019UsWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('j234-wx-2019-us-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuJ234Wx2019UsWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-j-234-wx-2023-default-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-j-234-wx-2023-default-warehouse.spec.ts new file mode 100644 index 000000000..307337abc --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-j-234-wx-2023-default-warehouse.spec.ts @@ -0,0 +1,40 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuJ234Wx2023DefaultWarehouse preset`, () => { + it(`should return a skuJ234Wx2023DefaultWarehouse preset when built for rest`, () => { + const skuJ234Wx2023DefaultWarehousePreset = InventoryEntryDraftRest.presets + .skuJ234Wx2023DefaultWarehouse() + .build(); + expect(skuJ234Wx2023DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuJ234Wx2023DefaultWarehouse preset when built for graphql`, () => { + const skuJ234Wx2023DefaultWarehousePreset = + InventoryEntryDraftGraphql.presets + .skuJ234Wx2023DefaultWarehouse() + .build(); + expect(skuJ234Wx2023DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuJ234Wx2023DefaultWarehouse preset when built for legacy rest`, () => { + const skuJ234Wx2023DefaultWarehousePreset = InventoryEntryDraft.presets + .skuJ234Wx2023DefaultWarehouse() + .buildRest(); + expect(skuJ234Wx2023DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuJ234Wx2023DefaultWarehouse preset when built for legacy graphql`, () => { + const skuJ234Wx2023DefaultWarehousePreset = InventoryEntryDraft.presets + .skuJ234Wx2023DefaultWarehouse() + .buildGraphql(); + expect(skuJ234Wx2023DefaultWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-j-234-wx-2023-default-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-j-234-wx-2023-default-warehouse.ts new file mode 100644 index 000000000..69a6ef9ab --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-j-234-wx-2023-default-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .defaultWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .j234Wx03() + .build(); + +const skuJ234Wx2023DefaultWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('j234-wx-2023-default-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuJ234Wx2023DefaultWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-j-234-wx-2023-eu-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-j-234-wx-2023-eu-warehouse.spec.ts new file mode 100644 index 000000000..91e11c552 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-j-234-wx-2023-eu-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuJ234Wx2023EuWarehouse preset`, () => { + it(`should return a skuJ234Wx2023EuWarehouse preset when built for rest`, () => { + const skuJ234Wx2023EuWarehousePreset = InventoryEntryDraftRest.presets + .skuJ234Wx2023EuWarehouse() + .build(); + expect(skuJ234Wx2023EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuJ234Wx2023EuWarehouse preset when built for graphql`, () => { + const skuJ234Wx2023EuWarehousePreset = InventoryEntryDraftGraphql.presets + .skuJ234Wx2023EuWarehouse() + .build(); + expect(skuJ234Wx2023EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuJ234Wx2023EuWarehouse preset when built for legacy rest`, () => { + const skuJ234Wx2023EuWarehousePreset = InventoryEntryDraft.presets + .skuJ234Wx2023EuWarehouse() + .buildRest(); + expect(skuJ234Wx2023EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuJ234Wx2023EuWarehouse preset when built for legacy graphql`, () => { + const skuJ234Wx2023EuWarehousePreset = InventoryEntryDraft.presets + .skuJ234Wx2023EuWarehouse() + .buildGraphql(); + expect(skuJ234Wx2023EuWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-j-234-wx-2023-eu-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-j-234-wx-2023-eu-warehouse.ts new file mode 100644 index 000000000..3f4af7ec1 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-j-234-wx-2023-eu-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .euWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .j234Wx03() + .build(); + +const skuJ234Wx2023EuWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('j234-wx-2023-eu-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuJ234Wx2023EuWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-j-234-wx-2023-us-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-j-234-wx-2023-us-warehouse.spec.ts new file mode 100644 index 000000000..a19d1af19 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-j-234-wx-2023-us-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuJ234Wx2023UsWarehouse preset`, () => { + it(`should return a skuJ234Wx2023UsWarehouse preset when built for rest`, () => { + const skuJ234Wx2023UsWarehousePreset = InventoryEntryDraftRest.presets + .skuJ234Wx2023UsWarehouse() + .build(); + expect(skuJ234Wx2023UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuJ234Wx2023UsWarehouse preset when built for graphql`, () => { + const skuJ234Wx2023UsWarehousePreset = InventoryEntryDraftGraphql.presets + .skuJ234Wx2023UsWarehouse() + .build(); + expect(skuJ234Wx2023UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuJ234Wx2023UsWarehouse preset when built for legacy rest`, () => { + const skuJ234Wx2023UsWarehousePreset = InventoryEntryDraft.presets + .skuJ234Wx2023UsWarehouse() + .buildRest(); + expect(skuJ234Wx2023UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuJ234Wx2023UsWarehouse preset when built for legacy graphql`, () => { + const skuJ234Wx2023UsWarehousePreset = InventoryEntryDraft.presets + .skuJ234Wx2023UsWarehouse() + .buildGraphql(); + expect(skuJ234Wx2023UsWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-j-234-wx-2023-us-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-j-234-wx-2023-us-warehouse.ts new file mode 100644 index 000000000..92153425e --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-j-234-wx-2023-us-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .usWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .j234Wx03() + .build(); + +const skuJ234Wx2023UsWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('j234-wx-2023-us-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuJ234Wx2023UsWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-j234-wx-2015-default.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-j234-wx-2015-default.spec.ts deleted file mode 100644 index 4d9fd9c33..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-j234-wx-2015-default.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuJ234Wx2015Default from './sku-j234-wx-2015-default'; - -describe(`with skuJ234Wx2015Default preset and default-warehouse channel`, () => { - it(`should return a skuJ234Wx2015Default preset`, () => { - const skuJ234Wx2015DefaultPreset = - skuJ234Wx2015Default().build(); - expect(skuJ234Wx2015DefaultPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "j234-wx-2015-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "j234-wx-2015", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuJ234Wx2015Default preset when built for graphql`, () => { - const skuJ234Wx2015DefaultPresetGraphql = - skuJ234Wx2015Default().buildGraphql(); - expect(skuJ234Wx2015DefaultPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "j234-wx-2015-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "j234-wx-2015", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-j234-wx-2015-default.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-j234-wx-2015-default.ts deleted file mode 100644 index e31f9210c..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-j234-wx-2015-default.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const defaultWarehouse = ChannelDraft.presets.sampleDataB2B - .defaultWarehouse() - .build(); - -const j234Wx01 = ProductVariantDraft.presets.sampleDataB2B - .j234Wx01() - .build(); - -const skuJ234Wx2015Default = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${j234Wx01.sku}-${defaultWarehouse.key}`) - .sku(j234Wx01.sku!) - .quantityOnStock(1000) - .supplyChannel( - KeyReferenceDraft.presets.channel().key(defaultWarehouse.key) - ); - -export default skuJ234Wx2015Default; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-j234-wx-2015-eu.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-j234-wx-2015-eu.spec.ts deleted file mode 100644 index 36bc7643d..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-j234-wx-2015-eu.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuJ234Wx2015Eu from './sku-j234-wx-2015-eu'; - -describe(`with skuJ234Wx2015Eu preset and eu-warehouse channel`, () => { - it(`should return a skuJ234Wx2015Eu preset`, () => { - const skuJ234Wx2015EuPreset = - skuJ234Wx2015Eu().build(); - expect(skuJ234Wx2015EuPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "j234-wx-2015-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "j234-wx-2015", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuJ234Wx2015Eu preset when built for graphql`, () => { - const skuJ234Wx2015EuPresetGraphql = - skuJ234Wx2015Eu().buildGraphql(); - expect(skuJ234Wx2015EuPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "j234-wx-2015-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "j234-wx-2015", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-j234-wx-2015-eu.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-j234-wx-2015-eu.ts deleted file mode 100644 index d0e9b3650..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-j234-wx-2015-eu.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const euWarehouse = ChannelDraft.presets.sampleDataB2B - .euWarehouse() - .build(); - -const j234Wx01 = ProductVariantDraft.presets.sampleDataB2B - .j234Wx01() - .build(); - -const skuJ234Wx2015Eu = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${j234Wx01.sku}-${euWarehouse.key}`) - .sku(j234Wx01.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(euWarehouse.key)); - -export default skuJ234Wx2015Eu; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-j234-wx-2015-us.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-j234-wx-2015-us.spec.ts deleted file mode 100644 index 1f9eeeff8..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-j234-wx-2015-us.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuJ234Wx2015Us from './sku-j234-wx-2015-us'; - -describe(`with skuJ234Wx2015Us preset and us-warehouse channel`, () => { - it(`should return a skuJ234Wx2015Us preset`, () => { - const skuJ234Wx2015UsPreset = - skuJ234Wx2015Us().build(); - expect(skuJ234Wx2015UsPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "j234-wx-2015-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "j234-wx-2015", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuJ234Wx2015Us preset when built for graphql`, () => { - const skuJ234Wx2015UsPresetGraphql = - skuJ234Wx2015Us().buildGraphql(); - expect(skuJ234Wx2015UsPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "j234-wx-2015-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "j234-wx-2015", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-j234-wx-2015-us.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-j234-wx-2015-us.ts deleted file mode 100644 index ef4a0057f..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-j234-wx-2015-us.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const usWarehouse = ChannelDraft.presets.sampleDataB2B - .usWarehouse() - .build(); - -const j234Wx01 = ProductVariantDraft.presets.sampleDataB2B - .j234Wx01() - .build(); - -const skuJ234Wx2015Us = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${j234Wx01.sku}-${usWarehouse.key}`) - .sku(j234Wx01.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(usWarehouse.key)); - -export default skuJ234Wx2015Us; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-j234-wx-2019-default.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-j234-wx-2019-default.spec.ts deleted file mode 100644 index d4512a770..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-j234-wx-2019-default.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuJ234Wx2019Default from './sku-j234-wx-2019-default'; - -describe(`with skuJ234Wx2019Default preset and default-warehouse channel`, () => { - it(`should return a skuJ234Wx2019Default preset`, () => { - const skuJ234Wx2019DefaultPreset = - skuJ234Wx2019Default().build(); - expect(skuJ234Wx2019DefaultPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "j234-wx-2019-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "j234-wx-2019", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuJ234Wx2019Default preset when built for graphql`, () => { - const skuJ234Wx2019DefaultPresetGraphql = - skuJ234Wx2019Default().buildGraphql(); - expect(skuJ234Wx2019DefaultPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "j234-wx-2019-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "j234-wx-2019", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-j234-wx-2019-default.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-j234-wx-2019-default.ts deleted file mode 100644 index b33632b67..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-j234-wx-2019-default.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const defaultWarehouse = ChannelDraft.presets.sampleDataB2B - .defaultWarehouse() - .build(); - -const j234Wx02 = ProductVariantDraft.presets.sampleDataB2B - .j234Wx02() - .build(); - -const skuJ234Wx2019Default = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${j234Wx02.sku}-${defaultWarehouse.key}`) - .sku(j234Wx02.sku!) - .quantityOnStock(1000) - .supplyChannel( - KeyReferenceDraft.presets.channel().key(defaultWarehouse.key) - ); - -export default skuJ234Wx2019Default; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-j234-wx-2019-eu.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-j234-wx-2019-eu.spec.ts deleted file mode 100644 index 2550977ff..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-j234-wx-2019-eu.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuJ234Wx2019Eu from './sku-j234-wx-2019-eu'; - -describe(`with skuJ234Wx2019Eu preset and eu-warehouse channel`, () => { - it(`should return a skuJ234Wx2019Eu preset`, () => { - const skuJ234Wx2019EuPreset = - skuJ234Wx2019Eu().build(); - expect(skuJ234Wx2019EuPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "j234-wx-2019-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "j234-wx-2019", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuJ234Wx2019Eu preset when built for graphql`, () => { - const skuJ234Wx2019EuPresetGraphql = - skuJ234Wx2019Eu().buildGraphql(); - expect(skuJ234Wx2019EuPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "j234-wx-2019-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "j234-wx-2019", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-j234-wx-2019-eu.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-j234-wx-2019-eu.ts deleted file mode 100644 index 4a21e8eed..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-j234-wx-2019-eu.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const euWarehouse = ChannelDraft.presets.sampleDataB2B - .euWarehouse() - .build(); - -const j234Wx02 = ProductVariantDraft.presets.sampleDataB2B - .j234Wx02() - .build(); - -const skuJ234Wx2019Eu = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${j234Wx02.sku}-${euWarehouse.key}`) - .sku(j234Wx02.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(euWarehouse.key)); - -export default skuJ234Wx2019Eu; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-j234-wx-2019-us.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-j234-wx-2019-us.spec.ts deleted file mode 100644 index c794d18dd..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-j234-wx-2019-us.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuJ234Wx2019Us from './sku-j234-wx-2019-us'; - -describe(`with skuJ234Wx2019Us preset and us-warehouse channel`, () => { - it(`should return a skuJ234Wx2019Us preset`, () => { - const skuJ234Wx2019UsPreset = - skuJ234Wx2019Us().build(); - expect(skuJ234Wx2019UsPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "j234-wx-2019-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "j234-wx-2019", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuJ234Wx2019Us preset when built for graphql`, () => { - const skuJ234Wx2019UsPresetGraphql = - skuJ234Wx2019Us().buildGraphql(); - expect(skuJ234Wx2019UsPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "j234-wx-2019-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "j234-wx-2019", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-j234-wx-2019-us.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-j234-wx-2019-us.ts deleted file mode 100644 index e485611c4..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-j234-wx-2019-us.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const usWarehouse = ChannelDraft.presets.sampleDataB2B - .usWarehouse() - .build(); - -const j234Wx02 = ProductVariantDraft.presets.sampleDataB2B - .j234Wx02() - .build(); - -const skuJ234Wx2019Us = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${j234Wx02.sku}-${usWarehouse.key}`) - .sku(j234Wx02.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(usWarehouse.key)); - -export default skuJ234Wx2019Us; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-j234-wx-2023-default.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-j234-wx-2023-default.spec.ts deleted file mode 100644 index 43f42e6cb..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-j234-wx-2023-default.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuJ234Wx2023Default from './sku-j234-wx-2023-default'; - -describe(`with skuJ234Wx2023Default preset and default-warehouse channel`, () => { - it(`should return a skuJ234Wx2023Default preset`, () => { - const skuJ234Wx2023DefaultPreset = - skuJ234Wx2023Default().build(); - expect(skuJ234Wx2023DefaultPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "j234-wx-2023-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "j234-wx-2023", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuJ234Wx2023Default preset when built for graphql`, () => { - const skuJ234Wx2023DefaultPresetGraphql = - skuJ234Wx2023Default().buildGraphql(); - expect(skuJ234Wx2023DefaultPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "j234-wx-2023-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "j234-wx-2023", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-j234-wx-2023-default.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-j234-wx-2023-default.ts deleted file mode 100644 index 60f2349df..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-j234-wx-2023-default.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const defaultWarehouse = ChannelDraft.presets.sampleDataB2B - .defaultWarehouse() - .build(); - -const j234Wx03 = ProductVariantDraft.presets.sampleDataB2B - .j234Wx03() - .build(); - -const skuJ234Wx2023Default = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${j234Wx03.sku}-${defaultWarehouse.key}`) - .sku(j234Wx03.sku!) - .quantityOnStock(1000) - .supplyChannel( - KeyReferenceDraft.presets.channel().key(defaultWarehouse.key) - ); - -export default skuJ234Wx2023Default; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-j234-wx-2023-eu.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-j234-wx-2023-eu.spec.ts deleted file mode 100644 index 6df2f7186..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-j234-wx-2023-eu.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuJ234Wx2023Eu from './sku-j234-wx-2023-eu'; - -describe(`with skuJ234Wx2023Eu preset and eu-warehouse channel`, () => { - it(`should return a skuJ234Wx2023Eu preset`, () => { - const skuJ234Wx2023EuPreset = - skuJ234Wx2023Eu().build(); - expect(skuJ234Wx2023EuPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "j234-wx-2023-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "j234-wx-2023", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuJ234Wx2023Eu preset when built for graphql`, () => { - const skuJ234Wx2023EuPresetGraphql = - skuJ234Wx2023Eu().buildGraphql(); - expect(skuJ234Wx2023EuPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "j234-wx-2023-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "j234-wx-2023", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-j234-wx-2023-eu.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-j234-wx-2023-eu.ts deleted file mode 100644 index 8da9205d4..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-j234-wx-2023-eu.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const euWarehouse = ChannelDraft.presets.sampleDataB2B - .euWarehouse() - .build(); - -const j234Wx03 = ProductVariantDraft.presets.sampleDataB2B - .j234Wx03() - .build(); - -const skuJ234Wx2023Eu = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${j234Wx03.sku}-${euWarehouse.key}`) - .sku(j234Wx03.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(euWarehouse.key)); - -export default skuJ234Wx2023Eu; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-j234-wx-2023-us.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-j234-wx-2023-us.spec.ts deleted file mode 100644 index c3dee0c50..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-j234-wx-2023-us.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuJ234Wx2023Us from './sku-j234-wx-2023-us'; - -describe(`with skuJ234Wx2023Us preset and us-warehouse channel`, () => { - it(`should return a skuJ234Wx2023Us preset`, () => { - const skuJ234Wx2023UsPreset = - skuJ234Wx2023Us().build(); - expect(skuJ234Wx2023UsPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "j234-wx-2023-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "j234-wx-2023", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuJ234Wx2023Us preset when built for graphql`, () => { - const skuJ234Wx2023UsPresetGraphql = - skuJ234Wx2023Us().buildGraphql(); - expect(skuJ234Wx2023UsPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "j234-wx-2023-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "j234-wx-2023", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-j234-wx-2023-us.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-j234-wx-2023-us.ts deleted file mode 100644 index 2b82721ac..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-j234-wx-2023-us.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const usWarehouse = ChannelDraft.presets.sampleDataB2B - .usWarehouse() - .build(); - -const j234Wx03 = ProductVariantDraft.presets.sampleDataB2B - .j234Wx03() - .build(); - -const skuJ234Wx2023Us = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${j234Wx03.sku}-${usWarehouse.key}`) - .sku(j234Wx03.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(usWarehouse.key)); - -export default skuJ234Wx2023Us; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jj-234-wx-2015-default-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jj-234-wx-2015-default-warehouse.spec.ts new file mode 100644 index 000000000..ec9cb8fac --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jj-234-wx-2015-default-warehouse.spec.ts @@ -0,0 +1,40 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuJj234Wx2015DefaultWarehouse preset`, () => { + it(`should return a skuJj234Wx2015DefaultWarehouse preset when built for rest`, () => { + const skuJj234Wx2015DefaultWarehousePreset = InventoryEntryDraftRest.presets + .skuJj234Wx2015DefaultWarehouse() + .build(); + expect(skuJj234Wx2015DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuJj234Wx2015DefaultWarehouse preset when built for graphql`, () => { + const skuJj234Wx2015DefaultWarehousePreset = + InventoryEntryDraftGraphql.presets + .skuJj234Wx2015DefaultWarehouse() + .build(); + expect(skuJj234Wx2015DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuJj234Wx2015DefaultWarehouse preset when built for legacy rest`, () => { + const skuJj234Wx2015DefaultWarehousePreset = InventoryEntryDraft.presets + .skuJj234Wx2015DefaultWarehouse() + .buildRest(); + expect(skuJj234Wx2015DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuJj234Wx2015DefaultWarehouse preset when built for legacy graphql`, () => { + const skuJj234Wx2015DefaultWarehousePreset = InventoryEntryDraft.presets + .skuJj234Wx2015DefaultWarehouse() + .buildGraphql(); + expect(skuJj234Wx2015DefaultWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jj-234-wx-2015-default-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jj-234-wx-2015-default-warehouse.ts new file mode 100644 index 000000000..48d0755ff --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jj-234-wx-2015-default-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .defaultWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .jj234Wx01() + .build(); + +const skuJj234Wx2015DefaultWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('jj234-wx-2015-default-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuJj234Wx2015DefaultWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jj-234-wx-2015-eu-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jj-234-wx-2015-eu-warehouse.spec.ts new file mode 100644 index 000000000..8247df8e4 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jj-234-wx-2015-eu-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuJj234Wx2015EuWarehouse preset`, () => { + it(`should return a skuJj234Wx2015EuWarehouse preset when built for rest`, () => { + const skuJj234Wx2015EuWarehousePreset = InventoryEntryDraftRest.presets + .skuJj234Wx2015EuWarehouse() + .build(); + expect(skuJj234Wx2015EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuJj234Wx2015EuWarehouse preset when built for graphql`, () => { + const skuJj234Wx2015EuWarehousePreset = InventoryEntryDraftGraphql.presets + .skuJj234Wx2015EuWarehouse() + .build(); + expect(skuJj234Wx2015EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuJj234Wx2015EuWarehouse preset when built for legacy rest`, () => { + const skuJj234Wx2015EuWarehousePreset = InventoryEntryDraft.presets + .skuJj234Wx2015EuWarehouse() + .buildRest(); + expect(skuJj234Wx2015EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuJj234Wx2015EuWarehouse preset when built for legacy graphql`, () => { + const skuJj234Wx2015EuWarehousePreset = InventoryEntryDraft.presets + .skuJj234Wx2015EuWarehouse() + .buildGraphql(); + expect(skuJj234Wx2015EuWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jj-234-wx-2015-eu-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jj-234-wx-2015-eu-warehouse.ts new file mode 100644 index 000000000..d447b42a9 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jj-234-wx-2015-eu-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .euWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .jj234Wx01() + .build(); + +const skuJj234Wx2015EuWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('jj234-wx-2015-eu-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuJj234Wx2015EuWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jj-234-wx-2015-us-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jj-234-wx-2015-us-warehouse.spec.ts new file mode 100644 index 000000000..9a42f7486 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jj-234-wx-2015-us-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuJj234Wx2015UsWarehouse preset`, () => { + it(`should return a skuJj234Wx2015UsWarehouse preset when built for rest`, () => { + const skuJj234Wx2015UsWarehousePreset = InventoryEntryDraftRest.presets + .skuJj234Wx2015UsWarehouse() + .build(); + expect(skuJj234Wx2015UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuJj234Wx2015UsWarehouse preset when built for graphql`, () => { + const skuJj234Wx2015UsWarehousePreset = InventoryEntryDraftGraphql.presets + .skuJj234Wx2015UsWarehouse() + .build(); + expect(skuJj234Wx2015UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuJj234Wx2015UsWarehouse preset when built for legacy rest`, () => { + const skuJj234Wx2015UsWarehousePreset = InventoryEntryDraft.presets + .skuJj234Wx2015UsWarehouse() + .buildRest(); + expect(skuJj234Wx2015UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuJj234Wx2015UsWarehouse preset when built for legacy graphql`, () => { + const skuJj234Wx2015UsWarehousePreset = InventoryEntryDraft.presets + .skuJj234Wx2015UsWarehouse() + .buildGraphql(); + expect(skuJj234Wx2015UsWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jj-234-wx-2015-us-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jj-234-wx-2015-us-warehouse.ts new file mode 100644 index 000000000..0adf36be9 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jj-234-wx-2015-us-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .usWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .jj234Wx01() + .build(); + +const skuJj234Wx2015UsWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('jj234-wx-2015-us-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuJj234Wx2015UsWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jj-234-wx-2019-default-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jj-234-wx-2019-default-warehouse.spec.ts new file mode 100644 index 000000000..2dcd584a7 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jj-234-wx-2019-default-warehouse.spec.ts @@ -0,0 +1,40 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuJj234Wx2019DefaultWarehouse preset`, () => { + it(`should return a skuJj234Wx2019DefaultWarehouse preset when built for rest`, () => { + const skuJj234Wx2019DefaultWarehousePreset = InventoryEntryDraftRest.presets + .skuJj234Wx2019DefaultWarehouse() + .build(); + expect(skuJj234Wx2019DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuJj234Wx2019DefaultWarehouse preset when built for graphql`, () => { + const skuJj234Wx2019DefaultWarehousePreset = + InventoryEntryDraftGraphql.presets + .skuJj234Wx2019DefaultWarehouse() + .build(); + expect(skuJj234Wx2019DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuJj234Wx2019DefaultWarehouse preset when built for legacy rest`, () => { + const skuJj234Wx2019DefaultWarehousePreset = InventoryEntryDraft.presets + .skuJj234Wx2019DefaultWarehouse() + .buildRest(); + expect(skuJj234Wx2019DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuJj234Wx2019DefaultWarehouse preset when built for legacy graphql`, () => { + const skuJj234Wx2019DefaultWarehousePreset = InventoryEntryDraft.presets + .skuJj234Wx2019DefaultWarehouse() + .buildGraphql(); + expect(skuJj234Wx2019DefaultWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jj-234-wx-2019-default-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jj-234-wx-2019-default-warehouse.ts new file mode 100644 index 000000000..52f1b3cea --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jj-234-wx-2019-default-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .defaultWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .jj234Wx02() + .build(); + +const skuJj234Wx2019DefaultWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('jj234-wx-2019-default-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuJj234Wx2019DefaultWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jj-234-wx-2019-eu-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jj-234-wx-2019-eu-warehouse.spec.ts new file mode 100644 index 000000000..f3257bbcc --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jj-234-wx-2019-eu-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuJj234Wx2019EuWarehouse preset`, () => { + it(`should return a skuJj234Wx2019EuWarehouse preset when built for rest`, () => { + const skuJj234Wx2019EuWarehousePreset = InventoryEntryDraftRest.presets + .skuJj234Wx2019EuWarehouse() + .build(); + expect(skuJj234Wx2019EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuJj234Wx2019EuWarehouse preset when built for graphql`, () => { + const skuJj234Wx2019EuWarehousePreset = InventoryEntryDraftGraphql.presets + .skuJj234Wx2019EuWarehouse() + .build(); + expect(skuJj234Wx2019EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuJj234Wx2019EuWarehouse preset when built for legacy rest`, () => { + const skuJj234Wx2019EuWarehousePreset = InventoryEntryDraft.presets + .skuJj234Wx2019EuWarehouse() + .buildRest(); + expect(skuJj234Wx2019EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuJj234Wx2019EuWarehouse preset when built for legacy graphql`, () => { + const skuJj234Wx2019EuWarehousePreset = InventoryEntryDraft.presets + .skuJj234Wx2019EuWarehouse() + .buildGraphql(); + expect(skuJj234Wx2019EuWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jj-234-wx-2019-eu-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jj-234-wx-2019-eu-warehouse.ts new file mode 100644 index 000000000..7e6fb6124 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jj-234-wx-2019-eu-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .euWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .jj234Wx02() + .build(); + +const skuJj234Wx2019EuWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('jj234-wx-2019-eu-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuJj234Wx2019EuWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jj-234-wx-2019-us-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jj-234-wx-2019-us-warehouse.spec.ts new file mode 100644 index 000000000..bd3c4aafd --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jj-234-wx-2019-us-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuJj234Wx2019UsWarehouse preset`, () => { + it(`should return a skuJj234Wx2019UsWarehouse preset when built for rest`, () => { + const skuJj234Wx2019UsWarehousePreset = InventoryEntryDraftRest.presets + .skuJj234Wx2019UsWarehouse() + .build(); + expect(skuJj234Wx2019UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuJj234Wx2019UsWarehouse preset when built for graphql`, () => { + const skuJj234Wx2019UsWarehousePreset = InventoryEntryDraftGraphql.presets + .skuJj234Wx2019UsWarehouse() + .build(); + expect(skuJj234Wx2019UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuJj234Wx2019UsWarehouse preset when built for legacy rest`, () => { + const skuJj234Wx2019UsWarehousePreset = InventoryEntryDraft.presets + .skuJj234Wx2019UsWarehouse() + .buildRest(); + expect(skuJj234Wx2019UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuJj234Wx2019UsWarehouse preset when built for legacy graphql`, () => { + const skuJj234Wx2019UsWarehousePreset = InventoryEntryDraft.presets + .skuJj234Wx2019UsWarehouse() + .buildGraphql(); + expect(skuJj234Wx2019UsWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jj-234-wx-2019-us-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jj-234-wx-2019-us-warehouse.ts new file mode 100644 index 000000000..e45c590a6 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jj-234-wx-2019-us-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .usWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .jj234Wx02() + .build(); + +const skuJj234Wx2019UsWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('jj234-wx-2019-us-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuJj234Wx2019UsWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jj-234-wx-2023-default-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jj-234-wx-2023-default-warehouse.spec.ts new file mode 100644 index 000000000..6625d2081 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jj-234-wx-2023-default-warehouse.spec.ts @@ -0,0 +1,40 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuJj234Wx2023DefaultWarehouse preset`, () => { + it(`should return a skuJj234Wx2023DefaultWarehouse preset when built for rest`, () => { + const skuJj234Wx2023DefaultWarehousePreset = InventoryEntryDraftRest.presets + .skuJj234Wx2023DefaultWarehouse() + .build(); + expect(skuJj234Wx2023DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuJj234Wx2023DefaultWarehouse preset when built for graphql`, () => { + const skuJj234Wx2023DefaultWarehousePreset = + InventoryEntryDraftGraphql.presets + .skuJj234Wx2023DefaultWarehouse() + .build(); + expect(skuJj234Wx2023DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuJj234Wx2023DefaultWarehouse preset when built for legacy rest`, () => { + const skuJj234Wx2023DefaultWarehousePreset = InventoryEntryDraft.presets + .skuJj234Wx2023DefaultWarehouse() + .buildRest(); + expect(skuJj234Wx2023DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuJj234Wx2023DefaultWarehouse preset when built for legacy graphql`, () => { + const skuJj234Wx2023DefaultWarehousePreset = InventoryEntryDraft.presets + .skuJj234Wx2023DefaultWarehouse() + .buildGraphql(); + expect(skuJj234Wx2023DefaultWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jj-234-wx-2023-default-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jj-234-wx-2023-default-warehouse.ts new file mode 100644 index 000000000..7fb53d3ac --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jj-234-wx-2023-default-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .defaultWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .jj234Wx03() + .build(); + +const skuJj234Wx2023DefaultWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('jj234-wx-2023-default-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuJj234Wx2023DefaultWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jj-234-wx-2023-eu-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jj-234-wx-2023-eu-warehouse.spec.ts new file mode 100644 index 000000000..fef2763a2 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jj-234-wx-2023-eu-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuJj234Wx2023EuWarehouse preset`, () => { + it(`should return a skuJj234Wx2023EuWarehouse preset when built for rest`, () => { + const skuJj234Wx2023EuWarehousePreset = InventoryEntryDraftRest.presets + .skuJj234Wx2023EuWarehouse() + .build(); + expect(skuJj234Wx2023EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuJj234Wx2023EuWarehouse preset when built for graphql`, () => { + const skuJj234Wx2023EuWarehousePreset = InventoryEntryDraftGraphql.presets + .skuJj234Wx2023EuWarehouse() + .build(); + expect(skuJj234Wx2023EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuJj234Wx2023EuWarehouse preset when built for legacy rest`, () => { + const skuJj234Wx2023EuWarehousePreset = InventoryEntryDraft.presets + .skuJj234Wx2023EuWarehouse() + .buildRest(); + expect(skuJj234Wx2023EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuJj234Wx2023EuWarehouse preset when built for legacy graphql`, () => { + const skuJj234Wx2023EuWarehousePreset = InventoryEntryDraft.presets + .skuJj234Wx2023EuWarehouse() + .buildGraphql(); + expect(skuJj234Wx2023EuWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jj-234-wx-2023-eu-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jj-234-wx-2023-eu-warehouse.ts new file mode 100644 index 000000000..964e19e09 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jj-234-wx-2023-eu-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .euWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .jj234Wx03() + .build(); + +const skuJj234Wx2023EuWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('jj234-wx-2023-eu-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuJj234Wx2023EuWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jj-234-wx-2023-us-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jj-234-wx-2023-us-warehouse.spec.ts new file mode 100644 index 000000000..7a2e5e685 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jj-234-wx-2023-us-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuJj234Wx2023UsWarehouse preset`, () => { + it(`should return a skuJj234Wx2023UsWarehouse preset when built for rest`, () => { + const skuJj234Wx2023UsWarehousePreset = InventoryEntryDraftRest.presets + .skuJj234Wx2023UsWarehouse() + .build(); + expect(skuJj234Wx2023UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuJj234Wx2023UsWarehouse preset when built for graphql`, () => { + const skuJj234Wx2023UsWarehousePreset = InventoryEntryDraftGraphql.presets + .skuJj234Wx2023UsWarehouse() + .build(); + expect(skuJj234Wx2023UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuJj234Wx2023UsWarehouse preset when built for legacy rest`, () => { + const skuJj234Wx2023UsWarehousePreset = InventoryEntryDraft.presets + .skuJj234Wx2023UsWarehouse() + .buildRest(); + expect(skuJj234Wx2023UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuJj234Wx2023UsWarehouse preset when built for legacy graphql`, () => { + const skuJj234Wx2023UsWarehousePreset = InventoryEntryDraft.presets + .skuJj234Wx2023UsWarehouse() + .buildGraphql(); + expect(skuJj234Wx2023UsWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jj-234-wx-2023-us-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jj-234-wx-2023-us-warehouse.ts new file mode 100644 index 000000000..13a26cf0d --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jj-234-wx-2023-us-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .usWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .jj234Wx03() + .build(); + +const skuJj234Wx2023UsWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('jj234-wx-2023-us-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuJj234Wx2023UsWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jj234-wx-2015-default.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jj234-wx-2015-default.spec.ts deleted file mode 100644 index 40dc3d28d..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jj234-wx-2015-default.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuJj234Wx2015Default from './sku-jj234-wx-2015-default'; - -describe(`with skuJj234Wx2015Default preset and default-warehouse channel`, () => { - it(`should return a skuJj234Wx2015Default preset`, () => { - const skuJj234Wx2015DefaultPreset = - skuJj234Wx2015Default().build(); - expect(skuJj234Wx2015DefaultPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "jj234-wx-2015-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "jj234-wx-2015", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuJj234Wx2015Default preset when built for graphql`, () => { - const skuJj234Wx2015DefaultPresetGraphql = - skuJj234Wx2015Default().buildGraphql(); - expect(skuJj234Wx2015DefaultPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "jj234-wx-2015-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "jj234-wx-2015", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jj234-wx-2015-default.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jj234-wx-2015-default.ts deleted file mode 100644 index 8ccd29f25..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jj234-wx-2015-default.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const defaultWarehouse = ChannelDraft.presets.sampleDataB2B - .defaultWarehouse() - .build(); - -const jj234Wx01 = ProductVariantDraft.presets.sampleDataB2B - .jj234Wx01() - .build(); - -const skuJj234Wx2015Default = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${jj234Wx01.sku}-${defaultWarehouse.key}`) - .sku(jj234Wx01.sku!) - .quantityOnStock(1000) - .supplyChannel( - KeyReferenceDraft.presets.channel().key(defaultWarehouse.key) - ); - -export default skuJj234Wx2015Default; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jj234-wx-2015-eu.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jj234-wx-2015-eu.spec.ts deleted file mode 100644 index f03159a65..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jj234-wx-2015-eu.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuJj234Wx2015Eu from './sku-jj234-wx-2015-eu'; - -describe(`with skuJj234Wx2015Eu preset and eu-warehouse channel`, () => { - it(`should return a skuJj234Wx2015Eu preset`, () => { - const skuJj234Wx2015EuPreset = - skuJj234Wx2015Eu().build(); - expect(skuJj234Wx2015EuPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "jj234-wx-2015-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "jj234-wx-2015", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuJj234Wx2015Eu preset when built for graphql`, () => { - const skuJj234Wx2015EuPresetGraphql = - skuJj234Wx2015Eu().buildGraphql(); - expect(skuJj234Wx2015EuPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "jj234-wx-2015-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "jj234-wx-2015", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jj234-wx-2015-eu.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jj234-wx-2015-eu.ts deleted file mode 100644 index 95a1b3ae8..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jj234-wx-2015-eu.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const euWarehouse = ChannelDraft.presets.sampleDataB2B - .euWarehouse() - .build(); - -const jj234Wx01 = ProductVariantDraft.presets.sampleDataB2B - .jj234Wx01() - .build(); - -const skuJj234Wx2015Eu = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${jj234Wx01.sku}-${euWarehouse.key}`) - .sku(jj234Wx01.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(euWarehouse.key)); - -export default skuJj234Wx2015Eu; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jj234-wx-2015-us.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jj234-wx-2015-us.spec.ts deleted file mode 100644 index 7746809ca..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jj234-wx-2015-us.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuJj234Wx2015Us from './sku-jj234-wx-2015-us'; - -describe(`with skuJj234Wx2015Us preset and us-warehouse channel`, () => { - it(`should return a skuJj234Wx2015Us preset`, () => { - const skuJj234Wx2015UsPreset = - skuJj234Wx2015Us().build(); - expect(skuJj234Wx2015UsPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "jj234-wx-2015-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "jj234-wx-2015", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuJj234Wx2015Us preset when built for graphql`, () => { - const skuJj234Wx2015UsPresetGraphql = - skuJj234Wx2015Us().buildGraphql(); - expect(skuJj234Wx2015UsPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "jj234-wx-2015-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "jj234-wx-2015", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jj234-wx-2015-us.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jj234-wx-2015-us.ts deleted file mode 100644 index b6868cf3a..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jj234-wx-2015-us.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const usWarehouse = ChannelDraft.presets.sampleDataB2B - .usWarehouse() - .build(); - -const jj234Wx01 = ProductVariantDraft.presets.sampleDataB2B - .jj234Wx01() - .build(); - -const skuJj234Wx2015Us = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${jj234Wx01.sku}-${usWarehouse.key}`) - .sku(jj234Wx01.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(usWarehouse.key)); - -export default skuJj234Wx2015Us; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jj234-wx-2019-default.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jj234-wx-2019-default.spec.ts deleted file mode 100644 index 938f1e596..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jj234-wx-2019-default.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuJj234Wx2019Default from './sku-jj234-wx-2019-default'; - -describe(`with skuJj234Wx2019Default preset and default-warehouse channel`, () => { - it(`should return a skuJj234Wx2019Default preset`, () => { - const skuJj234Wx2019DefaultPreset = - skuJj234Wx2019Default().build(); - expect(skuJj234Wx2019DefaultPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "jj234-wx-2019-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "jj234-wx-2019", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuJj234Wx2019Default preset when built for graphql`, () => { - const skuJj234Wx2019DefaultPresetGraphql = - skuJj234Wx2019Default().buildGraphql(); - expect(skuJj234Wx2019DefaultPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "jj234-wx-2019-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "jj234-wx-2019", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jj234-wx-2019-default.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jj234-wx-2019-default.ts deleted file mode 100644 index 1420b4a4d..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jj234-wx-2019-default.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const defaultWarehouse = ChannelDraft.presets.sampleDataB2B - .defaultWarehouse() - .build(); - -const jj234Wx02 = ProductVariantDraft.presets.sampleDataB2B - .jj234Wx02() - .build(); - -const skuJj234Wx2019Default = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${jj234Wx02.sku}-${defaultWarehouse.key}`) - .sku(jj234Wx02.sku!) - .quantityOnStock(1000) - .supplyChannel( - KeyReferenceDraft.presets.channel().key(defaultWarehouse.key) - ); - -export default skuJj234Wx2019Default; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jj234-wx-2019-eu.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jj234-wx-2019-eu.spec.ts deleted file mode 100644 index bdee8e86a..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jj234-wx-2019-eu.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuJj234Wx2019Eu from './sku-jj234-wx-2019-eu'; - -describe(`with skuJj234Wx2019Eu preset and eu-warehouse channel`, () => { - it(`should return a skuJj234Wx2019Eu preset`, () => { - const skuJj234Wx2019EuPreset = - skuJj234Wx2019Eu().build(); - expect(skuJj234Wx2019EuPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "jj234-wx-2019-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "jj234-wx-2019", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuJj234Wx2019Eu preset when built for graphql`, () => { - const skuJj234Wx2019EuPresetGraphql = - skuJj234Wx2019Eu().buildGraphql(); - expect(skuJj234Wx2019EuPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "jj234-wx-2019-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "jj234-wx-2019", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jj234-wx-2019-eu.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jj234-wx-2019-eu.ts deleted file mode 100644 index 3c7fcd682..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jj234-wx-2019-eu.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const euWarehouse = ChannelDraft.presets.sampleDataB2B - .euWarehouse() - .build(); - -const jj234Wx02 = ProductVariantDraft.presets.sampleDataB2B - .jj234Wx02() - .build(); - -const skuJj234Wx2019Eu = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${jj234Wx02.sku}-${euWarehouse.key}`) - .sku(jj234Wx02.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(euWarehouse.key)); - -export default skuJj234Wx2019Eu; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jj234-wx-2019-us.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jj234-wx-2019-us.spec.ts deleted file mode 100644 index 9916c2ea5..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jj234-wx-2019-us.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuJj234Wx2019Us from './sku-jj234-wx-2019-us'; - -describe(`with skuJj234Wx2019Us preset and us-warehouse channel`, () => { - it(`should return a skuJj234Wx2019Us preset`, () => { - const skuJj234Wx2019UsPreset = - skuJj234Wx2019Us().build(); - expect(skuJj234Wx2019UsPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "jj234-wx-2019-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "jj234-wx-2019", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuJj234Wx2019Us preset when built for graphql`, () => { - const skuJj234Wx2019UsPresetGraphql = - skuJj234Wx2019Us().buildGraphql(); - expect(skuJj234Wx2019UsPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "jj234-wx-2019-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "jj234-wx-2019", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jj234-wx-2019-us.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jj234-wx-2019-us.ts deleted file mode 100644 index ef883de0e..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jj234-wx-2019-us.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const usWarehouse = ChannelDraft.presets.sampleDataB2B - .usWarehouse() - .build(); - -const jj234Wx02 = ProductVariantDraft.presets.sampleDataB2B - .jj234Wx02() - .build(); - -const skuJj234Wx2019Us = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${jj234Wx02.sku}-${usWarehouse.key}`) - .sku(jj234Wx02.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(usWarehouse.key)); - -export default skuJj234Wx2019Us; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jj234-wx-2023-default.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jj234-wx-2023-default.spec.ts deleted file mode 100644 index d97bc625c..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jj234-wx-2023-default.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuJj234Wx2023Default from './sku-jj234-wx-2023-default'; - -describe(`with skuJj234Wx2023Default preset and default-warehouse channel`, () => { - it(`should return a skuJj234Wx2023Default preset`, () => { - const skuJj234Wx2023DefaultPreset = - skuJj234Wx2023Default().build(); - expect(skuJj234Wx2023DefaultPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "jj234-wx-2023-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "jj234-wx-2023", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuJj234Wx2023Default preset when built for graphql`, () => { - const skuJj234Wx2023DefaultPresetGraphql = - skuJj234Wx2023Default().buildGraphql(); - expect(skuJj234Wx2023DefaultPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "jj234-wx-2023-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "jj234-wx-2023", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jj234-wx-2023-default.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jj234-wx-2023-default.ts deleted file mode 100644 index 0979b02e6..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jj234-wx-2023-default.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const defaultWarehouse = ChannelDraft.presets.sampleDataB2B - .defaultWarehouse() - .build(); - -const jj234Wx03 = ProductVariantDraft.presets.sampleDataB2B - .jj234Wx03() - .build(); - -const skuJj234Wx2023Default = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${jj234Wx03.sku}-${defaultWarehouse.key}`) - .sku(jj234Wx03.sku!) - .quantityOnStock(1000) - .supplyChannel( - KeyReferenceDraft.presets.channel().key(defaultWarehouse.key) - ); - -export default skuJj234Wx2023Default; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jj234-wx-2023-eu.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jj234-wx-2023-eu.spec.ts deleted file mode 100644 index 157917742..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jj234-wx-2023-eu.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuJj234Wx2023Eu from './sku-jj234-wx-2023-eu'; - -describe(`with skuJj234Wx2023Eu preset and eu-warehouse channel`, () => { - it(`should return a skuJj234Wx2023Eu preset`, () => { - const skuJj234Wx2023EuPreset = - skuJj234Wx2023Eu().build(); - expect(skuJj234Wx2023EuPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "jj234-wx-2023-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "jj234-wx-2023", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuJj234Wx2023Eu preset when built for graphql`, () => { - const skuJj234Wx2023EuPresetGraphql = - skuJj234Wx2023Eu().buildGraphql(); - expect(skuJj234Wx2023EuPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "jj234-wx-2023-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "jj234-wx-2023", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jj234-wx-2023-eu.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jj234-wx-2023-eu.ts deleted file mode 100644 index aeac936ab..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jj234-wx-2023-eu.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const euWarehouse = ChannelDraft.presets.sampleDataB2B - .euWarehouse() - .build(); - -const jj234Wx03 = ProductVariantDraft.presets.sampleDataB2B - .jj234Wx03() - .build(); - -const skuJj234Wx2023Eu = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${jj234Wx03.sku}-${euWarehouse.key}`) - .sku(jj234Wx03.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(euWarehouse.key)); - -export default skuJj234Wx2023Eu; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jj234-wx-2023-us.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jj234-wx-2023-us.spec.ts deleted file mode 100644 index 05df10144..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jj234-wx-2023-us.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuJj234Wx2023Us from './sku-jj234-wx-2023-us'; - -describe(`with skuJj234Wx2023Us preset and us-warehouse channel`, () => { - it(`should return a skuJj234Wx2023Us preset`, () => { - const skuJj234Wx2023UsPreset = - skuJj234Wx2023Us().build(); - expect(skuJj234Wx2023UsPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "jj234-wx-2023-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "jj234-wx-2023", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuJj234Wx2023Us preset when built for graphql`, () => { - const skuJj234Wx2023UsPresetGraphql = - skuJj234Wx2023Us().buildGraphql(); - expect(skuJj234Wx2023UsPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "jj234-wx-2023-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "jj234-wx-2023", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jj234-wx-2023-us.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jj234-wx-2023-us.ts deleted file mode 100644 index c59ddc19d..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jj234-wx-2023-us.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const usWarehouse = ChannelDraft.presets.sampleDataB2B - .usWarehouse() - .build(); - -const jj234Wx03 = ProductVariantDraft.presets.sampleDataB2B - .jj234Wx03() - .build(); - -const skuJj234Wx2023Us = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${jj234Wx03.sku}-${usWarehouse.key}`) - .sku(jj234Wx03.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(usWarehouse.key)); - -export default skuJj234Wx2023Us; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jjj-890-op-blue-default-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jjj-890-op-blue-default-warehouse.spec.ts new file mode 100644 index 000000000..7352b7d6d --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jjj-890-op-blue-default-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuJjj890OpBlueDefaultWarehouse preset`, () => { + it(`should return a skuJjj890OpBlueDefaultWarehouse preset when built for rest`, () => { + const skuJjj890OpBlueDefaultWarehousePreset = + InventoryEntryDraftRest.presets.skuJjj890OpBlueDefaultWarehouse().build(); + expect(skuJjj890OpBlueDefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuJjj890OpBlueDefaultWarehouse preset when built for graphql`, () => { + const skuJjj890OpBlueDefaultWarehousePreset = + InventoryEntryDraftGraphql.presets + .skuJjj890OpBlueDefaultWarehouse() + .build(); + expect(skuJjj890OpBlueDefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuJjj890OpBlueDefaultWarehouse preset when built for legacy rest`, () => { + const skuJjj890OpBlueDefaultWarehousePreset = InventoryEntryDraft.presets + .skuJjj890OpBlueDefaultWarehouse() + .buildRest(); + expect(skuJjj890OpBlueDefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuJjj890OpBlueDefaultWarehouse preset when built for legacy graphql`, () => { + const skuJjj890OpBlueDefaultWarehousePreset = InventoryEntryDraft.presets + .skuJjj890OpBlueDefaultWarehouse() + .buildGraphql(); + expect(skuJjj890OpBlueDefaultWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jjj-890-op-blue-default-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jjj-890-op-blue-default-warehouse.ts new file mode 100644 index 000000000..f0ee30293 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jjj-890-op-blue-default-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .defaultWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .jjj890Op02() + .build(); + +const skuJjj890OpBlueDefaultWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('jjj890-op-blue-default-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuJjj890OpBlueDefaultWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jjj-890-op-blue-eu-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jjj-890-op-blue-eu-warehouse.spec.ts new file mode 100644 index 000000000..7d13a4b5e --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jjj-890-op-blue-eu-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuJjj890OpBlueEuWarehouse preset`, () => { + it(`should return a skuJjj890OpBlueEuWarehouse preset when built for rest`, () => { + const skuJjj890OpBlueEuWarehousePreset = InventoryEntryDraftRest.presets + .skuJjj890OpBlueEuWarehouse() + .build(); + expect(skuJjj890OpBlueEuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuJjj890OpBlueEuWarehouse preset when built for graphql`, () => { + const skuJjj890OpBlueEuWarehousePreset = InventoryEntryDraftGraphql.presets + .skuJjj890OpBlueEuWarehouse() + .build(); + expect(skuJjj890OpBlueEuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuJjj890OpBlueEuWarehouse preset when built for legacy rest`, () => { + const skuJjj890OpBlueEuWarehousePreset = InventoryEntryDraft.presets + .skuJjj890OpBlueEuWarehouse() + .buildRest(); + expect(skuJjj890OpBlueEuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuJjj890OpBlueEuWarehouse preset when built for legacy graphql`, () => { + const skuJjj890OpBlueEuWarehousePreset = InventoryEntryDraft.presets + .skuJjj890OpBlueEuWarehouse() + .buildGraphql(); + expect(skuJjj890OpBlueEuWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jjj-890-op-blue-eu-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jjj-890-op-blue-eu-warehouse.ts new file mode 100644 index 000000000..7e8666776 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jjj-890-op-blue-eu-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .euWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .jjj890Op02() + .build(); + +const skuJjj890OpBlueEuWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('jjj890-op-blue-eu-warehouse') + .sku(variant.sku!) + .quantityOnStock(999) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuJjj890OpBlueEuWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jjj-890-op-blue-us-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jjj-890-op-blue-us-warehouse.spec.ts new file mode 100644 index 000000000..a70d9ad8b --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jjj-890-op-blue-us-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuJjj890OpBlueUsWarehouse preset`, () => { + it(`should return a skuJjj890OpBlueUsWarehouse preset when built for rest`, () => { + const skuJjj890OpBlueUsWarehousePreset = InventoryEntryDraftRest.presets + .skuJjj890OpBlueUsWarehouse() + .build(); + expect(skuJjj890OpBlueUsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuJjj890OpBlueUsWarehouse preset when built for graphql`, () => { + const skuJjj890OpBlueUsWarehousePreset = InventoryEntryDraftGraphql.presets + .skuJjj890OpBlueUsWarehouse() + .build(); + expect(skuJjj890OpBlueUsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuJjj890OpBlueUsWarehouse preset when built for legacy rest`, () => { + const skuJjj890OpBlueUsWarehousePreset = InventoryEntryDraft.presets + .skuJjj890OpBlueUsWarehouse() + .buildRest(); + expect(skuJjj890OpBlueUsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuJjj890OpBlueUsWarehouse preset when built for legacy graphql`, () => { + const skuJjj890OpBlueUsWarehousePreset = InventoryEntryDraft.presets + .skuJjj890OpBlueUsWarehouse() + .buildGraphql(); + expect(skuJjj890OpBlueUsWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jjj-890-op-blue-us-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jjj-890-op-blue-us-warehouse.ts new file mode 100644 index 000000000..bddea677c --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jjj-890-op-blue-us-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .usWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .jjj890Op02() + .build(); + +const skuJjj890OpBlueUsWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('jjj890-op-blue-us-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuJjj890OpBlueUsWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jjj-890-op-green-default-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jjj-890-op-green-default-warehouse.spec.ts new file mode 100644 index 000000000..329bcf889 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jjj-890-op-green-default-warehouse.spec.ts @@ -0,0 +1,41 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuJjj890OpGreenDefaultWarehouse preset`, () => { + it(`should return a skuJjj890OpGreenDefaultWarehouse preset when built for rest`, () => { + const skuJjj890OpGreenDefaultWarehousePreset = + InventoryEntryDraftRest.presets + .skuJjj890OpGreenDefaultWarehouse() + .build(); + expect(skuJjj890OpGreenDefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuJjj890OpGreenDefaultWarehouse preset when built for graphql`, () => { + const skuJjj890OpGreenDefaultWarehousePreset = + InventoryEntryDraftGraphql.presets + .skuJjj890OpGreenDefaultWarehouse() + .build(); + expect(skuJjj890OpGreenDefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuJjj890OpGreenDefaultWarehouse preset when built for legacy rest`, () => { + const skuJjj890OpGreenDefaultWarehousePreset = InventoryEntryDraft.presets + .skuJjj890OpGreenDefaultWarehouse() + .buildRest(); + expect(skuJjj890OpGreenDefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuJjj890OpGreenDefaultWarehouse preset when built for legacy graphql`, () => { + const skuJjj890OpGreenDefaultWarehousePreset = InventoryEntryDraft.presets + .skuJjj890OpGreenDefaultWarehouse() + .buildGraphql(); + expect(skuJjj890OpGreenDefaultWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jjj-890-op-green-default-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jjj-890-op-green-default-warehouse.ts new file mode 100644 index 000000000..391906094 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jjj-890-op-green-default-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .defaultWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .jjj890Op03() + .build(); + +const skuJjj890OpGreenDefaultWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('jjj890-op-green-default-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuJjj890OpGreenDefaultWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jjj-890-op-green-eu-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jjj-890-op-green-eu-warehouse.spec.ts new file mode 100644 index 000000000..929f1a6af --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jjj-890-op-green-eu-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuJjj890OpGreenEuWarehouse preset`, () => { + it(`should return a skuJjj890OpGreenEuWarehouse preset when built for rest`, () => { + const skuJjj890OpGreenEuWarehousePreset = InventoryEntryDraftRest.presets + .skuJjj890OpGreenEuWarehouse() + .build(); + expect(skuJjj890OpGreenEuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuJjj890OpGreenEuWarehouse preset when built for graphql`, () => { + const skuJjj890OpGreenEuWarehousePreset = InventoryEntryDraftGraphql.presets + .skuJjj890OpGreenEuWarehouse() + .build(); + expect(skuJjj890OpGreenEuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuJjj890OpGreenEuWarehouse preset when built for legacy rest`, () => { + const skuJjj890OpGreenEuWarehousePreset = InventoryEntryDraft.presets + .skuJjj890OpGreenEuWarehouse() + .buildRest(); + expect(skuJjj890OpGreenEuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuJjj890OpGreenEuWarehouse preset when built for legacy graphql`, () => { + const skuJjj890OpGreenEuWarehousePreset = InventoryEntryDraft.presets + .skuJjj890OpGreenEuWarehouse() + .buildGraphql(); + expect(skuJjj890OpGreenEuWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jjj-890-op-green-eu-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jjj-890-op-green-eu-warehouse.ts new file mode 100644 index 000000000..5e40bd407 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jjj-890-op-green-eu-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .euWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .jjj890Op03() + .build(); + +const skuJjj890OpGreenEuWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('jjj890-op-green-eu-warehouse') + .sku(variant.sku!) + .quantityOnStock(999) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuJjj890OpGreenEuWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jjj-890-op-green-us-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jjj-890-op-green-us-warehouse.spec.ts new file mode 100644 index 000000000..0752c2bcd --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jjj-890-op-green-us-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuJjj890OpGreenUsWarehouse preset`, () => { + it(`should return a skuJjj890OpGreenUsWarehouse preset when built for rest`, () => { + const skuJjj890OpGreenUsWarehousePreset = InventoryEntryDraftRest.presets + .skuJjj890OpGreenUsWarehouse() + .build(); + expect(skuJjj890OpGreenUsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuJjj890OpGreenUsWarehouse preset when built for graphql`, () => { + const skuJjj890OpGreenUsWarehousePreset = InventoryEntryDraftGraphql.presets + .skuJjj890OpGreenUsWarehouse() + .build(); + expect(skuJjj890OpGreenUsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuJjj890OpGreenUsWarehouse preset when built for legacy rest`, () => { + const skuJjj890OpGreenUsWarehousePreset = InventoryEntryDraft.presets + .skuJjj890OpGreenUsWarehouse() + .buildRest(); + expect(skuJjj890OpGreenUsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuJjj890OpGreenUsWarehouse preset when built for legacy graphql`, () => { + const skuJjj890OpGreenUsWarehousePreset = InventoryEntryDraft.presets + .skuJjj890OpGreenUsWarehouse() + .buildGraphql(); + expect(skuJjj890OpGreenUsWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jjj-890-op-green-us-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jjj-890-op-green-us-warehouse.ts new file mode 100644 index 000000000..a718dd9b0 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jjj-890-op-green-us-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .usWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .jjj890Op03() + .build(); + +const skuJjj890OpGreenUsWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('jjj890-op-green-us-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuJjj890OpGreenUsWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jjj-890-op-red-default-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jjj-890-op-red-default-warehouse.spec.ts new file mode 100644 index 000000000..b0148b7d9 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jjj-890-op-red-default-warehouse.spec.ts @@ -0,0 +1,40 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuJjj890OpRedDefaultWarehouse preset`, () => { + it(`should return a skuJjj890OpRedDefaultWarehouse preset when built for rest`, () => { + const skuJjj890OpRedDefaultWarehousePreset = InventoryEntryDraftRest.presets + .skuJjj890OpRedDefaultWarehouse() + .build(); + expect(skuJjj890OpRedDefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuJjj890OpRedDefaultWarehouse preset when built for graphql`, () => { + const skuJjj890OpRedDefaultWarehousePreset = + InventoryEntryDraftGraphql.presets + .skuJjj890OpRedDefaultWarehouse() + .build(); + expect(skuJjj890OpRedDefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuJjj890OpRedDefaultWarehouse preset when built for legacy rest`, () => { + const skuJjj890OpRedDefaultWarehousePreset = InventoryEntryDraft.presets + .skuJjj890OpRedDefaultWarehouse() + .buildRest(); + expect(skuJjj890OpRedDefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuJjj890OpRedDefaultWarehouse preset when built for legacy graphql`, () => { + const skuJjj890OpRedDefaultWarehousePreset = InventoryEntryDraft.presets + .skuJjj890OpRedDefaultWarehouse() + .buildGraphql(); + expect(skuJjj890OpRedDefaultWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jjj-890-op-red-default-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jjj-890-op-red-default-warehouse.ts new file mode 100644 index 000000000..e2e8cf176 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jjj-890-op-red-default-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .defaultWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .jjj890Op01() + .build(); + +const skuJjj890OpRedDefaultWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('jjj890-op-red-default-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuJjj890OpRedDefaultWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jjj-890-op-red-eu-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jjj-890-op-red-eu-warehouse.spec.ts new file mode 100644 index 000000000..1075e1fb7 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jjj-890-op-red-eu-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuJjj890OpRedEuWarehouse preset`, () => { + it(`should return a skuJjj890OpRedEuWarehouse preset when built for rest`, () => { + const skuJjj890OpRedEuWarehousePreset = InventoryEntryDraftRest.presets + .skuJjj890OpRedEuWarehouse() + .build(); + expect(skuJjj890OpRedEuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuJjj890OpRedEuWarehouse preset when built for graphql`, () => { + const skuJjj890OpRedEuWarehousePreset = InventoryEntryDraftGraphql.presets + .skuJjj890OpRedEuWarehouse() + .build(); + expect(skuJjj890OpRedEuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuJjj890OpRedEuWarehouse preset when built for legacy rest`, () => { + const skuJjj890OpRedEuWarehousePreset = InventoryEntryDraft.presets + .skuJjj890OpRedEuWarehouse() + .buildRest(); + expect(skuJjj890OpRedEuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuJjj890OpRedEuWarehouse preset when built for legacy graphql`, () => { + const skuJjj890OpRedEuWarehousePreset = InventoryEntryDraft.presets + .skuJjj890OpRedEuWarehouse() + .buildGraphql(); + expect(skuJjj890OpRedEuWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jjj-890-op-red-eu-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jjj-890-op-red-eu-warehouse.ts new file mode 100644 index 000000000..ced6fc004 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jjj-890-op-red-eu-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .euWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .jjj890Op01() + .build(); + +const skuJjj890OpRedEuWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('jjj890-op-red-eu-warehouse') + .sku(variant.sku!) + .quantityOnStock(999) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuJjj890OpRedEuWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jjj-890-op-red-us-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jjj-890-op-red-us-warehouse.spec.ts new file mode 100644 index 000000000..2ff164fb0 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jjj-890-op-red-us-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuJjj890OpRedUsWarehouse preset`, () => { + it(`should return a skuJjj890OpRedUsWarehouse preset when built for rest`, () => { + const skuJjj890OpRedUsWarehousePreset = InventoryEntryDraftRest.presets + .skuJjj890OpRedUsWarehouse() + .build(); + expect(skuJjj890OpRedUsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuJjj890OpRedUsWarehouse preset when built for graphql`, () => { + const skuJjj890OpRedUsWarehousePreset = InventoryEntryDraftGraphql.presets + .skuJjj890OpRedUsWarehouse() + .build(); + expect(skuJjj890OpRedUsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuJjj890OpRedUsWarehouse preset when built for legacy rest`, () => { + const skuJjj890OpRedUsWarehousePreset = InventoryEntryDraft.presets + .skuJjj890OpRedUsWarehouse() + .buildRest(); + expect(skuJjj890OpRedUsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuJjj890OpRedUsWarehouse preset when built for legacy graphql`, () => { + const skuJjj890OpRedUsWarehousePreset = InventoryEntryDraft.presets + .skuJjj890OpRedUsWarehouse() + .buildGraphql(); + expect(skuJjj890OpRedUsWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jjj-890-op-red-us-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jjj-890-op-red-us-warehouse.ts new file mode 100644 index 000000000..4638f512d --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jjj-890-op-red-us-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .usWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .jjj890Op01() + .build(); + +const skuJjj890OpRedUsWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('jjj890-op-red-us-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuJjj890OpRedUsWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jjj890-op-blue-default.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jjj890-op-blue-default.spec.ts deleted file mode 100644 index 69554d4fa..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jjj890-op-blue-default.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuJjj890OpBlueDefault from './sku-jjj890-op-blue-default'; - -describe(`with skuJjj890OpBlueDefault preset and default-warehouse channel`, () => { - it(`should return a skuJjj890OpBlueDefault preset`, () => { - const skuJjj890OpBlueDefaultPreset = - skuJjj890OpBlueDefault().build(); - expect(skuJjj890OpBlueDefaultPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "jjj890-op-blue-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "jjj890-op-blue", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuJjj890OpBlueDefault preset when built for graphql`, () => { - const skuJjj890OpBlueDefaultPresetGraphql = - skuJjj890OpBlueDefault().buildGraphql(); - expect(skuJjj890OpBlueDefaultPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "jjj890-op-blue-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "jjj890-op-blue", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jjj890-op-blue-default.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jjj890-op-blue-default.ts deleted file mode 100644 index e85eabb73..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jjj890-op-blue-default.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const defaultWarehouse = ChannelDraft.presets.sampleDataB2B - .defaultWarehouse() - .build(); - -const jjj890Op02 = ProductVariantDraft.presets.sampleDataB2B - .jjj890Op02() - .build(); - -const skuJjj890OpBlueDefault = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${jjj890Op02.sku}-${defaultWarehouse.key}`) - .sku(jjj890Op02.sku!) - .quantityOnStock(1000) - .supplyChannel( - KeyReferenceDraft.presets.channel().key(defaultWarehouse.key) - ); - -export default skuJjj890OpBlueDefault; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jjj890-op-blue-eu.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jjj890-op-blue-eu.spec.ts deleted file mode 100644 index 35cf03ed2..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jjj890-op-blue-eu.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuJjj890OpBlueEu from './sku-jjj890-op-blue-eu'; - -describe(`with skuJjj890OpBlueEu preset and eu-warehouse channel`, () => { - it(`should return a skuJjj890OpBlueEu preset`, () => { - const skuJjj890OpBlueEuPreset = - skuJjj890OpBlueEu().build(); - expect(skuJjj890OpBlueEuPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "jjj890-op-blue-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "jjj890-op-blue", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuJjj890OpBlueEu preset when built for graphql`, () => { - const skuJjj890OpBlueEuPresetGraphql = - skuJjj890OpBlueEu().buildGraphql(); - expect(skuJjj890OpBlueEuPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "jjj890-op-blue-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "jjj890-op-blue", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jjj890-op-blue-eu.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jjj890-op-blue-eu.ts deleted file mode 100644 index d13487be7..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jjj890-op-blue-eu.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const euWarehouse = ChannelDraft.presets.sampleDataB2B - .euWarehouse() - .build(); - -const jjj890Op02 = ProductVariantDraft.presets.sampleDataB2B - .jjj890Op02() - .build(); - -const skuJjj890OpBlueEu = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${jjj890Op02.sku}-${euWarehouse.key}`) - .sku(jjj890Op02.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(euWarehouse.key)); - -export default skuJjj890OpBlueEu; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jjj890-op-blue-us.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jjj890-op-blue-us.spec.ts deleted file mode 100644 index 1e3ee4b5b..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jjj890-op-blue-us.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuJjj890OpBlueUs from './sku-jjj890-op-blue-us'; - -describe(`with skuJjj890OpBlueUs preset and us-warehouse channel`, () => { - it(`should return a skuJjj890OpBlueUs preset`, () => { - const skuJjj890OpBlueUsPreset = - skuJjj890OpBlueUs().build(); - expect(skuJjj890OpBlueUsPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "jjj890-op-blue-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "jjj890-op-blue", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuJjj890OpBlueUs preset when built for graphql`, () => { - const skuJjj890OpBlueUsPresetGraphql = - skuJjj890OpBlueUs().buildGraphql(); - expect(skuJjj890OpBlueUsPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "jjj890-op-blue-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "jjj890-op-blue", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jjj890-op-blue-us.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jjj890-op-blue-us.ts deleted file mode 100644 index 1a3209e47..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jjj890-op-blue-us.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const usWarehouse = ChannelDraft.presets.sampleDataB2B - .usWarehouse() - .build(); - -const jjj890Op02 = ProductVariantDraft.presets.sampleDataB2B - .jjj890Op02() - .build(); - -const skuJjj890OpBlueUs = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${jjj890Op02.sku}-${usWarehouse.key}`) - .sku(jjj890Op02.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(usWarehouse.key)); - -export default skuJjj890OpBlueUs; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jjj890-op-green-default.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jjj890-op-green-default.spec.ts deleted file mode 100644 index 4a07b99ac..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jjj890-op-green-default.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuJjj890OpGreenDefault from './sku-jjj890-op-green-default'; - -describe(`with skuJjj890OpGreenDefault preset and default-warehouse channel`, () => { - it(`should return a skuJjj890OpGreenDefault preset`, () => { - const skuJjj890OpGreenDefaultPreset = - skuJjj890OpGreenDefault().build(); - expect(skuJjj890OpGreenDefaultPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "jjj890-op-green-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "jjj890-op-green", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuJjj890OpGreenDefault preset when built for graphql`, () => { - const skuJjj890OpGreenDefaultPresetGraphql = - skuJjj890OpGreenDefault().buildGraphql(); - expect(skuJjj890OpGreenDefaultPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "jjj890-op-green-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "jjj890-op-green", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jjj890-op-green-default.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jjj890-op-green-default.ts deleted file mode 100644 index d398781cf..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jjj890-op-green-default.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const defaultWarehouse = ChannelDraft.presets.sampleDataB2B - .defaultWarehouse() - .build(); - -const jjj890Op03 = ProductVariantDraft.presets.sampleDataB2B - .jjj890Op03() - .build(); - -const skuJjj890OpGreenDefault = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${jjj890Op03.sku}-${defaultWarehouse.key}`) - .sku(jjj890Op03.sku!) - .quantityOnStock(1000) - .supplyChannel( - KeyReferenceDraft.presets.channel().key(defaultWarehouse.key) - ); - -export default skuJjj890OpGreenDefault; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jjj890-op-green-eu.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jjj890-op-green-eu.spec.ts deleted file mode 100644 index e54e27918..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jjj890-op-green-eu.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuJjj890OpGreenEu from './sku-jjj890-op-green-eu'; - -describe(`with skuJjj890OpGreenEu preset and eu-warehouse channel`, () => { - it(`should return a skuJjj890OpGreenEu preset`, () => { - const skuJjj890OpGreenEuPreset = - skuJjj890OpGreenEu().build(); - expect(skuJjj890OpGreenEuPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "jjj890-op-green-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "jjj890-op-green", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuJjj890OpGreenEu preset when built for graphql`, () => { - const skuJjj890OpGreenEuPresetGraphql = - skuJjj890OpGreenEu().buildGraphql(); - expect(skuJjj890OpGreenEuPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "jjj890-op-green-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "jjj890-op-green", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jjj890-op-green-eu.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jjj890-op-green-eu.ts deleted file mode 100644 index 738d349de..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jjj890-op-green-eu.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const euWarehouse = ChannelDraft.presets.sampleDataB2B - .euWarehouse() - .build(); - -const jjj890Op03 = ProductVariantDraft.presets.sampleDataB2B - .jjj890Op03() - .build(); - -const skuJjj890OpGreenEu = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${jjj890Op03.sku}-${euWarehouse.key}`) - .sku(jjj890Op03.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(euWarehouse.key)); - -export default skuJjj890OpGreenEu; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jjj890-op-green-us.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jjj890-op-green-us.spec.ts deleted file mode 100644 index aecf9f256..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jjj890-op-green-us.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuJjj890OpGreenUs from './sku-jjj890-op-green-us'; - -describe(`with skuJjj890OpGreenUs preset and us-warehouse channel`, () => { - it(`should return a skuJjj890OpGreenUs preset`, () => { - const skuJjj890OpGreenUsPreset = - skuJjj890OpGreenUs().build(); - expect(skuJjj890OpGreenUsPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "jjj890-op-green-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "jjj890-op-green", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuJjj890OpGreenUs preset when built for graphql`, () => { - const skuJjj890OpGreenUsPresetGraphql = - skuJjj890OpGreenUs().buildGraphql(); - expect(skuJjj890OpGreenUsPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "jjj890-op-green-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "jjj890-op-green", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jjj890-op-green-us.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jjj890-op-green-us.ts deleted file mode 100644 index c640c1cb8..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jjj890-op-green-us.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const usWarehouse = ChannelDraft.presets.sampleDataB2B - .usWarehouse() - .build(); - -const jjj890Op03 = ProductVariantDraft.presets.sampleDataB2B - .jjj890Op03() - .build(); - -const skuJjj890OpGreenUs = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${jjj890Op03.sku}-${usWarehouse.key}`) - .sku(jjj890Op03.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(usWarehouse.key)); - -export default skuJjj890OpGreenUs; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jjj890-op-red-default.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jjj890-op-red-default.spec.ts deleted file mode 100644 index 1b7fdf38a..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jjj890-op-red-default.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuJjj890OpRedDefault from './sku-jjj890-op-red-default'; - -describe(`with skuJjj890OpRedDefault preset and default-warehouse channel`, () => { - it(`should return a skuJjj890OpRedDefault preset`, () => { - const skuJjj890OpRedDefaultPreset = - skuJjj890OpRedDefault().build(); - expect(skuJjj890OpRedDefaultPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "jjj890-op-red-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "jjj890-op-red", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuJjj890OpRedDefault preset when built for graphql`, () => { - const skuJjj890OpRedDefaultPresetGraphql = - skuJjj890OpRedDefault().buildGraphql(); - expect(skuJjj890OpRedDefaultPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "jjj890-op-red-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "jjj890-op-red", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jjj890-op-red-default.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jjj890-op-red-default.ts deleted file mode 100644 index 25d87c63f..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jjj890-op-red-default.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const defaultWarehouse = ChannelDraft.presets.sampleDataB2B - .defaultWarehouse() - .build(); - -const jjj890Op01 = ProductVariantDraft.presets.sampleDataB2B - .jjj890Op01() - .build(); - -const skuJjj890OpRedDefault = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${jjj890Op01.sku}-${defaultWarehouse.key}`) - .sku(jjj890Op01.sku!) - .quantityOnStock(1000) - .supplyChannel( - KeyReferenceDraft.presets.channel().key(defaultWarehouse.key) - ); - -export default skuJjj890OpRedDefault; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jjj890-op-red-eu.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jjj890-op-red-eu.spec.ts deleted file mode 100644 index 0ebe883ce..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jjj890-op-red-eu.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuJjj890OpRedEu from './sku-jjj890-op-red-eu'; - -describe(`with skuJjj890OpRedEu preset and eu-warehouse channel`, () => { - it(`should return a skuJjj890OpRedEu preset`, () => { - const skuJjj890OpRedEuPreset = - skuJjj890OpRedEu().build(); - expect(skuJjj890OpRedEuPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "jjj890-op-red-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "jjj890-op-red", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuJjj890OpRedEu preset when built for graphql`, () => { - const skuJjj890OpRedEuPresetGraphql = - skuJjj890OpRedEu().buildGraphql(); - expect(skuJjj890OpRedEuPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "jjj890-op-red-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "jjj890-op-red", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jjj890-op-red-eu.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jjj890-op-red-eu.ts deleted file mode 100644 index 660170c31..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jjj890-op-red-eu.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const euWarehouse = ChannelDraft.presets.sampleDataB2B - .euWarehouse() - .build(); - -const jjj890Op01 = ProductVariantDraft.presets.sampleDataB2B - .jjj890Op01() - .build(); - -const skuJjj890OpRedEu = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${jjj890Op01.sku}-${euWarehouse.key}`) - .sku(jjj890Op01.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(euWarehouse.key)); - -export default skuJjj890OpRedEu; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jjj890-op-red-us.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jjj890-op-red-us.spec.ts deleted file mode 100644 index d84536322..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jjj890-op-red-us.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuJjj890OpRedUs from './sku-jjj890-op-red-us'; - -describe(`with skuJjj890OpRedUs preset and us-warehouse channel`, () => { - it(`should return a skuJjj890OpRedUs preset`, () => { - const skuJjj890OpRedUsPreset = - skuJjj890OpRedUs().build(); - expect(skuJjj890OpRedUsPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "jjj890-op-red-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "jjj890-op-red", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuJjj890OpRedUs preset when built for graphql`, () => { - const skuJjj890OpRedUsPresetGraphql = - skuJjj890OpRedUs().buildGraphql(); - expect(skuJjj890OpRedUsPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "jjj890-op-red-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "jjj890-op-red", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jjj890-op-red-us.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jjj890-op-red-us.ts deleted file mode 100644 index 314a160c9..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-jjj890-op-red-us.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const usWarehouse = ChannelDraft.presets.sampleDataB2B - .usWarehouse() - .build(); - -const jjj890Op01 = ProductVariantDraft.presets.sampleDataB2B - .jjj890Op01() - .build(); - -const skuJjj890OpRedUs = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${jjj890Op01.sku}-${usWarehouse.key}`) - .sku(jjj890Op01.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(usWarehouse.key)); - -export default skuJjj890OpRedUs; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-k-567-yz-2015-default-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-k-567-yz-2015-default-warehouse.spec.ts new file mode 100644 index 000000000..15380174f --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-k-567-yz-2015-default-warehouse.spec.ts @@ -0,0 +1,40 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuK567Yz2015DefaultWarehouse preset`, () => { + it(`should return a skuK567Yz2015DefaultWarehouse preset when built for rest`, () => { + const skuK567Yz2015DefaultWarehousePreset = InventoryEntryDraftRest.presets + .skuK567Yz2015DefaultWarehouse() + .build(); + expect(skuK567Yz2015DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuK567Yz2015DefaultWarehouse preset when built for graphql`, () => { + const skuK567Yz2015DefaultWarehousePreset = + InventoryEntryDraftGraphql.presets + .skuK567Yz2015DefaultWarehouse() + .build(); + expect(skuK567Yz2015DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuK567Yz2015DefaultWarehouse preset when built for legacy rest`, () => { + const skuK567Yz2015DefaultWarehousePreset = InventoryEntryDraft.presets + .skuK567Yz2015DefaultWarehouse() + .buildRest(); + expect(skuK567Yz2015DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuK567Yz2015DefaultWarehouse preset when built for legacy graphql`, () => { + const skuK567Yz2015DefaultWarehousePreset = InventoryEntryDraft.presets + .skuK567Yz2015DefaultWarehouse() + .buildGraphql(); + expect(skuK567Yz2015DefaultWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-k-567-yz-2015-default-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-k-567-yz-2015-default-warehouse.ts new file mode 100644 index 000000000..864aa9eb4 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-k-567-yz-2015-default-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .defaultWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .k567Yz01() + .build(); + +const skuK567Yz2015DefaultWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('k567-yz-2015-default-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuK567Yz2015DefaultWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-k-567-yz-2015-eu-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-k-567-yz-2015-eu-warehouse.spec.ts new file mode 100644 index 000000000..948b3e729 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-k-567-yz-2015-eu-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuK567Yz2015EuWarehouse preset`, () => { + it(`should return a skuK567Yz2015EuWarehouse preset when built for rest`, () => { + const skuK567Yz2015EuWarehousePreset = InventoryEntryDraftRest.presets + .skuK567Yz2015EuWarehouse() + .build(); + expect(skuK567Yz2015EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuK567Yz2015EuWarehouse preset when built for graphql`, () => { + const skuK567Yz2015EuWarehousePreset = InventoryEntryDraftGraphql.presets + .skuK567Yz2015EuWarehouse() + .build(); + expect(skuK567Yz2015EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuK567Yz2015EuWarehouse preset when built for legacy rest`, () => { + const skuK567Yz2015EuWarehousePreset = InventoryEntryDraft.presets + .skuK567Yz2015EuWarehouse() + .buildRest(); + expect(skuK567Yz2015EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuK567Yz2015EuWarehouse preset when built for legacy graphql`, () => { + const skuK567Yz2015EuWarehousePreset = InventoryEntryDraft.presets + .skuK567Yz2015EuWarehouse() + .buildGraphql(); + expect(skuK567Yz2015EuWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-k-567-yz-2015-eu-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-k-567-yz-2015-eu-warehouse.ts new file mode 100644 index 000000000..a7ef4a5ef --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-k-567-yz-2015-eu-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .euWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .k567Yz01() + .build(); + +const skuK567Yz2015EuWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('k567-yz-2015-eu-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuK567Yz2015EuWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-k-567-yz-2015-us-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-k-567-yz-2015-us-warehouse.spec.ts new file mode 100644 index 000000000..e6e2db3bf --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-k-567-yz-2015-us-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuK567Yz2015UsWarehouse preset`, () => { + it(`should return a skuK567Yz2015UsWarehouse preset when built for rest`, () => { + const skuK567Yz2015UsWarehousePreset = InventoryEntryDraftRest.presets + .skuK567Yz2015UsWarehouse() + .build(); + expect(skuK567Yz2015UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuK567Yz2015UsWarehouse preset when built for graphql`, () => { + const skuK567Yz2015UsWarehousePreset = InventoryEntryDraftGraphql.presets + .skuK567Yz2015UsWarehouse() + .build(); + expect(skuK567Yz2015UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuK567Yz2015UsWarehouse preset when built for legacy rest`, () => { + const skuK567Yz2015UsWarehousePreset = InventoryEntryDraft.presets + .skuK567Yz2015UsWarehouse() + .buildRest(); + expect(skuK567Yz2015UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuK567Yz2015UsWarehouse preset when built for legacy graphql`, () => { + const skuK567Yz2015UsWarehousePreset = InventoryEntryDraft.presets + .skuK567Yz2015UsWarehouse() + .buildGraphql(); + expect(skuK567Yz2015UsWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-k-567-yz-2015-us-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-k-567-yz-2015-us-warehouse.ts new file mode 100644 index 000000000..511d36664 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-k-567-yz-2015-us-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .usWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .k567Yz01() + .build(); + +const skuK567Yz2015UsWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('k567-yz-2015-us-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuK567Yz2015UsWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-k-567-yz-2019-default-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-k-567-yz-2019-default-warehouse.spec.ts new file mode 100644 index 000000000..e2c6fd8e2 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-k-567-yz-2019-default-warehouse.spec.ts @@ -0,0 +1,40 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuK567Yz2019DefaultWarehouse preset`, () => { + it(`should return a skuK567Yz2019DefaultWarehouse preset when built for rest`, () => { + const skuK567Yz2019DefaultWarehousePreset = InventoryEntryDraftRest.presets + .skuK567Yz2019DefaultWarehouse() + .build(); + expect(skuK567Yz2019DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuK567Yz2019DefaultWarehouse preset when built for graphql`, () => { + const skuK567Yz2019DefaultWarehousePreset = + InventoryEntryDraftGraphql.presets + .skuK567Yz2019DefaultWarehouse() + .build(); + expect(skuK567Yz2019DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuK567Yz2019DefaultWarehouse preset when built for legacy rest`, () => { + const skuK567Yz2019DefaultWarehousePreset = InventoryEntryDraft.presets + .skuK567Yz2019DefaultWarehouse() + .buildRest(); + expect(skuK567Yz2019DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuK567Yz2019DefaultWarehouse preset when built for legacy graphql`, () => { + const skuK567Yz2019DefaultWarehousePreset = InventoryEntryDraft.presets + .skuK567Yz2019DefaultWarehouse() + .buildGraphql(); + expect(skuK567Yz2019DefaultWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-k-567-yz-2019-default-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-k-567-yz-2019-default-warehouse.ts new file mode 100644 index 000000000..3d7277ff6 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-k-567-yz-2019-default-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .defaultWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .k567Yz02() + .build(); + +const skuK567Yz2019DefaultWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('k567-yz-2019-default-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuK567Yz2019DefaultWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-k-567-yz-2019-eu-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-k-567-yz-2019-eu-warehouse.spec.ts new file mode 100644 index 000000000..bab3abd2d --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-k-567-yz-2019-eu-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuK567Yz2019EuWarehouse preset`, () => { + it(`should return a skuK567Yz2019EuWarehouse preset when built for rest`, () => { + const skuK567Yz2019EuWarehousePreset = InventoryEntryDraftRest.presets + .skuK567Yz2019EuWarehouse() + .build(); + expect(skuK567Yz2019EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuK567Yz2019EuWarehouse preset when built for graphql`, () => { + const skuK567Yz2019EuWarehousePreset = InventoryEntryDraftGraphql.presets + .skuK567Yz2019EuWarehouse() + .build(); + expect(skuK567Yz2019EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuK567Yz2019EuWarehouse preset when built for legacy rest`, () => { + const skuK567Yz2019EuWarehousePreset = InventoryEntryDraft.presets + .skuK567Yz2019EuWarehouse() + .buildRest(); + expect(skuK567Yz2019EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuK567Yz2019EuWarehouse preset when built for legacy graphql`, () => { + const skuK567Yz2019EuWarehousePreset = InventoryEntryDraft.presets + .skuK567Yz2019EuWarehouse() + .buildGraphql(); + expect(skuK567Yz2019EuWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-k-567-yz-2019-eu-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-k-567-yz-2019-eu-warehouse.ts new file mode 100644 index 000000000..5579d840b --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-k-567-yz-2019-eu-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .euWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .k567Yz02() + .build(); + +const skuK567Yz2019EuWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('k567-yz-2019-eu-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuK567Yz2019EuWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-k-567-yz-2019-us-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-k-567-yz-2019-us-warehouse.spec.ts new file mode 100644 index 000000000..173ece613 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-k-567-yz-2019-us-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuK567Yz2019UsWarehouse preset`, () => { + it(`should return a skuK567Yz2019UsWarehouse preset when built for rest`, () => { + const skuK567Yz2019UsWarehousePreset = InventoryEntryDraftRest.presets + .skuK567Yz2019UsWarehouse() + .build(); + expect(skuK567Yz2019UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuK567Yz2019UsWarehouse preset when built for graphql`, () => { + const skuK567Yz2019UsWarehousePreset = InventoryEntryDraftGraphql.presets + .skuK567Yz2019UsWarehouse() + .build(); + expect(skuK567Yz2019UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuK567Yz2019UsWarehouse preset when built for legacy rest`, () => { + const skuK567Yz2019UsWarehousePreset = InventoryEntryDraft.presets + .skuK567Yz2019UsWarehouse() + .buildRest(); + expect(skuK567Yz2019UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuK567Yz2019UsWarehouse preset when built for legacy graphql`, () => { + const skuK567Yz2019UsWarehousePreset = InventoryEntryDraft.presets + .skuK567Yz2019UsWarehouse() + .buildGraphql(); + expect(skuK567Yz2019UsWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-k-567-yz-2019-us-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-k-567-yz-2019-us-warehouse.ts new file mode 100644 index 000000000..07127c3b5 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-k-567-yz-2019-us-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .usWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .k567Yz02() + .build(); + +const skuK567Yz2019UsWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('k567-yz-2019-us-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuK567Yz2019UsWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-k-567-yz-2023-default-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-k-567-yz-2023-default-warehouse.spec.ts new file mode 100644 index 000000000..429f27c5c --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-k-567-yz-2023-default-warehouse.spec.ts @@ -0,0 +1,40 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuK567Yz2023DefaultWarehouse preset`, () => { + it(`should return a skuK567Yz2023DefaultWarehouse preset when built for rest`, () => { + const skuK567Yz2023DefaultWarehousePreset = InventoryEntryDraftRest.presets + .skuK567Yz2023DefaultWarehouse() + .build(); + expect(skuK567Yz2023DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuK567Yz2023DefaultWarehouse preset when built for graphql`, () => { + const skuK567Yz2023DefaultWarehousePreset = + InventoryEntryDraftGraphql.presets + .skuK567Yz2023DefaultWarehouse() + .build(); + expect(skuK567Yz2023DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuK567Yz2023DefaultWarehouse preset when built for legacy rest`, () => { + const skuK567Yz2023DefaultWarehousePreset = InventoryEntryDraft.presets + .skuK567Yz2023DefaultWarehouse() + .buildRest(); + expect(skuK567Yz2023DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuK567Yz2023DefaultWarehouse preset when built for legacy graphql`, () => { + const skuK567Yz2023DefaultWarehousePreset = InventoryEntryDraft.presets + .skuK567Yz2023DefaultWarehouse() + .buildGraphql(); + expect(skuK567Yz2023DefaultWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-k-567-yz-2023-default-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-k-567-yz-2023-default-warehouse.ts new file mode 100644 index 000000000..273b9d4c0 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-k-567-yz-2023-default-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .defaultWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .k567Yz03() + .build(); + +const skuK567Yz2023DefaultWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('k567-yz-2023-default-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuK567Yz2023DefaultWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-k-567-yz-2023-eu-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-k-567-yz-2023-eu-warehouse.spec.ts new file mode 100644 index 000000000..41997b17a --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-k-567-yz-2023-eu-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuK567Yz2023EuWarehouse preset`, () => { + it(`should return a skuK567Yz2023EuWarehouse preset when built for rest`, () => { + const skuK567Yz2023EuWarehousePreset = InventoryEntryDraftRest.presets + .skuK567Yz2023EuWarehouse() + .build(); + expect(skuK567Yz2023EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuK567Yz2023EuWarehouse preset when built for graphql`, () => { + const skuK567Yz2023EuWarehousePreset = InventoryEntryDraftGraphql.presets + .skuK567Yz2023EuWarehouse() + .build(); + expect(skuK567Yz2023EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuK567Yz2023EuWarehouse preset when built for legacy rest`, () => { + const skuK567Yz2023EuWarehousePreset = InventoryEntryDraft.presets + .skuK567Yz2023EuWarehouse() + .buildRest(); + expect(skuK567Yz2023EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuK567Yz2023EuWarehouse preset when built for legacy graphql`, () => { + const skuK567Yz2023EuWarehousePreset = InventoryEntryDraft.presets + .skuK567Yz2023EuWarehouse() + .buildGraphql(); + expect(skuK567Yz2023EuWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-k-567-yz-2023-eu-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-k-567-yz-2023-eu-warehouse.ts new file mode 100644 index 000000000..0c6f66cb2 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-k-567-yz-2023-eu-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .euWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .k567Yz03() + .build(); + +const skuK567Yz2023EuWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('k567-yz-2023-eu-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuK567Yz2023EuWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-k-567-yz-2023-us-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-k-567-yz-2023-us-warehouse.spec.ts new file mode 100644 index 000000000..4b188617f --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-k-567-yz-2023-us-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuK567Yz2023UsWarehouse preset`, () => { + it(`should return a skuK567Yz2023UsWarehouse preset when built for rest`, () => { + const skuK567Yz2023UsWarehousePreset = InventoryEntryDraftRest.presets + .skuK567Yz2023UsWarehouse() + .build(); + expect(skuK567Yz2023UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuK567Yz2023UsWarehouse preset when built for graphql`, () => { + const skuK567Yz2023UsWarehousePreset = InventoryEntryDraftGraphql.presets + .skuK567Yz2023UsWarehouse() + .build(); + expect(skuK567Yz2023UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuK567Yz2023UsWarehouse preset when built for legacy rest`, () => { + const skuK567Yz2023UsWarehousePreset = InventoryEntryDraft.presets + .skuK567Yz2023UsWarehouse() + .buildRest(); + expect(skuK567Yz2023UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuK567Yz2023UsWarehouse preset when built for legacy graphql`, () => { + const skuK567Yz2023UsWarehousePreset = InventoryEntryDraft.presets + .skuK567Yz2023UsWarehouse() + .buildGraphql(); + expect(skuK567Yz2023UsWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-k-567-yz-2023-us-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-k-567-yz-2023-us-warehouse.ts new file mode 100644 index 000000000..1f9db4981 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-k-567-yz-2023-us-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .usWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .k567Yz03() + .build(); + +const skuK567Yz2023UsWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('k567-yz-2023-us-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuK567Yz2023UsWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-k567-yz-2015-default.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-k567-yz-2015-default.spec.ts deleted file mode 100644 index 67ebe4c1b..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-k567-yz-2015-default.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuK567Yz2015Default from './sku-k567-yz-2015-default'; - -describe(`with skuK567Yz2015Default preset and default-warehouse channel`, () => { - it(`should return a skuK567Yz2015Default preset`, () => { - const skuK567Yz2015DefaultPreset = - skuK567Yz2015Default().build(); - expect(skuK567Yz2015DefaultPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "k567-yz-2015-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "k567-yz-2015", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuK567Yz2015Default preset when built for graphql`, () => { - const skuK567Yz2015DefaultPresetGraphql = - skuK567Yz2015Default().buildGraphql(); - expect(skuK567Yz2015DefaultPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "k567-yz-2015-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "k567-yz-2015", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-k567-yz-2015-default.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-k567-yz-2015-default.ts deleted file mode 100644 index fba89fa51..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-k567-yz-2015-default.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const defaultWarehouse = ChannelDraft.presets.sampleDataB2B - .defaultWarehouse() - .build(); - -const k567Yz01 = ProductVariantDraft.presets.sampleDataB2B - .k567Yz01() - .build(); - -const skuK567Yz2015Default = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${k567Yz01.sku}-${defaultWarehouse.key}`) - .sku(k567Yz01.sku!) - .quantityOnStock(1000) - .supplyChannel( - KeyReferenceDraft.presets.channel().key(defaultWarehouse.key) - ); - -export default skuK567Yz2015Default; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-k567-yz-2015-eu.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-k567-yz-2015-eu.spec.ts deleted file mode 100644 index 48bacdac2..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-k567-yz-2015-eu.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuK567Yz2015Eu from './sku-k567-yz-2015-eu'; - -describe(`with skuK567Yz2015Eu preset and eu-warehouse channel`, () => { - it(`should return a skuK567Yz2015Eu preset`, () => { - const skuK567Yz2015EuPreset = - skuK567Yz2015Eu().build(); - expect(skuK567Yz2015EuPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "k567-yz-2015-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "k567-yz-2015", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuK567Yz2015Eu preset when built for graphql`, () => { - const skuK567Yz2015EuPresetGraphql = - skuK567Yz2015Eu().buildGraphql(); - expect(skuK567Yz2015EuPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "k567-yz-2015-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "k567-yz-2015", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-k567-yz-2015-eu.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-k567-yz-2015-eu.ts deleted file mode 100644 index ff076cb76..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-k567-yz-2015-eu.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const euWarehouse = ChannelDraft.presets.sampleDataB2B - .euWarehouse() - .build(); - -const k567Yz01 = ProductVariantDraft.presets.sampleDataB2B - .k567Yz01() - .build(); - -const skuK567Yz2015Eu = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${k567Yz01.sku}-${euWarehouse.key}`) - .sku(k567Yz01.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(euWarehouse.key)); - -export default skuK567Yz2015Eu; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-k567-yz-2015-us.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-k567-yz-2015-us.spec.ts deleted file mode 100644 index bd32f6612..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-k567-yz-2015-us.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuK567Yz2015Us from './sku-k567-yz-2015-us'; - -describe(`with skuK567Yz2015Us preset and us-warehouse channel`, () => { - it(`should return a skuK567Yz2015Us preset`, () => { - const skuK567Yz2015UsPreset = - skuK567Yz2015Us().build(); - expect(skuK567Yz2015UsPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "k567-yz-2015-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "k567-yz-2015", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuK567Yz2015Us preset when built for graphql`, () => { - const skuK567Yz2015UsPresetGraphql = - skuK567Yz2015Us().buildGraphql(); - expect(skuK567Yz2015UsPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "k567-yz-2015-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "k567-yz-2015", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-k567-yz-2015-us.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-k567-yz-2015-us.ts deleted file mode 100644 index 9e7529f4b..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-k567-yz-2015-us.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const usWarehouse = ChannelDraft.presets.sampleDataB2B - .usWarehouse() - .build(); - -const k567Yz01 = ProductVariantDraft.presets.sampleDataB2B - .k567Yz01() - .build(); - -const skuK567Yz2015Us = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${k567Yz01.sku}-${usWarehouse.key}`) - .sku(k567Yz01.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(usWarehouse.key)); - -export default skuK567Yz2015Us; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-k567-yz-2019-default.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-k567-yz-2019-default.spec.ts deleted file mode 100644 index 4f6b43fba..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-k567-yz-2019-default.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuK567Yz2019Default from './sku-k567-yz-2019-default'; - -describe(`with skuK567Yz2019Default preset and default-warehouse channel`, () => { - it(`should return a skuK567Yz2019Default preset`, () => { - const skuK567Yz2019DefaultPreset = - skuK567Yz2019Default().build(); - expect(skuK567Yz2019DefaultPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "k567-yz-2019-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "k567-yz-2019", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuK567Yz2019Default preset when built for graphql`, () => { - const skuK567Yz2019DefaultPresetGraphql = - skuK567Yz2019Default().buildGraphql(); - expect(skuK567Yz2019DefaultPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "k567-yz-2019-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "k567-yz-2019", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-k567-yz-2019-default.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-k567-yz-2019-default.ts deleted file mode 100644 index 351faaabe..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-k567-yz-2019-default.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const defaultWarehouse = ChannelDraft.presets.sampleDataB2B - .defaultWarehouse() - .build(); - -const k567Yz02 = ProductVariantDraft.presets.sampleDataB2B - .k567Yz02() - .build(); - -const skuK567Yz2019Default = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${k567Yz02.sku}-${defaultWarehouse.key}`) - .sku(k567Yz02.sku!) - .quantityOnStock(1000) - .supplyChannel( - KeyReferenceDraft.presets.channel().key(defaultWarehouse.key) - ); - -export default skuK567Yz2019Default; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-k567-yz-2019-eu.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-k567-yz-2019-eu.spec.ts deleted file mode 100644 index 5a107fe0e..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-k567-yz-2019-eu.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuK567Yz2019Eu from './sku-k567-yz-2019-eu'; - -describe(`with skuK567Yz2019Eu preset and eu-warehouse channel`, () => { - it(`should return a skuK567Yz2019Eu preset`, () => { - const skuK567Yz2019EuPreset = - skuK567Yz2019Eu().build(); - expect(skuK567Yz2019EuPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "k567-yz-2019-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "k567-yz-2019", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuK567Yz2019Eu preset when built for graphql`, () => { - const skuK567Yz2019EuPresetGraphql = - skuK567Yz2019Eu().buildGraphql(); - expect(skuK567Yz2019EuPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "k567-yz-2019-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "k567-yz-2019", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-k567-yz-2019-eu.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-k567-yz-2019-eu.ts deleted file mode 100644 index 4e64ac5af..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-k567-yz-2019-eu.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const euWarehouse = ChannelDraft.presets.sampleDataB2B - .euWarehouse() - .build(); - -const k567Yz02 = ProductVariantDraft.presets.sampleDataB2B - .k567Yz02() - .build(); - -const skuK567Yz2019Eu = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${k567Yz02.sku}-${euWarehouse.key}`) - .sku(k567Yz02.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(euWarehouse.key)); - -export default skuK567Yz2019Eu; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-k567-yz-2019-us.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-k567-yz-2019-us.spec.ts deleted file mode 100644 index 59a2cc76c..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-k567-yz-2019-us.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuK567Yz2019Us from './sku-k567-yz-2019-us'; - -describe(`with skuK567Yz2019Us preset and us-warehouse channel`, () => { - it(`should return a skuK567Yz2019Us preset`, () => { - const skuK567Yz2019UsPreset = - skuK567Yz2019Us().build(); - expect(skuK567Yz2019UsPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "k567-yz-2019-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "k567-yz-2019", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuK567Yz2019Us preset when built for graphql`, () => { - const skuK567Yz2019UsPresetGraphql = - skuK567Yz2019Us().buildGraphql(); - expect(skuK567Yz2019UsPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "k567-yz-2019-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "k567-yz-2019", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-k567-yz-2019-us.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-k567-yz-2019-us.ts deleted file mode 100644 index 0665414a2..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-k567-yz-2019-us.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const usWarehouse = ChannelDraft.presets.sampleDataB2B - .usWarehouse() - .build(); - -const k567Yz02 = ProductVariantDraft.presets.sampleDataB2B - .k567Yz02() - .build(); - -const skuK567Yz2019Us = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${k567Yz02.sku}-${usWarehouse.key}`) - .sku(k567Yz02.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(usWarehouse.key)); - -export default skuK567Yz2019Us; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-k567-yz-2023-default.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-k567-yz-2023-default.spec.ts deleted file mode 100644 index 0b3a1db2b..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-k567-yz-2023-default.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuK567Yz2023Default from './sku-k567-yz-2023-default'; - -describe(`with skuK567Yz2023Default preset and default-warehouse channel`, () => { - it(`should return a skuK567Yz2023Default preset`, () => { - const skuK567Yz2023DefaultPreset = - skuK567Yz2023Default().build(); - expect(skuK567Yz2023DefaultPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "k567-yz-2023-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "k567-yz-2023", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuK567Yz2023Default preset when built for graphql`, () => { - const skuK567Yz2023DefaultPresetGraphql = - skuK567Yz2023Default().buildGraphql(); - expect(skuK567Yz2023DefaultPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "k567-yz-2023-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "k567-yz-2023", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-k567-yz-2023-default.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-k567-yz-2023-default.ts deleted file mode 100644 index 9ba04a60f..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-k567-yz-2023-default.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const defaultWarehouse = ChannelDraft.presets.sampleDataB2B - .defaultWarehouse() - .build(); - -const k567Yz03 = ProductVariantDraft.presets.sampleDataB2B - .k567Yz03() - .build(); - -const skuK567Yz2023Default = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${k567Yz03.sku}-${defaultWarehouse.key}`) - .sku(k567Yz03.sku!) - .quantityOnStock(1000) - .supplyChannel( - KeyReferenceDraft.presets.channel().key(defaultWarehouse.key) - ); - -export default skuK567Yz2023Default; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-k567-yz-2023-eu.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-k567-yz-2023-eu.spec.ts deleted file mode 100644 index d8177f280..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-k567-yz-2023-eu.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuK567Yz2023Eu from './sku-k567-yz-2023-eu'; - -describe(`with skuK567Yz2023Eu preset and eu-warehouse channel`, () => { - it(`should return a skuK567Yz2023Eu preset`, () => { - const skuK567Yz2023EuPreset = - skuK567Yz2023Eu().build(); - expect(skuK567Yz2023EuPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "k567-yz-2023-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "k567-yz-2023", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuK567Yz2023Eu preset when built for graphql`, () => { - const skuK567Yz2023EuPresetGraphql = - skuK567Yz2023Eu().buildGraphql(); - expect(skuK567Yz2023EuPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "k567-yz-2023-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "k567-yz-2023", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-k567-yz-2023-eu.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-k567-yz-2023-eu.ts deleted file mode 100644 index 950821108..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-k567-yz-2023-eu.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const euWarehouse = ChannelDraft.presets.sampleDataB2B - .euWarehouse() - .build(); - -const k567Yz03 = ProductVariantDraft.presets.sampleDataB2B - .k567Yz03() - .build(); - -const skuK567Yz2023Eu = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${k567Yz03.sku}-${euWarehouse.key}`) - .sku(k567Yz03.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(euWarehouse.key)); - -export default skuK567Yz2023Eu; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-k567-yz-2023-us.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-k567-yz-2023-us.spec.ts deleted file mode 100644 index 3bcc3ed7a..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-k567-yz-2023-us.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuK567Yz2023Us from './sku-k567-yz-2023-us'; - -describe(`with skuK567Yz2023Us preset and us-warehouse channel`, () => { - it(`should return a skuK567Yz2023Us preset`, () => { - const skuK567Yz2023UsPreset = - skuK567Yz2023Us().build(); - expect(skuK567Yz2023UsPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "k567-yz-2023-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "k567-yz-2023", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuK567Yz2023Us preset when built for graphql`, () => { - const skuK567Yz2023UsPresetGraphql = - skuK567Yz2023Us().buildGraphql(); - expect(skuK567Yz2023UsPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "k567-yz-2023-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "k567-yz-2023", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-k567-yz-2023-us.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-k567-yz-2023-us.ts deleted file mode 100644 index 1e37995b7..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-k567-yz-2023-us.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const usWarehouse = ChannelDraft.presets.sampleDataB2B - .usWarehouse() - .build(); - -const k567Yz03 = ProductVariantDraft.presets.sampleDataB2B - .k567Yz03() - .build(); - -const skuK567Yz2023Us = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${k567Yz03.sku}-${usWarehouse.key}`) - .sku(k567Yz03.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(usWarehouse.key)); - -export default skuK567Yz2023Us; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-kk-567-yz-2015-default-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-kk-567-yz-2015-default-warehouse.spec.ts new file mode 100644 index 000000000..f4c867ffd --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-kk-567-yz-2015-default-warehouse.spec.ts @@ -0,0 +1,40 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuKk567Yz2015DefaultWarehouse preset`, () => { + it(`should return a skuKk567Yz2015DefaultWarehouse preset when built for rest`, () => { + const skuKk567Yz2015DefaultWarehousePreset = InventoryEntryDraftRest.presets + .skuKk567Yz2015DefaultWarehouse() + .build(); + expect(skuKk567Yz2015DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuKk567Yz2015DefaultWarehouse preset when built for graphql`, () => { + const skuKk567Yz2015DefaultWarehousePreset = + InventoryEntryDraftGraphql.presets + .skuKk567Yz2015DefaultWarehouse() + .build(); + expect(skuKk567Yz2015DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuKk567Yz2015DefaultWarehouse preset when built for legacy rest`, () => { + const skuKk567Yz2015DefaultWarehousePreset = InventoryEntryDraft.presets + .skuKk567Yz2015DefaultWarehouse() + .buildRest(); + expect(skuKk567Yz2015DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuKk567Yz2015DefaultWarehouse preset when built for legacy graphql`, () => { + const skuKk567Yz2015DefaultWarehousePreset = InventoryEntryDraft.presets + .skuKk567Yz2015DefaultWarehouse() + .buildGraphql(); + expect(skuKk567Yz2015DefaultWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-kk-567-yz-2015-default-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-kk-567-yz-2015-default-warehouse.ts new file mode 100644 index 000000000..4db4fea12 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-kk-567-yz-2015-default-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .defaultWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .kk567Yz01() + .build(); + +const skuKk567Yz2015DefaultWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('kk567-yz-2015-default-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuKk567Yz2015DefaultWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-kk-567-yz-2015-eu-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-kk-567-yz-2015-eu-warehouse.spec.ts new file mode 100644 index 000000000..aeefbc6b0 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-kk-567-yz-2015-eu-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuKk567Yz2015EuWarehouse preset`, () => { + it(`should return a skuKk567Yz2015EuWarehouse preset when built for rest`, () => { + const skuKk567Yz2015EuWarehousePreset = InventoryEntryDraftRest.presets + .skuKk567Yz2015EuWarehouse() + .build(); + expect(skuKk567Yz2015EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuKk567Yz2015EuWarehouse preset when built for graphql`, () => { + const skuKk567Yz2015EuWarehousePreset = InventoryEntryDraftGraphql.presets + .skuKk567Yz2015EuWarehouse() + .build(); + expect(skuKk567Yz2015EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuKk567Yz2015EuWarehouse preset when built for legacy rest`, () => { + const skuKk567Yz2015EuWarehousePreset = InventoryEntryDraft.presets + .skuKk567Yz2015EuWarehouse() + .buildRest(); + expect(skuKk567Yz2015EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuKk567Yz2015EuWarehouse preset when built for legacy graphql`, () => { + const skuKk567Yz2015EuWarehousePreset = InventoryEntryDraft.presets + .skuKk567Yz2015EuWarehouse() + .buildGraphql(); + expect(skuKk567Yz2015EuWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-kk-567-yz-2015-eu-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-kk-567-yz-2015-eu-warehouse.ts new file mode 100644 index 000000000..847380023 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-kk-567-yz-2015-eu-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .euWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .kk567Yz01() + .build(); + +const skuKk567Yz2015EuWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('kk567-yz-2015-eu-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuKk567Yz2015EuWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-kk-567-yz-2015-us-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-kk-567-yz-2015-us-warehouse.spec.ts new file mode 100644 index 000000000..3e867ec46 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-kk-567-yz-2015-us-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuKk567Yz2015UsWarehouse preset`, () => { + it(`should return a skuKk567Yz2015UsWarehouse preset when built for rest`, () => { + const skuKk567Yz2015UsWarehousePreset = InventoryEntryDraftRest.presets + .skuKk567Yz2015UsWarehouse() + .build(); + expect(skuKk567Yz2015UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuKk567Yz2015UsWarehouse preset when built for graphql`, () => { + const skuKk567Yz2015UsWarehousePreset = InventoryEntryDraftGraphql.presets + .skuKk567Yz2015UsWarehouse() + .build(); + expect(skuKk567Yz2015UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuKk567Yz2015UsWarehouse preset when built for legacy rest`, () => { + const skuKk567Yz2015UsWarehousePreset = InventoryEntryDraft.presets + .skuKk567Yz2015UsWarehouse() + .buildRest(); + expect(skuKk567Yz2015UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuKk567Yz2015UsWarehouse preset when built for legacy graphql`, () => { + const skuKk567Yz2015UsWarehousePreset = InventoryEntryDraft.presets + .skuKk567Yz2015UsWarehouse() + .buildGraphql(); + expect(skuKk567Yz2015UsWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-kk-567-yz-2015-us-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-kk-567-yz-2015-us-warehouse.ts new file mode 100644 index 000000000..c61b66dc6 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-kk-567-yz-2015-us-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .usWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .kk567Yz01() + .build(); + +const skuKk567Yz2015UsWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('kk567-yz-2015-us-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuKk567Yz2015UsWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-kk-567-yz-2019-default-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-kk-567-yz-2019-default-warehouse.spec.ts new file mode 100644 index 000000000..4b1e129e6 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-kk-567-yz-2019-default-warehouse.spec.ts @@ -0,0 +1,40 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuKk567Yz2019DefaultWarehouse preset`, () => { + it(`should return a skuKk567Yz2019DefaultWarehouse preset when built for rest`, () => { + const skuKk567Yz2019DefaultWarehousePreset = InventoryEntryDraftRest.presets + .skuKk567Yz2019DefaultWarehouse() + .build(); + expect(skuKk567Yz2019DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuKk567Yz2019DefaultWarehouse preset when built for graphql`, () => { + const skuKk567Yz2019DefaultWarehousePreset = + InventoryEntryDraftGraphql.presets + .skuKk567Yz2019DefaultWarehouse() + .build(); + expect(skuKk567Yz2019DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuKk567Yz2019DefaultWarehouse preset when built for legacy rest`, () => { + const skuKk567Yz2019DefaultWarehousePreset = InventoryEntryDraft.presets + .skuKk567Yz2019DefaultWarehouse() + .buildRest(); + expect(skuKk567Yz2019DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuKk567Yz2019DefaultWarehouse preset when built for legacy graphql`, () => { + const skuKk567Yz2019DefaultWarehousePreset = InventoryEntryDraft.presets + .skuKk567Yz2019DefaultWarehouse() + .buildGraphql(); + expect(skuKk567Yz2019DefaultWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-kk-567-yz-2019-default-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-kk-567-yz-2019-default-warehouse.ts new file mode 100644 index 000000000..1fc8a2394 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-kk-567-yz-2019-default-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .defaultWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .kk567Yz02() + .build(); + +const skuKk567Yz2019DefaultWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('kk567-yz-2019-default-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuKk567Yz2019DefaultWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-kk-567-yz-2019-eu-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-kk-567-yz-2019-eu-warehouse.spec.ts new file mode 100644 index 000000000..c005e5566 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-kk-567-yz-2019-eu-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuKk567Yz2019EuWarehouse preset`, () => { + it(`should return a skuKk567Yz2019EuWarehouse preset when built for rest`, () => { + const skuKk567Yz2019EuWarehousePreset = InventoryEntryDraftRest.presets + .skuKk567Yz2019EuWarehouse() + .build(); + expect(skuKk567Yz2019EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuKk567Yz2019EuWarehouse preset when built for graphql`, () => { + const skuKk567Yz2019EuWarehousePreset = InventoryEntryDraftGraphql.presets + .skuKk567Yz2019EuWarehouse() + .build(); + expect(skuKk567Yz2019EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuKk567Yz2019EuWarehouse preset when built for legacy rest`, () => { + const skuKk567Yz2019EuWarehousePreset = InventoryEntryDraft.presets + .skuKk567Yz2019EuWarehouse() + .buildRest(); + expect(skuKk567Yz2019EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuKk567Yz2019EuWarehouse preset when built for legacy graphql`, () => { + const skuKk567Yz2019EuWarehousePreset = InventoryEntryDraft.presets + .skuKk567Yz2019EuWarehouse() + .buildGraphql(); + expect(skuKk567Yz2019EuWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-kk-567-yz-2019-eu-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-kk-567-yz-2019-eu-warehouse.ts new file mode 100644 index 000000000..258e9f78a --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-kk-567-yz-2019-eu-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .euWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .kk567Yz02() + .build(); + +const skuKk567Yz2019EuWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('kk567-yz-2019-eu-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuKk567Yz2019EuWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-kk-567-yz-2019-us-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-kk-567-yz-2019-us-warehouse.spec.ts new file mode 100644 index 000000000..77e445950 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-kk-567-yz-2019-us-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuKk567Yz2019UsWarehouse preset`, () => { + it(`should return a skuKk567Yz2019UsWarehouse preset when built for rest`, () => { + const skuKk567Yz2019UsWarehousePreset = InventoryEntryDraftRest.presets + .skuKk567Yz2019UsWarehouse() + .build(); + expect(skuKk567Yz2019UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuKk567Yz2019UsWarehouse preset when built for graphql`, () => { + const skuKk567Yz2019UsWarehousePreset = InventoryEntryDraftGraphql.presets + .skuKk567Yz2019UsWarehouse() + .build(); + expect(skuKk567Yz2019UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuKk567Yz2019UsWarehouse preset when built for legacy rest`, () => { + const skuKk567Yz2019UsWarehousePreset = InventoryEntryDraft.presets + .skuKk567Yz2019UsWarehouse() + .buildRest(); + expect(skuKk567Yz2019UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuKk567Yz2019UsWarehouse preset when built for legacy graphql`, () => { + const skuKk567Yz2019UsWarehousePreset = InventoryEntryDraft.presets + .skuKk567Yz2019UsWarehouse() + .buildGraphql(); + expect(skuKk567Yz2019UsWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-kk-567-yz-2019-us-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-kk-567-yz-2019-us-warehouse.ts new file mode 100644 index 000000000..dc0e42e19 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-kk-567-yz-2019-us-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .usWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .kk567Yz02() + .build(); + +const skuKk567Yz2019UsWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('kk567-yz-2019-us-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuKk567Yz2019UsWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-kk-567-yz-2023-default-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-kk-567-yz-2023-default-warehouse.spec.ts new file mode 100644 index 000000000..8fd9e9a42 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-kk-567-yz-2023-default-warehouse.spec.ts @@ -0,0 +1,40 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuKk567Yz2023DefaultWarehouse preset`, () => { + it(`should return a skuKk567Yz2023DefaultWarehouse preset when built for rest`, () => { + const skuKk567Yz2023DefaultWarehousePreset = InventoryEntryDraftRest.presets + .skuKk567Yz2023DefaultWarehouse() + .build(); + expect(skuKk567Yz2023DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuKk567Yz2023DefaultWarehouse preset when built for graphql`, () => { + const skuKk567Yz2023DefaultWarehousePreset = + InventoryEntryDraftGraphql.presets + .skuKk567Yz2023DefaultWarehouse() + .build(); + expect(skuKk567Yz2023DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuKk567Yz2023DefaultWarehouse preset when built for legacy rest`, () => { + const skuKk567Yz2023DefaultWarehousePreset = InventoryEntryDraft.presets + .skuKk567Yz2023DefaultWarehouse() + .buildRest(); + expect(skuKk567Yz2023DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuKk567Yz2023DefaultWarehouse preset when built for legacy graphql`, () => { + const skuKk567Yz2023DefaultWarehousePreset = InventoryEntryDraft.presets + .skuKk567Yz2023DefaultWarehouse() + .buildGraphql(); + expect(skuKk567Yz2023DefaultWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-kk-567-yz-2023-default-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-kk-567-yz-2023-default-warehouse.ts new file mode 100644 index 000000000..113ed3f09 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-kk-567-yz-2023-default-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .defaultWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .kk567Yz03() + .build(); + +const skuKk567Yz2023DefaultWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('kk567-yz-2023-default-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuKk567Yz2023DefaultWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-kk-567-yz-2023-eu-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-kk-567-yz-2023-eu-warehouse.spec.ts new file mode 100644 index 000000000..4e311477e --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-kk-567-yz-2023-eu-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuKk567Yz2023EuWarehouse preset`, () => { + it(`should return a skuKk567Yz2023EuWarehouse preset when built for rest`, () => { + const skuKk567Yz2023EuWarehousePreset = InventoryEntryDraftRest.presets + .skuKk567Yz2023EuWarehouse() + .build(); + expect(skuKk567Yz2023EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuKk567Yz2023EuWarehouse preset when built for graphql`, () => { + const skuKk567Yz2023EuWarehousePreset = InventoryEntryDraftGraphql.presets + .skuKk567Yz2023EuWarehouse() + .build(); + expect(skuKk567Yz2023EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuKk567Yz2023EuWarehouse preset when built for legacy rest`, () => { + const skuKk567Yz2023EuWarehousePreset = InventoryEntryDraft.presets + .skuKk567Yz2023EuWarehouse() + .buildRest(); + expect(skuKk567Yz2023EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuKk567Yz2023EuWarehouse preset when built for legacy graphql`, () => { + const skuKk567Yz2023EuWarehousePreset = InventoryEntryDraft.presets + .skuKk567Yz2023EuWarehouse() + .buildGraphql(); + expect(skuKk567Yz2023EuWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-kk-567-yz-2023-eu-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-kk-567-yz-2023-eu-warehouse.ts new file mode 100644 index 000000000..1e6b00d95 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-kk-567-yz-2023-eu-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .euWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .kk567Yz03() + .build(); + +const skuKk567Yz2023EuWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('kk567-yz-2023-eu-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuKk567Yz2023EuWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-kk-567-yz-2023-us-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-kk-567-yz-2023-us-warehouse.spec.ts new file mode 100644 index 000000000..b345855cc --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-kk-567-yz-2023-us-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuKk567Yz2023UsWarehouse preset`, () => { + it(`should return a skuKk567Yz2023UsWarehouse preset when built for rest`, () => { + const skuKk567Yz2023UsWarehousePreset = InventoryEntryDraftRest.presets + .skuKk567Yz2023UsWarehouse() + .build(); + expect(skuKk567Yz2023UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuKk567Yz2023UsWarehouse preset when built for graphql`, () => { + const skuKk567Yz2023UsWarehousePreset = InventoryEntryDraftGraphql.presets + .skuKk567Yz2023UsWarehouse() + .build(); + expect(skuKk567Yz2023UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuKk567Yz2023UsWarehouse preset when built for legacy rest`, () => { + const skuKk567Yz2023UsWarehousePreset = InventoryEntryDraft.presets + .skuKk567Yz2023UsWarehouse() + .buildRest(); + expect(skuKk567Yz2023UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuKk567Yz2023UsWarehouse preset when built for legacy graphql`, () => { + const skuKk567Yz2023UsWarehousePreset = InventoryEntryDraft.presets + .skuKk567Yz2023UsWarehouse() + .buildGraphql(); + expect(skuKk567Yz2023UsWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-kk-567-yz-2023-us-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-kk-567-yz-2023-us-warehouse.ts new file mode 100644 index 000000000..b747ad455 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-kk-567-yz-2023-us-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .usWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .kk567Yz03() + .build(); + +const skuKk567Yz2023UsWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('kk567-yz-2023-us-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuKk567Yz2023UsWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-kk567-yz-2015-default.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-kk567-yz-2015-default.spec.ts deleted file mode 100644 index 2bb83b644..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-kk567-yz-2015-default.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuKk567Yz2015Default from './sku-kk567-yz-2015-default'; - -describe(`with skuKk567Yz2015Default preset and default-warehouse channel`, () => { - it(`should return a skuKk567Yz2015Default preset`, () => { - const skuKk567Yz2015DefaultPreset = - skuKk567Yz2015Default().build(); - expect(skuKk567Yz2015DefaultPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "kk567-yz-2015-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "kk567-yz-2015", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuKk567Yz2015Default preset when built for graphql`, () => { - const skuKk567Yz2015DefaultPresetGraphql = - skuKk567Yz2015Default().buildGraphql(); - expect(skuKk567Yz2015DefaultPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "kk567-yz-2015-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "kk567-yz-2015", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-kk567-yz-2015-default.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-kk567-yz-2015-default.ts deleted file mode 100644 index 56e17224a..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-kk567-yz-2015-default.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const defaultWarehouse = ChannelDraft.presets.sampleDataB2B - .defaultWarehouse() - .build(); - -const kk567Yz01 = ProductVariantDraft.presets.sampleDataB2B - .kk567Yz01() - .build(); - -const skuKk567Yz2015Default = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${kk567Yz01.sku}-${defaultWarehouse.key}`) - .sku(kk567Yz01.sku!) - .quantityOnStock(1000) - .supplyChannel( - KeyReferenceDraft.presets.channel().key(defaultWarehouse.key) - ); - -export default skuKk567Yz2015Default; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-kk567-yz-2015-eu.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-kk567-yz-2015-eu.spec.ts deleted file mode 100644 index a712782d3..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-kk567-yz-2015-eu.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuKk567Yz2015Eu from './sku-kk567-yz-2015-eu'; - -describe(`with skuKk567Yz2015Eu preset and eu-warehouse channel`, () => { - it(`should return a skuKk567Yz2015Eu preset`, () => { - const skuKk567Yz2015EuPreset = - skuKk567Yz2015Eu().build(); - expect(skuKk567Yz2015EuPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "kk567-yz-2015-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "kk567-yz-2015", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuKk567Yz2015Eu preset when built for graphql`, () => { - const skuKk567Yz2015EuPresetGraphql = - skuKk567Yz2015Eu().buildGraphql(); - expect(skuKk567Yz2015EuPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "kk567-yz-2015-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "kk567-yz-2015", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-kk567-yz-2015-eu.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-kk567-yz-2015-eu.ts deleted file mode 100644 index d173337e8..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-kk567-yz-2015-eu.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const euWarehouse = ChannelDraft.presets.sampleDataB2B - .euWarehouse() - .build(); - -const kk567Yz01 = ProductVariantDraft.presets.sampleDataB2B - .kk567Yz01() - .build(); - -const skuKk567Yz2015Eu = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${kk567Yz01.sku}-${euWarehouse.key}`) - .sku(kk567Yz01.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(euWarehouse.key)); - -export default skuKk567Yz2015Eu; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-kk567-yz-2015-us.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-kk567-yz-2015-us.spec.ts deleted file mode 100644 index 040866eb0..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-kk567-yz-2015-us.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuKk567Yz2015Us from './sku-kk567-yz-2015-us'; - -describe(`with skuKk567Yz2015Us preset and us-warehouse channel`, () => { - it(`should return a skuKk567Yz2015Us preset`, () => { - const skuKk567Yz2015UsPreset = - skuKk567Yz2015Us().build(); - expect(skuKk567Yz2015UsPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "kk567-yz-2015-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "kk567-yz-2015", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuKk567Yz2015Us preset when built for graphql`, () => { - const skuKk567Yz2015UsPresetGraphql = - skuKk567Yz2015Us().buildGraphql(); - expect(skuKk567Yz2015UsPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "kk567-yz-2015-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "kk567-yz-2015", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-kk567-yz-2015-us.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-kk567-yz-2015-us.ts deleted file mode 100644 index 7cb5204e8..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-kk567-yz-2015-us.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const usWarehouse = ChannelDraft.presets.sampleDataB2B - .usWarehouse() - .build(); - -const kk567Yz01 = ProductVariantDraft.presets.sampleDataB2B - .kk567Yz01() - .build(); - -const skuKk567Yz2015Us = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${kk567Yz01.sku}-${usWarehouse.key}`) - .sku(kk567Yz01.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(usWarehouse.key)); - -export default skuKk567Yz2015Us; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-kk567-yz-2019-default.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-kk567-yz-2019-default.spec.ts deleted file mode 100644 index 2ba3c8430..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-kk567-yz-2019-default.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuKk567Yz2019Default from './sku-kk567-yz-2019-default'; - -describe(`with skuKk567Yz2019Default preset and default-warehouse channel`, () => { - it(`should return a skuKk567Yz2019Default preset`, () => { - const skuKk567Yz2019DefaultPreset = - skuKk567Yz2019Default().build(); - expect(skuKk567Yz2019DefaultPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "kk567-yz-2019-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "kk567-yz-2019", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuKk567Yz2019Default preset when built for graphql`, () => { - const skuKk567Yz2019DefaultPresetGraphql = - skuKk567Yz2019Default().buildGraphql(); - expect(skuKk567Yz2019DefaultPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "kk567-yz-2019-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "kk567-yz-2019", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-kk567-yz-2019-default.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-kk567-yz-2019-default.ts deleted file mode 100644 index 6825aea1f..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-kk567-yz-2019-default.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const defaultWarehouse = ChannelDraft.presets.sampleDataB2B - .defaultWarehouse() - .build(); - -const kk567Yz02 = ProductVariantDraft.presets.sampleDataB2B - .kk567Yz02() - .build(); - -const skuKk567Yz2019Default = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${kk567Yz02.sku}-${defaultWarehouse.key}`) - .sku(kk567Yz02.sku!) - .quantityOnStock(1000) - .supplyChannel( - KeyReferenceDraft.presets.channel().key(defaultWarehouse.key) - ); - -export default skuKk567Yz2019Default; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-kk567-yz-2019-eu.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-kk567-yz-2019-eu.spec.ts deleted file mode 100644 index 32175d0cd..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-kk567-yz-2019-eu.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuKk567Yz2019Eu from './sku-kk567-yz-2019-eu'; - -describe(`with skuKk567Yz2019Eu preset and eu-warehouse channel`, () => { - it(`should return a skuKk567Yz2019Eu preset`, () => { - const skuKk567Yz2019EuPreset = - skuKk567Yz2019Eu().build(); - expect(skuKk567Yz2019EuPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "kk567-yz-2019-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "kk567-yz-2019", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuKk567Yz2019Eu preset when built for graphql`, () => { - const skuKk567Yz2019EuPresetGraphql = - skuKk567Yz2019Eu().buildGraphql(); - expect(skuKk567Yz2019EuPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "kk567-yz-2019-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "kk567-yz-2019", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-kk567-yz-2019-eu.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-kk567-yz-2019-eu.ts deleted file mode 100644 index fb6e0a061..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-kk567-yz-2019-eu.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const euWarehouse = ChannelDraft.presets.sampleDataB2B - .euWarehouse() - .build(); - -const kk567Yz02 = ProductVariantDraft.presets.sampleDataB2B - .kk567Yz02() - .build(); - -const skuKk567Yz2019Eu = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${kk567Yz02.sku}-${euWarehouse.key}`) - .sku(kk567Yz02.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(euWarehouse.key)); - -export default skuKk567Yz2019Eu; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-kk567-yz-2019-us.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-kk567-yz-2019-us.spec.ts deleted file mode 100644 index aefb6a90b..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-kk567-yz-2019-us.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuKk567Yz2019Us from './sku-kk567-yz-2019-us'; - -describe(`with skuKk567Yz2019Us preset and us-warehouse channel`, () => { - it(`should return a skuKk567Yz2019Us preset`, () => { - const skuKk567Yz2019UsPreset = - skuKk567Yz2019Us().build(); - expect(skuKk567Yz2019UsPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "kk567-yz-2019-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "kk567-yz-2019", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuKk567Yz2019Us preset when built for graphql`, () => { - const skuKk567Yz2019UsPresetGraphql = - skuKk567Yz2019Us().buildGraphql(); - expect(skuKk567Yz2019UsPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "kk567-yz-2019-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "kk567-yz-2019", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-kk567-yz-2019-us.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-kk567-yz-2019-us.ts deleted file mode 100644 index 97bc17cbb..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-kk567-yz-2019-us.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const usWarehouse = ChannelDraft.presets.sampleDataB2B - .usWarehouse() - .build(); - -const kk567Yz02 = ProductVariantDraft.presets.sampleDataB2B - .kk567Yz02() - .build(); - -const skuKk567Yz2019Us = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${kk567Yz02.sku}-${usWarehouse.key}`) - .sku(kk567Yz02.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(usWarehouse.key)); - -export default skuKk567Yz2019Us; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-kk567-yz-2023-default.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-kk567-yz-2023-default.spec.ts deleted file mode 100644 index 78353f491..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-kk567-yz-2023-default.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuKk567Yz2023Default from './sku-kk567-yz-2023-default'; - -describe(`with skuKk567Yz2023Default preset and default-warehouse channel`, () => { - it(`should return a skuKk567Yz2023Default preset`, () => { - const skuKk567Yz2023DefaultPreset = - skuKk567Yz2023Default().build(); - expect(skuKk567Yz2023DefaultPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "kk567-yz-2023-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "kk567-yz-2023", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuKk567Yz2023Default preset when built for graphql`, () => { - const skuKk567Yz2023DefaultPresetGraphql = - skuKk567Yz2023Default().buildGraphql(); - expect(skuKk567Yz2023DefaultPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "kk567-yz-2023-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "kk567-yz-2023", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-kk567-yz-2023-default.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-kk567-yz-2023-default.ts deleted file mode 100644 index 767af775e..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-kk567-yz-2023-default.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const defaultWarehouse = ChannelDraft.presets.sampleDataB2B - .defaultWarehouse() - .build(); - -const kk567Yz03 = ProductVariantDraft.presets.sampleDataB2B - .kk567Yz03() - .build(); - -const skuKk567Yz2023Default = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${kk567Yz03.sku}-${defaultWarehouse.key}`) - .sku(kk567Yz03.sku!) - .quantityOnStock(1000) - .supplyChannel( - KeyReferenceDraft.presets.channel().key(defaultWarehouse.key) - ); - -export default skuKk567Yz2023Default; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-kk567-yz-2023-eu.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-kk567-yz-2023-eu.spec.ts deleted file mode 100644 index a7bb79604..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-kk567-yz-2023-eu.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuKk567Yz2023Eu from './sku-kk567-yz-2023-eu'; - -describe(`with skuKk567Yz2023Eu preset and eu-warehouse channel`, () => { - it(`should return a skuKk567Yz2023Eu preset`, () => { - const skuKk567Yz2023EuPreset = - skuKk567Yz2023Eu().build(); - expect(skuKk567Yz2023EuPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "kk567-yz-2023-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "kk567-yz-2023", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuKk567Yz2023Eu preset when built for graphql`, () => { - const skuKk567Yz2023EuPresetGraphql = - skuKk567Yz2023Eu().buildGraphql(); - expect(skuKk567Yz2023EuPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "kk567-yz-2023-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "kk567-yz-2023", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-kk567-yz-2023-eu.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-kk567-yz-2023-eu.ts deleted file mode 100644 index a38a35383..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-kk567-yz-2023-eu.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const euWarehouse = ChannelDraft.presets.sampleDataB2B - .euWarehouse() - .build(); - -const kk567Yz03 = ProductVariantDraft.presets.sampleDataB2B - .kk567Yz03() - .build(); - -const skuKk567Yz2023Eu = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${kk567Yz03.sku}-${euWarehouse.key}`) - .sku(kk567Yz03.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(euWarehouse.key)); - -export default skuKk567Yz2023Eu; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-kk567-yz-2023-us.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-kk567-yz-2023-us.spec.ts deleted file mode 100644 index c5560da74..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-kk567-yz-2023-us.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuKk567Yz2023Us from './sku-kk567-yz-2023-us'; - -describe(`with skuKk567Yz2023Us preset and us-warehouse channel`, () => { - it(`should return a skuKk567Yz2023Us preset`, () => { - const skuKk567Yz2023UsPreset = - skuKk567Yz2023Us().build(); - expect(skuKk567Yz2023UsPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "kk567-yz-2023-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "kk567-yz-2023", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuKk567Yz2023Us preset when built for graphql`, () => { - const skuKk567Yz2023UsPresetGraphql = - skuKk567Yz2023Us().buildGraphql(); - expect(skuKk567Yz2023UsPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "kk567-yz-2023-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "kk567-yz-2023", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-kk567-yz-2023-us.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-kk567-yz-2023-us.ts deleted file mode 100644 index 8ba6df4fc..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-kk567-yz-2023-us.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const usWarehouse = ChannelDraft.presets.sampleDataB2B - .usWarehouse() - .build(); - -const kk567Yz03 = ProductVariantDraft.presets.sampleDataB2B - .kk567Yz03() - .build(); - -const skuKk567Yz2023Us = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${kk567Yz03.sku}-${usWarehouse.key}`) - .sku(kk567Yz03.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(usWarehouse.key)); - -export default skuKk567Yz2023Us; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-l-890-op-2015-default-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-l-890-op-2015-default-warehouse.spec.ts new file mode 100644 index 000000000..6a0f0c028 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-l-890-op-2015-default-warehouse.spec.ts @@ -0,0 +1,40 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuL890Op2015DefaultWarehouse preset`, () => { + it(`should return a skuL890Op2015DefaultWarehouse preset when built for rest`, () => { + const skuL890Op2015DefaultWarehousePreset = InventoryEntryDraftRest.presets + .skuL890Op2015DefaultWarehouse() + .build(); + expect(skuL890Op2015DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuL890Op2015DefaultWarehouse preset when built for graphql`, () => { + const skuL890Op2015DefaultWarehousePreset = + InventoryEntryDraftGraphql.presets + .skuL890Op2015DefaultWarehouse() + .build(); + expect(skuL890Op2015DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuL890Op2015DefaultWarehouse preset when built for legacy rest`, () => { + const skuL890Op2015DefaultWarehousePreset = InventoryEntryDraft.presets + .skuL890Op2015DefaultWarehouse() + .buildRest(); + expect(skuL890Op2015DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuL890Op2015DefaultWarehouse preset when built for legacy graphql`, () => { + const skuL890Op2015DefaultWarehousePreset = InventoryEntryDraft.presets + .skuL890Op2015DefaultWarehouse() + .buildGraphql(); + expect(skuL890Op2015DefaultWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-l-890-op-2015-default-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-l-890-op-2015-default-warehouse.ts new file mode 100644 index 000000000..3ab79784c --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-l-890-op-2015-default-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .defaultWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .l890Op01() + .build(); + +const skuL890Op2015DefaultWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('l890-op-2015-default-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuL890Op2015DefaultWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-l-890-op-2015-eu-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-l-890-op-2015-eu-warehouse.spec.ts new file mode 100644 index 000000000..f572b013a --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-l-890-op-2015-eu-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuL890Op2015EuWarehouse preset`, () => { + it(`should return a skuL890Op2015EuWarehouse preset when built for rest`, () => { + const skuL890Op2015EuWarehousePreset = InventoryEntryDraftRest.presets + .skuL890Op2015EuWarehouse() + .build(); + expect(skuL890Op2015EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuL890Op2015EuWarehouse preset when built for graphql`, () => { + const skuL890Op2015EuWarehousePreset = InventoryEntryDraftGraphql.presets + .skuL890Op2015EuWarehouse() + .build(); + expect(skuL890Op2015EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuL890Op2015EuWarehouse preset when built for legacy rest`, () => { + const skuL890Op2015EuWarehousePreset = InventoryEntryDraft.presets + .skuL890Op2015EuWarehouse() + .buildRest(); + expect(skuL890Op2015EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuL890Op2015EuWarehouse preset when built for legacy graphql`, () => { + const skuL890Op2015EuWarehousePreset = InventoryEntryDraft.presets + .skuL890Op2015EuWarehouse() + .buildGraphql(); + expect(skuL890Op2015EuWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-l-890-op-2015-eu-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-l-890-op-2015-eu-warehouse.ts new file mode 100644 index 000000000..d87bcff60 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-l-890-op-2015-eu-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .euWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .l890Op01() + .build(); + +const skuL890Op2015EuWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('l890-op-2015-eu-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuL890Op2015EuWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-l-890-op-2015-us-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-l-890-op-2015-us-warehouse.spec.ts new file mode 100644 index 000000000..b8483453d --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-l-890-op-2015-us-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuL890Op2015UsWarehouse preset`, () => { + it(`should return a skuL890Op2015UsWarehouse preset when built for rest`, () => { + const skuL890Op2015UsWarehousePreset = InventoryEntryDraftRest.presets + .skuL890Op2015UsWarehouse() + .build(); + expect(skuL890Op2015UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuL890Op2015UsWarehouse preset when built for graphql`, () => { + const skuL890Op2015UsWarehousePreset = InventoryEntryDraftGraphql.presets + .skuL890Op2015UsWarehouse() + .build(); + expect(skuL890Op2015UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuL890Op2015UsWarehouse preset when built for legacy rest`, () => { + const skuL890Op2015UsWarehousePreset = InventoryEntryDraft.presets + .skuL890Op2015UsWarehouse() + .buildRest(); + expect(skuL890Op2015UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuL890Op2015UsWarehouse preset when built for legacy graphql`, () => { + const skuL890Op2015UsWarehousePreset = InventoryEntryDraft.presets + .skuL890Op2015UsWarehouse() + .buildGraphql(); + expect(skuL890Op2015UsWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-l-890-op-2015-us-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-l-890-op-2015-us-warehouse.ts new file mode 100644 index 000000000..3e39413a0 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-l-890-op-2015-us-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .usWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .l890Op01() + .build(); + +const skuL890Op2015UsWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('l890-op-2015-us-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuL890Op2015UsWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-l-890-op-2019-default-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-l-890-op-2019-default-warehouse.spec.ts new file mode 100644 index 000000000..d0678e041 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-l-890-op-2019-default-warehouse.spec.ts @@ -0,0 +1,40 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuL890Op2019DefaultWarehouse preset`, () => { + it(`should return a skuL890Op2019DefaultWarehouse preset when built for rest`, () => { + const skuL890Op2019DefaultWarehousePreset = InventoryEntryDraftRest.presets + .skuL890Op2019DefaultWarehouse() + .build(); + expect(skuL890Op2019DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuL890Op2019DefaultWarehouse preset when built for graphql`, () => { + const skuL890Op2019DefaultWarehousePreset = + InventoryEntryDraftGraphql.presets + .skuL890Op2019DefaultWarehouse() + .build(); + expect(skuL890Op2019DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuL890Op2019DefaultWarehouse preset when built for legacy rest`, () => { + const skuL890Op2019DefaultWarehousePreset = InventoryEntryDraft.presets + .skuL890Op2019DefaultWarehouse() + .buildRest(); + expect(skuL890Op2019DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuL890Op2019DefaultWarehouse preset when built for legacy graphql`, () => { + const skuL890Op2019DefaultWarehousePreset = InventoryEntryDraft.presets + .skuL890Op2019DefaultWarehouse() + .buildGraphql(); + expect(skuL890Op2019DefaultWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-l-890-op-2019-default-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-l-890-op-2019-default-warehouse.ts new file mode 100644 index 000000000..2ead301e9 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-l-890-op-2019-default-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .defaultWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .l890Op02() + .build(); + +const skuL890Op2019DefaultWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('l890-op-2019-default-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuL890Op2019DefaultWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-l-890-op-2019-eu-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-l-890-op-2019-eu-warehouse.spec.ts new file mode 100644 index 000000000..98f615627 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-l-890-op-2019-eu-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuL890Op2019EuWarehouse preset`, () => { + it(`should return a skuL890Op2019EuWarehouse preset when built for rest`, () => { + const skuL890Op2019EuWarehousePreset = InventoryEntryDraftRest.presets + .skuL890Op2019EuWarehouse() + .build(); + expect(skuL890Op2019EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuL890Op2019EuWarehouse preset when built for graphql`, () => { + const skuL890Op2019EuWarehousePreset = InventoryEntryDraftGraphql.presets + .skuL890Op2019EuWarehouse() + .build(); + expect(skuL890Op2019EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuL890Op2019EuWarehouse preset when built for legacy rest`, () => { + const skuL890Op2019EuWarehousePreset = InventoryEntryDraft.presets + .skuL890Op2019EuWarehouse() + .buildRest(); + expect(skuL890Op2019EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuL890Op2019EuWarehouse preset when built for legacy graphql`, () => { + const skuL890Op2019EuWarehousePreset = InventoryEntryDraft.presets + .skuL890Op2019EuWarehouse() + .buildGraphql(); + expect(skuL890Op2019EuWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-l-890-op-2019-eu-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-l-890-op-2019-eu-warehouse.ts new file mode 100644 index 000000000..c74ba918f --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-l-890-op-2019-eu-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .euWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .l890Op02() + .build(); + +const skuL890Op2019EuWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('l890-op-2019-eu-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuL890Op2019EuWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-l-890-op-2019-us-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-l-890-op-2019-us-warehouse.spec.ts new file mode 100644 index 000000000..e0035b8aa --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-l-890-op-2019-us-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuL890Op2019UsWarehouse preset`, () => { + it(`should return a skuL890Op2019UsWarehouse preset when built for rest`, () => { + const skuL890Op2019UsWarehousePreset = InventoryEntryDraftRest.presets + .skuL890Op2019UsWarehouse() + .build(); + expect(skuL890Op2019UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuL890Op2019UsWarehouse preset when built for graphql`, () => { + const skuL890Op2019UsWarehousePreset = InventoryEntryDraftGraphql.presets + .skuL890Op2019UsWarehouse() + .build(); + expect(skuL890Op2019UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuL890Op2019UsWarehouse preset when built for legacy rest`, () => { + const skuL890Op2019UsWarehousePreset = InventoryEntryDraft.presets + .skuL890Op2019UsWarehouse() + .buildRest(); + expect(skuL890Op2019UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuL890Op2019UsWarehouse preset when built for legacy graphql`, () => { + const skuL890Op2019UsWarehousePreset = InventoryEntryDraft.presets + .skuL890Op2019UsWarehouse() + .buildGraphql(); + expect(skuL890Op2019UsWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-l-890-op-2019-us-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-l-890-op-2019-us-warehouse.ts new file mode 100644 index 000000000..18b1d1250 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-l-890-op-2019-us-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .usWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .l890Op02() + .build(); + +const skuL890Op2019UsWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('l890-op-2019-us-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuL890Op2019UsWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-l-890-op-2023-default-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-l-890-op-2023-default-warehouse.spec.ts new file mode 100644 index 000000000..d74f0e861 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-l-890-op-2023-default-warehouse.spec.ts @@ -0,0 +1,40 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuL890Op2023DefaultWarehouse preset`, () => { + it(`should return a skuL890Op2023DefaultWarehouse preset when built for rest`, () => { + const skuL890Op2023DefaultWarehousePreset = InventoryEntryDraftRest.presets + .skuL890Op2023DefaultWarehouse() + .build(); + expect(skuL890Op2023DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuL890Op2023DefaultWarehouse preset when built for graphql`, () => { + const skuL890Op2023DefaultWarehousePreset = + InventoryEntryDraftGraphql.presets + .skuL890Op2023DefaultWarehouse() + .build(); + expect(skuL890Op2023DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuL890Op2023DefaultWarehouse preset when built for legacy rest`, () => { + const skuL890Op2023DefaultWarehousePreset = InventoryEntryDraft.presets + .skuL890Op2023DefaultWarehouse() + .buildRest(); + expect(skuL890Op2023DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuL890Op2023DefaultWarehouse preset when built for legacy graphql`, () => { + const skuL890Op2023DefaultWarehousePreset = InventoryEntryDraft.presets + .skuL890Op2023DefaultWarehouse() + .buildGraphql(); + expect(skuL890Op2023DefaultWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-l-890-op-2023-default-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-l-890-op-2023-default-warehouse.ts new file mode 100644 index 000000000..dffd0e794 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-l-890-op-2023-default-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .defaultWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .l890Op03() + .build(); + +const skuL890Op2023DefaultWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('l890-op-2023-default-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuL890Op2023DefaultWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-l-890-op-2023-eu-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-l-890-op-2023-eu-warehouse.spec.ts new file mode 100644 index 000000000..ffdca22ca --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-l-890-op-2023-eu-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuL890Op2023EuWarehouse preset`, () => { + it(`should return a skuL890Op2023EuWarehouse preset when built for rest`, () => { + const skuL890Op2023EuWarehousePreset = InventoryEntryDraftRest.presets + .skuL890Op2023EuWarehouse() + .build(); + expect(skuL890Op2023EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuL890Op2023EuWarehouse preset when built for graphql`, () => { + const skuL890Op2023EuWarehousePreset = InventoryEntryDraftGraphql.presets + .skuL890Op2023EuWarehouse() + .build(); + expect(skuL890Op2023EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuL890Op2023EuWarehouse preset when built for legacy rest`, () => { + const skuL890Op2023EuWarehousePreset = InventoryEntryDraft.presets + .skuL890Op2023EuWarehouse() + .buildRest(); + expect(skuL890Op2023EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuL890Op2023EuWarehouse preset when built for legacy graphql`, () => { + const skuL890Op2023EuWarehousePreset = InventoryEntryDraft.presets + .skuL890Op2023EuWarehouse() + .buildGraphql(); + expect(skuL890Op2023EuWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-l-890-op-2023-eu-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-l-890-op-2023-eu-warehouse.ts new file mode 100644 index 000000000..804142493 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-l-890-op-2023-eu-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .euWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .l890Op03() + .build(); + +const skuL890Op2023EuWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('l890-op-2023-eu-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuL890Op2023EuWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-l-890-op-2023-us-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-l-890-op-2023-us-warehouse.spec.ts new file mode 100644 index 000000000..868415516 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-l-890-op-2023-us-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuL890Op2023UsWarehouse preset`, () => { + it(`should return a skuL890Op2023UsWarehouse preset when built for rest`, () => { + const skuL890Op2023UsWarehousePreset = InventoryEntryDraftRest.presets + .skuL890Op2023UsWarehouse() + .build(); + expect(skuL890Op2023UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuL890Op2023UsWarehouse preset when built for graphql`, () => { + const skuL890Op2023UsWarehousePreset = InventoryEntryDraftGraphql.presets + .skuL890Op2023UsWarehouse() + .build(); + expect(skuL890Op2023UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuL890Op2023UsWarehouse preset when built for legacy rest`, () => { + const skuL890Op2023UsWarehousePreset = InventoryEntryDraft.presets + .skuL890Op2023UsWarehouse() + .buildRest(); + expect(skuL890Op2023UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuL890Op2023UsWarehouse preset when built for legacy graphql`, () => { + const skuL890Op2023UsWarehousePreset = InventoryEntryDraft.presets + .skuL890Op2023UsWarehouse() + .buildGraphql(); + expect(skuL890Op2023UsWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-l-890-op-2023-us-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-l-890-op-2023-us-warehouse.ts new file mode 100644 index 000000000..9e9138cc9 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-l-890-op-2023-us-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .usWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .l890Op03() + .build(); + +const skuL890Op2023UsWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('l890-op-2023-us-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuL890Op2023UsWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-l890-op-2015-default.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-l890-op-2015-default.spec.ts deleted file mode 100644 index 00e018462..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-l890-op-2015-default.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuL890Op2015Default from './sku-l890-op-2015-default'; - -describe(`with skuL890Op2015Default preset and default-warehouse channel`, () => { - it(`should return a skuL890Op2015Default preset`, () => { - const skuL890Op2015DefaultPreset = - skuL890Op2015Default().build(); - expect(skuL890Op2015DefaultPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "l890-op-2015-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "l890-op-2015", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuL890Op2015Default preset when built for graphql`, () => { - const skuL890Op2015DefaultPresetGraphql = - skuL890Op2015Default().buildGraphql(); - expect(skuL890Op2015DefaultPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "l890-op-2015-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "l890-op-2015", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-l890-op-2015-default.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-l890-op-2015-default.ts deleted file mode 100644 index 78af48855..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-l890-op-2015-default.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const defaultWarehouse = ChannelDraft.presets.sampleDataB2B - .defaultWarehouse() - .build(); - -const l890Op01 = ProductVariantDraft.presets.sampleDataB2B - .l890Op01() - .build(); - -const skuL890Op2015Default = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${l890Op01.sku}-${defaultWarehouse.key}`) - .sku(l890Op01.sku!) - .quantityOnStock(1000) - .supplyChannel( - KeyReferenceDraft.presets.channel().key(defaultWarehouse.key) - ); - -export default skuL890Op2015Default; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-l890-op-2015-eu.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-l890-op-2015-eu.spec.ts deleted file mode 100644 index 99de30967..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-l890-op-2015-eu.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuL890Op2015Eu from './sku-l890-op-2015-eu'; - -describe(`with skuL890Op2015Eu preset and eu-warehouse channel`, () => { - it(`should return a skuL890Op2015Eu preset`, () => { - const skuL890Op2015EuPreset = - skuL890Op2015Eu().build(); - expect(skuL890Op2015EuPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "l890-op-2015-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "l890-op-2015", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuL890Op2015Eu preset when built for graphql`, () => { - const skuL890Op2015EuPresetGraphql = - skuL890Op2015Eu().buildGraphql(); - expect(skuL890Op2015EuPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "l890-op-2015-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "l890-op-2015", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-l890-op-2015-eu.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-l890-op-2015-eu.ts deleted file mode 100644 index dddfaa3eb..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-l890-op-2015-eu.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const euWarehouse = ChannelDraft.presets.sampleDataB2B - .euWarehouse() - .build(); - -const l890Op01 = ProductVariantDraft.presets.sampleDataB2B - .l890Op01() - .build(); - -const skuL890Op2015Eu = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${l890Op01.sku}-${euWarehouse.key}`) - .sku(l890Op01.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(euWarehouse.key)); - -export default skuL890Op2015Eu; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-l890-op-2015-us.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-l890-op-2015-us.spec.ts deleted file mode 100644 index bed9f670a..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-l890-op-2015-us.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuL890Op2015Us from './sku-l890-op-2015-us'; - -describe(`with skuL890Op2015Us preset and us-warehouse channel`, () => { - it(`should return a skuL890Op2015Us preset`, () => { - const skuL890Op2015UsPreset = - skuL890Op2015Us().build(); - expect(skuL890Op2015UsPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "l890-op-2015-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "l890-op-2015", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuL890Op2015Us preset when built for graphql`, () => { - const skuL890Op2015UsPresetGraphql = - skuL890Op2015Us().buildGraphql(); - expect(skuL890Op2015UsPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "l890-op-2015-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "l890-op-2015", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-l890-op-2015-us.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-l890-op-2015-us.ts deleted file mode 100644 index 2dc7db2ee..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-l890-op-2015-us.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const usWarehouse = ChannelDraft.presets.sampleDataB2B - .usWarehouse() - .build(); - -const l890Op01 = ProductVariantDraft.presets.sampleDataB2B - .l890Op01() - .build(); - -const skuL890Op2015Us = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${l890Op01.sku}-${usWarehouse.key}`) - .sku(l890Op01.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(usWarehouse.key)); - -export default skuL890Op2015Us; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-l890-op-2019-default.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-l890-op-2019-default.spec.ts deleted file mode 100644 index 40e4fecae..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-l890-op-2019-default.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuL890Op2019Default from './sku-l890-op-2019-default'; - -describe(`with skuL890Op2019Default preset and default-warehouse channel`, () => { - it(`should return a skuL890Op2019Default preset`, () => { - const skuL890Op2019DefaultPreset = - skuL890Op2019Default().build(); - expect(skuL890Op2019DefaultPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "l890-op-2019-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "l890-op-2019", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuL890Op2019Default preset when built for graphql`, () => { - const skuL890Op2019DefaultPresetGraphql = - skuL890Op2019Default().buildGraphql(); - expect(skuL890Op2019DefaultPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "l890-op-2019-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "l890-op-2019", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-l890-op-2019-default.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-l890-op-2019-default.ts deleted file mode 100644 index 60f6f26fe..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-l890-op-2019-default.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const defaultWarehouse = ChannelDraft.presets.sampleDataB2B - .defaultWarehouse() - .build(); - -const l890Op02 = ProductVariantDraft.presets.sampleDataB2B - .l890Op02() - .build(); - -const skuL890Op2019Default = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${l890Op02.sku}-${defaultWarehouse.key}`) - .sku(l890Op02.sku!) - .quantityOnStock(1000) - .supplyChannel( - KeyReferenceDraft.presets.channel().key(defaultWarehouse.key) - ); - -export default skuL890Op2019Default; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-l890-op-2019-eu.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-l890-op-2019-eu.spec.ts deleted file mode 100644 index d636ed0f6..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-l890-op-2019-eu.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuL890Op2019Eu from './sku-l890-op-2019-eu'; - -describe(`with skuL890Op2019Eu preset and eu-warehouse channel`, () => { - it(`should return a skuL890Op2019Eu preset`, () => { - const skuL890Op2019EuPreset = - skuL890Op2019Eu().build(); - expect(skuL890Op2019EuPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "l890-op-2019-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "l890-op-2019", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuL890Op2019Eu preset when built for graphql`, () => { - const skuL890Op2019EuPresetGraphql = - skuL890Op2019Eu().buildGraphql(); - expect(skuL890Op2019EuPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "l890-op-2019-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "l890-op-2019", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-l890-op-2019-eu.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-l890-op-2019-eu.ts deleted file mode 100644 index 2e0995f9e..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-l890-op-2019-eu.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const euWarehouse = ChannelDraft.presets.sampleDataB2B - .euWarehouse() - .build(); - -const l890Op02 = ProductVariantDraft.presets.sampleDataB2B - .l890Op02() - .build(); - -const skuL890Op2019Eu = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${l890Op02.sku}-${euWarehouse.key}`) - .sku(l890Op02.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(euWarehouse.key)); - -export default skuL890Op2019Eu; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-l890-op-2019-us.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-l890-op-2019-us.spec.ts deleted file mode 100644 index b446ee347..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-l890-op-2019-us.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuL890Op2019Us from './sku-l890-op-2019-us'; - -describe(`with skuL890Op2019Us preset and us-warehouse channel`, () => { - it(`should return a skuL890Op2019Us preset`, () => { - const skuL890Op2019UsPreset = - skuL890Op2019Us().build(); - expect(skuL890Op2019UsPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "l890-op-2019-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "l890-op-2019", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuL890Op2019Us preset when built for graphql`, () => { - const skuL890Op2019UsPresetGraphql = - skuL890Op2019Us().buildGraphql(); - expect(skuL890Op2019UsPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "l890-op-2019-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "l890-op-2019", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-l890-op-2019-us.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-l890-op-2019-us.ts deleted file mode 100644 index cd87dbabf..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-l890-op-2019-us.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const usWarehouse = ChannelDraft.presets.sampleDataB2B - .usWarehouse() - .build(); - -const l890Op02 = ProductVariantDraft.presets.sampleDataB2B - .l890Op02() - .build(); - -const skuL890Op2019Us = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${l890Op02.sku}-${usWarehouse.key}`) - .sku(l890Op02.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(usWarehouse.key)); - -export default skuL890Op2019Us; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-l890-op-2023-default.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-l890-op-2023-default.spec.ts deleted file mode 100644 index 6300669c5..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-l890-op-2023-default.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuL890Op2023Default from './sku-l890-op-2023-default'; - -describe(`with skuL890Op2023Default preset and default-warehouse channel`, () => { - it(`should return a skuL890Op2023Default preset`, () => { - const skuL890Op2023DefaultPreset = - skuL890Op2023Default().build(); - expect(skuL890Op2023DefaultPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "l890-op-2023-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "l890-op-2023", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuL890Op2023Default preset when built for graphql`, () => { - const skuL890Op2023DefaultPresetGraphql = - skuL890Op2023Default().buildGraphql(); - expect(skuL890Op2023DefaultPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "l890-op-2023-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "l890-op-2023", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-l890-op-2023-default.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-l890-op-2023-default.ts deleted file mode 100644 index 0d165a5d6..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-l890-op-2023-default.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const defaultWarehouse = ChannelDraft.presets.sampleDataB2B - .defaultWarehouse() - .build(); - -const l890Op03 = ProductVariantDraft.presets.sampleDataB2B - .l890Op03() - .build(); - -const skuL890Op2023Default = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${l890Op03.sku}-${defaultWarehouse.key}`) - .sku(l890Op03.sku!) - .quantityOnStock(1000) - .supplyChannel( - KeyReferenceDraft.presets.channel().key(defaultWarehouse.key) - ); - -export default skuL890Op2023Default; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-l890-op-2023-eu.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-l890-op-2023-eu.spec.ts deleted file mode 100644 index 5470bc935..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-l890-op-2023-eu.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuL890Op2023Eu from './sku-l890-op-2023-eu'; - -describe(`with skuL890Op2023Eu preset and eu-warehouse channel`, () => { - it(`should return a skuL890Op2023Eu preset`, () => { - const skuL890Op2023EuPreset = - skuL890Op2023Eu().build(); - expect(skuL890Op2023EuPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "l890-op-2023-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "l890-op-2023", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuL890Op2023Eu preset when built for graphql`, () => { - const skuL890Op2023EuPresetGraphql = - skuL890Op2023Eu().buildGraphql(); - expect(skuL890Op2023EuPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "l890-op-2023-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "l890-op-2023", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-l890-op-2023-eu.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-l890-op-2023-eu.ts deleted file mode 100644 index 14e27894b..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-l890-op-2023-eu.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const euWarehouse = ChannelDraft.presets.sampleDataB2B - .euWarehouse() - .build(); - -const l890Op03 = ProductVariantDraft.presets.sampleDataB2B - .l890Op03() - .build(); - -const skuL890Op2023Eu = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${l890Op03.sku}-${euWarehouse.key}`) - .sku(l890Op03.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(euWarehouse.key)); - -export default skuL890Op2023Eu; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-l890-op-2023-us.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-l890-op-2023-us.spec.ts deleted file mode 100644 index f1344ed2a..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-l890-op-2023-us.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuL890Op2023Us from './sku-l890-op-2023-us'; - -describe(`with skuL890Op2023Us preset and us-warehouse channel`, () => { - it(`should return a skuL890Op2023Us preset`, () => { - const skuL890Op2023UsPreset = - skuL890Op2023Us().build(); - expect(skuL890Op2023UsPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "l890-op-2023-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "l890-op-2023", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuL890Op2023Us preset when built for graphql`, () => { - const skuL890Op2023UsPresetGraphql = - skuL890Op2023Us().buildGraphql(); - expect(skuL890Op2023UsPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "l890-op-2023-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "l890-op-2023", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-l890-op-2023-us.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-l890-op-2023-us.ts deleted file mode 100644 index 151b486d1..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-l890-op-2023-us.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const usWarehouse = ChannelDraft.presets.sampleDataB2B - .usWarehouse() - .build(); - -const l890Op03 = ProductVariantDraft.presets.sampleDataB2B - .l890Op03() - .build(); - -const skuL890Op2023Us = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${l890Op03.sku}-${usWarehouse.key}`) - .sku(l890Op03.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(usWarehouse.key)); - -export default skuL890Op2023Us; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-led-work-light-default-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-led-work-light-default-warehouse.spec.ts new file mode 100644 index 000000000..38c054999 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-led-work-light-default-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuLedWorkLightDefaultWarehouse preset`, () => { + it(`should return a skuLedWorkLightDefaultWarehouse preset when built for rest`, () => { + const skuLedWorkLightDefaultWarehousePreset = + InventoryEntryDraftRest.presets.skuLedWorkLightDefaultWarehouse().build(); + expect(skuLedWorkLightDefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuLedWorkLightDefaultWarehouse preset when built for graphql`, () => { + const skuLedWorkLightDefaultWarehousePreset = + InventoryEntryDraftGraphql.presets + .skuLedWorkLightDefaultWarehouse() + .build(); + expect(skuLedWorkLightDefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuLedWorkLightDefaultWarehouse preset when built for legacy rest`, () => { + const skuLedWorkLightDefaultWarehousePreset = InventoryEntryDraft.presets + .skuLedWorkLightDefaultWarehouse() + .buildRest(); + expect(skuLedWorkLightDefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuLedWorkLightDefaultWarehouse preset when built for legacy graphql`, () => { + const skuLedWorkLightDefaultWarehousePreset = InventoryEntryDraft.presets + .skuLedWorkLightDefaultWarehouse() + .buildGraphql(); + expect(skuLedWorkLightDefaultWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-led-work-light-default-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-led-work-light-default-warehouse.ts new file mode 100644 index 000000000..28cf19e6a --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-led-work-light-default-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .defaultWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .ledWorkLight01() + .build(); + +const skuLedWorkLightDefaultWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('led-work-light-default-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuLedWorkLightDefaultWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-led-work-light-default.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-led-work-light-default.spec.ts deleted file mode 100644 index f3ac95d34..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-led-work-light-default.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuLedWorkLightDefault from './sku-led-work-light-default'; - -describe(`with skuLedWorkLightDefault preset and default-warehouse channel`, () => { - it(`should return a skuLedWorkLightDefault preset`, () => { - const skuLedWorkLightDefaultPreset = - skuLedWorkLightDefault().build(); - expect(skuLedWorkLightDefaultPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "led-work-light-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "led-work-light", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuLedWorkLightDefault preset when built for graphql`, () => { - const skuLedWorkLightDefaultPresetGraphql = - skuLedWorkLightDefault().buildGraphql(); - expect(skuLedWorkLightDefaultPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "led-work-light-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "led-work-light", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-led-work-light-default.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-led-work-light-default.ts deleted file mode 100644 index 5cffd1452..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-led-work-light-default.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const defaultWarehouse = ChannelDraft.presets.sampleDataB2B - .defaultWarehouse() - .build(); - -const ledWorkLight01 = ProductVariantDraft.presets.sampleDataB2B - .ledWorkLight01() - .build(); - -const skuLedWorkLightDefault = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${ledWorkLight01.sku}-${defaultWarehouse.key}`) - .sku(ledWorkLight01.sku!) - .quantityOnStock(1000) - .supplyChannel( - KeyReferenceDraft.presets.channel().key(defaultWarehouse.key) - ); - -export default skuLedWorkLightDefault; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-led-work-light-eu-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-led-work-light-eu-warehouse.spec.ts new file mode 100644 index 000000000..021fb89a2 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-led-work-light-eu-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuLedWorkLightEuWarehouse preset`, () => { + it(`should return a skuLedWorkLightEuWarehouse preset when built for rest`, () => { + const skuLedWorkLightEuWarehousePreset = InventoryEntryDraftRest.presets + .skuLedWorkLightEuWarehouse() + .build(); + expect(skuLedWorkLightEuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuLedWorkLightEuWarehouse preset when built for graphql`, () => { + const skuLedWorkLightEuWarehousePreset = InventoryEntryDraftGraphql.presets + .skuLedWorkLightEuWarehouse() + .build(); + expect(skuLedWorkLightEuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuLedWorkLightEuWarehouse preset when built for legacy rest`, () => { + const skuLedWorkLightEuWarehousePreset = InventoryEntryDraft.presets + .skuLedWorkLightEuWarehouse() + .buildRest(); + expect(skuLedWorkLightEuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuLedWorkLightEuWarehouse preset when built for legacy graphql`, () => { + const skuLedWorkLightEuWarehousePreset = InventoryEntryDraft.presets + .skuLedWorkLightEuWarehouse() + .buildGraphql(); + expect(skuLedWorkLightEuWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-led-work-light-eu-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-led-work-light-eu-warehouse.ts new file mode 100644 index 000000000..bc9e225f2 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-led-work-light-eu-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .euWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .ledWorkLight01() + .build(); + +const skuLedWorkLightEuWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('led-work-light-eu-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuLedWorkLightEuWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-led-work-light-eu.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-led-work-light-eu.spec.ts deleted file mode 100644 index 3780f7e86..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-led-work-light-eu.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuLedWorkLightEu from './sku-led-work-light-eu'; - -describe(`with skuLedWorkLightEu preset and eu-warehouse channel`, () => { - it(`should return a skuLedWorkLightEu preset`, () => { - const skuLedWorkLightEuPreset = - skuLedWorkLightEu().build(); - expect(skuLedWorkLightEuPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "led-work-light-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "led-work-light", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuLedWorkLightEu preset when built for graphql`, () => { - const skuLedWorkLightEuPresetGraphql = - skuLedWorkLightEu().buildGraphql(); - expect(skuLedWorkLightEuPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "led-work-light-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "led-work-light", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-led-work-light-eu.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-led-work-light-eu.ts deleted file mode 100644 index bee5d881e..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-led-work-light-eu.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const euWarehouse = ChannelDraft.presets.sampleDataB2B - .euWarehouse() - .build(); - -const ledWorkLight01 = ProductVariantDraft.presets.sampleDataB2B - .ledWorkLight01() - .build(); - -const skuLedWorkLightEu = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${ledWorkLight01.sku}-${euWarehouse.key}`) - .sku(ledWorkLight01.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(euWarehouse.key)); - -export default skuLedWorkLightEu; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-led-work-light-us-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-led-work-light-us-warehouse.spec.ts new file mode 100644 index 000000000..7ba003454 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-led-work-light-us-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuLedWorkLightUsWarehouse preset`, () => { + it(`should return a skuLedWorkLightUsWarehouse preset when built for rest`, () => { + const skuLedWorkLightUsWarehousePreset = InventoryEntryDraftRest.presets + .skuLedWorkLightUsWarehouse() + .build(); + expect(skuLedWorkLightUsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuLedWorkLightUsWarehouse preset when built for graphql`, () => { + const skuLedWorkLightUsWarehousePreset = InventoryEntryDraftGraphql.presets + .skuLedWorkLightUsWarehouse() + .build(); + expect(skuLedWorkLightUsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuLedWorkLightUsWarehouse preset when built for legacy rest`, () => { + const skuLedWorkLightUsWarehousePreset = InventoryEntryDraft.presets + .skuLedWorkLightUsWarehouse() + .buildRest(); + expect(skuLedWorkLightUsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuLedWorkLightUsWarehouse preset when built for legacy graphql`, () => { + const skuLedWorkLightUsWarehousePreset = InventoryEntryDraft.presets + .skuLedWorkLightUsWarehouse() + .buildGraphql(); + expect(skuLedWorkLightUsWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-led-work-light-us-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-led-work-light-us-warehouse.ts new file mode 100644 index 000000000..7d5b3b4bb --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-led-work-light-us-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .usWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .ledWorkLight01() + .build(); + +const skuLedWorkLightUsWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('led-work-light-us-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuLedWorkLightUsWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-led-work-light-us.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-led-work-light-us.spec.ts deleted file mode 100644 index 023791a9b..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-led-work-light-us.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuLedWorkLightUs from './sku-led-work-light-us'; - -describe(`with skuLedWorkLightUs preset and us-warehouse channel`, () => { - it(`should return a skuLedWorkLightUs preset`, () => { - const skuLedWorkLightUsPreset = - skuLedWorkLightUs().build(); - expect(skuLedWorkLightUsPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "led-work-light-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "led-work-light", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuLedWorkLightUs preset when built for graphql`, () => { - const skuLedWorkLightUsPresetGraphql = - skuLedWorkLightUs().buildGraphql(); - expect(skuLedWorkLightUsPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "led-work-light-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "led-work-light", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-led-work-light-us.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-led-work-light-us.ts deleted file mode 100644 index a27f9989a..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-led-work-light-us.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const usWarehouse = ChannelDraft.presets.sampleDataB2B - .usWarehouse() - .build(); - -const ledWorkLight01 = ProductVariantDraft.presets.sampleDataB2B - .ledWorkLight01() - .build(); - -const skuLedWorkLightUs = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${ledWorkLight01.sku}-${usWarehouse.key}`) - .sku(ledWorkLight01.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(usWarehouse.key)); - -export default skuLedWorkLightUs; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ll-890-op-2015-default-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ll-890-op-2015-default-warehouse.spec.ts new file mode 100644 index 000000000..9b885c07e --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ll-890-op-2015-default-warehouse.spec.ts @@ -0,0 +1,40 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuLl890Op2015DefaultWarehouse preset`, () => { + it(`should return a skuLl890Op2015DefaultWarehouse preset when built for rest`, () => { + const skuLl890Op2015DefaultWarehousePreset = InventoryEntryDraftRest.presets + .skuLl890Op2015DefaultWarehouse() + .build(); + expect(skuLl890Op2015DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuLl890Op2015DefaultWarehouse preset when built for graphql`, () => { + const skuLl890Op2015DefaultWarehousePreset = + InventoryEntryDraftGraphql.presets + .skuLl890Op2015DefaultWarehouse() + .build(); + expect(skuLl890Op2015DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuLl890Op2015DefaultWarehouse preset when built for legacy rest`, () => { + const skuLl890Op2015DefaultWarehousePreset = InventoryEntryDraft.presets + .skuLl890Op2015DefaultWarehouse() + .buildRest(); + expect(skuLl890Op2015DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuLl890Op2015DefaultWarehouse preset when built for legacy graphql`, () => { + const skuLl890Op2015DefaultWarehousePreset = InventoryEntryDraft.presets + .skuLl890Op2015DefaultWarehouse() + .buildGraphql(); + expect(skuLl890Op2015DefaultWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ll-890-op-2015-default-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ll-890-op-2015-default-warehouse.ts new file mode 100644 index 000000000..56421e0f3 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ll-890-op-2015-default-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .defaultWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .ll890Op01() + .build(); + +const skuLl890Op2015DefaultWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('ll890-op-2015-default-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuLl890Op2015DefaultWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ll-890-op-2015-eu-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ll-890-op-2015-eu-warehouse.spec.ts new file mode 100644 index 000000000..e90f047eb --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ll-890-op-2015-eu-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuLl890Op2015EuWarehouse preset`, () => { + it(`should return a skuLl890Op2015EuWarehouse preset when built for rest`, () => { + const skuLl890Op2015EuWarehousePreset = InventoryEntryDraftRest.presets + .skuLl890Op2015EuWarehouse() + .build(); + expect(skuLl890Op2015EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuLl890Op2015EuWarehouse preset when built for graphql`, () => { + const skuLl890Op2015EuWarehousePreset = InventoryEntryDraftGraphql.presets + .skuLl890Op2015EuWarehouse() + .build(); + expect(skuLl890Op2015EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuLl890Op2015EuWarehouse preset when built for legacy rest`, () => { + const skuLl890Op2015EuWarehousePreset = InventoryEntryDraft.presets + .skuLl890Op2015EuWarehouse() + .buildRest(); + expect(skuLl890Op2015EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuLl890Op2015EuWarehouse preset when built for legacy graphql`, () => { + const skuLl890Op2015EuWarehousePreset = InventoryEntryDraft.presets + .skuLl890Op2015EuWarehouse() + .buildGraphql(); + expect(skuLl890Op2015EuWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ll-890-op-2015-eu-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ll-890-op-2015-eu-warehouse.ts new file mode 100644 index 000000000..e2ef08121 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ll-890-op-2015-eu-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .euWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .ll890Op01() + .build(); + +const skuLl890Op2015EuWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('ll890-op-2015-eu-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuLl890Op2015EuWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ll-890-op-2015-us-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ll-890-op-2015-us-warehouse.spec.ts new file mode 100644 index 000000000..27c85e6a2 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ll-890-op-2015-us-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuLl890Op2015UsWarehouse preset`, () => { + it(`should return a skuLl890Op2015UsWarehouse preset when built for rest`, () => { + const skuLl890Op2015UsWarehousePreset = InventoryEntryDraftRest.presets + .skuLl890Op2015UsWarehouse() + .build(); + expect(skuLl890Op2015UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuLl890Op2015UsWarehouse preset when built for graphql`, () => { + const skuLl890Op2015UsWarehousePreset = InventoryEntryDraftGraphql.presets + .skuLl890Op2015UsWarehouse() + .build(); + expect(skuLl890Op2015UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuLl890Op2015UsWarehouse preset when built for legacy rest`, () => { + const skuLl890Op2015UsWarehousePreset = InventoryEntryDraft.presets + .skuLl890Op2015UsWarehouse() + .buildRest(); + expect(skuLl890Op2015UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuLl890Op2015UsWarehouse preset when built for legacy graphql`, () => { + const skuLl890Op2015UsWarehousePreset = InventoryEntryDraft.presets + .skuLl890Op2015UsWarehouse() + .buildGraphql(); + expect(skuLl890Op2015UsWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ll-890-op-2015-us-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ll-890-op-2015-us-warehouse.ts new file mode 100644 index 000000000..c144fd405 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ll-890-op-2015-us-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .usWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .ll890Op01() + .build(); + +const skuLl890Op2015UsWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('ll890-op-2015-us-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuLl890Op2015UsWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ll-890-op-2019-default-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ll-890-op-2019-default-warehouse.spec.ts new file mode 100644 index 000000000..f54cc6acd --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ll-890-op-2019-default-warehouse.spec.ts @@ -0,0 +1,40 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuLl890Op2019DefaultWarehouse preset`, () => { + it(`should return a skuLl890Op2019DefaultWarehouse preset when built for rest`, () => { + const skuLl890Op2019DefaultWarehousePreset = InventoryEntryDraftRest.presets + .skuLl890Op2019DefaultWarehouse() + .build(); + expect(skuLl890Op2019DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuLl890Op2019DefaultWarehouse preset when built for graphql`, () => { + const skuLl890Op2019DefaultWarehousePreset = + InventoryEntryDraftGraphql.presets + .skuLl890Op2019DefaultWarehouse() + .build(); + expect(skuLl890Op2019DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuLl890Op2019DefaultWarehouse preset when built for legacy rest`, () => { + const skuLl890Op2019DefaultWarehousePreset = InventoryEntryDraft.presets + .skuLl890Op2019DefaultWarehouse() + .buildRest(); + expect(skuLl890Op2019DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuLl890Op2019DefaultWarehouse preset when built for legacy graphql`, () => { + const skuLl890Op2019DefaultWarehousePreset = InventoryEntryDraft.presets + .skuLl890Op2019DefaultWarehouse() + .buildGraphql(); + expect(skuLl890Op2019DefaultWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ll-890-op-2019-default-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ll-890-op-2019-default-warehouse.ts new file mode 100644 index 000000000..41f3e71ee --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ll-890-op-2019-default-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .defaultWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .ll890Op02() + .build(); + +const skuLl890Op2019DefaultWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('ll890-op-2019-default-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuLl890Op2019DefaultWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ll-890-op-2019-eu-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ll-890-op-2019-eu-warehouse.spec.ts new file mode 100644 index 000000000..fcc1ac839 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ll-890-op-2019-eu-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuLl890Op2019EuWarehouse preset`, () => { + it(`should return a skuLl890Op2019EuWarehouse preset when built for rest`, () => { + const skuLl890Op2019EuWarehousePreset = InventoryEntryDraftRest.presets + .skuLl890Op2019EuWarehouse() + .build(); + expect(skuLl890Op2019EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuLl890Op2019EuWarehouse preset when built for graphql`, () => { + const skuLl890Op2019EuWarehousePreset = InventoryEntryDraftGraphql.presets + .skuLl890Op2019EuWarehouse() + .build(); + expect(skuLl890Op2019EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuLl890Op2019EuWarehouse preset when built for legacy rest`, () => { + const skuLl890Op2019EuWarehousePreset = InventoryEntryDraft.presets + .skuLl890Op2019EuWarehouse() + .buildRest(); + expect(skuLl890Op2019EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuLl890Op2019EuWarehouse preset when built for legacy graphql`, () => { + const skuLl890Op2019EuWarehousePreset = InventoryEntryDraft.presets + .skuLl890Op2019EuWarehouse() + .buildGraphql(); + expect(skuLl890Op2019EuWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ll-890-op-2019-eu-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ll-890-op-2019-eu-warehouse.ts new file mode 100644 index 000000000..ee0e9798d --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ll-890-op-2019-eu-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .euWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .ll890Op02() + .build(); + +const skuLl890Op2019EuWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('ll890-op-2019-eu-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuLl890Op2019EuWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ll-890-op-2019-us-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ll-890-op-2019-us-warehouse.spec.ts new file mode 100644 index 000000000..e5ebec664 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ll-890-op-2019-us-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuLl890Op2019UsWarehouse preset`, () => { + it(`should return a skuLl890Op2019UsWarehouse preset when built for rest`, () => { + const skuLl890Op2019UsWarehousePreset = InventoryEntryDraftRest.presets + .skuLl890Op2019UsWarehouse() + .build(); + expect(skuLl890Op2019UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuLl890Op2019UsWarehouse preset when built for graphql`, () => { + const skuLl890Op2019UsWarehousePreset = InventoryEntryDraftGraphql.presets + .skuLl890Op2019UsWarehouse() + .build(); + expect(skuLl890Op2019UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuLl890Op2019UsWarehouse preset when built for legacy rest`, () => { + const skuLl890Op2019UsWarehousePreset = InventoryEntryDraft.presets + .skuLl890Op2019UsWarehouse() + .buildRest(); + expect(skuLl890Op2019UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuLl890Op2019UsWarehouse preset when built for legacy graphql`, () => { + const skuLl890Op2019UsWarehousePreset = InventoryEntryDraft.presets + .skuLl890Op2019UsWarehouse() + .buildGraphql(); + expect(skuLl890Op2019UsWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ll-890-op-2019-us-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ll-890-op-2019-us-warehouse.ts new file mode 100644 index 000000000..6af77ebbe --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ll-890-op-2019-us-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .usWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .ll890Op02() + .build(); + +const skuLl890Op2019UsWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('ll890-op-2019-us-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuLl890Op2019UsWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ll-890-op-2023-default-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ll-890-op-2023-default-warehouse.spec.ts new file mode 100644 index 000000000..7c1a22656 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ll-890-op-2023-default-warehouse.spec.ts @@ -0,0 +1,40 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuLl890Op2023DefaultWarehouse preset`, () => { + it(`should return a skuLl890Op2023DefaultWarehouse preset when built for rest`, () => { + const skuLl890Op2023DefaultWarehousePreset = InventoryEntryDraftRest.presets + .skuLl890Op2023DefaultWarehouse() + .build(); + expect(skuLl890Op2023DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuLl890Op2023DefaultWarehouse preset when built for graphql`, () => { + const skuLl890Op2023DefaultWarehousePreset = + InventoryEntryDraftGraphql.presets + .skuLl890Op2023DefaultWarehouse() + .build(); + expect(skuLl890Op2023DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuLl890Op2023DefaultWarehouse preset when built for legacy rest`, () => { + const skuLl890Op2023DefaultWarehousePreset = InventoryEntryDraft.presets + .skuLl890Op2023DefaultWarehouse() + .buildRest(); + expect(skuLl890Op2023DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuLl890Op2023DefaultWarehouse preset when built for legacy graphql`, () => { + const skuLl890Op2023DefaultWarehousePreset = InventoryEntryDraft.presets + .skuLl890Op2023DefaultWarehouse() + .buildGraphql(); + expect(skuLl890Op2023DefaultWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ll-890-op-2023-default-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ll-890-op-2023-default-warehouse.ts new file mode 100644 index 000000000..ddd865386 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ll-890-op-2023-default-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .defaultWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .ll890Op03() + .build(); + +const skuLl890Op2023DefaultWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('ll890-op-2023-default-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuLl890Op2023DefaultWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ll-890-op-2023-eu-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ll-890-op-2023-eu-warehouse.spec.ts new file mode 100644 index 000000000..98434edcd --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ll-890-op-2023-eu-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuLl890Op2023EuWarehouse preset`, () => { + it(`should return a skuLl890Op2023EuWarehouse preset when built for rest`, () => { + const skuLl890Op2023EuWarehousePreset = InventoryEntryDraftRest.presets + .skuLl890Op2023EuWarehouse() + .build(); + expect(skuLl890Op2023EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuLl890Op2023EuWarehouse preset when built for graphql`, () => { + const skuLl890Op2023EuWarehousePreset = InventoryEntryDraftGraphql.presets + .skuLl890Op2023EuWarehouse() + .build(); + expect(skuLl890Op2023EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuLl890Op2023EuWarehouse preset when built for legacy rest`, () => { + const skuLl890Op2023EuWarehousePreset = InventoryEntryDraft.presets + .skuLl890Op2023EuWarehouse() + .buildRest(); + expect(skuLl890Op2023EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuLl890Op2023EuWarehouse preset when built for legacy graphql`, () => { + const skuLl890Op2023EuWarehousePreset = InventoryEntryDraft.presets + .skuLl890Op2023EuWarehouse() + .buildGraphql(); + expect(skuLl890Op2023EuWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ll-890-op-2023-eu-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ll-890-op-2023-eu-warehouse.ts new file mode 100644 index 000000000..3605c35c0 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ll-890-op-2023-eu-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .euWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .ll890Op03() + .build(); + +const skuLl890Op2023EuWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('ll890-op-2023-eu-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuLl890Op2023EuWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ll-890-op-2023-us-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ll-890-op-2023-us-warehouse.spec.ts new file mode 100644 index 000000000..6a80cceea --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ll-890-op-2023-us-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuLl890Op2023UsWarehouse preset`, () => { + it(`should return a skuLl890Op2023UsWarehouse preset when built for rest`, () => { + const skuLl890Op2023UsWarehousePreset = InventoryEntryDraftRest.presets + .skuLl890Op2023UsWarehouse() + .build(); + expect(skuLl890Op2023UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuLl890Op2023UsWarehouse preset when built for graphql`, () => { + const skuLl890Op2023UsWarehousePreset = InventoryEntryDraftGraphql.presets + .skuLl890Op2023UsWarehouse() + .build(); + expect(skuLl890Op2023UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuLl890Op2023UsWarehouse preset when built for legacy rest`, () => { + const skuLl890Op2023UsWarehousePreset = InventoryEntryDraft.presets + .skuLl890Op2023UsWarehouse() + .buildRest(); + expect(skuLl890Op2023UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuLl890Op2023UsWarehouse preset when built for legacy graphql`, () => { + const skuLl890Op2023UsWarehousePreset = InventoryEntryDraft.presets + .skuLl890Op2023UsWarehouse() + .buildGraphql(); + expect(skuLl890Op2023UsWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ll-890-op-2023-us-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ll-890-op-2023-us-warehouse.ts new file mode 100644 index 000000000..c3259ccc8 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ll-890-op-2023-us-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .usWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .ll890Op03() + .build(); + +const skuLl890Op2023UsWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('ll890-op-2023-us-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuLl890Op2023UsWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ll890-op-2015-default.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ll890-op-2015-default.spec.ts deleted file mode 100644 index 73eba6e6a..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ll890-op-2015-default.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuLl890Op2015Default from './sku-ll890-op-2015-default'; - -describe(`with skuLl890Op2015Default preset and default-warehouse channel`, () => { - it(`should return a skuLl890Op2015Default preset`, () => { - const skuLl890Op2015DefaultPreset = - skuLl890Op2015Default().build(); - expect(skuLl890Op2015DefaultPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "ll890-op-2015-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "ll890-op-2015", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuLl890Op2015Default preset when built for graphql`, () => { - const skuLl890Op2015DefaultPresetGraphql = - skuLl890Op2015Default().buildGraphql(); - expect(skuLl890Op2015DefaultPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "ll890-op-2015-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "ll890-op-2015", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ll890-op-2015-default.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ll890-op-2015-default.ts deleted file mode 100644 index 56d7e0d8d..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ll890-op-2015-default.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const defaultWarehouse = ChannelDraft.presets.sampleDataB2B - .defaultWarehouse() - .build(); - -const ll890Op01 = ProductVariantDraft.presets.sampleDataB2B - .ll890Op01() - .build(); - -const skuLl890Op2015Default = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${ll890Op01.sku}-${defaultWarehouse.key}`) - .sku(ll890Op01.sku!) - .quantityOnStock(1000) - .supplyChannel( - KeyReferenceDraft.presets.channel().key(defaultWarehouse.key) - ); - -export default skuLl890Op2015Default; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ll890-op-2015-eu.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ll890-op-2015-eu.spec.ts deleted file mode 100644 index 9cdde4b43..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ll890-op-2015-eu.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuLl890Op2015Eu from './sku-ll890-op-2015-eu'; - -describe(`with skuLl890Op2015Eu preset and eu-warehouse channel`, () => { - it(`should return a skuLl890Op2015Eu preset`, () => { - const skuLl890Op2015EuPreset = - skuLl890Op2015Eu().build(); - expect(skuLl890Op2015EuPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "ll890-op-2015-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "ll890-op-2015", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuLl890Op2015Eu preset when built for graphql`, () => { - const skuLl890Op2015EuPresetGraphql = - skuLl890Op2015Eu().buildGraphql(); - expect(skuLl890Op2015EuPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "ll890-op-2015-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "ll890-op-2015", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ll890-op-2015-eu.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ll890-op-2015-eu.ts deleted file mode 100644 index 7de68c6d8..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ll890-op-2015-eu.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const euWarehouse = ChannelDraft.presets.sampleDataB2B - .euWarehouse() - .build(); - -const ll890Op01 = ProductVariantDraft.presets.sampleDataB2B - .ll890Op01() - .build(); - -const skuLl890Op2015Eu = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${ll890Op01.sku}-${euWarehouse.key}`) - .sku(ll890Op01.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(euWarehouse.key)); - -export default skuLl890Op2015Eu; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ll890-op-2015-us.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ll890-op-2015-us.spec.ts deleted file mode 100644 index 44181ee4d..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ll890-op-2015-us.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuLl890Op2015Us from './sku-ll890-op-2015-us'; - -describe(`with skuLl890Op2015Us preset and us-warehouse channel`, () => { - it(`should return a skuLl890Op2015Us preset`, () => { - const skuLl890Op2015UsPreset = - skuLl890Op2015Us().build(); - expect(skuLl890Op2015UsPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "ll890-op-2015-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "ll890-op-2015", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuLl890Op2015Us preset when built for graphql`, () => { - const skuLl890Op2015UsPresetGraphql = - skuLl890Op2015Us().buildGraphql(); - expect(skuLl890Op2015UsPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "ll890-op-2015-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "ll890-op-2015", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ll890-op-2015-us.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ll890-op-2015-us.ts deleted file mode 100644 index 1531583ae..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ll890-op-2015-us.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const usWarehouse = ChannelDraft.presets.sampleDataB2B - .usWarehouse() - .build(); - -const ll890Op01 = ProductVariantDraft.presets.sampleDataB2B - .ll890Op01() - .build(); - -const skuLl890Op2015Us = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${ll890Op01.sku}-${usWarehouse.key}`) - .sku(ll890Op01.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(usWarehouse.key)); - -export default skuLl890Op2015Us; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ll890-op-2019-default.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ll890-op-2019-default.spec.ts deleted file mode 100644 index d8e98158f..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ll890-op-2019-default.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuLl890Op2019Default from './sku-ll890-op-2019-default'; - -describe(`with skuLl890Op2019Default preset and default-warehouse channel`, () => { - it(`should return a skuLl890Op2019Default preset`, () => { - const skuLl890Op2019DefaultPreset = - skuLl890Op2019Default().build(); - expect(skuLl890Op2019DefaultPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "ll890-op-2019-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "ll890-op-2019", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuLl890Op2019Default preset when built for graphql`, () => { - const skuLl890Op2019DefaultPresetGraphql = - skuLl890Op2019Default().buildGraphql(); - expect(skuLl890Op2019DefaultPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "ll890-op-2019-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "ll890-op-2019", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ll890-op-2019-default.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ll890-op-2019-default.ts deleted file mode 100644 index 3d15bbc58..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ll890-op-2019-default.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const defaultWarehouse = ChannelDraft.presets.sampleDataB2B - .defaultWarehouse() - .build(); - -const ll890Op02 = ProductVariantDraft.presets.sampleDataB2B - .ll890Op02() - .build(); - -const skuLl890Op2019Default = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${ll890Op02.sku}-${defaultWarehouse.key}`) - .sku(ll890Op02.sku!) - .quantityOnStock(1000) - .supplyChannel( - KeyReferenceDraft.presets.channel().key(defaultWarehouse.key) - ); - -export default skuLl890Op2019Default; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ll890-op-2019-eu.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ll890-op-2019-eu.spec.ts deleted file mode 100644 index e364b0561..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ll890-op-2019-eu.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuLl890Op2019Eu from './sku-ll890-op-2019-eu'; - -describe(`with skuLl890Op2019Eu preset and eu-warehouse channel`, () => { - it(`should return a skuLl890Op2019Eu preset`, () => { - const skuLl890Op2019EuPreset = - skuLl890Op2019Eu().build(); - expect(skuLl890Op2019EuPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "ll890-op-2019-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "ll890-op-2019", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuLl890Op2019Eu preset when built for graphql`, () => { - const skuLl890Op2019EuPresetGraphql = - skuLl890Op2019Eu().buildGraphql(); - expect(skuLl890Op2019EuPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "ll890-op-2019-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "ll890-op-2019", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ll890-op-2019-eu.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ll890-op-2019-eu.ts deleted file mode 100644 index 4319cd6d5..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ll890-op-2019-eu.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const euWarehouse = ChannelDraft.presets.sampleDataB2B - .euWarehouse() - .build(); - -const ll890Op02 = ProductVariantDraft.presets.sampleDataB2B - .ll890Op02() - .build(); - -const skuLl890Op2019Eu = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${ll890Op02.sku}-${euWarehouse.key}`) - .sku(ll890Op02.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(euWarehouse.key)); - -export default skuLl890Op2019Eu; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ll890-op-2019-us.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ll890-op-2019-us.spec.ts deleted file mode 100644 index b8dc490d6..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ll890-op-2019-us.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuLl890Op2019Us from './sku-ll890-op-2019-us'; - -describe(`with skuLl890Op2019Us preset and us-warehouse channel`, () => { - it(`should return a skuLl890Op2019Us preset`, () => { - const skuLl890Op2019UsPreset = - skuLl890Op2019Us().build(); - expect(skuLl890Op2019UsPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "ll890-op-2019-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "ll890-op-2019", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuLl890Op2019Us preset when built for graphql`, () => { - const skuLl890Op2019UsPresetGraphql = - skuLl890Op2019Us().buildGraphql(); - expect(skuLl890Op2019UsPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "ll890-op-2019-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "ll890-op-2019", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ll890-op-2019-us.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ll890-op-2019-us.ts deleted file mode 100644 index 9471fb167..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ll890-op-2019-us.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const usWarehouse = ChannelDraft.presets.sampleDataB2B - .usWarehouse() - .build(); - -const ll890Op02 = ProductVariantDraft.presets.sampleDataB2B - .ll890Op02() - .build(); - -const skuLl890Op2019Us = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${ll890Op02.sku}-${usWarehouse.key}`) - .sku(ll890Op02.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(usWarehouse.key)); - -export default skuLl890Op2019Us; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ll890-op-2023-default.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ll890-op-2023-default.spec.ts deleted file mode 100644 index 483a36e1c..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ll890-op-2023-default.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuLl890Op2023Default from './sku-ll890-op-2023-default'; - -describe(`with skuLl890Op2023Default preset and default-warehouse channel`, () => { - it(`should return a skuLl890Op2023Default preset`, () => { - const skuLl890Op2023DefaultPreset = - skuLl890Op2023Default().build(); - expect(skuLl890Op2023DefaultPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "ll890-op-2023-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "ll890-op-2023", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuLl890Op2023Default preset when built for graphql`, () => { - const skuLl890Op2023DefaultPresetGraphql = - skuLl890Op2023Default().buildGraphql(); - expect(skuLl890Op2023DefaultPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "ll890-op-2023-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "ll890-op-2023", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ll890-op-2023-default.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ll890-op-2023-default.ts deleted file mode 100644 index 7bd005e03..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ll890-op-2023-default.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const defaultWarehouse = ChannelDraft.presets.sampleDataB2B - .defaultWarehouse() - .build(); - -const ll890Op03 = ProductVariantDraft.presets.sampleDataB2B - .ll890Op03() - .build(); - -const skuLl890Op2023Default = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${ll890Op03.sku}-${defaultWarehouse.key}`) - .sku(ll890Op03.sku!) - .quantityOnStock(1000) - .supplyChannel( - KeyReferenceDraft.presets.channel().key(defaultWarehouse.key) - ); - -export default skuLl890Op2023Default; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ll890-op-2023-eu.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ll890-op-2023-eu.spec.ts deleted file mode 100644 index d70c1de0e..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ll890-op-2023-eu.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuLl890Op2023Eu from './sku-ll890-op-2023-eu'; - -describe(`with skuLl890Op2023Eu preset and eu-warehouse channel`, () => { - it(`should return a skuLl890Op2023Eu preset`, () => { - const skuLl890Op2023EuPreset = - skuLl890Op2023Eu().build(); - expect(skuLl890Op2023EuPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "ll890-op-2023-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "ll890-op-2023", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuLl890Op2023Eu preset when built for graphql`, () => { - const skuLl890Op2023EuPresetGraphql = - skuLl890Op2023Eu().buildGraphql(); - expect(skuLl890Op2023EuPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "ll890-op-2023-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "ll890-op-2023", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ll890-op-2023-eu.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ll890-op-2023-eu.ts deleted file mode 100644 index 5e94b183b..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ll890-op-2023-eu.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const euWarehouse = ChannelDraft.presets.sampleDataB2B - .euWarehouse() - .build(); - -const ll890Op03 = ProductVariantDraft.presets.sampleDataB2B - .ll890Op03() - .build(); - -const skuLl890Op2023Eu = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${ll890Op03.sku}-${euWarehouse.key}`) - .sku(ll890Op03.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(euWarehouse.key)); - -export default skuLl890Op2023Eu; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ll890-op-2023-us.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ll890-op-2023-us.spec.ts deleted file mode 100644 index 0a00b0c39..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ll890-op-2023-us.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuLl890Op2023Us from './sku-ll890-op-2023-us'; - -describe(`with skuLl890Op2023Us preset and us-warehouse channel`, () => { - it(`should return a skuLl890Op2023Us preset`, () => { - const skuLl890Op2023UsPreset = - skuLl890Op2023Us().build(); - expect(skuLl890Op2023UsPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "ll890-op-2023-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "ll890-op-2023", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuLl890Op2023Us preset when built for graphql`, () => { - const skuLl890Op2023UsPresetGraphql = - skuLl890Op2023Us().buildGraphql(); - expect(skuLl890Op2023UsPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "ll890-op-2023-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "ll890-op-2023", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ll890-op-2023-us.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ll890-op-2023-us.ts deleted file mode 100644 index 2b059909d..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ll890-op-2023-us.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const usWarehouse = ChannelDraft.presets.sampleDataB2B - .usWarehouse() - .build(); - -const ll890Op03 = ProductVariantDraft.presets.sampleDataB2B - .ll890Op03() - .build(); - -const skuLl890Op2023Us = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${ll890Op03.sku}-${usWarehouse.key}`) - .sku(ll890Op03.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(usWarehouse.key)); - -export default skuLl890Op2023Us; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-m-890-op-2015-default-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-m-890-op-2015-default-warehouse.spec.ts new file mode 100644 index 000000000..73e5c7442 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-m-890-op-2015-default-warehouse.spec.ts @@ -0,0 +1,40 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuM890Op2015DefaultWarehouse preset`, () => { + it(`should return a skuM890Op2015DefaultWarehouse preset when built for rest`, () => { + const skuM890Op2015DefaultWarehousePreset = InventoryEntryDraftRest.presets + .skuM890Op2015DefaultWarehouse() + .build(); + expect(skuM890Op2015DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuM890Op2015DefaultWarehouse preset when built for graphql`, () => { + const skuM890Op2015DefaultWarehousePreset = + InventoryEntryDraftGraphql.presets + .skuM890Op2015DefaultWarehouse() + .build(); + expect(skuM890Op2015DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuM890Op2015DefaultWarehouse preset when built for legacy rest`, () => { + const skuM890Op2015DefaultWarehousePreset = InventoryEntryDraft.presets + .skuM890Op2015DefaultWarehouse() + .buildRest(); + expect(skuM890Op2015DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuM890Op2015DefaultWarehouse preset when built for legacy graphql`, () => { + const skuM890Op2015DefaultWarehousePreset = InventoryEntryDraft.presets + .skuM890Op2015DefaultWarehouse() + .buildGraphql(); + expect(skuM890Op2015DefaultWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-m-890-op-2015-default-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-m-890-op-2015-default-warehouse.ts new file mode 100644 index 000000000..9f7fe2ae0 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-m-890-op-2015-default-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .defaultWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .m890Op01() + .build(); + +const skuM890Op2015DefaultWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('m890-op-2015-default-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuM890Op2015DefaultWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-m-890-op-2015-eu-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-m-890-op-2015-eu-warehouse.spec.ts new file mode 100644 index 000000000..4c6b7c3b3 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-m-890-op-2015-eu-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuM890Op2015EuWarehouse preset`, () => { + it(`should return a skuM890Op2015EuWarehouse preset when built for rest`, () => { + const skuM890Op2015EuWarehousePreset = InventoryEntryDraftRest.presets + .skuM890Op2015EuWarehouse() + .build(); + expect(skuM890Op2015EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuM890Op2015EuWarehouse preset when built for graphql`, () => { + const skuM890Op2015EuWarehousePreset = InventoryEntryDraftGraphql.presets + .skuM890Op2015EuWarehouse() + .build(); + expect(skuM890Op2015EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuM890Op2015EuWarehouse preset when built for legacy rest`, () => { + const skuM890Op2015EuWarehousePreset = InventoryEntryDraft.presets + .skuM890Op2015EuWarehouse() + .buildRest(); + expect(skuM890Op2015EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuM890Op2015EuWarehouse preset when built for legacy graphql`, () => { + const skuM890Op2015EuWarehousePreset = InventoryEntryDraft.presets + .skuM890Op2015EuWarehouse() + .buildGraphql(); + expect(skuM890Op2015EuWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-m-890-op-2015-eu-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-m-890-op-2015-eu-warehouse.ts new file mode 100644 index 000000000..510ab86af --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-m-890-op-2015-eu-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .euWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .m890Op01() + .build(); + +const skuM890Op2015EuWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('m890-op-2015-eu-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuM890Op2015EuWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-m-890-op-2015-us-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-m-890-op-2015-us-warehouse.spec.ts new file mode 100644 index 000000000..f1e88ccc3 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-m-890-op-2015-us-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuM890Op2015UsWarehouse preset`, () => { + it(`should return a skuM890Op2015UsWarehouse preset when built for rest`, () => { + const skuM890Op2015UsWarehousePreset = InventoryEntryDraftRest.presets + .skuM890Op2015UsWarehouse() + .build(); + expect(skuM890Op2015UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuM890Op2015UsWarehouse preset when built for graphql`, () => { + const skuM890Op2015UsWarehousePreset = InventoryEntryDraftGraphql.presets + .skuM890Op2015UsWarehouse() + .build(); + expect(skuM890Op2015UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuM890Op2015UsWarehouse preset when built for legacy rest`, () => { + const skuM890Op2015UsWarehousePreset = InventoryEntryDraft.presets + .skuM890Op2015UsWarehouse() + .buildRest(); + expect(skuM890Op2015UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuM890Op2015UsWarehouse preset when built for legacy graphql`, () => { + const skuM890Op2015UsWarehousePreset = InventoryEntryDraft.presets + .skuM890Op2015UsWarehouse() + .buildGraphql(); + expect(skuM890Op2015UsWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-m-890-op-2015-us-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-m-890-op-2015-us-warehouse.ts new file mode 100644 index 000000000..134098fc8 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-m-890-op-2015-us-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .usWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .m890Op01() + .build(); + +const skuM890Op2015UsWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('m890-op-2015-us-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuM890Op2015UsWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-m-890-op-2019-default-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-m-890-op-2019-default-warehouse.spec.ts new file mode 100644 index 000000000..0ebc8c56f --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-m-890-op-2019-default-warehouse.spec.ts @@ -0,0 +1,40 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuM890Op2019DefaultWarehouse preset`, () => { + it(`should return a skuM890Op2019DefaultWarehouse preset when built for rest`, () => { + const skuM890Op2019DefaultWarehousePreset = InventoryEntryDraftRest.presets + .skuM890Op2019DefaultWarehouse() + .build(); + expect(skuM890Op2019DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuM890Op2019DefaultWarehouse preset when built for graphql`, () => { + const skuM890Op2019DefaultWarehousePreset = + InventoryEntryDraftGraphql.presets + .skuM890Op2019DefaultWarehouse() + .build(); + expect(skuM890Op2019DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuM890Op2019DefaultWarehouse preset when built for legacy rest`, () => { + const skuM890Op2019DefaultWarehousePreset = InventoryEntryDraft.presets + .skuM890Op2019DefaultWarehouse() + .buildRest(); + expect(skuM890Op2019DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuM890Op2019DefaultWarehouse preset when built for legacy graphql`, () => { + const skuM890Op2019DefaultWarehousePreset = InventoryEntryDraft.presets + .skuM890Op2019DefaultWarehouse() + .buildGraphql(); + expect(skuM890Op2019DefaultWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-m-890-op-2019-default-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-m-890-op-2019-default-warehouse.ts new file mode 100644 index 000000000..c10281adc --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-m-890-op-2019-default-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .defaultWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .m890Op02() + .build(); + +const skuM890Op2019DefaultWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('m890-op-2019-default-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuM890Op2019DefaultWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-m-890-op-2019-eu-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-m-890-op-2019-eu-warehouse.spec.ts new file mode 100644 index 000000000..027a039b2 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-m-890-op-2019-eu-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuM890Op2019EuWarehouse preset`, () => { + it(`should return a skuM890Op2019EuWarehouse preset when built for rest`, () => { + const skuM890Op2019EuWarehousePreset = InventoryEntryDraftRest.presets + .skuM890Op2019EuWarehouse() + .build(); + expect(skuM890Op2019EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuM890Op2019EuWarehouse preset when built for graphql`, () => { + const skuM890Op2019EuWarehousePreset = InventoryEntryDraftGraphql.presets + .skuM890Op2019EuWarehouse() + .build(); + expect(skuM890Op2019EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuM890Op2019EuWarehouse preset when built for legacy rest`, () => { + const skuM890Op2019EuWarehousePreset = InventoryEntryDraft.presets + .skuM890Op2019EuWarehouse() + .buildRest(); + expect(skuM890Op2019EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuM890Op2019EuWarehouse preset when built for legacy graphql`, () => { + const skuM890Op2019EuWarehousePreset = InventoryEntryDraft.presets + .skuM890Op2019EuWarehouse() + .buildGraphql(); + expect(skuM890Op2019EuWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-m-890-op-2019-eu-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-m-890-op-2019-eu-warehouse.ts new file mode 100644 index 000000000..900114c5b --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-m-890-op-2019-eu-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .euWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .m890Op02() + .build(); + +const skuM890Op2019EuWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('m890-op-2019-eu-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuM890Op2019EuWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-m-890-op-2019-us-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-m-890-op-2019-us-warehouse.spec.ts new file mode 100644 index 000000000..a4620cec7 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-m-890-op-2019-us-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuM890Op2019UsWarehouse preset`, () => { + it(`should return a skuM890Op2019UsWarehouse preset when built for rest`, () => { + const skuM890Op2019UsWarehousePreset = InventoryEntryDraftRest.presets + .skuM890Op2019UsWarehouse() + .build(); + expect(skuM890Op2019UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuM890Op2019UsWarehouse preset when built for graphql`, () => { + const skuM890Op2019UsWarehousePreset = InventoryEntryDraftGraphql.presets + .skuM890Op2019UsWarehouse() + .build(); + expect(skuM890Op2019UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuM890Op2019UsWarehouse preset when built for legacy rest`, () => { + const skuM890Op2019UsWarehousePreset = InventoryEntryDraft.presets + .skuM890Op2019UsWarehouse() + .buildRest(); + expect(skuM890Op2019UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuM890Op2019UsWarehouse preset when built for legacy graphql`, () => { + const skuM890Op2019UsWarehousePreset = InventoryEntryDraft.presets + .skuM890Op2019UsWarehouse() + .buildGraphql(); + expect(skuM890Op2019UsWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-m-890-op-2019-us-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-m-890-op-2019-us-warehouse.ts new file mode 100644 index 000000000..7b26c9669 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-m-890-op-2019-us-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .usWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .m890Op02() + .build(); + +const skuM890Op2019UsWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('m890-op-2019-us-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuM890Op2019UsWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-m-890-op-2023-default-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-m-890-op-2023-default-warehouse.spec.ts new file mode 100644 index 000000000..9ea6c2353 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-m-890-op-2023-default-warehouse.spec.ts @@ -0,0 +1,40 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuM890Op2023DefaultWarehouse preset`, () => { + it(`should return a skuM890Op2023DefaultWarehouse preset when built for rest`, () => { + const skuM890Op2023DefaultWarehousePreset = InventoryEntryDraftRest.presets + .skuM890Op2023DefaultWarehouse() + .build(); + expect(skuM890Op2023DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuM890Op2023DefaultWarehouse preset when built for graphql`, () => { + const skuM890Op2023DefaultWarehousePreset = + InventoryEntryDraftGraphql.presets + .skuM890Op2023DefaultWarehouse() + .build(); + expect(skuM890Op2023DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuM890Op2023DefaultWarehouse preset when built for legacy rest`, () => { + const skuM890Op2023DefaultWarehousePreset = InventoryEntryDraft.presets + .skuM890Op2023DefaultWarehouse() + .buildRest(); + expect(skuM890Op2023DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuM890Op2023DefaultWarehouse preset when built for legacy graphql`, () => { + const skuM890Op2023DefaultWarehousePreset = InventoryEntryDraft.presets + .skuM890Op2023DefaultWarehouse() + .buildGraphql(); + expect(skuM890Op2023DefaultWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-m-890-op-2023-default-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-m-890-op-2023-default-warehouse.ts new file mode 100644 index 000000000..b9ba3d370 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-m-890-op-2023-default-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .defaultWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .m890Op03() + .build(); + +const skuM890Op2023DefaultWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('m890-op-2023-default-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuM890Op2023DefaultWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-m-890-op-2023-eu-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-m-890-op-2023-eu-warehouse.spec.ts new file mode 100644 index 000000000..e1b5db10d --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-m-890-op-2023-eu-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuM890Op2023EuWarehouse preset`, () => { + it(`should return a skuM890Op2023EuWarehouse preset when built for rest`, () => { + const skuM890Op2023EuWarehousePreset = InventoryEntryDraftRest.presets + .skuM890Op2023EuWarehouse() + .build(); + expect(skuM890Op2023EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuM890Op2023EuWarehouse preset when built for graphql`, () => { + const skuM890Op2023EuWarehousePreset = InventoryEntryDraftGraphql.presets + .skuM890Op2023EuWarehouse() + .build(); + expect(skuM890Op2023EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuM890Op2023EuWarehouse preset when built for legacy rest`, () => { + const skuM890Op2023EuWarehousePreset = InventoryEntryDraft.presets + .skuM890Op2023EuWarehouse() + .buildRest(); + expect(skuM890Op2023EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuM890Op2023EuWarehouse preset when built for legacy graphql`, () => { + const skuM890Op2023EuWarehousePreset = InventoryEntryDraft.presets + .skuM890Op2023EuWarehouse() + .buildGraphql(); + expect(skuM890Op2023EuWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-m-890-op-2023-eu-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-m-890-op-2023-eu-warehouse.ts new file mode 100644 index 000000000..7f1fff6e8 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-m-890-op-2023-eu-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .euWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .m890Op03() + .build(); + +const skuM890Op2023EuWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('m890-op-2023-eu-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuM890Op2023EuWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-m-890-op-2023-us-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-m-890-op-2023-us-warehouse.spec.ts new file mode 100644 index 000000000..60d8d6f70 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-m-890-op-2023-us-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuM890Op2023UsWarehouse preset`, () => { + it(`should return a skuM890Op2023UsWarehouse preset when built for rest`, () => { + const skuM890Op2023UsWarehousePreset = InventoryEntryDraftRest.presets + .skuM890Op2023UsWarehouse() + .build(); + expect(skuM890Op2023UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuM890Op2023UsWarehouse preset when built for graphql`, () => { + const skuM890Op2023UsWarehousePreset = InventoryEntryDraftGraphql.presets + .skuM890Op2023UsWarehouse() + .build(); + expect(skuM890Op2023UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuM890Op2023UsWarehouse preset when built for legacy rest`, () => { + const skuM890Op2023UsWarehousePreset = InventoryEntryDraft.presets + .skuM890Op2023UsWarehouse() + .buildRest(); + expect(skuM890Op2023UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuM890Op2023UsWarehouse preset when built for legacy graphql`, () => { + const skuM890Op2023UsWarehousePreset = InventoryEntryDraft.presets + .skuM890Op2023UsWarehouse() + .buildGraphql(); + expect(skuM890Op2023UsWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-m-890-op-2023-us-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-m-890-op-2023-us-warehouse.ts new file mode 100644 index 000000000..3cddff302 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-m-890-op-2023-us-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .usWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .m890Op03() + .build(); + +const skuM890Op2023UsWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('m890-op-2023-us-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuM890Op2023UsWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-m890-op-2015-default.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-m890-op-2015-default.spec.ts deleted file mode 100644 index 02bba0cc3..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-m890-op-2015-default.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuM890Op2015Default from './sku-m890-op-2015-default'; - -describe(`with skuM890Op2015Default preset and default-warehouse channel`, () => { - it(`should return a skuM890Op2015Default preset`, () => { - const skuM890Op2015DefaultPreset = - skuM890Op2015Default().build(); - expect(skuM890Op2015DefaultPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "m890-op-2015-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "m890-op-2015", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuM890Op2015Default preset when built for graphql`, () => { - const skuM890Op2015DefaultPresetGraphql = - skuM890Op2015Default().buildGraphql(); - expect(skuM890Op2015DefaultPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "m890-op-2015-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "m890-op-2015", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-m890-op-2015-default.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-m890-op-2015-default.ts deleted file mode 100644 index 7e6a77fe6..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-m890-op-2015-default.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const defaultWarehouse = ChannelDraft.presets.sampleDataB2B - .defaultWarehouse() - .build(); - -const m890Op01 = ProductVariantDraft.presets.sampleDataB2B - .m890Op01() - .build(); - -const skuM890Op2015Default = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${m890Op01.sku}-${defaultWarehouse.key}`) - .sku(m890Op01.sku!) - .quantityOnStock(1000) - .supplyChannel( - KeyReferenceDraft.presets.channel().key(defaultWarehouse.key) - ); - -export default skuM890Op2015Default; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-m890-op-2015-eu.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-m890-op-2015-eu.spec.ts deleted file mode 100644 index 0c08b9128..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-m890-op-2015-eu.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuM890Op2015Eu from './sku-m890-op-2015-eu'; - -describe(`with skuM890Op2015Eu preset and eu-warehouse channel`, () => { - it(`should return a skuM890Op2015Eu preset`, () => { - const skuM890Op2015EuPreset = - skuM890Op2015Eu().build(); - expect(skuM890Op2015EuPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "m890-op-2015-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "m890-op-2015", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuM890Op2015Eu preset when built for graphql`, () => { - const skuM890Op2015EuPresetGraphql = - skuM890Op2015Eu().buildGraphql(); - expect(skuM890Op2015EuPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "m890-op-2015-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "m890-op-2015", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-m890-op-2015-eu.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-m890-op-2015-eu.ts deleted file mode 100644 index 1a17a60ae..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-m890-op-2015-eu.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const euWarehouse = ChannelDraft.presets.sampleDataB2B - .euWarehouse() - .build(); - -const m890Op01 = ProductVariantDraft.presets.sampleDataB2B - .m890Op01() - .build(); - -const skuM890Op2015Eu = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${m890Op01.sku}-${euWarehouse.key}`) - .sku(m890Op01.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(euWarehouse.key)); - -export default skuM890Op2015Eu; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-m890-op-2015-us.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-m890-op-2015-us.spec.ts deleted file mode 100644 index c2533e9b6..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-m890-op-2015-us.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuM890Op2015Us from './sku-m890-op-2015-us'; - -describe(`with skuM890Op2015Us preset and us-warehouse channel`, () => { - it(`should return a skuM890Op2015Us preset`, () => { - const skuM890Op2015UsPreset = - skuM890Op2015Us().build(); - expect(skuM890Op2015UsPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "m890-op-2015-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "m890-op-2015", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuM890Op2015Us preset when built for graphql`, () => { - const skuM890Op2015UsPresetGraphql = - skuM890Op2015Us().buildGraphql(); - expect(skuM890Op2015UsPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "m890-op-2015-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "m890-op-2015", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-m890-op-2015-us.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-m890-op-2015-us.ts deleted file mode 100644 index 6afa4105e..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-m890-op-2015-us.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const usWarehouse = ChannelDraft.presets.sampleDataB2B - .usWarehouse() - .build(); - -const m890Op01 = ProductVariantDraft.presets.sampleDataB2B - .m890Op01() - .build(); - -const skuM890Op2015Us = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${m890Op01.sku}-${usWarehouse.key}`) - .sku(m890Op01.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(usWarehouse.key)); - -export default skuM890Op2015Us; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-m890-op-2019-default.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-m890-op-2019-default.spec.ts deleted file mode 100644 index 8527dcfc4..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-m890-op-2019-default.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuM890Op2019Default from './sku-m890-op-2019-default'; - -describe(`with skuM890Op2019Default preset and default-warehouse channel`, () => { - it(`should return a skuM890Op2019Default preset`, () => { - const skuM890Op2019DefaultPreset = - skuM890Op2019Default().build(); - expect(skuM890Op2019DefaultPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "m890-op-2019-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "m890-op-2019", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuM890Op2019Default preset when built for graphql`, () => { - const skuM890Op2019DefaultPresetGraphql = - skuM890Op2019Default().buildGraphql(); - expect(skuM890Op2019DefaultPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "m890-op-2019-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "m890-op-2019", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-m890-op-2019-default.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-m890-op-2019-default.ts deleted file mode 100644 index 29aebea0a..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-m890-op-2019-default.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const defaultWarehouse = ChannelDraft.presets.sampleDataB2B - .defaultWarehouse() - .build(); - -const m890Op02 = ProductVariantDraft.presets.sampleDataB2B - .m890Op02() - .build(); - -const skuM890Op2019Default = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${m890Op02.sku}-${defaultWarehouse.key}`) - .sku(m890Op02.sku!) - .quantityOnStock(1000) - .supplyChannel( - KeyReferenceDraft.presets.channel().key(defaultWarehouse.key) - ); - -export default skuM890Op2019Default; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-m890-op-2019-eu.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-m890-op-2019-eu.spec.ts deleted file mode 100644 index 840dbb916..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-m890-op-2019-eu.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuM890Op2019Eu from './sku-m890-op-2019-eu'; - -describe(`with skuM890Op2019Eu preset and eu-warehouse channel`, () => { - it(`should return a skuM890Op2019Eu preset`, () => { - const skuM890Op2019EuPreset = - skuM890Op2019Eu().build(); - expect(skuM890Op2019EuPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "m890-op-2019-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "m890-op-2019", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuM890Op2019Eu preset when built for graphql`, () => { - const skuM890Op2019EuPresetGraphql = - skuM890Op2019Eu().buildGraphql(); - expect(skuM890Op2019EuPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "m890-op-2019-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "m890-op-2019", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-m890-op-2019-eu.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-m890-op-2019-eu.ts deleted file mode 100644 index 5cf1ab27a..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-m890-op-2019-eu.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const euWarehouse = ChannelDraft.presets.sampleDataB2B - .euWarehouse() - .build(); - -const m890Op02 = ProductVariantDraft.presets.sampleDataB2B - .m890Op02() - .build(); - -const skuM890Op2019Eu = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${m890Op02.sku}-${euWarehouse.key}`) - .sku(m890Op02.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(euWarehouse.key)); - -export default skuM890Op2019Eu; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-m890-op-2019-us.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-m890-op-2019-us.spec.ts deleted file mode 100644 index 448c97ff0..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-m890-op-2019-us.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuM890Op2019Us from './sku-m890-op-2019-us'; - -describe(`with skuM890Op2019Us preset and us-warehouse channel`, () => { - it(`should return a skuM890Op2019Us preset`, () => { - const skuM890Op2019UsPreset = - skuM890Op2019Us().build(); - expect(skuM890Op2019UsPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "m890-op-2019-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "m890-op-2019", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuM890Op2019Us preset when built for graphql`, () => { - const skuM890Op2019UsPresetGraphql = - skuM890Op2019Us().buildGraphql(); - expect(skuM890Op2019UsPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "m890-op-2019-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "m890-op-2019", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-m890-op-2019-us.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-m890-op-2019-us.ts deleted file mode 100644 index 70a7460be..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-m890-op-2019-us.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const usWarehouse = ChannelDraft.presets.sampleDataB2B - .usWarehouse() - .build(); - -const m890Op02 = ProductVariantDraft.presets.sampleDataB2B - .m890Op02() - .build(); - -const skuM890Op2019Us = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${m890Op02.sku}-${usWarehouse.key}`) - .sku(m890Op02.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(usWarehouse.key)); - -export default skuM890Op2019Us; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-m890-op-2023-default.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-m890-op-2023-default.spec.ts deleted file mode 100644 index 7edd0faef..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-m890-op-2023-default.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuM890Op2023Default from './sku-m890-op-2023-default'; - -describe(`with skuM890Op2023Default preset and default-warehouse channel`, () => { - it(`should return a skuM890Op2023Default preset`, () => { - const skuM890Op2023DefaultPreset = - skuM890Op2023Default().build(); - expect(skuM890Op2023DefaultPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "m890-op-2023-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "m890-op-2023", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuM890Op2023Default preset when built for graphql`, () => { - const skuM890Op2023DefaultPresetGraphql = - skuM890Op2023Default().buildGraphql(); - expect(skuM890Op2023DefaultPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "m890-op-2023-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "m890-op-2023", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-m890-op-2023-default.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-m890-op-2023-default.ts deleted file mode 100644 index 8f67b3bf4..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-m890-op-2023-default.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const defaultWarehouse = ChannelDraft.presets.sampleDataB2B - .defaultWarehouse() - .build(); - -const m890Op03 = ProductVariantDraft.presets.sampleDataB2B - .m890Op03() - .build(); - -const skuM890Op2023Default = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${m890Op03.sku}-${defaultWarehouse.key}`) - .sku(m890Op03.sku!) - .quantityOnStock(1000) - .supplyChannel( - KeyReferenceDraft.presets.channel().key(defaultWarehouse.key) - ); - -export default skuM890Op2023Default; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-m890-op-2023-eu.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-m890-op-2023-eu.spec.ts deleted file mode 100644 index 2baf7c6ae..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-m890-op-2023-eu.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuM890Op2023Eu from './sku-m890-op-2023-eu'; - -describe(`with skuM890Op2023Eu preset and eu-warehouse channel`, () => { - it(`should return a skuM890Op2023Eu preset`, () => { - const skuM890Op2023EuPreset = - skuM890Op2023Eu().build(); - expect(skuM890Op2023EuPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "m890-op-2023-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "m890-op-2023", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuM890Op2023Eu preset when built for graphql`, () => { - const skuM890Op2023EuPresetGraphql = - skuM890Op2023Eu().buildGraphql(); - expect(skuM890Op2023EuPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "m890-op-2023-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "m890-op-2023", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-m890-op-2023-eu.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-m890-op-2023-eu.ts deleted file mode 100644 index 9dcb1ea1c..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-m890-op-2023-eu.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const euWarehouse = ChannelDraft.presets.sampleDataB2B - .euWarehouse() - .build(); - -const m890Op03 = ProductVariantDraft.presets.sampleDataB2B - .m890Op03() - .build(); - -const skuM890Op2023Eu = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${m890Op03.sku}-${euWarehouse.key}`) - .sku(m890Op03.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(euWarehouse.key)); - -export default skuM890Op2023Eu; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-m890-op-2023-us.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-m890-op-2023-us.spec.ts deleted file mode 100644 index 3ce52a634..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-m890-op-2023-us.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuM890Op2023Us from './sku-m890-op-2023-us'; - -describe(`with skuM890Op2023Us preset and us-warehouse channel`, () => { - it(`should return a skuM890Op2023Us preset`, () => { - const skuM890Op2023UsPreset = - skuM890Op2023Us().build(); - expect(skuM890Op2023UsPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "m890-op-2023-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "m890-op-2023", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuM890Op2023Us preset when built for graphql`, () => { - const skuM890Op2023UsPresetGraphql = - skuM890Op2023Us().buildGraphql(); - expect(skuM890Op2023UsPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "m890-op-2023-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "m890-op-2023", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-m890-op-2023-us.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-m890-op-2023-us.ts deleted file mode 100644 index 7e8420e2a..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-m890-op-2023-us.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const usWarehouse = ChannelDraft.presets.sampleDataB2B - .usWarehouse() - .build(); - -const m890Op03 = ProductVariantDraft.presets.sampleDataB2B - .m890Op03() - .build(); - -const skuM890Op2023Us = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${m890Op03.sku}-${usWarehouse.key}`) - .sku(m890Op03.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(usWarehouse.key)); - -export default skuM890Op2023Us; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-mm-123-qr-2015-default-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-mm-123-qr-2015-default-warehouse.spec.ts new file mode 100644 index 000000000..15fa170ec --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-mm-123-qr-2015-default-warehouse.spec.ts @@ -0,0 +1,40 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuMm123Qr2015DefaultWarehouse preset`, () => { + it(`should return a skuMm123Qr2015DefaultWarehouse preset when built for rest`, () => { + const skuMm123Qr2015DefaultWarehousePreset = InventoryEntryDraftRest.presets + .skuMm123Qr2015DefaultWarehouse() + .build(); + expect(skuMm123Qr2015DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuMm123Qr2015DefaultWarehouse preset when built for graphql`, () => { + const skuMm123Qr2015DefaultWarehousePreset = + InventoryEntryDraftGraphql.presets + .skuMm123Qr2015DefaultWarehouse() + .build(); + expect(skuMm123Qr2015DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuMm123Qr2015DefaultWarehouse preset when built for legacy rest`, () => { + const skuMm123Qr2015DefaultWarehousePreset = InventoryEntryDraft.presets + .skuMm123Qr2015DefaultWarehouse() + .buildRest(); + expect(skuMm123Qr2015DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuMm123Qr2015DefaultWarehouse preset when built for legacy graphql`, () => { + const skuMm123Qr2015DefaultWarehousePreset = InventoryEntryDraft.presets + .skuMm123Qr2015DefaultWarehouse() + .buildGraphql(); + expect(skuMm123Qr2015DefaultWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-mm-123-qr-2015-default-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-mm-123-qr-2015-default-warehouse.ts new file mode 100644 index 000000000..4f2277357 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-mm-123-qr-2015-default-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .defaultWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .mm123Qr01() + .build(); + +const skuMm123Qr2015DefaultWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('mm123-qr-2015-default-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuMm123Qr2015DefaultWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-mm-123-qr-2015-eu-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-mm-123-qr-2015-eu-warehouse.spec.ts new file mode 100644 index 000000000..05048eb11 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-mm-123-qr-2015-eu-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuMm123Qr2015EuWarehouse preset`, () => { + it(`should return a skuMm123Qr2015EuWarehouse preset when built for rest`, () => { + const skuMm123Qr2015EuWarehousePreset = InventoryEntryDraftRest.presets + .skuMm123Qr2015EuWarehouse() + .build(); + expect(skuMm123Qr2015EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuMm123Qr2015EuWarehouse preset when built for graphql`, () => { + const skuMm123Qr2015EuWarehousePreset = InventoryEntryDraftGraphql.presets + .skuMm123Qr2015EuWarehouse() + .build(); + expect(skuMm123Qr2015EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuMm123Qr2015EuWarehouse preset when built for legacy rest`, () => { + const skuMm123Qr2015EuWarehousePreset = InventoryEntryDraft.presets + .skuMm123Qr2015EuWarehouse() + .buildRest(); + expect(skuMm123Qr2015EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuMm123Qr2015EuWarehouse preset when built for legacy graphql`, () => { + const skuMm123Qr2015EuWarehousePreset = InventoryEntryDraft.presets + .skuMm123Qr2015EuWarehouse() + .buildGraphql(); + expect(skuMm123Qr2015EuWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-mm-123-qr-2015-eu-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-mm-123-qr-2015-eu-warehouse.ts new file mode 100644 index 000000000..1ebe3f268 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-mm-123-qr-2015-eu-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .euWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .mm123Qr01() + .build(); + +const skuMm123Qr2015EuWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('mm123-qr-2015-eu-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuMm123Qr2015EuWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-mm-123-qr-2015-us-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-mm-123-qr-2015-us-warehouse.spec.ts new file mode 100644 index 000000000..6d675f4f4 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-mm-123-qr-2015-us-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuMm123Qr2015UsWarehouse preset`, () => { + it(`should return a skuMm123Qr2015UsWarehouse preset when built for rest`, () => { + const skuMm123Qr2015UsWarehousePreset = InventoryEntryDraftRest.presets + .skuMm123Qr2015UsWarehouse() + .build(); + expect(skuMm123Qr2015UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuMm123Qr2015UsWarehouse preset when built for graphql`, () => { + const skuMm123Qr2015UsWarehousePreset = InventoryEntryDraftGraphql.presets + .skuMm123Qr2015UsWarehouse() + .build(); + expect(skuMm123Qr2015UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuMm123Qr2015UsWarehouse preset when built for legacy rest`, () => { + const skuMm123Qr2015UsWarehousePreset = InventoryEntryDraft.presets + .skuMm123Qr2015UsWarehouse() + .buildRest(); + expect(skuMm123Qr2015UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuMm123Qr2015UsWarehouse preset when built for legacy graphql`, () => { + const skuMm123Qr2015UsWarehousePreset = InventoryEntryDraft.presets + .skuMm123Qr2015UsWarehouse() + .buildGraphql(); + expect(skuMm123Qr2015UsWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-mm-123-qr-2015-us-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-mm-123-qr-2015-us-warehouse.ts new file mode 100644 index 000000000..dc3dcca74 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-mm-123-qr-2015-us-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .usWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .mm123Qr01() + .build(); + +const skuMm123Qr2015UsWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('mm123-qr-2015-us-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuMm123Qr2015UsWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-mm-123-qr-2019-default-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-mm-123-qr-2019-default-warehouse.spec.ts new file mode 100644 index 000000000..340b51546 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-mm-123-qr-2019-default-warehouse.spec.ts @@ -0,0 +1,40 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuMm123Qr2019DefaultWarehouse preset`, () => { + it(`should return a skuMm123Qr2019DefaultWarehouse preset when built for rest`, () => { + const skuMm123Qr2019DefaultWarehousePreset = InventoryEntryDraftRest.presets + .skuMm123Qr2019DefaultWarehouse() + .build(); + expect(skuMm123Qr2019DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuMm123Qr2019DefaultWarehouse preset when built for graphql`, () => { + const skuMm123Qr2019DefaultWarehousePreset = + InventoryEntryDraftGraphql.presets + .skuMm123Qr2019DefaultWarehouse() + .build(); + expect(skuMm123Qr2019DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuMm123Qr2019DefaultWarehouse preset when built for legacy rest`, () => { + const skuMm123Qr2019DefaultWarehousePreset = InventoryEntryDraft.presets + .skuMm123Qr2019DefaultWarehouse() + .buildRest(); + expect(skuMm123Qr2019DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuMm123Qr2019DefaultWarehouse preset when built for legacy graphql`, () => { + const skuMm123Qr2019DefaultWarehousePreset = InventoryEntryDraft.presets + .skuMm123Qr2019DefaultWarehouse() + .buildGraphql(); + expect(skuMm123Qr2019DefaultWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-mm-123-qr-2019-default-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-mm-123-qr-2019-default-warehouse.ts new file mode 100644 index 000000000..6bf068e3c --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-mm-123-qr-2019-default-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .defaultWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .mm123Qr02() + .build(); + +const skuMm123Qr2019DefaultWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('mm123-qr-2019-default-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuMm123Qr2019DefaultWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-mm-123-qr-2019-eu-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-mm-123-qr-2019-eu-warehouse.spec.ts new file mode 100644 index 000000000..2d49126ce --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-mm-123-qr-2019-eu-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuMm123Qr2019EuWarehouse preset`, () => { + it(`should return a skuMm123Qr2019EuWarehouse preset when built for rest`, () => { + const skuMm123Qr2019EuWarehousePreset = InventoryEntryDraftRest.presets + .skuMm123Qr2019EuWarehouse() + .build(); + expect(skuMm123Qr2019EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuMm123Qr2019EuWarehouse preset when built for graphql`, () => { + const skuMm123Qr2019EuWarehousePreset = InventoryEntryDraftGraphql.presets + .skuMm123Qr2019EuWarehouse() + .build(); + expect(skuMm123Qr2019EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuMm123Qr2019EuWarehouse preset when built for legacy rest`, () => { + const skuMm123Qr2019EuWarehousePreset = InventoryEntryDraft.presets + .skuMm123Qr2019EuWarehouse() + .buildRest(); + expect(skuMm123Qr2019EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuMm123Qr2019EuWarehouse preset when built for legacy graphql`, () => { + const skuMm123Qr2019EuWarehousePreset = InventoryEntryDraft.presets + .skuMm123Qr2019EuWarehouse() + .buildGraphql(); + expect(skuMm123Qr2019EuWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-mm-123-qr-2019-eu-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-mm-123-qr-2019-eu-warehouse.ts new file mode 100644 index 000000000..849cdbe77 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-mm-123-qr-2019-eu-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .euWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .mm123Qr02() + .build(); + +const skuMm123Qr2019EuWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('mm123-qr-2019-eu-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuMm123Qr2019EuWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-mm-123-qr-2019-us-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-mm-123-qr-2019-us-warehouse.spec.ts new file mode 100644 index 000000000..53a96ed07 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-mm-123-qr-2019-us-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuMm123Qr2019UsWarehouse preset`, () => { + it(`should return a skuMm123Qr2019UsWarehouse preset when built for rest`, () => { + const skuMm123Qr2019UsWarehousePreset = InventoryEntryDraftRest.presets + .skuMm123Qr2019UsWarehouse() + .build(); + expect(skuMm123Qr2019UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuMm123Qr2019UsWarehouse preset when built for graphql`, () => { + const skuMm123Qr2019UsWarehousePreset = InventoryEntryDraftGraphql.presets + .skuMm123Qr2019UsWarehouse() + .build(); + expect(skuMm123Qr2019UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuMm123Qr2019UsWarehouse preset when built for legacy rest`, () => { + const skuMm123Qr2019UsWarehousePreset = InventoryEntryDraft.presets + .skuMm123Qr2019UsWarehouse() + .buildRest(); + expect(skuMm123Qr2019UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuMm123Qr2019UsWarehouse preset when built for legacy graphql`, () => { + const skuMm123Qr2019UsWarehousePreset = InventoryEntryDraft.presets + .skuMm123Qr2019UsWarehouse() + .buildGraphql(); + expect(skuMm123Qr2019UsWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-mm-123-qr-2019-us-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-mm-123-qr-2019-us-warehouse.ts new file mode 100644 index 000000000..462c6f70a --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-mm-123-qr-2019-us-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .usWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .mm123Qr02() + .build(); + +const skuMm123Qr2019UsWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('mm123-qr-2019-us-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuMm123Qr2019UsWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-mm-123-qr-2023-default-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-mm-123-qr-2023-default-warehouse.spec.ts new file mode 100644 index 000000000..e0cd7585b --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-mm-123-qr-2023-default-warehouse.spec.ts @@ -0,0 +1,40 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuMm123Qr2023DefaultWarehouse preset`, () => { + it(`should return a skuMm123Qr2023DefaultWarehouse preset when built for rest`, () => { + const skuMm123Qr2023DefaultWarehousePreset = InventoryEntryDraftRest.presets + .skuMm123Qr2023DefaultWarehouse() + .build(); + expect(skuMm123Qr2023DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuMm123Qr2023DefaultWarehouse preset when built for graphql`, () => { + const skuMm123Qr2023DefaultWarehousePreset = + InventoryEntryDraftGraphql.presets + .skuMm123Qr2023DefaultWarehouse() + .build(); + expect(skuMm123Qr2023DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuMm123Qr2023DefaultWarehouse preset when built for legacy rest`, () => { + const skuMm123Qr2023DefaultWarehousePreset = InventoryEntryDraft.presets + .skuMm123Qr2023DefaultWarehouse() + .buildRest(); + expect(skuMm123Qr2023DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuMm123Qr2023DefaultWarehouse preset when built for legacy graphql`, () => { + const skuMm123Qr2023DefaultWarehousePreset = InventoryEntryDraft.presets + .skuMm123Qr2023DefaultWarehouse() + .buildGraphql(); + expect(skuMm123Qr2023DefaultWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-mm-123-qr-2023-default-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-mm-123-qr-2023-default-warehouse.ts new file mode 100644 index 000000000..2c8afa9b8 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-mm-123-qr-2023-default-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .defaultWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .mm123Qr03() + .build(); + +const skuMm123Qr2023DefaultWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('mm123-qr-2023-default-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuMm123Qr2023DefaultWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-mm-123-qr-2023-eu-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-mm-123-qr-2023-eu-warehouse.spec.ts new file mode 100644 index 000000000..fdcc5e175 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-mm-123-qr-2023-eu-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuMm123Qr2023EuWarehouse preset`, () => { + it(`should return a skuMm123Qr2023EuWarehouse preset when built for rest`, () => { + const skuMm123Qr2023EuWarehousePreset = InventoryEntryDraftRest.presets + .skuMm123Qr2023EuWarehouse() + .build(); + expect(skuMm123Qr2023EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuMm123Qr2023EuWarehouse preset when built for graphql`, () => { + const skuMm123Qr2023EuWarehousePreset = InventoryEntryDraftGraphql.presets + .skuMm123Qr2023EuWarehouse() + .build(); + expect(skuMm123Qr2023EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuMm123Qr2023EuWarehouse preset when built for legacy rest`, () => { + const skuMm123Qr2023EuWarehousePreset = InventoryEntryDraft.presets + .skuMm123Qr2023EuWarehouse() + .buildRest(); + expect(skuMm123Qr2023EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuMm123Qr2023EuWarehouse preset when built for legacy graphql`, () => { + const skuMm123Qr2023EuWarehousePreset = InventoryEntryDraft.presets + .skuMm123Qr2023EuWarehouse() + .buildGraphql(); + expect(skuMm123Qr2023EuWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-mm-123-qr-2023-eu-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-mm-123-qr-2023-eu-warehouse.ts new file mode 100644 index 000000000..8467e6e78 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-mm-123-qr-2023-eu-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .euWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .mm123Qr03() + .build(); + +const skuMm123Qr2023EuWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('mm123-qr-2023-eu-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuMm123Qr2023EuWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-mm-123-qr-2023-us-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-mm-123-qr-2023-us-warehouse.spec.ts new file mode 100644 index 000000000..c3cffdefc --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-mm-123-qr-2023-us-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuMm123Qr2023UsWarehouse preset`, () => { + it(`should return a skuMm123Qr2023UsWarehouse preset when built for rest`, () => { + const skuMm123Qr2023UsWarehousePreset = InventoryEntryDraftRest.presets + .skuMm123Qr2023UsWarehouse() + .build(); + expect(skuMm123Qr2023UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuMm123Qr2023UsWarehouse preset when built for graphql`, () => { + const skuMm123Qr2023UsWarehousePreset = InventoryEntryDraftGraphql.presets + .skuMm123Qr2023UsWarehouse() + .build(); + expect(skuMm123Qr2023UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuMm123Qr2023UsWarehouse preset when built for legacy rest`, () => { + const skuMm123Qr2023UsWarehousePreset = InventoryEntryDraft.presets + .skuMm123Qr2023UsWarehouse() + .buildRest(); + expect(skuMm123Qr2023UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuMm123Qr2023UsWarehouse preset when built for legacy graphql`, () => { + const skuMm123Qr2023UsWarehousePreset = InventoryEntryDraft.presets + .skuMm123Qr2023UsWarehouse() + .buildGraphql(); + expect(skuMm123Qr2023UsWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-mm-123-qr-2023-us-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-mm-123-qr-2023-us-warehouse.ts new file mode 100644 index 000000000..4c4f6d7ab --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-mm-123-qr-2023-us-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .usWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .mm123Qr03() + .build(); + +const skuMm123Qr2023UsWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('mm123-qr-2023-us-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuMm123Qr2023UsWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-mm123-qr-2015-default.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-mm123-qr-2015-default.spec.ts deleted file mode 100644 index feb7ad989..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-mm123-qr-2015-default.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuMm123Qr2015Default from './sku-mm123-qr-2015-default'; - -describe(`with skuMm123Qr2015Default preset and default-warehouse channel`, () => { - it(`should return a skuMm123Qr2015Default preset`, () => { - const skuMm123Qr2015DefaultPreset = - skuMm123Qr2015Default().build(); - expect(skuMm123Qr2015DefaultPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "mm123-qr-2015-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "mm123-qr-2015", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuMm123Qr2015Default preset when built for graphql`, () => { - const skuMm123Qr2015DefaultPresetGraphql = - skuMm123Qr2015Default().buildGraphql(); - expect(skuMm123Qr2015DefaultPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "mm123-qr-2015-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "mm123-qr-2015", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-mm123-qr-2015-default.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-mm123-qr-2015-default.ts deleted file mode 100644 index 4e019ab1e..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-mm123-qr-2015-default.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const defaultWarehouse = ChannelDraft.presets.sampleDataB2B - .defaultWarehouse() - .build(); - -const mm123Qr01 = ProductVariantDraft.presets.sampleDataB2B - .mm123Qr01() - .build(); - -const skuMm123Qr2015Default = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${mm123Qr01.sku}-${defaultWarehouse.key}`) - .sku(mm123Qr01.sku!) - .quantityOnStock(1000) - .supplyChannel( - KeyReferenceDraft.presets.channel().key(defaultWarehouse.key) - ); - -export default skuMm123Qr2015Default; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-mm123-qr-2015-eu.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-mm123-qr-2015-eu.spec.ts deleted file mode 100644 index ff9b86920..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-mm123-qr-2015-eu.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuMm123Qr2015Eu from './sku-mm123-qr-2015-eu'; - -describe(`with skuMm123Qr2015Eu preset and eu-warehouse channel`, () => { - it(`should return a skuMm123Qr2015Eu preset`, () => { - const skuMm123Qr2015EuPreset = - skuMm123Qr2015Eu().build(); - expect(skuMm123Qr2015EuPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "mm123-qr-2015-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "mm123-qr-2015", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuMm123Qr2015Eu preset when built for graphql`, () => { - const skuMm123Qr2015EuPresetGraphql = - skuMm123Qr2015Eu().buildGraphql(); - expect(skuMm123Qr2015EuPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "mm123-qr-2015-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "mm123-qr-2015", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-mm123-qr-2015-eu.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-mm123-qr-2015-eu.ts deleted file mode 100644 index e06ce3f2a..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-mm123-qr-2015-eu.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const euWarehouse = ChannelDraft.presets.sampleDataB2B - .euWarehouse() - .build(); - -const mm123Qr01 = ProductVariantDraft.presets.sampleDataB2B - .mm123Qr01() - .build(); - -const skuMm123Qr2015Eu = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${mm123Qr01.sku}-${euWarehouse.key}`) - .sku(mm123Qr01.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(euWarehouse.key)); - -export default skuMm123Qr2015Eu; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-mm123-qr-2015-us.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-mm123-qr-2015-us.spec.ts deleted file mode 100644 index df29982dd..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-mm123-qr-2015-us.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuMm123Qr2015Us from './sku-mm123-qr-2015-us'; - -describe(`with skuMm123Qr2015Us preset and us-warehouse channel`, () => { - it(`should return a skuMm123Qr2015Us preset`, () => { - const skuMm123Qr2015UsPreset = - skuMm123Qr2015Us().build(); - expect(skuMm123Qr2015UsPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "mm123-qr-2015-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "mm123-qr-2015", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuMm123Qr2015Us preset when built for graphql`, () => { - const skuMm123Qr2015UsPresetGraphql = - skuMm123Qr2015Us().buildGraphql(); - expect(skuMm123Qr2015UsPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "mm123-qr-2015-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "mm123-qr-2015", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-mm123-qr-2015-us.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-mm123-qr-2015-us.ts deleted file mode 100644 index 51122d803..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-mm123-qr-2015-us.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const usWarehouse = ChannelDraft.presets.sampleDataB2B - .usWarehouse() - .build(); - -const mm123Qr01 = ProductVariantDraft.presets.sampleDataB2B - .mm123Qr01() - .build(); - -const skuMm123Qr2015Us = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${mm123Qr01.sku}-${usWarehouse.key}`) - .sku(mm123Qr01.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(usWarehouse.key)); - -export default skuMm123Qr2015Us; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-mm123-qr-2019-default.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-mm123-qr-2019-default.spec.ts deleted file mode 100644 index d380c8a0b..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-mm123-qr-2019-default.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuMm123Qr2019Default from './sku-mm123-qr-2019-default'; - -describe(`with skuMm123Qr2019Default preset and default-warehouse channel`, () => { - it(`should return a skuMm123Qr2019Default preset`, () => { - const skuMm123Qr2019DefaultPreset = - skuMm123Qr2019Default().build(); - expect(skuMm123Qr2019DefaultPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "mm123-qr-2019-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "mm123-qr-2019", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuMm123Qr2019Default preset when built for graphql`, () => { - const skuMm123Qr2019DefaultPresetGraphql = - skuMm123Qr2019Default().buildGraphql(); - expect(skuMm123Qr2019DefaultPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "mm123-qr-2019-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "mm123-qr-2019", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-mm123-qr-2019-default.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-mm123-qr-2019-default.ts deleted file mode 100644 index c3e347bc8..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-mm123-qr-2019-default.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const defaultWarehouse = ChannelDraft.presets.sampleDataB2B - .defaultWarehouse() - .build(); - -const mm123Qr02 = ProductVariantDraft.presets.sampleDataB2B - .mm123Qr02() - .build(); - -const skuMm123Qr2019Default = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${mm123Qr02.sku}-${defaultWarehouse.key}`) - .sku(mm123Qr02.sku!) - .quantityOnStock(1000) - .supplyChannel( - KeyReferenceDraft.presets.channel().key(defaultWarehouse.key) - ); - -export default skuMm123Qr2019Default; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-mm123-qr-2019-eu.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-mm123-qr-2019-eu.spec.ts deleted file mode 100644 index 8c086b9ee..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-mm123-qr-2019-eu.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuMm123Qr2019Eu from './sku-mm123-qr-2019-eu'; - -describe(`with skuMm123Qr2019Eu preset and eu-warehouse channel`, () => { - it(`should return a skuMm123Qr2019Eu preset`, () => { - const skuMm123Qr2019EuPreset = - skuMm123Qr2019Eu().build(); - expect(skuMm123Qr2019EuPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "mm123-qr-2019-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "mm123-qr-2019", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuMm123Qr2019Eu preset when built for graphql`, () => { - const skuMm123Qr2019EuPresetGraphql = - skuMm123Qr2019Eu().buildGraphql(); - expect(skuMm123Qr2019EuPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "mm123-qr-2019-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "mm123-qr-2019", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-mm123-qr-2019-eu.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-mm123-qr-2019-eu.ts deleted file mode 100644 index c63e7dbd3..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-mm123-qr-2019-eu.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const euWarehouse = ChannelDraft.presets.sampleDataB2B - .euWarehouse() - .build(); - -const mm123Qr02 = ProductVariantDraft.presets.sampleDataB2B - .mm123Qr02() - .build(); - -const skuMm123Qr2019Eu = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${mm123Qr02.sku}-${euWarehouse.key}`) - .sku(mm123Qr02.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(euWarehouse.key)); - -export default skuMm123Qr2019Eu; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-mm123-qr-2019-us.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-mm123-qr-2019-us.spec.ts deleted file mode 100644 index 7ae465626..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-mm123-qr-2019-us.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuMm123Qr2019Us from './sku-mm123-qr-2019-us'; - -describe(`with skuMm123Qr2019Us preset and us-warehouse channel`, () => { - it(`should return a skuMm123Qr2019Us preset`, () => { - const skuMm123Qr2019UsPreset = - skuMm123Qr2019Us().build(); - expect(skuMm123Qr2019UsPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "mm123-qr-2019-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "mm123-qr-2019", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuMm123Qr2019Us preset when built for graphql`, () => { - const skuMm123Qr2019UsPresetGraphql = - skuMm123Qr2019Us().buildGraphql(); - expect(skuMm123Qr2019UsPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "mm123-qr-2019-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "mm123-qr-2019", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-mm123-qr-2019-us.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-mm123-qr-2019-us.ts deleted file mode 100644 index d6ebf75b1..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-mm123-qr-2019-us.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const usWarehouse = ChannelDraft.presets.sampleDataB2B - .usWarehouse() - .build(); - -const mm123Qr02 = ProductVariantDraft.presets.sampleDataB2B - .mm123Qr02() - .build(); - -const skuMm123Qr2019Us = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${mm123Qr02.sku}-${usWarehouse.key}`) - .sku(mm123Qr02.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(usWarehouse.key)); - -export default skuMm123Qr2019Us; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-mm123-qr-2023-default.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-mm123-qr-2023-default.spec.ts deleted file mode 100644 index 194d5c478..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-mm123-qr-2023-default.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuMm123Qr2023Default from './sku-mm123-qr-2023-default'; - -describe(`with skuMm123Qr2023Default preset and default-warehouse channel`, () => { - it(`should return a skuMm123Qr2023Default preset`, () => { - const skuMm123Qr2023DefaultPreset = - skuMm123Qr2023Default().build(); - expect(skuMm123Qr2023DefaultPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "mm123-qr-2023-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "mm123-qr-2023", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuMm123Qr2023Default preset when built for graphql`, () => { - const skuMm123Qr2023DefaultPresetGraphql = - skuMm123Qr2023Default().buildGraphql(); - expect(skuMm123Qr2023DefaultPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "mm123-qr-2023-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "mm123-qr-2023", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-mm123-qr-2023-default.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-mm123-qr-2023-default.ts deleted file mode 100644 index 37cb98abe..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-mm123-qr-2023-default.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const defaultWarehouse = ChannelDraft.presets.sampleDataB2B - .defaultWarehouse() - .build(); - -const mm123Qr03 = ProductVariantDraft.presets.sampleDataB2B - .mm123Qr03() - .build(); - -const skuMm123Qr2023Default = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${mm123Qr03.sku}-${defaultWarehouse.key}`) - .sku(mm123Qr03.sku!) - .quantityOnStock(1000) - .supplyChannel( - KeyReferenceDraft.presets.channel().key(defaultWarehouse.key) - ); - -export default skuMm123Qr2023Default; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-mm123-qr-2023-eu.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-mm123-qr-2023-eu.spec.ts deleted file mode 100644 index ab101d94d..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-mm123-qr-2023-eu.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuMm123Qr2023Eu from './sku-mm123-qr-2023-eu'; - -describe(`with skuMm123Qr2023Eu preset and eu-warehouse channel`, () => { - it(`should return a skuMm123Qr2023Eu preset`, () => { - const skuMm123Qr2023EuPreset = - skuMm123Qr2023Eu().build(); - expect(skuMm123Qr2023EuPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "mm123-qr-2023-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "mm123-qr-2023", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuMm123Qr2023Eu preset when built for graphql`, () => { - const skuMm123Qr2023EuPresetGraphql = - skuMm123Qr2023Eu().buildGraphql(); - expect(skuMm123Qr2023EuPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "mm123-qr-2023-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "mm123-qr-2023", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-mm123-qr-2023-eu.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-mm123-qr-2023-eu.ts deleted file mode 100644 index 2ff1d3a15..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-mm123-qr-2023-eu.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const euWarehouse = ChannelDraft.presets.sampleDataB2B - .euWarehouse() - .build(); - -const mm123Qr03 = ProductVariantDraft.presets.sampleDataB2B - .mm123Qr03() - .build(); - -const skuMm123Qr2023Eu = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${mm123Qr03.sku}-${euWarehouse.key}`) - .sku(mm123Qr03.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(euWarehouse.key)); - -export default skuMm123Qr2023Eu; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-mm123-qr-2023-us.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-mm123-qr-2023-us.spec.ts deleted file mode 100644 index e2be982d7..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-mm123-qr-2023-us.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuMm123Qr2023Us from './sku-mm123-qr-2023-us'; - -describe(`with skuMm123Qr2023Us preset and us-warehouse channel`, () => { - it(`should return a skuMm123Qr2023Us preset`, () => { - const skuMm123Qr2023UsPreset = - skuMm123Qr2023Us().build(); - expect(skuMm123Qr2023UsPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "mm123-qr-2023-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "mm123-qr-2023", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuMm123Qr2023Us preset when built for graphql`, () => { - const skuMm123Qr2023UsPresetGraphql = - skuMm123Qr2023Us().buildGraphql(); - expect(skuMm123Qr2023UsPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "mm123-qr-2023-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "mm123-qr-2023", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-mm123-qr-2023-us.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-mm123-qr-2023-us.ts deleted file mode 100644 index 107bb7dbb..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-mm123-qr-2023-us.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const usWarehouse = ChannelDraft.presets.sampleDataB2B - .usWarehouse() - .build(); - -const mm123Qr03 = ProductVariantDraft.presets.sampleDataB2B - .mm123Qr03() - .build(); - -const skuMm123Qr2023Us = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${mm123Qr03.sku}-${usWarehouse.key}`) - .sku(mm123Qr03.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(usWarehouse.key)); - -export default skuMm123Qr2023Us; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-n-123-qr-2015-default-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-n-123-qr-2015-default-warehouse.spec.ts new file mode 100644 index 000000000..58d157508 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-n-123-qr-2015-default-warehouse.spec.ts @@ -0,0 +1,40 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuN123Qr2015DefaultWarehouse preset`, () => { + it(`should return a skuN123Qr2015DefaultWarehouse preset when built for rest`, () => { + const skuN123Qr2015DefaultWarehousePreset = InventoryEntryDraftRest.presets + .skuN123Qr2015DefaultWarehouse() + .build(); + expect(skuN123Qr2015DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuN123Qr2015DefaultWarehouse preset when built for graphql`, () => { + const skuN123Qr2015DefaultWarehousePreset = + InventoryEntryDraftGraphql.presets + .skuN123Qr2015DefaultWarehouse() + .build(); + expect(skuN123Qr2015DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuN123Qr2015DefaultWarehouse preset when built for legacy rest`, () => { + const skuN123Qr2015DefaultWarehousePreset = InventoryEntryDraft.presets + .skuN123Qr2015DefaultWarehouse() + .buildRest(); + expect(skuN123Qr2015DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuN123Qr2015DefaultWarehouse preset when built for legacy graphql`, () => { + const skuN123Qr2015DefaultWarehousePreset = InventoryEntryDraft.presets + .skuN123Qr2015DefaultWarehouse() + .buildGraphql(); + expect(skuN123Qr2015DefaultWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-n-123-qr-2015-default-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-n-123-qr-2015-default-warehouse.ts new file mode 100644 index 000000000..cb459dece --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-n-123-qr-2015-default-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .defaultWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .n123Qr01() + .build(); + +const skuN123Qr2015DefaultWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('n123-qr-2015-default-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuN123Qr2015DefaultWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-n-123-qr-2015-eu-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-n-123-qr-2015-eu-warehouse.spec.ts new file mode 100644 index 000000000..ecfaee897 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-n-123-qr-2015-eu-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuN123Qr2015EuWarehouse preset`, () => { + it(`should return a skuN123Qr2015EuWarehouse preset when built for rest`, () => { + const skuN123Qr2015EuWarehousePreset = InventoryEntryDraftRest.presets + .skuN123Qr2015EuWarehouse() + .build(); + expect(skuN123Qr2015EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuN123Qr2015EuWarehouse preset when built for graphql`, () => { + const skuN123Qr2015EuWarehousePreset = InventoryEntryDraftGraphql.presets + .skuN123Qr2015EuWarehouse() + .build(); + expect(skuN123Qr2015EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuN123Qr2015EuWarehouse preset when built for legacy rest`, () => { + const skuN123Qr2015EuWarehousePreset = InventoryEntryDraft.presets + .skuN123Qr2015EuWarehouse() + .buildRest(); + expect(skuN123Qr2015EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuN123Qr2015EuWarehouse preset when built for legacy graphql`, () => { + const skuN123Qr2015EuWarehousePreset = InventoryEntryDraft.presets + .skuN123Qr2015EuWarehouse() + .buildGraphql(); + expect(skuN123Qr2015EuWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-n-123-qr-2015-eu-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-n-123-qr-2015-eu-warehouse.ts new file mode 100644 index 000000000..47f190bb1 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-n-123-qr-2015-eu-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .euWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .n123Qr01() + .build(); + +const skuN123Qr2015EuWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('n123-qr-2015-eu-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuN123Qr2015EuWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-n-123-qr-2015-us-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-n-123-qr-2015-us-warehouse.spec.ts new file mode 100644 index 000000000..9e9d7471e --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-n-123-qr-2015-us-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuN123Qr2015UsWarehouse preset`, () => { + it(`should return a skuN123Qr2015UsWarehouse preset when built for rest`, () => { + const skuN123Qr2015UsWarehousePreset = InventoryEntryDraftRest.presets + .skuN123Qr2015UsWarehouse() + .build(); + expect(skuN123Qr2015UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuN123Qr2015UsWarehouse preset when built for graphql`, () => { + const skuN123Qr2015UsWarehousePreset = InventoryEntryDraftGraphql.presets + .skuN123Qr2015UsWarehouse() + .build(); + expect(skuN123Qr2015UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuN123Qr2015UsWarehouse preset when built for legacy rest`, () => { + const skuN123Qr2015UsWarehousePreset = InventoryEntryDraft.presets + .skuN123Qr2015UsWarehouse() + .buildRest(); + expect(skuN123Qr2015UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuN123Qr2015UsWarehouse preset when built for legacy graphql`, () => { + const skuN123Qr2015UsWarehousePreset = InventoryEntryDraft.presets + .skuN123Qr2015UsWarehouse() + .buildGraphql(); + expect(skuN123Qr2015UsWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-n-123-qr-2015-us-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-n-123-qr-2015-us-warehouse.ts new file mode 100644 index 000000000..817d5f2c5 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-n-123-qr-2015-us-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .usWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .n123Qr01() + .build(); + +const skuN123Qr2015UsWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('n123-qr-2015-us-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuN123Qr2015UsWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-n-123-qr-2019-default-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-n-123-qr-2019-default-warehouse.spec.ts new file mode 100644 index 000000000..889c72c99 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-n-123-qr-2019-default-warehouse.spec.ts @@ -0,0 +1,40 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuN123Qr2019DefaultWarehouse preset`, () => { + it(`should return a skuN123Qr2019DefaultWarehouse preset when built for rest`, () => { + const skuN123Qr2019DefaultWarehousePreset = InventoryEntryDraftRest.presets + .skuN123Qr2019DefaultWarehouse() + .build(); + expect(skuN123Qr2019DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuN123Qr2019DefaultWarehouse preset when built for graphql`, () => { + const skuN123Qr2019DefaultWarehousePreset = + InventoryEntryDraftGraphql.presets + .skuN123Qr2019DefaultWarehouse() + .build(); + expect(skuN123Qr2019DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuN123Qr2019DefaultWarehouse preset when built for legacy rest`, () => { + const skuN123Qr2019DefaultWarehousePreset = InventoryEntryDraft.presets + .skuN123Qr2019DefaultWarehouse() + .buildRest(); + expect(skuN123Qr2019DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuN123Qr2019DefaultWarehouse preset when built for legacy graphql`, () => { + const skuN123Qr2019DefaultWarehousePreset = InventoryEntryDraft.presets + .skuN123Qr2019DefaultWarehouse() + .buildGraphql(); + expect(skuN123Qr2019DefaultWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-n-123-qr-2019-default-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-n-123-qr-2019-default-warehouse.ts new file mode 100644 index 000000000..7287cc0a8 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-n-123-qr-2019-default-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .defaultWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .n123Qr02() + .build(); + +const skuN123Qr2019DefaultWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('n123-qr-2019-default-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuN123Qr2019DefaultWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-n-123-qr-2019-eu-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-n-123-qr-2019-eu-warehouse.spec.ts new file mode 100644 index 000000000..f8169a69f --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-n-123-qr-2019-eu-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuN123Qr2019EuWarehouse preset`, () => { + it(`should return a skuN123Qr2019EuWarehouse preset when built for rest`, () => { + const skuN123Qr2019EuWarehousePreset = InventoryEntryDraftRest.presets + .skuN123Qr2019EuWarehouse() + .build(); + expect(skuN123Qr2019EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuN123Qr2019EuWarehouse preset when built for graphql`, () => { + const skuN123Qr2019EuWarehousePreset = InventoryEntryDraftGraphql.presets + .skuN123Qr2019EuWarehouse() + .build(); + expect(skuN123Qr2019EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuN123Qr2019EuWarehouse preset when built for legacy rest`, () => { + const skuN123Qr2019EuWarehousePreset = InventoryEntryDraft.presets + .skuN123Qr2019EuWarehouse() + .buildRest(); + expect(skuN123Qr2019EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuN123Qr2019EuWarehouse preset when built for legacy graphql`, () => { + const skuN123Qr2019EuWarehousePreset = InventoryEntryDraft.presets + .skuN123Qr2019EuWarehouse() + .buildGraphql(); + expect(skuN123Qr2019EuWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-n-123-qr-2019-eu-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-n-123-qr-2019-eu-warehouse.ts new file mode 100644 index 000000000..e47629aa9 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-n-123-qr-2019-eu-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .euWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .n123Qr02() + .build(); + +const skuN123Qr2019EuWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('n123-qr-2019-eu-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuN123Qr2019EuWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-n-123-qr-2019-us-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-n-123-qr-2019-us-warehouse.spec.ts new file mode 100644 index 000000000..6fcc6c84e --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-n-123-qr-2019-us-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuN123Qr2019UsWarehouse preset`, () => { + it(`should return a skuN123Qr2019UsWarehouse preset when built for rest`, () => { + const skuN123Qr2019UsWarehousePreset = InventoryEntryDraftRest.presets + .skuN123Qr2019UsWarehouse() + .build(); + expect(skuN123Qr2019UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuN123Qr2019UsWarehouse preset when built for graphql`, () => { + const skuN123Qr2019UsWarehousePreset = InventoryEntryDraftGraphql.presets + .skuN123Qr2019UsWarehouse() + .build(); + expect(skuN123Qr2019UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuN123Qr2019UsWarehouse preset when built for legacy rest`, () => { + const skuN123Qr2019UsWarehousePreset = InventoryEntryDraft.presets + .skuN123Qr2019UsWarehouse() + .buildRest(); + expect(skuN123Qr2019UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuN123Qr2019UsWarehouse preset when built for legacy graphql`, () => { + const skuN123Qr2019UsWarehousePreset = InventoryEntryDraft.presets + .skuN123Qr2019UsWarehouse() + .buildGraphql(); + expect(skuN123Qr2019UsWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-n-123-qr-2019-us-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-n-123-qr-2019-us-warehouse.ts new file mode 100644 index 000000000..db0e103e9 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-n-123-qr-2019-us-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .usWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .n123Qr02() + .build(); + +const skuN123Qr2019UsWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('n123-qr-2019-us-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuN123Qr2019UsWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-n-123-qr-2023-default-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-n-123-qr-2023-default-warehouse.spec.ts new file mode 100644 index 000000000..9e6c4f9b9 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-n-123-qr-2023-default-warehouse.spec.ts @@ -0,0 +1,40 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuN123Qr2023DefaultWarehouse preset`, () => { + it(`should return a skuN123Qr2023DefaultWarehouse preset when built for rest`, () => { + const skuN123Qr2023DefaultWarehousePreset = InventoryEntryDraftRest.presets + .skuN123Qr2023DefaultWarehouse() + .build(); + expect(skuN123Qr2023DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuN123Qr2023DefaultWarehouse preset when built for graphql`, () => { + const skuN123Qr2023DefaultWarehousePreset = + InventoryEntryDraftGraphql.presets + .skuN123Qr2023DefaultWarehouse() + .build(); + expect(skuN123Qr2023DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuN123Qr2023DefaultWarehouse preset when built for legacy rest`, () => { + const skuN123Qr2023DefaultWarehousePreset = InventoryEntryDraft.presets + .skuN123Qr2023DefaultWarehouse() + .buildRest(); + expect(skuN123Qr2023DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuN123Qr2023DefaultWarehouse preset when built for legacy graphql`, () => { + const skuN123Qr2023DefaultWarehousePreset = InventoryEntryDraft.presets + .skuN123Qr2023DefaultWarehouse() + .buildGraphql(); + expect(skuN123Qr2023DefaultWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-n-123-qr-2023-default-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-n-123-qr-2023-default-warehouse.ts new file mode 100644 index 000000000..2d906f560 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-n-123-qr-2023-default-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .defaultWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .n123Qr03() + .build(); + +const skuN123Qr2023DefaultWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('n123-qr-2023-default-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuN123Qr2023DefaultWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-n-123-qr-2023-eu-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-n-123-qr-2023-eu-warehouse.spec.ts new file mode 100644 index 000000000..6da364bf1 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-n-123-qr-2023-eu-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuN123Qr2023EuWarehouse preset`, () => { + it(`should return a skuN123Qr2023EuWarehouse preset when built for rest`, () => { + const skuN123Qr2023EuWarehousePreset = InventoryEntryDraftRest.presets + .skuN123Qr2023EuWarehouse() + .build(); + expect(skuN123Qr2023EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuN123Qr2023EuWarehouse preset when built for graphql`, () => { + const skuN123Qr2023EuWarehousePreset = InventoryEntryDraftGraphql.presets + .skuN123Qr2023EuWarehouse() + .build(); + expect(skuN123Qr2023EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuN123Qr2023EuWarehouse preset when built for legacy rest`, () => { + const skuN123Qr2023EuWarehousePreset = InventoryEntryDraft.presets + .skuN123Qr2023EuWarehouse() + .buildRest(); + expect(skuN123Qr2023EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuN123Qr2023EuWarehouse preset when built for legacy graphql`, () => { + const skuN123Qr2023EuWarehousePreset = InventoryEntryDraft.presets + .skuN123Qr2023EuWarehouse() + .buildGraphql(); + expect(skuN123Qr2023EuWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-n-123-qr-2023-eu-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-n-123-qr-2023-eu-warehouse.ts new file mode 100644 index 000000000..c33599eae --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-n-123-qr-2023-eu-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .euWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .n123Qr03() + .build(); + +const skuN123Qr2023EuWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('n123-qr-2023-eu-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuN123Qr2023EuWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-n-123-qr-2023-us-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-n-123-qr-2023-us-warehouse.spec.ts new file mode 100644 index 000000000..54dff5b0f --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-n-123-qr-2023-us-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuN123Qr2023UsWarehouse preset`, () => { + it(`should return a skuN123Qr2023UsWarehouse preset when built for rest`, () => { + const skuN123Qr2023UsWarehousePreset = InventoryEntryDraftRest.presets + .skuN123Qr2023UsWarehouse() + .build(); + expect(skuN123Qr2023UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuN123Qr2023UsWarehouse preset when built for graphql`, () => { + const skuN123Qr2023UsWarehousePreset = InventoryEntryDraftGraphql.presets + .skuN123Qr2023UsWarehouse() + .build(); + expect(skuN123Qr2023UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuN123Qr2023UsWarehouse preset when built for legacy rest`, () => { + const skuN123Qr2023UsWarehousePreset = InventoryEntryDraft.presets + .skuN123Qr2023UsWarehouse() + .buildRest(); + expect(skuN123Qr2023UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuN123Qr2023UsWarehouse preset when built for legacy graphql`, () => { + const skuN123Qr2023UsWarehousePreset = InventoryEntryDraft.presets + .skuN123Qr2023UsWarehouse() + .buildGraphql(); + expect(skuN123Qr2023UsWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-n-123-qr-2023-us-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-n-123-qr-2023-us-warehouse.ts new file mode 100644 index 000000000..940862d98 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-n-123-qr-2023-us-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .usWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .n123Qr03() + .build(); + +const skuN123Qr2023UsWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('n123-qr-2023-us-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuN123Qr2023UsWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-n123-qr-2015-default.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-n123-qr-2015-default.spec.ts deleted file mode 100644 index 8db4a3ef6..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-n123-qr-2015-default.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuN123Qr2015Default from './sku-n123-qr-2015-default'; - -describe(`with skuN123Qr2015Default preset and default-warehouse channel`, () => { - it(`should return a skuN123Qr2015Default preset`, () => { - const skuN123Qr2015DefaultPreset = - skuN123Qr2015Default().build(); - expect(skuN123Qr2015DefaultPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "n123-qr-2015-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "n123-qr-2015", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuN123Qr2015Default preset when built for graphql`, () => { - const skuN123Qr2015DefaultPresetGraphql = - skuN123Qr2015Default().buildGraphql(); - expect(skuN123Qr2015DefaultPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "n123-qr-2015-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "n123-qr-2015", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-n123-qr-2015-default.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-n123-qr-2015-default.ts deleted file mode 100644 index bfa6d7341..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-n123-qr-2015-default.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const defaultWarehouse = ChannelDraft.presets.sampleDataB2B - .defaultWarehouse() - .build(); - -const n123Qr01 = ProductVariantDraft.presets.sampleDataB2B - .n123Qr01() - .build(); - -const skuN123Qr2015Default = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${n123Qr01.sku}-${defaultWarehouse.key}`) - .sku(n123Qr01.sku!) - .quantityOnStock(1000) - .supplyChannel( - KeyReferenceDraft.presets.channel().key(defaultWarehouse.key) - ); - -export default skuN123Qr2015Default; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-n123-qr-2015-eu.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-n123-qr-2015-eu.spec.ts deleted file mode 100644 index 69fc8b122..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-n123-qr-2015-eu.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuN123Qr2015Eu from './sku-n123-qr-2015-eu'; - -describe(`with skuN123Qr2015Eu preset and eu-warehouse channel`, () => { - it(`should return a skuN123Qr2015Eu preset`, () => { - const skuN123Qr2015EuPreset = - skuN123Qr2015Eu().build(); - expect(skuN123Qr2015EuPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "n123-qr-2015-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "n123-qr-2015", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuN123Qr2015Eu preset when built for graphql`, () => { - const skuN123Qr2015EuPresetGraphql = - skuN123Qr2015Eu().buildGraphql(); - expect(skuN123Qr2015EuPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "n123-qr-2015-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "n123-qr-2015", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-n123-qr-2015-eu.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-n123-qr-2015-eu.ts deleted file mode 100644 index 31c39486d..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-n123-qr-2015-eu.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const euWarehouse = ChannelDraft.presets.sampleDataB2B - .euWarehouse() - .build(); - -const n123Qr01 = ProductVariantDraft.presets.sampleDataB2B - .n123Qr01() - .build(); - -const skuN123Qr2015Eu = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${n123Qr01.sku}-${euWarehouse.key}`) - .sku(n123Qr01.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(euWarehouse.key)); - -export default skuN123Qr2015Eu; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-n123-qr-2015-us.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-n123-qr-2015-us.spec.ts deleted file mode 100644 index c4c8b24f5..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-n123-qr-2015-us.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuN123Qr2015Us from './sku-n123-qr-2015-us'; - -describe(`with skuN123Qr2015Us preset and us-warehouse channel`, () => { - it(`should return a skuN123Qr2015Us preset`, () => { - const skuN123Qr2015UsPreset = - skuN123Qr2015Us().build(); - expect(skuN123Qr2015UsPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "n123-qr-2015-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "n123-qr-2015", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuN123Qr2015Us preset when built for graphql`, () => { - const skuN123Qr2015UsPresetGraphql = - skuN123Qr2015Us().buildGraphql(); - expect(skuN123Qr2015UsPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "n123-qr-2015-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "n123-qr-2015", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-n123-qr-2015-us.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-n123-qr-2015-us.ts deleted file mode 100644 index 964b077a0..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-n123-qr-2015-us.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const usWarehouse = ChannelDraft.presets.sampleDataB2B - .usWarehouse() - .build(); - -const n123Qr01 = ProductVariantDraft.presets.sampleDataB2B - .n123Qr01() - .build(); - -const skuN123Qr2015Us = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${n123Qr01.sku}-${usWarehouse.key}`) - .sku(n123Qr01.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(usWarehouse.key)); - -export default skuN123Qr2015Us; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-n123-qr-2019-default.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-n123-qr-2019-default.spec.ts deleted file mode 100644 index 406474b0b..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-n123-qr-2019-default.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuN123Qr2019Default from './sku-n123-qr-2019-default'; - -describe(`with skuN123Qr2019Default preset and default-warehouse channel`, () => { - it(`should return a skuN123Qr2019Default preset`, () => { - const skuN123Qr2019DefaultPreset = - skuN123Qr2019Default().build(); - expect(skuN123Qr2019DefaultPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "n123-qr-2019-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "n123-qr-2019", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuN123Qr2019Default preset when built for graphql`, () => { - const skuN123Qr2019DefaultPresetGraphql = - skuN123Qr2019Default().buildGraphql(); - expect(skuN123Qr2019DefaultPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "n123-qr-2019-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "n123-qr-2019", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-n123-qr-2019-default.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-n123-qr-2019-default.ts deleted file mode 100644 index 895f5836c..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-n123-qr-2019-default.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const defaultWarehouse = ChannelDraft.presets.sampleDataB2B - .defaultWarehouse() - .build(); - -const n123Qr02 = ProductVariantDraft.presets.sampleDataB2B - .n123Qr02() - .build(); - -const skuN123Qr2019Default = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${n123Qr02.sku}-${defaultWarehouse.key}`) - .sku(n123Qr02.sku!) - .quantityOnStock(1000) - .supplyChannel( - KeyReferenceDraft.presets.channel().key(defaultWarehouse.key) - ); - -export default skuN123Qr2019Default; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-n123-qr-2019-eu.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-n123-qr-2019-eu.spec.ts deleted file mode 100644 index 9fadd36c9..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-n123-qr-2019-eu.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuN123Qr2019Eu from './sku-n123-qr-2019-eu'; - -describe(`with skuN123Qr2019Eu preset and eu-warehouse channel`, () => { - it(`should return a skuN123Qr2019Eu preset`, () => { - const skuN123Qr2019EuPreset = - skuN123Qr2019Eu().build(); - expect(skuN123Qr2019EuPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "n123-qr-2019-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "n123-qr-2019", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuN123Qr2019Eu preset when built for graphql`, () => { - const skuN123Qr2019EuPresetGraphql = - skuN123Qr2019Eu().buildGraphql(); - expect(skuN123Qr2019EuPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "n123-qr-2019-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "n123-qr-2019", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-n123-qr-2019-eu.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-n123-qr-2019-eu.ts deleted file mode 100644 index c17171b64..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-n123-qr-2019-eu.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const euWarehouse = ChannelDraft.presets.sampleDataB2B - .euWarehouse() - .build(); - -const n123Qr02 = ProductVariantDraft.presets.sampleDataB2B - .n123Qr02() - .build(); - -const skuN123Qr2019Eu = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${n123Qr02.sku}-${euWarehouse.key}`) - .sku(n123Qr02.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(euWarehouse.key)); - -export default skuN123Qr2019Eu; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-n123-qr-2019-us.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-n123-qr-2019-us.spec.ts deleted file mode 100644 index 7152437d0..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-n123-qr-2019-us.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuN123Qr2019Us from './sku-n123-qr-2019-us'; - -describe(`with skuN123Qr2019Us preset and us-warehouse channel`, () => { - it(`should return a skuN123Qr2019Us preset`, () => { - const skuN123Qr2019UsPreset = - skuN123Qr2019Us().build(); - expect(skuN123Qr2019UsPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "n123-qr-2019-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "n123-qr-2019", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuN123Qr2019Us preset when built for graphql`, () => { - const skuN123Qr2019UsPresetGraphql = - skuN123Qr2019Us().buildGraphql(); - expect(skuN123Qr2019UsPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "n123-qr-2019-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "n123-qr-2019", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-n123-qr-2019-us.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-n123-qr-2019-us.ts deleted file mode 100644 index 255302629..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-n123-qr-2019-us.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const usWarehouse = ChannelDraft.presets.sampleDataB2B - .usWarehouse() - .build(); - -const n123Qr02 = ProductVariantDraft.presets.sampleDataB2B - .n123Qr02() - .build(); - -const skuN123Qr2019Us = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${n123Qr02.sku}-${usWarehouse.key}`) - .sku(n123Qr02.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(usWarehouse.key)); - -export default skuN123Qr2019Us; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-n123-qr-2023-default.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-n123-qr-2023-default.spec.ts deleted file mode 100644 index 7d371401f..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-n123-qr-2023-default.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuN123Qr2023Default from './sku-n123-qr-2023-default'; - -describe(`with skuN123Qr2023Default preset and default-warehouse channel`, () => { - it(`should return a skuN123Qr2023Default preset`, () => { - const skuN123Qr2023DefaultPreset = - skuN123Qr2023Default().build(); - expect(skuN123Qr2023DefaultPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "n123-qr-2023-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "n123-qr-2023", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuN123Qr2023Default preset when built for graphql`, () => { - const skuN123Qr2023DefaultPresetGraphql = - skuN123Qr2023Default().buildGraphql(); - expect(skuN123Qr2023DefaultPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "n123-qr-2023-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "n123-qr-2023", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-n123-qr-2023-default.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-n123-qr-2023-default.ts deleted file mode 100644 index 99eefe4e6..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-n123-qr-2023-default.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const defaultWarehouse = ChannelDraft.presets.sampleDataB2B - .defaultWarehouse() - .build(); - -const n123Qr03 = ProductVariantDraft.presets.sampleDataB2B - .n123Qr03() - .build(); - -const skuN123Qr2023Default = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${n123Qr03.sku}-${defaultWarehouse.key}`) - .sku(n123Qr03.sku!) - .quantityOnStock(1000) - .supplyChannel( - KeyReferenceDraft.presets.channel().key(defaultWarehouse.key) - ); - -export default skuN123Qr2023Default; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-n123-qr-2023-eu.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-n123-qr-2023-eu.spec.ts deleted file mode 100644 index f6d5956dc..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-n123-qr-2023-eu.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuN123Qr2023Eu from './sku-n123-qr-2023-eu'; - -describe(`with skuN123Qr2023Eu preset and eu-warehouse channel`, () => { - it(`should return a skuN123Qr2023Eu preset`, () => { - const skuN123Qr2023EuPreset = - skuN123Qr2023Eu().build(); - expect(skuN123Qr2023EuPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "n123-qr-2023-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "n123-qr-2023", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuN123Qr2023Eu preset when built for graphql`, () => { - const skuN123Qr2023EuPresetGraphql = - skuN123Qr2023Eu().buildGraphql(); - expect(skuN123Qr2023EuPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "n123-qr-2023-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "n123-qr-2023", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-n123-qr-2023-eu.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-n123-qr-2023-eu.ts deleted file mode 100644 index 5d88571d1..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-n123-qr-2023-eu.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const euWarehouse = ChannelDraft.presets.sampleDataB2B - .euWarehouse() - .build(); - -const n123Qr03 = ProductVariantDraft.presets.sampleDataB2B - .n123Qr03() - .build(); - -const skuN123Qr2023Eu = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${n123Qr03.sku}-${euWarehouse.key}`) - .sku(n123Qr03.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(euWarehouse.key)); - -export default skuN123Qr2023Eu; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-n123-qr-2023-us.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-n123-qr-2023-us.spec.ts deleted file mode 100644 index 20231b26c..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-n123-qr-2023-us.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuN123Qr2023Us from './sku-n123-qr-2023-us'; - -describe(`with skuN123Qr2023Us preset and us-warehouse channel`, () => { - it(`should return a skuN123Qr2023Us preset`, () => { - const skuN123Qr2023UsPreset = - skuN123Qr2023Us().build(); - expect(skuN123Qr2023UsPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "n123-qr-2023-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "n123-qr-2023", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuN123Qr2023Us preset when built for graphql`, () => { - const skuN123Qr2023UsPresetGraphql = - skuN123Qr2023Us().buildGraphql(); - expect(skuN123Qr2023UsPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "n123-qr-2023-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "n123-qr-2023", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-n123-qr-2023-us.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-n123-qr-2023-us.ts deleted file mode 100644 index 1b8757417..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-n123-qr-2023-us.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const usWarehouse = ChannelDraft.presets.sampleDataB2B - .usWarehouse() - .build(); - -const n123Qr03 = ProductVariantDraft.presets.sampleDataB2B - .n123Qr03() - .build(); - -const skuN123Qr2023Us = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${n123Qr03.sku}-${usWarehouse.key}`) - .sku(n123Qr03.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(usWarehouse.key)); - -export default skuN123Qr2023Us; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-nn-456-st-2015-default-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-nn-456-st-2015-default-warehouse.spec.ts new file mode 100644 index 000000000..160460ce2 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-nn-456-st-2015-default-warehouse.spec.ts @@ -0,0 +1,40 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuNn456St2015DefaultWarehouse preset`, () => { + it(`should return a skuNn456St2015DefaultWarehouse preset when built for rest`, () => { + const skuNn456St2015DefaultWarehousePreset = InventoryEntryDraftRest.presets + .skuNn456St2015DefaultWarehouse() + .build(); + expect(skuNn456St2015DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuNn456St2015DefaultWarehouse preset when built for graphql`, () => { + const skuNn456St2015DefaultWarehousePreset = + InventoryEntryDraftGraphql.presets + .skuNn456St2015DefaultWarehouse() + .build(); + expect(skuNn456St2015DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuNn456St2015DefaultWarehouse preset when built for legacy rest`, () => { + const skuNn456St2015DefaultWarehousePreset = InventoryEntryDraft.presets + .skuNn456St2015DefaultWarehouse() + .buildRest(); + expect(skuNn456St2015DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuNn456St2015DefaultWarehouse preset when built for legacy graphql`, () => { + const skuNn456St2015DefaultWarehousePreset = InventoryEntryDraft.presets + .skuNn456St2015DefaultWarehouse() + .buildGraphql(); + expect(skuNn456St2015DefaultWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-nn-456-st-2015-default-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-nn-456-st-2015-default-warehouse.ts new file mode 100644 index 000000000..7950be797 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-nn-456-st-2015-default-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .defaultWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .nn456St01() + .build(); + +const skuNn456St2015DefaultWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('nn456-st-2015-default-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuNn456St2015DefaultWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-nn-456-st-2015-eu-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-nn-456-st-2015-eu-warehouse.spec.ts new file mode 100644 index 000000000..aa018620d --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-nn-456-st-2015-eu-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuNn456St2015EuWarehouse preset`, () => { + it(`should return a skuNn456St2015EuWarehouse preset when built for rest`, () => { + const skuNn456St2015EuWarehousePreset = InventoryEntryDraftRest.presets + .skuNn456St2015EuWarehouse() + .build(); + expect(skuNn456St2015EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuNn456St2015EuWarehouse preset when built for graphql`, () => { + const skuNn456St2015EuWarehousePreset = InventoryEntryDraftGraphql.presets + .skuNn456St2015EuWarehouse() + .build(); + expect(skuNn456St2015EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuNn456St2015EuWarehouse preset when built for legacy rest`, () => { + const skuNn456St2015EuWarehousePreset = InventoryEntryDraft.presets + .skuNn456St2015EuWarehouse() + .buildRest(); + expect(skuNn456St2015EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuNn456St2015EuWarehouse preset when built for legacy graphql`, () => { + const skuNn456St2015EuWarehousePreset = InventoryEntryDraft.presets + .skuNn456St2015EuWarehouse() + .buildGraphql(); + expect(skuNn456St2015EuWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-nn-456-st-2015-eu-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-nn-456-st-2015-eu-warehouse.ts new file mode 100644 index 000000000..807ce1e8a --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-nn-456-st-2015-eu-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .euWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .nn456St01() + .build(); + +const skuNn456St2015EuWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('nn456-st-2015-eu-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuNn456St2015EuWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-nn-456-st-2015-us-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-nn-456-st-2015-us-warehouse.spec.ts new file mode 100644 index 000000000..016be4788 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-nn-456-st-2015-us-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuNn456St2015UsWarehouse preset`, () => { + it(`should return a skuNn456St2015UsWarehouse preset when built for rest`, () => { + const skuNn456St2015UsWarehousePreset = InventoryEntryDraftRest.presets + .skuNn456St2015UsWarehouse() + .build(); + expect(skuNn456St2015UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuNn456St2015UsWarehouse preset when built for graphql`, () => { + const skuNn456St2015UsWarehousePreset = InventoryEntryDraftGraphql.presets + .skuNn456St2015UsWarehouse() + .build(); + expect(skuNn456St2015UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuNn456St2015UsWarehouse preset when built for legacy rest`, () => { + const skuNn456St2015UsWarehousePreset = InventoryEntryDraft.presets + .skuNn456St2015UsWarehouse() + .buildRest(); + expect(skuNn456St2015UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuNn456St2015UsWarehouse preset when built for legacy graphql`, () => { + const skuNn456St2015UsWarehousePreset = InventoryEntryDraft.presets + .skuNn456St2015UsWarehouse() + .buildGraphql(); + expect(skuNn456St2015UsWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-nn-456-st-2015-us-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-nn-456-st-2015-us-warehouse.ts new file mode 100644 index 000000000..0b5e30ee3 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-nn-456-st-2015-us-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .usWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .nn456St01() + .build(); + +const skuNn456St2015UsWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('nn456-st-2015-us-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuNn456St2015UsWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-nn-456-st-2019-default-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-nn-456-st-2019-default-warehouse.spec.ts new file mode 100644 index 000000000..73744a147 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-nn-456-st-2019-default-warehouse.spec.ts @@ -0,0 +1,40 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuNn456St2019DefaultWarehouse preset`, () => { + it(`should return a skuNn456St2019DefaultWarehouse preset when built for rest`, () => { + const skuNn456St2019DefaultWarehousePreset = InventoryEntryDraftRest.presets + .skuNn456St2019DefaultWarehouse() + .build(); + expect(skuNn456St2019DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuNn456St2019DefaultWarehouse preset when built for graphql`, () => { + const skuNn456St2019DefaultWarehousePreset = + InventoryEntryDraftGraphql.presets + .skuNn456St2019DefaultWarehouse() + .build(); + expect(skuNn456St2019DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuNn456St2019DefaultWarehouse preset when built for legacy rest`, () => { + const skuNn456St2019DefaultWarehousePreset = InventoryEntryDraft.presets + .skuNn456St2019DefaultWarehouse() + .buildRest(); + expect(skuNn456St2019DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuNn456St2019DefaultWarehouse preset when built for legacy graphql`, () => { + const skuNn456St2019DefaultWarehousePreset = InventoryEntryDraft.presets + .skuNn456St2019DefaultWarehouse() + .buildGraphql(); + expect(skuNn456St2019DefaultWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-nn-456-st-2019-default-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-nn-456-st-2019-default-warehouse.ts new file mode 100644 index 000000000..88514dbd3 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-nn-456-st-2019-default-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .defaultWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .nn456St02() + .build(); + +const skuNn456St2019DefaultWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('nn456-st-2019-default-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuNn456St2019DefaultWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-nn-456-st-2019-eu-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-nn-456-st-2019-eu-warehouse.spec.ts new file mode 100644 index 000000000..fc87a2c70 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-nn-456-st-2019-eu-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuNn456St2019EuWarehouse preset`, () => { + it(`should return a skuNn456St2019EuWarehouse preset when built for rest`, () => { + const skuNn456St2019EuWarehousePreset = InventoryEntryDraftRest.presets + .skuNn456St2019EuWarehouse() + .build(); + expect(skuNn456St2019EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuNn456St2019EuWarehouse preset when built for graphql`, () => { + const skuNn456St2019EuWarehousePreset = InventoryEntryDraftGraphql.presets + .skuNn456St2019EuWarehouse() + .build(); + expect(skuNn456St2019EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuNn456St2019EuWarehouse preset when built for legacy rest`, () => { + const skuNn456St2019EuWarehousePreset = InventoryEntryDraft.presets + .skuNn456St2019EuWarehouse() + .buildRest(); + expect(skuNn456St2019EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuNn456St2019EuWarehouse preset when built for legacy graphql`, () => { + const skuNn456St2019EuWarehousePreset = InventoryEntryDraft.presets + .skuNn456St2019EuWarehouse() + .buildGraphql(); + expect(skuNn456St2019EuWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-nn-456-st-2019-eu-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-nn-456-st-2019-eu-warehouse.ts new file mode 100644 index 000000000..aa59f5dfc --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-nn-456-st-2019-eu-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .euWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .nn456St02() + .build(); + +const skuNn456St2019EuWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('nn456-st-2019-eu-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuNn456St2019EuWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-nn-456-st-2019-us-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-nn-456-st-2019-us-warehouse.spec.ts new file mode 100644 index 000000000..211d4bc67 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-nn-456-st-2019-us-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuNn456St2019UsWarehouse preset`, () => { + it(`should return a skuNn456St2019UsWarehouse preset when built for rest`, () => { + const skuNn456St2019UsWarehousePreset = InventoryEntryDraftRest.presets + .skuNn456St2019UsWarehouse() + .build(); + expect(skuNn456St2019UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuNn456St2019UsWarehouse preset when built for graphql`, () => { + const skuNn456St2019UsWarehousePreset = InventoryEntryDraftGraphql.presets + .skuNn456St2019UsWarehouse() + .build(); + expect(skuNn456St2019UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuNn456St2019UsWarehouse preset when built for legacy rest`, () => { + const skuNn456St2019UsWarehousePreset = InventoryEntryDraft.presets + .skuNn456St2019UsWarehouse() + .buildRest(); + expect(skuNn456St2019UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuNn456St2019UsWarehouse preset when built for legacy graphql`, () => { + const skuNn456St2019UsWarehousePreset = InventoryEntryDraft.presets + .skuNn456St2019UsWarehouse() + .buildGraphql(); + expect(skuNn456St2019UsWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-nn-456-st-2019-us-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-nn-456-st-2019-us-warehouse.ts new file mode 100644 index 000000000..c0b8a3d01 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-nn-456-st-2019-us-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .usWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .nn456St02() + .build(); + +const skuNn456St2019UsWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('nn456-st-2019-us-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuNn456St2019UsWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-nn-456-st-2023-default-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-nn-456-st-2023-default-warehouse.spec.ts new file mode 100644 index 000000000..e6f112614 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-nn-456-st-2023-default-warehouse.spec.ts @@ -0,0 +1,40 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuNn456St2023DefaultWarehouse preset`, () => { + it(`should return a skuNn456St2023DefaultWarehouse preset when built for rest`, () => { + const skuNn456St2023DefaultWarehousePreset = InventoryEntryDraftRest.presets + .skuNn456St2023DefaultWarehouse() + .build(); + expect(skuNn456St2023DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuNn456St2023DefaultWarehouse preset when built for graphql`, () => { + const skuNn456St2023DefaultWarehousePreset = + InventoryEntryDraftGraphql.presets + .skuNn456St2023DefaultWarehouse() + .build(); + expect(skuNn456St2023DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuNn456St2023DefaultWarehouse preset when built for legacy rest`, () => { + const skuNn456St2023DefaultWarehousePreset = InventoryEntryDraft.presets + .skuNn456St2023DefaultWarehouse() + .buildRest(); + expect(skuNn456St2023DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuNn456St2023DefaultWarehouse preset when built for legacy graphql`, () => { + const skuNn456St2023DefaultWarehousePreset = InventoryEntryDraft.presets + .skuNn456St2023DefaultWarehouse() + .buildGraphql(); + expect(skuNn456St2023DefaultWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-nn-456-st-2023-default-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-nn-456-st-2023-default-warehouse.ts new file mode 100644 index 000000000..eb73d7d62 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-nn-456-st-2023-default-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .defaultWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .nn456St03() + .build(); + +const skuNn456St2023DefaultWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('nn456-st-2023-default-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuNn456St2023DefaultWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-nn-456-st-2023-eu-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-nn-456-st-2023-eu-warehouse.spec.ts new file mode 100644 index 000000000..24effd63f --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-nn-456-st-2023-eu-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuNn456St2023EuWarehouse preset`, () => { + it(`should return a skuNn456St2023EuWarehouse preset when built for rest`, () => { + const skuNn456St2023EuWarehousePreset = InventoryEntryDraftRest.presets + .skuNn456St2023EuWarehouse() + .build(); + expect(skuNn456St2023EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuNn456St2023EuWarehouse preset when built for graphql`, () => { + const skuNn456St2023EuWarehousePreset = InventoryEntryDraftGraphql.presets + .skuNn456St2023EuWarehouse() + .build(); + expect(skuNn456St2023EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuNn456St2023EuWarehouse preset when built for legacy rest`, () => { + const skuNn456St2023EuWarehousePreset = InventoryEntryDraft.presets + .skuNn456St2023EuWarehouse() + .buildRest(); + expect(skuNn456St2023EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuNn456St2023EuWarehouse preset when built for legacy graphql`, () => { + const skuNn456St2023EuWarehousePreset = InventoryEntryDraft.presets + .skuNn456St2023EuWarehouse() + .buildGraphql(); + expect(skuNn456St2023EuWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-nn-456-st-2023-eu-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-nn-456-st-2023-eu-warehouse.ts new file mode 100644 index 000000000..3bb8a75ca --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-nn-456-st-2023-eu-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .euWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .nn456St03() + .build(); + +const skuNn456St2023EuWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('nn456-st-2023-eu-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuNn456St2023EuWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-nn-456-st-2023-us-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-nn-456-st-2023-us-warehouse.spec.ts new file mode 100644 index 000000000..4b4f183f4 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-nn-456-st-2023-us-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuNn456St2023UsWarehouse preset`, () => { + it(`should return a skuNn456St2023UsWarehouse preset when built for rest`, () => { + const skuNn456St2023UsWarehousePreset = InventoryEntryDraftRest.presets + .skuNn456St2023UsWarehouse() + .build(); + expect(skuNn456St2023UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuNn456St2023UsWarehouse preset when built for graphql`, () => { + const skuNn456St2023UsWarehousePreset = InventoryEntryDraftGraphql.presets + .skuNn456St2023UsWarehouse() + .build(); + expect(skuNn456St2023UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuNn456St2023UsWarehouse preset when built for legacy rest`, () => { + const skuNn456St2023UsWarehousePreset = InventoryEntryDraft.presets + .skuNn456St2023UsWarehouse() + .buildRest(); + expect(skuNn456St2023UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuNn456St2023UsWarehouse preset when built for legacy graphql`, () => { + const skuNn456St2023UsWarehousePreset = InventoryEntryDraft.presets + .skuNn456St2023UsWarehouse() + .buildGraphql(); + expect(skuNn456St2023UsWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-nn-456-st-2023-us-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-nn-456-st-2023-us-warehouse.ts new file mode 100644 index 000000000..65ca85f01 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-nn-456-st-2023-us-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .usWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .nn456St03() + .build(); + +const skuNn456St2023UsWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('nn456-st-2023-us-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuNn456St2023UsWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-nn456-st-2015-default.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-nn456-st-2015-default.spec.ts deleted file mode 100644 index 582a96824..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-nn456-st-2015-default.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuNn456St2015Default from './sku-nn456-st-2015-default'; - -describe(`with skuNn456St2015Default preset and default-warehouse channel`, () => { - it(`should return a skuNn456St2015Default preset`, () => { - const skuNn456St2015DefaultPreset = - skuNn456St2015Default().build(); - expect(skuNn456St2015DefaultPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "nn456-st-2015-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "nn456-st-2015", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuNn456St2015Default preset when built for graphql`, () => { - const skuNn456St2015DefaultPresetGraphql = - skuNn456St2015Default().buildGraphql(); - expect(skuNn456St2015DefaultPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "nn456-st-2015-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "nn456-st-2015", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-nn456-st-2015-default.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-nn456-st-2015-default.ts deleted file mode 100644 index 6a65df896..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-nn456-st-2015-default.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const defaultWarehouse = ChannelDraft.presets.sampleDataB2B - .defaultWarehouse() - .build(); - -const nn456St01 = ProductVariantDraft.presets.sampleDataB2B - .nn456St01() - .build(); - -const skuNn456St2015Default = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${nn456St01.sku}-${defaultWarehouse.key}`) - .sku(nn456St01.sku!) - .quantityOnStock(1000) - .supplyChannel( - KeyReferenceDraft.presets.channel().key(defaultWarehouse.key) - ); - -export default skuNn456St2015Default; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-nn456-st-2015-eu.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-nn456-st-2015-eu.spec.ts deleted file mode 100644 index c34e41828..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-nn456-st-2015-eu.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuNn456St2015Eu from './sku-nn456-st-2015-eu'; - -describe(`with skuNn456St2015Eu preset and eu-warehouse channel`, () => { - it(`should return a skuNn456St2015Eu preset`, () => { - const skuNn456St2015EuPreset = - skuNn456St2015Eu().build(); - expect(skuNn456St2015EuPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "nn456-st-2015-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "nn456-st-2015", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuNn456St2015Eu preset when built for graphql`, () => { - const skuNn456St2015EuPresetGraphql = - skuNn456St2015Eu().buildGraphql(); - expect(skuNn456St2015EuPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "nn456-st-2015-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "nn456-st-2015", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-nn456-st-2015-eu.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-nn456-st-2015-eu.ts deleted file mode 100644 index 1b53d6369..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-nn456-st-2015-eu.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const euWarehouse = ChannelDraft.presets.sampleDataB2B - .euWarehouse() - .build(); - -const nn456St01 = ProductVariantDraft.presets.sampleDataB2B - .nn456St01() - .build(); - -const skuNn456St2015Eu = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${nn456St01.sku}-${euWarehouse.key}`) - .sku(nn456St01.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(euWarehouse.key)); - -export default skuNn456St2015Eu; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-nn456-st-2015-us.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-nn456-st-2015-us.spec.ts deleted file mode 100644 index 6c91170df..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-nn456-st-2015-us.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuNn456St2015Us from './sku-nn456-st-2015-us'; - -describe(`with skuNn456St2015Us preset and us-warehouse channel`, () => { - it(`should return a skuNn456St2015Us preset`, () => { - const skuNn456St2015UsPreset = - skuNn456St2015Us().build(); - expect(skuNn456St2015UsPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "nn456-st-2015-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "nn456-st-2015", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuNn456St2015Us preset when built for graphql`, () => { - const skuNn456St2015UsPresetGraphql = - skuNn456St2015Us().buildGraphql(); - expect(skuNn456St2015UsPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "nn456-st-2015-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "nn456-st-2015", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-nn456-st-2015-us.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-nn456-st-2015-us.ts deleted file mode 100644 index 01ee84d2f..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-nn456-st-2015-us.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const usWarehouse = ChannelDraft.presets.sampleDataB2B - .usWarehouse() - .build(); - -const nn456St01 = ProductVariantDraft.presets.sampleDataB2B - .nn456St01() - .build(); - -const skuNn456St2015Us = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${nn456St01.sku}-${usWarehouse.key}`) - .sku(nn456St01.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(usWarehouse.key)); - -export default skuNn456St2015Us; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-nn456-st-2019-default.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-nn456-st-2019-default.spec.ts deleted file mode 100644 index 0d8e0fb81..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-nn456-st-2019-default.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuNn456St2019Default from './sku-nn456-st-2019-default'; - -describe(`with skuNn456St2019Default preset and default-warehouse channel`, () => { - it(`should return a skuNn456St2019Default preset`, () => { - const skuNn456St2019DefaultPreset = - skuNn456St2019Default().build(); - expect(skuNn456St2019DefaultPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "nn456-st-2019-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "nn456-st-2019", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuNn456St2019Default preset when built for graphql`, () => { - const skuNn456St2019DefaultPresetGraphql = - skuNn456St2019Default().buildGraphql(); - expect(skuNn456St2019DefaultPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "nn456-st-2019-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "nn456-st-2019", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-nn456-st-2019-default.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-nn456-st-2019-default.ts deleted file mode 100644 index 5f66b4063..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-nn456-st-2019-default.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const defaultWarehouse = ChannelDraft.presets.sampleDataB2B - .defaultWarehouse() - .build(); - -const nn456St02 = ProductVariantDraft.presets.sampleDataB2B - .nn456St02() - .build(); - -const skuNn456St2019Default = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${nn456St02.sku}-${defaultWarehouse.key}`) - .sku(nn456St02.sku!) - .quantityOnStock(1000) - .supplyChannel( - KeyReferenceDraft.presets.channel().key(defaultWarehouse.key) - ); - -export default skuNn456St2019Default; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-nn456-st-2019-eu.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-nn456-st-2019-eu.spec.ts deleted file mode 100644 index 1fb5dceab..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-nn456-st-2019-eu.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuNn456St2019Eu from './sku-nn456-st-2019-eu'; - -describe(`with skuNn456St2019Eu preset and eu-warehouse channel`, () => { - it(`should return a skuNn456St2019Eu preset`, () => { - const skuNn456St2019EuPreset = - skuNn456St2019Eu().build(); - expect(skuNn456St2019EuPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "nn456-st-2019-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "nn456-st-2019", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuNn456St2019Eu preset when built for graphql`, () => { - const skuNn456St2019EuPresetGraphql = - skuNn456St2019Eu().buildGraphql(); - expect(skuNn456St2019EuPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "nn456-st-2019-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "nn456-st-2019", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-nn456-st-2019-eu.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-nn456-st-2019-eu.ts deleted file mode 100644 index 99eb74b8b..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-nn456-st-2019-eu.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const euWarehouse = ChannelDraft.presets.sampleDataB2B - .euWarehouse() - .build(); - -const nn456St02 = ProductVariantDraft.presets.sampleDataB2B - .nn456St02() - .build(); - -const skuNn456St2019Eu = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${nn456St02.sku}-${euWarehouse.key}`) - .sku(nn456St02.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(euWarehouse.key)); - -export default skuNn456St2019Eu; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-nn456-st-2019-us.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-nn456-st-2019-us.spec.ts deleted file mode 100644 index 0a33badee..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-nn456-st-2019-us.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuNn456St2019Us from './sku-nn456-st-2019-us'; - -describe(`with skuNn456St2019Us preset and us-warehouse channel`, () => { - it(`should return a skuNn456St2019Us preset`, () => { - const skuNn456St2019UsPreset = - skuNn456St2019Us().build(); - expect(skuNn456St2019UsPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "nn456-st-2019-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "nn456-st-2019", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuNn456St2019Us preset when built for graphql`, () => { - const skuNn456St2019UsPresetGraphql = - skuNn456St2019Us().buildGraphql(); - expect(skuNn456St2019UsPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "nn456-st-2019-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "nn456-st-2019", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-nn456-st-2019-us.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-nn456-st-2019-us.ts deleted file mode 100644 index ea4fd7d3b..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-nn456-st-2019-us.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const usWarehouse = ChannelDraft.presets.sampleDataB2B - .usWarehouse() - .build(); - -const nn456St02 = ProductVariantDraft.presets.sampleDataB2B - .nn456St02() - .build(); - -const skuNn456St2019Us = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${nn456St02.sku}-${usWarehouse.key}`) - .sku(nn456St02.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(usWarehouse.key)); - -export default skuNn456St2019Us; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-nn456-st-2023-default.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-nn456-st-2023-default.spec.ts deleted file mode 100644 index e59a0a3b2..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-nn456-st-2023-default.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuNn456St2023Default from './sku-nn456-st-2023-default'; - -describe(`with skuNn456St2023Default preset and default-warehouse channel`, () => { - it(`should return a skuNn456St2023Default preset`, () => { - const skuNn456St2023DefaultPreset = - skuNn456St2023Default().build(); - expect(skuNn456St2023DefaultPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "nn456-st-2023-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "nn456-st-2023", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuNn456St2023Default preset when built for graphql`, () => { - const skuNn456St2023DefaultPresetGraphql = - skuNn456St2023Default().buildGraphql(); - expect(skuNn456St2023DefaultPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "nn456-st-2023-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "nn456-st-2023", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-nn456-st-2023-default.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-nn456-st-2023-default.ts deleted file mode 100644 index cab8e55c8..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-nn456-st-2023-default.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const defaultWarehouse = ChannelDraft.presets.sampleDataB2B - .defaultWarehouse() - .build(); - -const nn456St03 = ProductVariantDraft.presets.sampleDataB2B - .nn456St03() - .build(); - -const skuNn456St2023Default = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${nn456St03.sku}-${defaultWarehouse.key}`) - .sku(nn456St03.sku!) - .quantityOnStock(1000) - .supplyChannel( - KeyReferenceDraft.presets.channel().key(defaultWarehouse.key) - ); - -export default skuNn456St2023Default; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-nn456-st-2023-eu.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-nn456-st-2023-eu.spec.ts deleted file mode 100644 index b610fc60c..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-nn456-st-2023-eu.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuNn456St2023Eu from './sku-nn456-st-2023-eu'; - -describe(`with skuNn456St2023Eu preset and eu-warehouse channel`, () => { - it(`should return a skuNn456St2023Eu preset`, () => { - const skuNn456St2023EuPreset = - skuNn456St2023Eu().build(); - expect(skuNn456St2023EuPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "nn456-st-2023-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "nn456-st-2023", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuNn456St2023Eu preset when built for graphql`, () => { - const skuNn456St2023EuPresetGraphql = - skuNn456St2023Eu().buildGraphql(); - expect(skuNn456St2023EuPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "nn456-st-2023-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "nn456-st-2023", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-nn456-st-2023-eu.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-nn456-st-2023-eu.ts deleted file mode 100644 index 784061d26..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-nn456-st-2023-eu.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const euWarehouse = ChannelDraft.presets.sampleDataB2B - .euWarehouse() - .build(); - -const nn456St03 = ProductVariantDraft.presets.sampleDataB2B - .nn456St03() - .build(); - -const skuNn456St2023Eu = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${nn456St03.sku}-${euWarehouse.key}`) - .sku(nn456St03.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(euWarehouse.key)); - -export default skuNn456St2023Eu; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-nn456-st-2023-us.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-nn456-st-2023-us.spec.ts deleted file mode 100644 index 7014c1218..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-nn456-st-2023-us.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuNn456St2023Us from './sku-nn456-st-2023-us'; - -describe(`with skuNn456St2023Us preset and us-warehouse channel`, () => { - it(`should return a skuNn456St2023Us preset`, () => { - const skuNn456St2023UsPreset = - skuNn456St2023Us().build(); - expect(skuNn456St2023UsPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "nn456-st-2023-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "nn456-st-2023", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuNn456St2023Us preset when built for graphql`, () => { - const skuNn456St2023UsPresetGraphql = - skuNn456St2023Us().buildGraphql(); - expect(skuNn456St2023UsPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "nn456-st-2023-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "nn456-st-2023", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-nn456-st-2023-us.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-nn456-st-2023-us.ts deleted file mode 100644 index fd0be4fcd..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-nn456-st-2023-us.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const usWarehouse = ChannelDraft.presets.sampleDataB2B - .usWarehouse() - .build(); - -const nn456St03 = ProductVariantDraft.presets.sampleDataB2B - .nn456St03() - .build(); - -const skuNn456St2023Us = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${nn456St03.sku}-${usWarehouse.key}`) - .sku(nn456St03.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(usWarehouse.key)); - -export default skuNn456St2023Us; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-oil-filter-default-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-oil-filter-default-warehouse.spec.ts new file mode 100644 index 000000000..1d007a6b3 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-oil-filter-default-warehouse.spec.ts @@ -0,0 +1,38 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuOilFilterDefaultWarehouse preset`, () => { + it(`should return a skuOilFilterDefaultWarehouse preset when built for rest`, () => { + const skuOilFilterDefaultWarehousePreset = InventoryEntryDraftRest.presets + .skuOilFilterDefaultWarehouse() + .build(); + expect(skuOilFilterDefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuOilFilterDefaultWarehouse preset when built for graphql`, () => { + const skuOilFilterDefaultWarehousePreset = + InventoryEntryDraftGraphql.presets.skuOilFilterDefaultWarehouse().build(); + expect(skuOilFilterDefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuOilFilterDefaultWarehouse preset when built for legacy rest`, () => { + const skuOilFilterDefaultWarehousePreset = InventoryEntryDraft.presets + .skuOilFilterDefaultWarehouse() + .buildRest(); + expect(skuOilFilterDefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuOilFilterDefaultWarehouse preset when built for legacy graphql`, () => { + const skuOilFilterDefaultWarehousePreset = InventoryEntryDraft.presets + .skuOilFilterDefaultWarehouse() + .buildGraphql(); + expect(skuOilFilterDefaultWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-oil-filter-default-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-oil-filter-default-warehouse.ts new file mode 100644 index 000000000..585409123 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-oil-filter-default-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .defaultWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .oilFilter01() + .build(); + +const skuOilFilterDefaultWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('oil-filter-default-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuOilFilterDefaultWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-oil-filter-default.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-oil-filter-default.spec.ts deleted file mode 100644 index 6cbb3b639..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-oil-filter-default.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuOilFilterDefault from './sku-oil-filter-default'; - -describe(`with skuOilFilterDefault preset and default-warehouse channel`, () => { - it(`should return a skuOilFilterDefault preset`, () => { - const skuOilFilterDefaultPreset = - skuOilFilterDefault().build(); - expect(skuOilFilterDefaultPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "oil-filter-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "oil-filter", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuOilFilterDefault preset when built for graphql`, () => { - const skuOilFilterDefaultPresetGraphql = - skuOilFilterDefault().buildGraphql(); - expect(skuOilFilterDefaultPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "oil-filter-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "oil-filter", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-oil-filter-default.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-oil-filter-default.ts deleted file mode 100644 index d346238b1..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-oil-filter-default.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const defaultWarehouse = ChannelDraft.presets.sampleDataB2B - .defaultWarehouse() - .build(); - -const oilFilter01 = ProductVariantDraft.presets.sampleDataB2B - .oilFilter01() - .build(); - -const skuOilFilterDefault = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${oilFilter01.sku}-${defaultWarehouse.key}`) - .sku(oilFilter01.sku!) - .quantityOnStock(1000) - .supplyChannel( - KeyReferenceDraft.presets.channel().key(defaultWarehouse.key) - ); - -export default skuOilFilterDefault; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-oil-filter-eu-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-oil-filter-eu-warehouse.spec.ts new file mode 100644 index 000000000..ad78bc257 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-oil-filter-eu-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuOilFilterEuWarehouse preset`, () => { + it(`should return a skuOilFilterEuWarehouse preset when built for rest`, () => { + const skuOilFilterEuWarehousePreset = InventoryEntryDraftRest.presets + .skuOilFilterEuWarehouse() + .build(); + expect(skuOilFilterEuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuOilFilterEuWarehouse preset when built for graphql`, () => { + const skuOilFilterEuWarehousePreset = InventoryEntryDraftGraphql.presets + .skuOilFilterEuWarehouse() + .build(); + expect(skuOilFilterEuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuOilFilterEuWarehouse preset when built for legacy rest`, () => { + const skuOilFilterEuWarehousePreset = InventoryEntryDraft.presets + .skuOilFilterEuWarehouse() + .buildRest(); + expect(skuOilFilterEuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuOilFilterEuWarehouse preset when built for legacy graphql`, () => { + const skuOilFilterEuWarehousePreset = InventoryEntryDraft.presets + .skuOilFilterEuWarehouse() + .buildGraphql(); + expect(skuOilFilterEuWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-oil-filter-eu-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-oil-filter-eu-warehouse.ts new file mode 100644 index 000000000..5b5cac2d5 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-oil-filter-eu-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .euWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .oilFilter01() + .build(); + +const skuOilFilterEuWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('oil-filter-eu-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuOilFilterEuWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-oil-filter-eu.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-oil-filter-eu.spec.ts deleted file mode 100644 index 5e835c24a..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-oil-filter-eu.spec.ts +++ /dev/null @@ -1,41 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuOilFilterEu from './sku-oil-filter-eu'; - -describe(`with skuOilFilterEu preset and eu-warehouse channel`, () => { - it(`should return a skuOilFilterEu preset`, () => { - const skuOilFilterEuPreset = skuOilFilterEu().build(); - expect(skuOilFilterEuPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "oil-filter-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "oil-filter", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuOilFilterEu preset when built for graphql`, () => { - const skuOilFilterEuPresetGraphql = - skuOilFilterEu().buildGraphql(); - expect(skuOilFilterEuPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "oil-filter-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "oil-filter", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-oil-filter-eu.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-oil-filter-eu.ts deleted file mode 100644 index 5a660f850..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-oil-filter-eu.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const euWarehouse = ChannelDraft.presets.sampleDataB2B - .euWarehouse() - .build(); - -const oilFilter01 = ProductVariantDraft.presets.sampleDataB2B - .oilFilter01() - .build(); - -const skuOilFilterEu = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${oilFilter01.sku}-${euWarehouse.key}`) - .sku(oilFilter01.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(euWarehouse.key)); - -export default skuOilFilterEu; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-oil-filter-us-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-oil-filter-us-warehouse.spec.ts new file mode 100644 index 000000000..1b3eba4b7 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-oil-filter-us-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuOilFilterUsWarehouse preset`, () => { + it(`should return a skuOilFilterUsWarehouse preset when built for rest`, () => { + const skuOilFilterUsWarehousePreset = InventoryEntryDraftRest.presets + .skuOilFilterUsWarehouse() + .build(); + expect(skuOilFilterUsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuOilFilterUsWarehouse preset when built for graphql`, () => { + const skuOilFilterUsWarehousePreset = InventoryEntryDraftGraphql.presets + .skuOilFilterUsWarehouse() + .build(); + expect(skuOilFilterUsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuOilFilterUsWarehouse preset when built for legacy rest`, () => { + const skuOilFilterUsWarehousePreset = InventoryEntryDraft.presets + .skuOilFilterUsWarehouse() + .buildRest(); + expect(skuOilFilterUsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuOilFilterUsWarehouse preset when built for legacy graphql`, () => { + const skuOilFilterUsWarehousePreset = InventoryEntryDraft.presets + .skuOilFilterUsWarehouse() + .buildGraphql(); + expect(skuOilFilterUsWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-oil-filter-us-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-oil-filter-us-warehouse.ts new file mode 100644 index 000000000..2b9ce9fbf --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-oil-filter-us-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .usWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .oilFilter01() + .build(); + +const skuOilFilterUsWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('oil-filter-us-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuOilFilterUsWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-oil-filter-us.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-oil-filter-us.spec.ts deleted file mode 100644 index 71c05ee8f..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-oil-filter-us.spec.ts +++ /dev/null @@ -1,41 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuOilFilterUs from './sku-oil-filter-us'; - -describe(`with skuOilFilterUs preset and us-warehouse channel`, () => { - it(`should return a skuOilFilterUs preset`, () => { - const skuOilFilterUsPreset = skuOilFilterUs().build(); - expect(skuOilFilterUsPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "oil-filter-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "oil-filter", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuOilFilterUs preset when built for graphql`, () => { - const skuOilFilterUsPresetGraphql = - skuOilFilterUs().buildGraphql(); - expect(skuOilFilterUsPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "oil-filter-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "oil-filter", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-oil-filter-us.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-oil-filter-us.ts deleted file mode 100644 index 9da88cada..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-oil-filter-us.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const usWarehouse = ChannelDraft.presets.sampleDataB2B - .usWarehouse() - .build(); - -const oilFilter01 = ProductVariantDraft.presets.sampleDataB2B - .oilFilter01() - .build(); - -const skuOilFilterUs = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${oilFilter01.sku}-${usWarehouse.key}`) - .sku(oilFilter01.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(usWarehouse.key)); - -export default skuOilFilterUs; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-oo-789-uv-2015-default-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-oo-789-uv-2015-default-warehouse.spec.ts new file mode 100644 index 000000000..292691f68 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-oo-789-uv-2015-default-warehouse.spec.ts @@ -0,0 +1,40 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuOo789Uv2015DefaultWarehouse preset`, () => { + it(`should return a skuOo789Uv2015DefaultWarehouse preset when built for rest`, () => { + const skuOo789Uv2015DefaultWarehousePreset = InventoryEntryDraftRest.presets + .skuOo789Uv2015DefaultWarehouse() + .build(); + expect(skuOo789Uv2015DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuOo789Uv2015DefaultWarehouse preset when built for graphql`, () => { + const skuOo789Uv2015DefaultWarehousePreset = + InventoryEntryDraftGraphql.presets + .skuOo789Uv2015DefaultWarehouse() + .build(); + expect(skuOo789Uv2015DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuOo789Uv2015DefaultWarehouse preset when built for legacy rest`, () => { + const skuOo789Uv2015DefaultWarehousePreset = InventoryEntryDraft.presets + .skuOo789Uv2015DefaultWarehouse() + .buildRest(); + expect(skuOo789Uv2015DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuOo789Uv2015DefaultWarehouse preset when built for legacy graphql`, () => { + const skuOo789Uv2015DefaultWarehousePreset = InventoryEntryDraft.presets + .skuOo789Uv2015DefaultWarehouse() + .buildGraphql(); + expect(skuOo789Uv2015DefaultWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-oo-789-uv-2015-default-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-oo-789-uv-2015-default-warehouse.ts new file mode 100644 index 000000000..88a470f9f --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-oo-789-uv-2015-default-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .defaultWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .oo789Uv01() + .build(); + +const skuOo789Uv2015DefaultWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('oo789-uv-2015-default-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuOo789Uv2015DefaultWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-oo-789-uv-2015-eu-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-oo-789-uv-2015-eu-warehouse.spec.ts new file mode 100644 index 000000000..547e4a5ec --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-oo-789-uv-2015-eu-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuOo789Uv2015EuWarehouse preset`, () => { + it(`should return a skuOo789Uv2015EuWarehouse preset when built for rest`, () => { + const skuOo789Uv2015EuWarehousePreset = InventoryEntryDraftRest.presets + .skuOo789Uv2015EuWarehouse() + .build(); + expect(skuOo789Uv2015EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuOo789Uv2015EuWarehouse preset when built for graphql`, () => { + const skuOo789Uv2015EuWarehousePreset = InventoryEntryDraftGraphql.presets + .skuOo789Uv2015EuWarehouse() + .build(); + expect(skuOo789Uv2015EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuOo789Uv2015EuWarehouse preset when built for legacy rest`, () => { + const skuOo789Uv2015EuWarehousePreset = InventoryEntryDraft.presets + .skuOo789Uv2015EuWarehouse() + .buildRest(); + expect(skuOo789Uv2015EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuOo789Uv2015EuWarehouse preset when built for legacy graphql`, () => { + const skuOo789Uv2015EuWarehousePreset = InventoryEntryDraft.presets + .skuOo789Uv2015EuWarehouse() + .buildGraphql(); + expect(skuOo789Uv2015EuWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-oo-789-uv-2015-eu-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-oo-789-uv-2015-eu-warehouse.ts new file mode 100644 index 000000000..a660cddf7 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-oo-789-uv-2015-eu-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .euWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .oo789Uv01() + .build(); + +const skuOo789Uv2015EuWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('oo789-uv-2015-eu-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuOo789Uv2015EuWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-oo-789-uv-2015-us-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-oo-789-uv-2015-us-warehouse.spec.ts new file mode 100644 index 000000000..277b5cb90 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-oo-789-uv-2015-us-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuOo789Uv2015UsWarehouse preset`, () => { + it(`should return a skuOo789Uv2015UsWarehouse preset when built for rest`, () => { + const skuOo789Uv2015UsWarehousePreset = InventoryEntryDraftRest.presets + .skuOo789Uv2015UsWarehouse() + .build(); + expect(skuOo789Uv2015UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuOo789Uv2015UsWarehouse preset when built for graphql`, () => { + const skuOo789Uv2015UsWarehousePreset = InventoryEntryDraftGraphql.presets + .skuOo789Uv2015UsWarehouse() + .build(); + expect(skuOo789Uv2015UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuOo789Uv2015UsWarehouse preset when built for legacy rest`, () => { + const skuOo789Uv2015UsWarehousePreset = InventoryEntryDraft.presets + .skuOo789Uv2015UsWarehouse() + .buildRest(); + expect(skuOo789Uv2015UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuOo789Uv2015UsWarehouse preset when built for legacy graphql`, () => { + const skuOo789Uv2015UsWarehousePreset = InventoryEntryDraft.presets + .skuOo789Uv2015UsWarehouse() + .buildGraphql(); + expect(skuOo789Uv2015UsWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-oo-789-uv-2015-us-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-oo-789-uv-2015-us-warehouse.ts new file mode 100644 index 000000000..053c8b708 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-oo-789-uv-2015-us-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .usWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .oo789Uv01() + .build(); + +const skuOo789Uv2015UsWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('oo789-uv-2015-us-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuOo789Uv2015UsWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-oo-789-uv-2019-default-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-oo-789-uv-2019-default-warehouse.spec.ts new file mode 100644 index 000000000..959e23eee --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-oo-789-uv-2019-default-warehouse.spec.ts @@ -0,0 +1,40 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuOo789Uv2019DefaultWarehouse preset`, () => { + it(`should return a skuOo789Uv2019DefaultWarehouse preset when built for rest`, () => { + const skuOo789Uv2019DefaultWarehousePreset = InventoryEntryDraftRest.presets + .skuOo789Uv2019DefaultWarehouse() + .build(); + expect(skuOo789Uv2019DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuOo789Uv2019DefaultWarehouse preset when built for graphql`, () => { + const skuOo789Uv2019DefaultWarehousePreset = + InventoryEntryDraftGraphql.presets + .skuOo789Uv2019DefaultWarehouse() + .build(); + expect(skuOo789Uv2019DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuOo789Uv2019DefaultWarehouse preset when built for legacy rest`, () => { + const skuOo789Uv2019DefaultWarehousePreset = InventoryEntryDraft.presets + .skuOo789Uv2019DefaultWarehouse() + .buildRest(); + expect(skuOo789Uv2019DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuOo789Uv2019DefaultWarehouse preset when built for legacy graphql`, () => { + const skuOo789Uv2019DefaultWarehousePreset = InventoryEntryDraft.presets + .skuOo789Uv2019DefaultWarehouse() + .buildGraphql(); + expect(skuOo789Uv2019DefaultWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-oo-789-uv-2019-default-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-oo-789-uv-2019-default-warehouse.ts new file mode 100644 index 000000000..00f4d318b --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-oo-789-uv-2019-default-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .defaultWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .oo789Uv02() + .build(); + +const skuOo789Uv2019DefaultWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('oo789-uv-2019-default-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuOo789Uv2019DefaultWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-oo-789-uv-2019-eu-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-oo-789-uv-2019-eu-warehouse.spec.ts new file mode 100644 index 000000000..1d8ee1582 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-oo-789-uv-2019-eu-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuOo789Uv2019EuWarehouse preset`, () => { + it(`should return a skuOo789Uv2019EuWarehouse preset when built for rest`, () => { + const skuOo789Uv2019EuWarehousePreset = InventoryEntryDraftRest.presets + .skuOo789Uv2019EuWarehouse() + .build(); + expect(skuOo789Uv2019EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuOo789Uv2019EuWarehouse preset when built for graphql`, () => { + const skuOo789Uv2019EuWarehousePreset = InventoryEntryDraftGraphql.presets + .skuOo789Uv2019EuWarehouse() + .build(); + expect(skuOo789Uv2019EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuOo789Uv2019EuWarehouse preset when built for legacy rest`, () => { + const skuOo789Uv2019EuWarehousePreset = InventoryEntryDraft.presets + .skuOo789Uv2019EuWarehouse() + .buildRest(); + expect(skuOo789Uv2019EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuOo789Uv2019EuWarehouse preset when built for legacy graphql`, () => { + const skuOo789Uv2019EuWarehousePreset = InventoryEntryDraft.presets + .skuOo789Uv2019EuWarehouse() + .buildGraphql(); + expect(skuOo789Uv2019EuWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-oo-789-uv-2019-eu-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-oo-789-uv-2019-eu-warehouse.ts new file mode 100644 index 000000000..31e4104ef --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-oo-789-uv-2019-eu-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .euWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .oo789Uv02() + .build(); + +const skuOo789Uv2019EuWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('oo789-uv-2019-eu-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuOo789Uv2019EuWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-oo-789-uv-2019-us-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-oo-789-uv-2019-us-warehouse.spec.ts new file mode 100644 index 000000000..39028b606 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-oo-789-uv-2019-us-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuOo789Uv2019UsWarehouse preset`, () => { + it(`should return a skuOo789Uv2019UsWarehouse preset when built for rest`, () => { + const skuOo789Uv2019UsWarehousePreset = InventoryEntryDraftRest.presets + .skuOo789Uv2019UsWarehouse() + .build(); + expect(skuOo789Uv2019UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuOo789Uv2019UsWarehouse preset when built for graphql`, () => { + const skuOo789Uv2019UsWarehousePreset = InventoryEntryDraftGraphql.presets + .skuOo789Uv2019UsWarehouse() + .build(); + expect(skuOo789Uv2019UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuOo789Uv2019UsWarehouse preset when built for legacy rest`, () => { + const skuOo789Uv2019UsWarehousePreset = InventoryEntryDraft.presets + .skuOo789Uv2019UsWarehouse() + .buildRest(); + expect(skuOo789Uv2019UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuOo789Uv2019UsWarehouse preset when built for legacy graphql`, () => { + const skuOo789Uv2019UsWarehousePreset = InventoryEntryDraft.presets + .skuOo789Uv2019UsWarehouse() + .buildGraphql(); + expect(skuOo789Uv2019UsWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-oo-789-uv-2019-us-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-oo-789-uv-2019-us-warehouse.ts new file mode 100644 index 000000000..2885056c7 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-oo-789-uv-2019-us-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .usWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .oo789Uv02() + .build(); + +const skuOo789Uv2019UsWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('oo789-uv-2019-us-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuOo789Uv2019UsWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-oo-789-uv-2023-default-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-oo-789-uv-2023-default-warehouse.spec.ts new file mode 100644 index 000000000..2a5965ca8 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-oo-789-uv-2023-default-warehouse.spec.ts @@ -0,0 +1,40 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuOo789Uv2023DefaultWarehouse preset`, () => { + it(`should return a skuOo789Uv2023DefaultWarehouse preset when built for rest`, () => { + const skuOo789Uv2023DefaultWarehousePreset = InventoryEntryDraftRest.presets + .skuOo789Uv2023DefaultWarehouse() + .build(); + expect(skuOo789Uv2023DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuOo789Uv2023DefaultWarehouse preset when built for graphql`, () => { + const skuOo789Uv2023DefaultWarehousePreset = + InventoryEntryDraftGraphql.presets + .skuOo789Uv2023DefaultWarehouse() + .build(); + expect(skuOo789Uv2023DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuOo789Uv2023DefaultWarehouse preset when built for legacy rest`, () => { + const skuOo789Uv2023DefaultWarehousePreset = InventoryEntryDraft.presets + .skuOo789Uv2023DefaultWarehouse() + .buildRest(); + expect(skuOo789Uv2023DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuOo789Uv2023DefaultWarehouse preset when built for legacy graphql`, () => { + const skuOo789Uv2023DefaultWarehousePreset = InventoryEntryDraft.presets + .skuOo789Uv2023DefaultWarehouse() + .buildGraphql(); + expect(skuOo789Uv2023DefaultWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-oo-789-uv-2023-default-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-oo-789-uv-2023-default-warehouse.ts new file mode 100644 index 000000000..86547a077 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-oo-789-uv-2023-default-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .defaultWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .oo789Uv03() + .build(); + +const skuOo789Uv2023DefaultWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('oo789-uv-2023-default-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuOo789Uv2023DefaultWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-oo-789-uv-2023-eu-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-oo-789-uv-2023-eu-warehouse.spec.ts new file mode 100644 index 000000000..cd743082f --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-oo-789-uv-2023-eu-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuOo789Uv2023EuWarehouse preset`, () => { + it(`should return a skuOo789Uv2023EuWarehouse preset when built for rest`, () => { + const skuOo789Uv2023EuWarehousePreset = InventoryEntryDraftRest.presets + .skuOo789Uv2023EuWarehouse() + .build(); + expect(skuOo789Uv2023EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuOo789Uv2023EuWarehouse preset when built for graphql`, () => { + const skuOo789Uv2023EuWarehousePreset = InventoryEntryDraftGraphql.presets + .skuOo789Uv2023EuWarehouse() + .build(); + expect(skuOo789Uv2023EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuOo789Uv2023EuWarehouse preset when built for legacy rest`, () => { + const skuOo789Uv2023EuWarehousePreset = InventoryEntryDraft.presets + .skuOo789Uv2023EuWarehouse() + .buildRest(); + expect(skuOo789Uv2023EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuOo789Uv2023EuWarehouse preset when built for legacy graphql`, () => { + const skuOo789Uv2023EuWarehousePreset = InventoryEntryDraft.presets + .skuOo789Uv2023EuWarehouse() + .buildGraphql(); + expect(skuOo789Uv2023EuWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-oo-789-uv-2023-eu-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-oo-789-uv-2023-eu-warehouse.ts new file mode 100644 index 000000000..300db1b58 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-oo-789-uv-2023-eu-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .euWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .oo789Uv03() + .build(); + +const skuOo789Uv2023EuWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('oo789-uv-2023-eu-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuOo789Uv2023EuWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-oo-789-uv-2023-us-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-oo-789-uv-2023-us-warehouse.spec.ts new file mode 100644 index 000000000..5055a35dd --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-oo-789-uv-2023-us-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuOo789Uv2023UsWarehouse preset`, () => { + it(`should return a skuOo789Uv2023UsWarehouse preset when built for rest`, () => { + const skuOo789Uv2023UsWarehousePreset = InventoryEntryDraftRest.presets + .skuOo789Uv2023UsWarehouse() + .build(); + expect(skuOo789Uv2023UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuOo789Uv2023UsWarehouse preset when built for graphql`, () => { + const skuOo789Uv2023UsWarehousePreset = InventoryEntryDraftGraphql.presets + .skuOo789Uv2023UsWarehouse() + .build(); + expect(skuOo789Uv2023UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuOo789Uv2023UsWarehouse preset when built for legacy rest`, () => { + const skuOo789Uv2023UsWarehousePreset = InventoryEntryDraft.presets + .skuOo789Uv2023UsWarehouse() + .buildRest(); + expect(skuOo789Uv2023UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuOo789Uv2023UsWarehouse preset when built for legacy graphql`, () => { + const skuOo789Uv2023UsWarehousePreset = InventoryEntryDraft.presets + .skuOo789Uv2023UsWarehouse() + .buildGraphql(); + expect(skuOo789Uv2023UsWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-oo-789-uv-2023-us-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-oo-789-uv-2023-us-warehouse.ts new file mode 100644 index 000000000..29a3a6e07 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-oo-789-uv-2023-us-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .usWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .oo789Uv03() + .build(); + +const skuOo789Uv2023UsWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('oo789-uv-2023-us-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuOo789Uv2023UsWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-oo789-uv-2015-default.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-oo789-uv-2015-default.spec.ts deleted file mode 100644 index e0968eb6b..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-oo789-uv-2015-default.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuOo789Uv2015Default from './sku-oo789-uv-2015-default'; - -describe(`with skuOo789Uv2015Default preset and default-warehouse channel`, () => { - it(`should return a skuOo789Uv2015Default preset`, () => { - const skuOo789Uv2015DefaultPreset = - skuOo789Uv2015Default().build(); - expect(skuOo789Uv2015DefaultPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "oo789-uv-2015-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "oo789-uv-2015", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuOo789Uv2015Default preset when built for graphql`, () => { - const skuOo789Uv2015DefaultPresetGraphql = - skuOo789Uv2015Default().buildGraphql(); - expect(skuOo789Uv2015DefaultPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "oo789-uv-2015-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "oo789-uv-2015", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-oo789-uv-2015-default.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-oo789-uv-2015-default.ts deleted file mode 100644 index ca4d693f1..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-oo789-uv-2015-default.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const defaultWarehouse = ChannelDraft.presets.sampleDataB2B - .defaultWarehouse() - .build(); - -const oo789Uv01 = ProductVariantDraft.presets.sampleDataB2B - .oo789Uv01() - .build(); - -const skuOo789Uv2015Default = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${oo789Uv01.sku}-${defaultWarehouse.key}`) - .sku(oo789Uv01.sku!) - .quantityOnStock(1000) - .supplyChannel( - KeyReferenceDraft.presets.channel().key(defaultWarehouse.key) - ); - -export default skuOo789Uv2015Default; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-oo789-uv-2015-eu.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-oo789-uv-2015-eu.spec.ts deleted file mode 100644 index dd41dd7a1..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-oo789-uv-2015-eu.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuOo789Uv2015Eu from './sku-oo789-uv-2015-eu'; - -describe(`with skuOo789Uv2015Eu preset and eu-warehouse channel`, () => { - it(`should return a skuOo789Uv2015Eu preset`, () => { - const skuOo789Uv2015EuPreset = - skuOo789Uv2015Eu().build(); - expect(skuOo789Uv2015EuPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "oo789-uv-2015-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "oo789-uv-2015", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuOo789Uv2015Eu preset when built for graphql`, () => { - const skuOo789Uv2015EuPresetGraphql = - skuOo789Uv2015Eu().buildGraphql(); - expect(skuOo789Uv2015EuPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "oo789-uv-2015-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "oo789-uv-2015", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-oo789-uv-2015-eu.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-oo789-uv-2015-eu.ts deleted file mode 100644 index 1578367aa..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-oo789-uv-2015-eu.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const euWarehouse = ChannelDraft.presets.sampleDataB2B - .euWarehouse() - .build(); - -const oo789Uv01 = ProductVariantDraft.presets.sampleDataB2B - .oo789Uv01() - .build(); - -const skuOo789Uv2015Eu = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${oo789Uv01.sku}-${euWarehouse.key}`) - .sku(oo789Uv01.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(euWarehouse.key)); - -export default skuOo789Uv2015Eu; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-oo789-uv-2015-us.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-oo789-uv-2015-us.spec.ts deleted file mode 100644 index c8e9398ab..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-oo789-uv-2015-us.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuOo789Uv2015Us from './sku-oo789-uv-2015-us'; - -describe(`with skuOo789Uv2015Us preset and us-warehouse channel`, () => { - it(`should return a skuOo789Uv2015Us preset`, () => { - const skuOo789Uv2015UsPreset = - skuOo789Uv2015Us().build(); - expect(skuOo789Uv2015UsPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "oo789-uv-2015-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "oo789-uv-2015", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuOo789Uv2015Us preset when built for graphql`, () => { - const skuOo789Uv2015UsPresetGraphql = - skuOo789Uv2015Us().buildGraphql(); - expect(skuOo789Uv2015UsPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "oo789-uv-2015-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "oo789-uv-2015", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-oo789-uv-2015-us.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-oo789-uv-2015-us.ts deleted file mode 100644 index 5da1c44fd..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-oo789-uv-2015-us.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const usWarehouse = ChannelDraft.presets.sampleDataB2B - .usWarehouse() - .build(); - -const oo789Uv01 = ProductVariantDraft.presets.sampleDataB2B - .oo789Uv01() - .build(); - -const skuOo789Uv2015Us = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${oo789Uv01.sku}-${usWarehouse.key}`) - .sku(oo789Uv01.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(usWarehouse.key)); - -export default skuOo789Uv2015Us; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-oo789-uv-2019-default.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-oo789-uv-2019-default.spec.ts deleted file mode 100644 index da26d163f..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-oo789-uv-2019-default.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuOo789Uv2019Default from './sku-oo789-uv-2019-default'; - -describe(`with skuOo789Uv2019Default preset and default-warehouse channel`, () => { - it(`should return a skuOo789Uv2019Default preset`, () => { - const skuOo789Uv2019DefaultPreset = - skuOo789Uv2019Default().build(); - expect(skuOo789Uv2019DefaultPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "oo789-uv-2019-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "oo789-uv-2019", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuOo789Uv2019Default preset when built for graphql`, () => { - const skuOo789Uv2019DefaultPresetGraphql = - skuOo789Uv2019Default().buildGraphql(); - expect(skuOo789Uv2019DefaultPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "oo789-uv-2019-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "oo789-uv-2019", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-oo789-uv-2019-default.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-oo789-uv-2019-default.ts deleted file mode 100644 index 057df54e2..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-oo789-uv-2019-default.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const defaultWarehouse = ChannelDraft.presets.sampleDataB2B - .defaultWarehouse() - .build(); - -const oo789Uv02 = ProductVariantDraft.presets.sampleDataB2B - .oo789Uv02() - .build(); - -const skuOo789Uv2019Default = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${oo789Uv02.sku}-${defaultWarehouse.key}`) - .sku(oo789Uv02.sku!) - .quantityOnStock(1000) - .supplyChannel( - KeyReferenceDraft.presets.channel().key(defaultWarehouse.key) - ); - -export default skuOo789Uv2019Default; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-oo789-uv-2019-eu.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-oo789-uv-2019-eu.spec.ts deleted file mode 100644 index da6952161..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-oo789-uv-2019-eu.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuOo789Uv2019Eu from './sku-oo789-uv-2019-eu'; - -describe(`with skuOo789Uv2019Eu preset and eu-warehouse channel`, () => { - it(`should return a skuOo789Uv2019Eu preset`, () => { - const skuOo789Uv2019EuPreset = - skuOo789Uv2019Eu().build(); - expect(skuOo789Uv2019EuPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "oo789-uv-2019-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "oo789-uv-2019", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuOo789Uv2019Eu preset when built for graphql`, () => { - const skuOo789Uv2019EuPresetGraphql = - skuOo789Uv2019Eu().buildGraphql(); - expect(skuOo789Uv2019EuPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "oo789-uv-2019-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "oo789-uv-2019", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-oo789-uv-2019-eu.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-oo789-uv-2019-eu.ts deleted file mode 100644 index bdad88368..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-oo789-uv-2019-eu.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const euWarehouse = ChannelDraft.presets.sampleDataB2B - .euWarehouse() - .build(); - -const oo789Uv02 = ProductVariantDraft.presets.sampleDataB2B - .oo789Uv02() - .build(); - -const skuOo789Uv2019Eu = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${oo789Uv02.sku}-${euWarehouse.key}`) - .sku(oo789Uv02.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(euWarehouse.key)); - -export default skuOo789Uv2019Eu; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-oo789-uv-2019-us.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-oo789-uv-2019-us.spec.ts deleted file mode 100644 index 04380283e..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-oo789-uv-2019-us.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuOo789Uv2019Us from './sku-oo789-uv-2019-us'; - -describe(`with skuOo789Uv2019Us preset and us-warehouse channel`, () => { - it(`should return a skuOo789Uv2019Us preset`, () => { - const skuOo789Uv2019UsPreset = - skuOo789Uv2019Us().build(); - expect(skuOo789Uv2019UsPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "oo789-uv-2019-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "oo789-uv-2019", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuOo789Uv2019Us preset when built for graphql`, () => { - const skuOo789Uv2019UsPresetGraphql = - skuOo789Uv2019Us().buildGraphql(); - expect(skuOo789Uv2019UsPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "oo789-uv-2019-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "oo789-uv-2019", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-oo789-uv-2019-us.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-oo789-uv-2019-us.ts deleted file mode 100644 index 3dcf281ba..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-oo789-uv-2019-us.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const usWarehouse = ChannelDraft.presets.sampleDataB2B - .usWarehouse() - .build(); - -const oo789Uv02 = ProductVariantDraft.presets.sampleDataB2B - .oo789Uv02() - .build(); - -const skuOo789Uv2019Us = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${oo789Uv02.sku}-${usWarehouse.key}`) - .sku(oo789Uv02.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(usWarehouse.key)); - -export default skuOo789Uv2019Us; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-oo789-uv-2023-default.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-oo789-uv-2023-default.spec.ts deleted file mode 100644 index 59fa9901e..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-oo789-uv-2023-default.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuOo789Uv2023Default from './sku-oo789-uv-2023-default'; - -describe(`with skuOo789Uv2023Default preset and default-warehouse channel`, () => { - it(`should return a skuOo789Uv2023Default preset`, () => { - const skuOo789Uv2023DefaultPreset = - skuOo789Uv2023Default().build(); - expect(skuOo789Uv2023DefaultPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "oo789-uv-2023-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "oo789-uv-2023", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuOo789Uv2023Default preset when built for graphql`, () => { - const skuOo789Uv2023DefaultPresetGraphql = - skuOo789Uv2023Default().buildGraphql(); - expect(skuOo789Uv2023DefaultPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "oo789-uv-2023-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "oo789-uv-2023", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-oo789-uv-2023-default.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-oo789-uv-2023-default.ts deleted file mode 100644 index 81b547d9a..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-oo789-uv-2023-default.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const defaultWarehouse = ChannelDraft.presets.sampleDataB2B - .defaultWarehouse() - .build(); - -const oo789Uv03 = ProductVariantDraft.presets.sampleDataB2B - .oo789Uv03() - .build(); - -const skuOo789Uv2023Default = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${oo789Uv03.sku}-${defaultWarehouse.key}`) - .sku(oo789Uv03.sku!) - .quantityOnStock(1000) - .supplyChannel( - KeyReferenceDraft.presets.channel().key(defaultWarehouse.key) - ); - -export default skuOo789Uv2023Default; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-oo789-uv-2023-eu.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-oo789-uv-2023-eu.spec.ts deleted file mode 100644 index 3b0bebb6c..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-oo789-uv-2023-eu.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuOo789Uv2023Eu from './sku-oo789-uv-2023-eu'; - -describe(`with skuOo789Uv2023Eu preset and eu-warehouse channel`, () => { - it(`should return a skuOo789Uv2023Eu preset`, () => { - const skuOo789Uv2023EuPreset = - skuOo789Uv2023Eu().build(); - expect(skuOo789Uv2023EuPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "oo789-uv-2023-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "oo789-uv-2023", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuOo789Uv2023Eu preset when built for graphql`, () => { - const skuOo789Uv2023EuPresetGraphql = - skuOo789Uv2023Eu().buildGraphql(); - expect(skuOo789Uv2023EuPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "oo789-uv-2023-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "oo789-uv-2023", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-oo789-uv-2023-eu.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-oo789-uv-2023-eu.ts deleted file mode 100644 index 072fcfc70..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-oo789-uv-2023-eu.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const euWarehouse = ChannelDraft.presets.sampleDataB2B - .euWarehouse() - .build(); - -const oo789Uv03 = ProductVariantDraft.presets.sampleDataB2B - .oo789Uv03() - .build(); - -const skuOo789Uv2023Eu = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${oo789Uv03.sku}-${euWarehouse.key}`) - .sku(oo789Uv03.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(euWarehouse.key)); - -export default skuOo789Uv2023Eu; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-oo789-uv-2023-us.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-oo789-uv-2023-us.spec.ts deleted file mode 100644 index 476475656..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-oo789-uv-2023-us.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuOo789Uv2023Us from './sku-oo789-uv-2023-us'; - -describe(`with skuOo789Uv2023Us preset and us-warehouse channel`, () => { - it(`should return a skuOo789Uv2023Us preset`, () => { - const skuOo789Uv2023UsPreset = - skuOo789Uv2023Us().build(); - expect(skuOo789Uv2023UsPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "oo789-uv-2023-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "oo789-uv-2023", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuOo789Uv2023Us preset when built for graphql`, () => { - const skuOo789Uv2023UsPresetGraphql = - skuOo789Uv2023Us().buildGraphql(); - expect(skuOo789Uv2023UsPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "oo789-uv-2023-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "oo789-uv-2023", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-oo789-uv-2023-us.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-oo789-uv-2023-us.ts deleted file mode 100644 index cf0e39adc..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-oo789-uv-2023-us.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const usWarehouse = ChannelDraft.presets.sampleDataB2B - .usWarehouse() - .build(); - -const oo789Uv03 = ProductVariantDraft.presets.sampleDataB2B - .oo789Uv03() - .build(); - -const skuOo789Uv2023Us = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${oo789Uv03.sku}-${usWarehouse.key}`) - .sku(oo789Uv03.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(usWarehouse.key)); - -export default skuOo789Uv2023Us; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-p-234-qw-2015-default-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-p-234-qw-2015-default-warehouse.spec.ts new file mode 100644 index 000000000..a918a7a47 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-p-234-qw-2015-default-warehouse.spec.ts @@ -0,0 +1,40 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuP234Qw2015DefaultWarehouse preset`, () => { + it(`should return a skuP234Qw2015DefaultWarehouse preset when built for rest`, () => { + const skuP234Qw2015DefaultWarehousePreset = InventoryEntryDraftRest.presets + .skuP234Qw2015DefaultWarehouse() + .build(); + expect(skuP234Qw2015DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuP234Qw2015DefaultWarehouse preset when built for graphql`, () => { + const skuP234Qw2015DefaultWarehousePreset = + InventoryEntryDraftGraphql.presets + .skuP234Qw2015DefaultWarehouse() + .build(); + expect(skuP234Qw2015DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuP234Qw2015DefaultWarehouse preset when built for legacy rest`, () => { + const skuP234Qw2015DefaultWarehousePreset = InventoryEntryDraft.presets + .skuP234Qw2015DefaultWarehouse() + .buildRest(); + expect(skuP234Qw2015DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuP234Qw2015DefaultWarehouse preset when built for legacy graphql`, () => { + const skuP234Qw2015DefaultWarehousePreset = InventoryEntryDraft.presets + .skuP234Qw2015DefaultWarehouse() + .buildGraphql(); + expect(skuP234Qw2015DefaultWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-p-234-qw-2015-default-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-p-234-qw-2015-default-warehouse.ts new file mode 100644 index 000000000..bda68902b --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-p-234-qw-2015-default-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .defaultWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .p234Qw01() + .build(); + +const skuP234Qw2015DefaultWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('p234-qw-2015-default-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuP234Qw2015DefaultWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-p-234-qw-2015-eu-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-p-234-qw-2015-eu-warehouse.spec.ts new file mode 100644 index 000000000..46c939b4c --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-p-234-qw-2015-eu-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuP234Qw2015EuWarehouse preset`, () => { + it(`should return a skuP234Qw2015EuWarehouse preset when built for rest`, () => { + const skuP234Qw2015EuWarehousePreset = InventoryEntryDraftRest.presets + .skuP234Qw2015EuWarehouse() + .build(); + expect(skuP234Qw2015EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuP234Qw2015EuWarehouse preset when built for graphql`, () => { + const skuP234Qw2015EuWarehousePreset = InventoryEntryDraftGraphql.presets + .skuP234Qw2015EuWarehouse() + .build(); + expect(skuP234Qw2015EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuP234Qw2015EuWarehouse preset when built for legacy rest`, () => { + const skuP234Qw2015EuWarehousePreset = InventoryEntryDraft.presets + .skuP234Qw2015EuWarehouse() + .buildRest(); + expect(skuP234Qw2015EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuP234Qw2015EuWarehouse preset when built for legacy graphql`, () => { + const skuP234Qw2015EuWarehousePreset = InventoryEntryDraft.presets + .skuP234Qw2015EuWarehouse() + .buildGraphql(); + expect(skuP234Qw2015EuWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-p-234-qw-2015-eu-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-p-234-qw-2015-eu-warehouse.ts new file mode 100644 index 000000000..14e02c7cb --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-p-234-qw-2015-eu-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .euWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .p234Qw01() + .build(); + +const skuP234Qw2015EuWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('p234-qw-2015-eu-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuP234Qw2015EuWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-p-234-qw-2015-us-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-p-234-qw-2015-us-warehouse.spec.ts new file mode 100644 index 000000000..64bb08bab --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-p-234-qw-2015-us-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuP234Qw2015UsWarehouse preset`, () => { + it(`should return a skuP234Qw2015UsWarehouse preset when built for rest`, () => { + const skuP234Qw2015UsWarehousePreset = InventoryEntryDraftRest.presets + .skuP234Qw2015UsWarehouse() + .build(); + expect(skuP234Qw2015UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuP234Qw2015UsWarehouse preset when built for graphql`, () => { + const skuP234Qw2015UsWarehousePreset = InventoryEntryDraftGraphql.presets + .skuP234Qw2015UsWarehouse() + .build(); + expect(skuP234Qw2015UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuP234Qw2015UsWarehouse preset when built for legacy rest`, () => { + const skuP234Qw2015UsWarehousePreset = InventoryEntryDraft.presets + .skuP234Qw2015UsWarehouse() + .buildRest(); + expect(skuP234Qw2015UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuP234Qw2015UsWarehouse preset when built for legacy graphql`, () => { + const skuP234Qw2015UsWarehousePreset = InventoryEntryDraft.presets + .skuP234Qw2015UsWarehouse() + .buildGraphql(); + expect(skuP234Qw2015UsWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-p-234-qw-2015-us-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-p-234-qw-2015-us-warehouse.ts new file mode 100644 index 000000000..a449f2797 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-p-234-qw-2015-us-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .usWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .p234Qw01() + .build(); + +const skuP234Qw2015UsWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('p234-qw-2015-us-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuP234Qw2015UsWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-p-234-qw-2019-default-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-p-234-qw-2019-default-warehouse.spec.ts new file mode 100644 index 000000000..1b0f292cd --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-p-234-qw-2019-default-warehouse.spec.ts @@ -0,0 +1,40 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuP234Qw2019DefaultWarehouse preset`, () => { + it(`should return a skuP234Qw2019DefaultWarehouse preset when built for rest`, () => { + const skuP234Qw2019DefaultWarehousePreset = InventoryEntryDraftRest.presets + .skuP234Qw2019DefaultWarehouse() + .build(); + expect(skuP234Qw2019DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuP234Qw2019DefaultWarehouse preset when built for graphql`, () => { + const skuP234Qw2019DefaultWarehousePreset = + InventoryEntryDraftGraphql.presets + .skuP234Qw2019DefaultWarehouse() + .build(); + expect(skuP234Qw2019DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuP234Qw2019DefaultWarehouse preset when built for legacy rest`, () => { + const skuP234Qw2019DefaultWarehousePreset = InventoryEntryDraft.presets + .skuP234Qw2019DefaultWarehouse() + .buildRest(); + expect(skuP234Qw2019DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuP234Qw2019DefaultWarehouse preset when built for legacy graphql`, () => { + const skuP234Qw2019DefaultWarehousePreset = InventoryEntryDraft.presets + .skuP234Qw2019DefaultWarehouse() + .buildGraphql(); + expect(skuP234Qw2019DefaultWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-p-234-qw-2019-default-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-p-234-qw-2019-default-warehouse.ts new file mode 100644 index 000000000..6cbd40474 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-p-234-qw-2019-default-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .defaultWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .p234Qw02() + .build(); + +const skuP234Qw2019DefaultWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('p234-qw-2019-default-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuP234Qw2019DefaultWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-p-234-qw-2019-eu-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-p-234-qw-2019-eu-warehouse.spec.ts new file mode 100644 index 000000000..7c290ee31 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-p-234-qw-2019-eu-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuP234Qw2019EuWarehouse preset`, () => { + it(`should return a skuP234Qw2019EuWarehouse preset when built for rest`, () => { + const skuP234Qw2019EuWarehousePreset = InventoryEntryDraftRest.presets + .skuP234Qw2019EuWarehouse() + .build(); + expect(skuP234Qw2019EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuP234Qw2019EuWarehouse preset when built for graphql`, () => { + const skuP234Qw2019EuWarehousePreset = InventoryEntryDraftGraphql.presets + .skuP234Qw2019EuWarehouse() + .build(); + expect(skuP234Qw2019EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuP234Qw2019EuWarehouse preset when built for legacy rest`, () => { + const skuP234Qw2019EuWarehousePreset = InventoryEntryDraft.presets + .skuP234Qw2019EuWarehouse() + .buildRest(); + expect(skuP234Qw2019EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuP234Qw2019EuWarehouse preset when built for legacy graphql`, () => { + const skuP234Qw2019EuWarehousePreset = InventoryEntryDraft.presets + .skuP234Qw2019EuWarehouse() + .buildGraphql(); + expect(skuP234Qw2019EuWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-p-234-qw-2019-eu-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-p-234-qw-2019-eu-warehouse.ts new file mode 100644 index 000000000..415f49556 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-p-234-qw-2019-eu-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .euWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .p234Qw02() + .build(); + +const skuP234Qw2019EuWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('p234-qw-2019-eu-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuP234Qw2019EuWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-p-234-qw-2019-us-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-p-234-qw-2019-us-warehouse.spec.ts new file mode 100644 index 000000000..48a0f6dd4 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-p-234-qw-2019-us-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuP234Qw2019UsWarehouse preset`, () => { + it(`should return a skuP234Qw2019UsWarehouse preset when built for rest`, () => { + const skuP234Qw2019UsWarehousePreset = InventoryEntryDraftRest.presets + .skuP234Qw2019UsWarehouse() + .build(); + expect(skuP234Qw2019UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuP234Qw2019UsWarehouse preset when built for graphql`, () => { + const skuP234Qw2019UsWarehousePreset = InventoryEntryDraftGraphql.presets + .skuP234Qw2019UsWarehouse() + .build(); + expect(skuP234Qw2019UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuP234Qw2019UsWarehouse preset when built for legacy rest`, () => { + const skuP234Qw2019UsWarehousePreset = InventoryEntryDraft.presets + .skuP234Qw2019UsWarehouse() + .buildRest(); + expect(skuP234Qw2019UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuP234Qw2019UsWarehouse preset when built for legacy graphql`, () => { + const skuP234Qw2019UsWarehousePreset = InventoryEntryDraft.presets + .skuP234Qw2019UsWarehouse() + .buildGraphql(); + expect(skuP234Qw2019UsWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-p-234-qw-2019-us-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-p-234-qw-2019-us-warehouse.ts new file mode 100644 index 000000000..be22b1c4f --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-p-234-qw-2019-us-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .usWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .p234Qw02() + .build(); + +const skuP234Qw2019UsWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('p234-qw-2019-us-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuP234Qw2019UsWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-p-234-qw-2023-default-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-p-234-qw-2023-default-warehouse.spec.ts new file mode 100644 index 000000000..bf8044e86 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-p-234-qw-2023-default-warehouse.spec.ts @@ -0,0 +1,40 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuP234Qw2023DefaultWarehouse preset`, () => { + it(`should return a skuP234Qw2023DefaultWarehouse preset when built for rest`, () => { + const skuP234Qw2023DefaultWarehousePreset = InventoryEntryDraftRest.presets + .skuP234Qw2023DefaultWarehouse() + .build(); + expect(skuP234Qw2023DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuP234Qw2023DefaultWarehouse preset when built for graphql`, () => { + const skuP234Qw2023DefaultWarehousePreset = + InventoryEntryDraftGraphql.presets + .skuP234Qw2023DefaultWarehouse() + .build(); + expect(skuP234Qw2023DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuP234Qw2023DefaultWarehouse preset when built for legacy rest`, () => { + const skuP234Qw2023DefaultWarehousePreset = InventoryEntryDraft.presets + .skuP234Qw2023DefaultWarehouse() + .buildRest(); + expect(skuP234Qw2023DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuP234Qw2023DefaultWarehouse preset when built for legacy graphql`, () => { + const skuP234Qw2023DefaultWarehousePreset = InventoryEntryDraft.presets + .skuP234Qw2023DefaultWarehouse() + .buildGraphql(); + expect(skuP234Qw2023DefaultWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-p-234-qw-2023-default-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-p-234-qw-2023-default-warehouse.ts new file mode 100644 index 000000000..546743d36 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-p-234-qw-2023-default-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .defaultWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .p234Qw03() + .build(); + +const skuP234Qw2023DefaultWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('p234-qw-2023-default-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuP234Qw2023DefaultWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-p-234-qw-2023-eu-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-p-234-qw-2023-eu-warehouse.spec.ts new file mode 100644 index 000000000..5c99a9db4 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-p-234-qw-2023-eu-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuP234Qw2023EuWarehouse preset`, () => { + it(`should return a skuP234Qw2023EuWarehouse preset when built for rest`, () => { + const skuP234Qw2023EuWarehousePreset = InventoryEntryDraftRest.presets + .skuP234Qw2023EuWarehouse() + .build(); + expect(skuP234Qw2023EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuP234Qw2023EuWarehouse preset when built for graphql`, () => { + const skuP234Qw2023EuWarehousePreset = InventoryEntryDraftGraphql.presets + .skuP234Qw2023EuWarehouse() + .build(); + expect(skuP234Qw2023EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuP234Qw2023EuWarehouse preset when built for legacy rest`, () => { + const skuP234Qw2023EuWarehousePreset = InventoryEntryDraft.presets + .skuP234Qw2023EuWarehouse() + .buildRest(); + expect(skuP234Qw2023EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuP234Qw2023EuWarehouse preset when built for legacy graphql`, () => { + const skuP234Qw2023EuWarehousePreset = InventoryEntryDraft.presets + .skuP234Qw2023EuWarehouse() + .buildGraphql(); + expect(skuP234Qw2023EuWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-p-234-qw-2023-eu-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-p-234-qw-2023-eu-warehouse.ts new file mode 100644 index 000000000..438dd2548 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-p-234-qw-2023-eu-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .euWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .p234Qw03() + .build(); + +const skuP234Qw2023EuWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('p234-qw-2023-eu-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuP234Qw2023EuWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-p-234-qw-2023-us-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-p-234-qw-2023-us-warehouse.spec.ts new file mode 100644 index 000000000..c74b4dac3 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-p-234-qw-2023-us-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuP234Qw2023UsWarehouse preset`, () => { + it(`should return a skuP234Qw2023UsWarehouse preset when built for rest`, () => { + const skuP234Qw2023UsWarehousePreset = InventoryEntryDraftRest.presets + .skuP234Qw2023UsWarehouse() + .build(); + expect(skuP234Qw2023UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuP234Qw2023UsWarehouse preset when built for graphql`, () => { + const skuP234Qw2023UsWarehousePreset = InventoryEntryDraftGraphql.presets + .skuP234Qw2023UsWarehouse() + .build(); + expect(skuP234Qw2023UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuP234Qw2023UsWarehouse preset when built for legacy rest`, () => { + const skuP234Qw2023UsWarehousePreset = InventoryEntryDraft.presets + .skuP234Qw2023UsWarehouse() + .buildRest(); + expect(skuP234Qw2023UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuP234Qw2023UsWarehouse preset when built for legacy graphql`, () => { + const skuP234Qw2023UsWarehousePreset = InventoryEntryDraft.presets + .skuP234Qw2023UsWarehouse() + .buildGraphql(); + expect(skuP234Qw2023UsWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-p-234-qw-2023-us-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-p-234-qw-2023-us-warehouse.ts new file mode 100644 index 000000000..f8e92a089 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-p-234-qw-2023-us-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .usWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .p234Qw03() + .build(); + +const skuP234Qw2023UsWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('p234-qw-2023-us-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuP234Qw2023UsWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-p234-qw-2015-default.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-p234-qw-2015-default.spec.ts deleted file mode 100644 index a03515f7e..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-p234-qw-2015-default.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuP234Qw2015Default from './sku-p234-qw-2015-default'; - -describe(`with skuP234Qw2015Default preset and default-warehouse channel`, () => { - it(`should return a skuP234Qw2015Default preset`, () => { - const skuP234Qw2015DefaultPreset = - skuP234Qw2015Default().build(); - expect(skuP234Qw2015DefaultPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "p234-qw-2015-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "p234-qw-2015", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuP234Qw2015Default preset when built for graphql`, () => { - const skuP234Qw2015DefaultPresetGraphql = - skuP234Qw2015Default().buildGraphql(); - expect(skuP234Qw2015DefaultPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "p234-qw-2015-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "p234-qw-2015", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-p234-qw-2015-default.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-p234-qw-2015-default.ts deleted file mode 100644 index ca2c98146..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-p234-qw-2015-default.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const defaultWarehouse = ChannelDraft.presets.sampleDataB2B - .defaultWarehouse() - .build(); - -const p234Qw01 = ProductVariantDraft.presets.sampleDataB2B - .p234Qw01() - .build(); - -const skuP234Qw2015Default = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${p234Qw01.sku}-${defaultWarehouse.key}`) - .sku(p234Qw01.sku!) - .quantityOnStock(1000) - .supplyChannel( - KeyReferenceDraft.presets.channel().key(defaultWarehouse.key) - ); - -export default skuP234Qw2015Default; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-p234-qw-2015-eu.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-p234-qw-2015-eu.spec.ts deleted file mode 100644 index b5947a2bd..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-p234-qw-2015-eu.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuP234Qw2015Eu from './sku-p234-qw-2015-eu'; - -describe(`with skuP234Qw2015Eu preset and eu-warehouse channel`, () => { - it(`should return a skuP234Qw2015Eu preset`, () => { - const skuP234Qw2015EuPreset = - skuP234Qw2015Eu().build(); - expect(skuP234Qw2015EuPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "p234-qw-2015-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "p234-qw-2015", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuP234Qw2015Eu preset when built for graphql`, () => { - const skuP234Qw2015EuPresetGraphql = - skuP234Qw2015Eu().buildGraphql(); - expect(skuP234Qw2015EuPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "p234-qw-2015-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "p234-qw-2015", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-p234-qw-2015-eu.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-p234-qw-2015-eu.ts deleted file mode 100644 index 53d1f6967..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-p234-qw-2015-eu.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const euWarehouse = ChannelDraft.presets.sampleDataB2B - .euWarehouse() - .build(); - -const p234Qw01 = ProductVariantDraft.presets.sampleDataB2B - .p234Qw01() - .build(); - -const skuP234Qw2015Eu = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${p234Qw01.sku}-${euWarehouse.key}`) - .sku(p234Qw01.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(euWarehouse.key)); - -export default skuP234Qw2015Eu; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-p234-qw-2015-us.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-p234-qw-2015-us.spec.ts deleted file mode 100644 index 072e5d5d7..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-p234-qw-2015-us.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuP234Qw2015Us from './sku-p234-qw-2015-us'; - -describe(`with skuP234Qw2015Us preset and us-warehouse channel`, () => { - it(`should return a skuP234Qw2015Us preset`, () => { - const skuP234Qw2015UsPreset = - skuP234Qw2015Us().build(); - expect(skuP234Qw2015UsPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "p234-qw-2015-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "p234-qw-2015", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuP234Qw2015Us preset when built for graphql`, () => { - const skuP234Qw2015UsPresetGraphql = - skuP234Qw2015Us().buildGraphql(); - expect(skuP234Qw2015UsPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "p234-qw-2015-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "p234-qw-2015", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-p234-qw-2015-us.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-p234-qw-2015-us.ts deleted file mode 100644 index e5134ca7d..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-p234-qw-2015-us.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const usWarehouse = ChannelDraft.presets.sampleDataB2B - .usWarehouse() - .build(); - -const p234Qw01 = ProductVariantDraft.presets.sampleDataB2B - .p234Qw01() - .build(); - -const skuP234Qw2015Us = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${p234Qw01.sku}-${usWarehouse.key}`) - .sku(p234Qw01.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(usWarehouse.key)); - -export default skuP234Qw2015Us; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-p234-qw-2019-default.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-p234-qw-2019-default.spec.ts deleted file mode 100644 index 512df0818..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-p234-qw-2019-default.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuP234Qw2019Default from './sku-p234-qw-2019-default'; - -describe(`with skuP234Qw2019Default preset and default-warehouse channel`, () => { - it(`should return a skuP234Qw2019Default preset`, () => { - const skuP234Qw2019DefaultPreset = - skuP234Qw2019Default().build(); - expect(skuP234Qw2019DefaultPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "p234-qw-2019-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "p234-qw-2019", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuP234Qw2019Default preset when built for graphql`, () => { - const skuP234Qw2019DefaultPresetGraphql = - skuP234Qw2019Default().buildGraphql(); - expect(skuP234Qw2019DefaultPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "p234-qw-2019-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "p234-qw-2019", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-p234-qw-2019-default.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-p234-qw-2019-default.ts deleted file mode 100644 index e73e2f8f2..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-p234-qw-2019-default.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const defaultWarehouse = ChannelDraft.presets.sampleDataB2B - .defaultWarehouse() - .build(); - -const p234Qw02 = ProductVariantDraft.presets.sampleDataB2B - .p234Qw02() - .build(); - -const skuP234Qw2019Default = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${p234Qw02.sku}-${defaultWarehouse.key}`) - .sku(p234Qw02.sku!) - .quantityOnStock(1000) - .supplyChannel( - KeyReferenceDraft.presets.channel().key(defaultWarehouse.key) - ); - -export default skuP234Qw2019Default; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-p234-qw-2019-eu.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-p234-qw-2019-eu.spec.ts deleted file mode 100644 index cf961278f..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-p234-qw-2019-eu.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuP234Qw2019Eu from './sku-p234-qw-2019-eu'; - -describe(`with skuP234Qw2019Eu preset and eu-warehouse channel`, () => { - it(`should return a skuP234Qw2019Eu preset`, () => { - const skuP234Qw2019EuPreset = - skuP234Qw2019Eu().build(); - expect(skuP234Qw2019EuPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "p234-qw-2019-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "p234-qw-2019", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuP234Qw2019Eu preset when built for graphql`, () => { - const skuP234Qw2019EuPresetGraphql = - skuP234Qw2019Eu().buildGraphql(); - expect(skuP234Qw2019EuPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "p234-qw-2019-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "p234-qw-2019", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-p234-qw-2019-eu.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-p234-qw-2019-eu.ts deleted file mode 100644 index 2e51e08a5..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-p234-qw-2019-eu.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const euWarehouse = ChannelDraft.presets.sampleDataB2B - .euWarehouse() - .build(); - -const p234Qw02 = ProductVariantDraft.presets.sampleDataB2B - .p234Qw02() - .build(); - -const skuP234Qw2019Eu = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${p234Qw02.sku}-${euWarehouse.key}`) - .sku(p234Qw02.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(euWarehouse.key)); - -export default skuP234Qw2019Eu; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-p234-qw-2019-us.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-p234-qw-2019-us.spec.ts deleted file mode 100644 index a61590ca6..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-p234-qw-2019-us.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuP234Qw2019Us from './sku-p234-qw-2019-us'; - -describe(`with skuP234Qw2019Us preset and us-warehouse channel`, () => { - it(`should return a skuP234Qw2019Us preset`, () => { - const skuP234Qw2019UsPreset = - skuP234Qw2019Us().build(); - expect(skuP234Qw2019UsPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "p234-qw-2019-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "p234-qw-2019", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuP234Qw2019Us preset when built for graphql`, () => { - const skuP234Qw2019UsPresetGraphql = - skuP234Qw2019Us().buildGraphql(); - expect(skuP234Qw2019UsPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "p234-qw-2019-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "p234-qw-2019", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-p234-qw-2019-us.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-p234-qw-2019-us.ts deleted file mode 100644 index 9f2a65c4a..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-p234-qw-2019-us.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const usWarehouse = ChannelDraft.presets.sampleDataB2B - .usWarehouse() - .build(); - -const p234Qw02 = ProductVariantDraft.presets.sampleDataB2B - .p234Qw02() - .build(); - -const skuP234Qw2019Us = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${p234Qw02.sku}-${usWarehouse.key}`) - .sku(p234Qw02.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(usWarehouse.key)); - -export default skuP234Qw2019Us; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-p234-qw-2023-default.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-p234-qw-2023-default.spec.ts deleted file mode 100644 index bbdc61e89..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-p234-qw-2023-default.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuP234Qw2023Default from './sku-p234-qw-2023-default'; - -describe(`with skuP234Qw2023Default preset and default-warehouse channel`, () => { - it(`should return a skuP234Qw2023Default preset`, () => { - const skuP234Qw2023DefaultPreset = - skuP234Qw2023Default().build(); - expect(skuP234Qw2023DefaultPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "p234-qw-2023-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "p234-qw-2023", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuP234Qw2023Default preset when built for graphql`, () => { - const skuP234Qw2023DefaultPresetGraphql = - skuP234Qw2023Default().buildGraphql(); - expect(skuP234Qw2023DefaultPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "p234-qw-2023-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "p234-qw-2023", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-p234-qw-2023-default.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-p234-qw-2023-default.ts deleted file mode 100644 index 2778b820f..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-p234-qw-2023-default.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const defaultWarehouse = ChannelDraft.presets.sampleDataB2B - .defaultWarehouse() - .build(); - -const p234Qw03 = ProductVariantDraft.presets.sampleDataB2B - .p234Qw03() - .build(); - -const skuP234Qw2023Default = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${p234Qw03.sku}-${defaultWarehouse.key}`) - .sku(p234Qw03.sku!) - .quantityOnStock(1000) - .supplyChannel( - KeyReferenceDraft.presets.channel().key(defaultWarehouse.key) - ); - -export default skuP234Qw2023Default; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-p234-qw-2023-eu.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-p234-qw-2023-eu.spec.ts deleted file mode 100644 index db193113a..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-p234-qw-2023-eu.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuP234Qw2023Eu from './sku-p234-qw-2023-eu'; - -describe(`with skuP234Qw2023Eu preset and eu-warehouse channel`, () => { - it(`should return a skuP234Qw2023Eu preset`, () => { - const skuP234Qw2023EuPreset = - skuP234Qw2023Eu().build(); - expect(skuP234Qw2023EuPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "p234-qw-2023-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "p234-qw-2023", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuP234Qw2023Eu preset when built for graphql`, () => { - const skuP234Qw2023EuPresetGraphql = - skuP234Qw2023Eu().buildGraphql(); - expect(skuP234Qw2023EuPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "p234-qw-2023-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "p234-qw-2023", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-p234-qw-2023-eu.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-p234-qw-2023-eu.ts deleted file mode 100644 index 07c46b045..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-p234-qw-2023-eu.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const euWarehouse = ChannelDraft.presets.sampleDataB2B - .euWarehouse() - .build(); - -const p234Qw03 = ProductVariantDraft.presets.sampleDataB2B - .p234Qw03() - .build(); - -const skuP234Qw2023Eu = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${p234Qw03.sku}-${euWarehouse.key}`) - .sku(p234Qw03.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(euWarehouse.key)); - -export default skuP234Qw2023Eu; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-p234-qw-2023-us.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-p234-qw-2023-us.spec.ts deleted file mode 100644 index 2f1e40af6..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-p234-qw-2023-us.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuP234Qw2023Us from './sku-p234-qw-2023-us'; - -describe(`with skuP234Qw2023Us preset and us-warehouse channel`, () => { - it(`should return a skuP234Qw2023Us preset`, () => { - const skuP234Qw2023UsPreset = - skuP234Qw2023Us().build(); - expect(skuP234Qw2023UsPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "p234-qw-2023-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "p234-qw-2023", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuP234Qw2023Us preset when built for graphql`, () => { - const skuP234Qw2023UsPresetGraphql = - skuP234Qw2023Us().buildGraphql(); - expect(skuP234Qw2023UsPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "p234-qw-2023-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "p234-qw-2023", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-p234-qw-2023-us.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-p234-qw-2023-us.ts deleted file mode 100644 index 5c4c619e0..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-p234-qw-2023-us.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const usWarehouse = ChannelDraft.presets.sampleDataB2B - .usWarehouse() - .build(); - -const p234Qw03 = ProductVariantDraft.presets.sampleDataB2B - .p234Qw03() - .build(); - -const skuP234Qw2023Us = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${p234Qw03.sku}-${usWarehouse.key}`) - .sku(p234Qw03.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(usWarehouse.key)); - -export default skuP234Qw2023Us; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-pin-and-bushing-kit-default-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-pin-and-bushing-kit-default-warehouse.spec.ts new file mode 100644 index 000000000..d307f892b --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-pin-and-bushing-kit-default-warehouse.spec.ts @@ -0,0 +1,43 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuPinAndBushingKitDefaultWarehouse preset`, () => { + it(`should return a skuPinAndBushingKitDefaultWarehouse preset when built for rest`, () => { + const skuPinAndBushingKitDefaultWarehousePreset = + InventoryEntryDraftRest.presets + .skuPinAndBushingKitDefaultWarehouse() + .build(); + expect(skuPinAndBushingKitDefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuPinAndBushingKitDefaultWarehouse preset when built for graphql`, () => { + const skuPinAndBushingKitDefaultWarehousePreset = + InventoryEntryDraftGraphql.presets + .skuPinAndBushingKitDefaultWarehouse() + .build(); + expect(skuPinAndBushingKitDefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuPinAndBushingKitDefaultWarehouse preset when built for legacy rest`, () => { + const skuPinAndBushingKitDefaultWarehousePreset = + InventoryEntryDraft.presets + .skuPinAndBushingKitDefaultWarehouse() + .buildRest(); + expect(skuPinAndBushingKitDefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuPinAndBushingKitDefaultWarehouse preset when built for legacy graphql`, () => { + const skuPinAndBushingKitDefaultWarehousePreset = + InventoryEntryDraft.presets + .skuPinAndBushingKitDefaultWarehouse() + .buildGraphql(); + expect(skuPinAndBushingKitDefaultWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-pin-and-bushing-kit-default-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-pin-and-bushing-kit-default-warehouse.ts new file mode 100644 index 000000000..78bf64332 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-pin-and-bushing-kit-default-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .defaultWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .pinAndBushingKit01() + .build(); + +const skuPinAndBushingKitDefaultWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('pin-and-bushing-kit-default-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuPinAndBushingKitDefaultWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-pin-and-bushing-kit-default.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-pin-and-bushing-kit-default.spec.ts deleted file mode 100644 index 2a298b447..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-pin-and-bushing-kit-default.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuPinAndBushingKitDefault from './sku-pin-and-bushing-kit-default'; - -describe(`with skuPinAndBushingKitDefault preset and default-warehouse channel`, () => { - it(`should return a skuPinAndBushingKitDefault preset`, () => { - const skuPinAndBushingKitDefaultPreset = - skuPinAndBushingKitDefault().build(); - expect(skuPinAndBushingKitDefaultPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "pin-and-bushing-kit-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "pin-and-bushing-kit", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuPinAndBushingKitDefault preset when built for graphql`, () => { - const skuPinAndBushingKitDefaultPresetGraphql = - skuPinAndBushingKitDefault().buildGraphql(); - expect(skuPinAndBushingKitDefaultPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "pin-and-bushing-kit-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "pin-and-bushing-kit", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-pin-and-bushing-kit-default.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-pin-and-bushing-kit-default.ts deleted file mode 100644 index 96cb03686..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-pin-and-bushing-kit-default.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const defaultWarehouse = ChannelDraft.presets.sampleDataB2B - .defaultWarehouse() - .build(); - -const pinAndBushingKit01 = ProductVariantDraft.presets.sampleDataB2B - .pinAndBushingKit01() - .build(); - -const skuPinAndBushingKitDefault = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${pinAndBushingKit01.sku}-${defaultWarehouse.key}`) - .sku(pinAndBushingKit01.sku!) - .quantityOnStock(1000) - .supplyChannel( - KeyReferenceDraft.presets.channel().key(defaultWarehouse.key) - ); - -export default skuPinAndBushingKitDefault; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-pin-and-bushing-kit-eu-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-pin-and-bushing-kit-eu-warehouse.spec.ts new file mode 100644 index 000000000..f67512da1 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-pin-and-bushing-kit-eu-warehouse.spec.ts @@ -0,0 +1,40 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuPinAndBushingKitEuWarehouse preset`, () => { + it(`should return a skuPinAndBushingKitEuWarehouse preset when built for rest`, () => { + const skuPinAndBushingKitEuWarehousePreset = InventoryEntryDraftRest.presets + .skuPinAndBushingKitEuWarehouse() + .build(); + expect(skuPinAndBushingKitEuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuPinAndBushingKitEuWarehouse preset when built for graphql`, () => { + const skuPinAndBushingKitEuWarehousePreset = + InventoryEntryDraftGraphql.presets + .skuPinAndBushingKitEuWarehouse() + .build(); + expect(skuPinAndBushingKitEuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuPinAndBushingKitEuWarehouse preset when built for legacy rest`, () => { + const skuPinAndBushingKitEuWarehousePreset = InventoryEntryDraft.presets + .skuPinAndBushingKitEuWarehouse() + .buildRest(); + expect(skuPinAndBushingKitEuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuPinAndBushingKitEuWarehouse preset when built for legacy graphql`, () => { + const skuPinAndBushingKitEuWarehousePreset = InventoryEntryDraft.presets + .skuPinAndBushingKitEuWarehouse() + .buildGraphql(); + expect(skuPinAndBushingKitEuWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-pin-and-bushing-kit-eu-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-pin-and-bushing-kit-eu-warehouse.ts new file mode 100644 index 000000000..33208025c --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-pin-and-bushing-kit-eu-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .euWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .pinAndBushingKit01() + .build(); + +const skuPinAndBushingKitEuWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('pin-and-bushing-kit-eu-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuPinAndBushingKitEuWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-pin-and-bushing-kit-eu.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-pin-and-bushing-kit-eu.spec.ts deleted file mode 100644 index 5127e0648..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-pin-and-bushing-kit-eu.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuPinAndBushingKitEu from './sku-pin-and-bushing-kit-eu'; - -describe(`with skuPinAndBushingKitEu preset and eu-warehouse channel`, () => { - it(`should return a skuPinAndBushingKitEu preset`, () => { - const skuPinAndBushingKitEuPreset = - skuPinAndBushingKitEu().build(); - expect(skuPinAndBushingKitEuPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "pin-and-bushing-kit-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "pin-and-bushing-kit", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuPinAndBushingKitEu preset when built for graphql`, () => { - const skuPinAndBushingKitEuPresetGraphql = - skuPinAndBushingKitEu().buildGraphql(); - expect(skuPinAndBushingKitEuPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "pin-and-bushing-kit-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "pin-and-bushing-kit", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-pin-and-bushing-kit-eu.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-pin-and-bushing-kit-eu.ts deleted file mode 100644 index 1358ccdab..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-pin-and-bushing-kit-eu.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const euWarehouse = ChannelDraft.presets.sampleDataB2B - .euWarehouse() - .build(); - -const pinAndBushingKit01 = ProductVariantDraft.presets.sampleDataB2B - .pinAndBushingKit01() - .build(); - -const skuPinAndBushingKitEu = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${pinAndBushingKit01.sku}-${euWarehouse.key}`) - .sku(pinAndBushingKit01.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(euWarehouse.key)); - -export default skuPinAndBushingKitEu; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-pin-and-bushing-kit-us-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-pin-and-bushing-kit-us-warehouse.spec.ts new file mode 100644 index 000000000..a1e1c1d53 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-pin-and-bushing-kit-us-warehouse.spec.ts @@ -0,0 +1,40 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuPinAndBushingKitUsWarehouse preset`, () => { + it(`should return a skuPinAndBushingKitUsWarehouse preset when built for rest`, () => { + const skuPinAndBushingKitUsWarehousePreset = InventoryEntryDraftRest.presets + .skuPinAndBushingKitUsWarehouse() + .build(); + expect(skuPinAndBushingKitUsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuPinAndBushingKitUsWarehouse preset when built for graphql`, () => { + const skuPinAndBushingKitUsWarehousePreset = + InventoryEntryDraftGraphql.presets + .skuPinAndBushingKitUsWarehouse() + .build(); + expect(skuPinAndBushingKitUsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuPinAndBushingKitUsWarehouse preset when built for legacy rest`, () => { + const skuPinAndBushingKitUsWarehousePreset = InventoryEntryDraft.presets + .skuPinAndBushingKitUsWarehouse() + .buildRest(); + expect(skuPinAndBushingKitUsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuPinAndBushingKitUsWarehouse preset when built for legacy graphql`, () => { + const skuPinAndBushingKitUsWarehousePreset = InventoryEntryDraft.presets + .skuPinAndBushingKitUsWarehouse() + .buildGraphql(); + expect(skuPinAndBushingKitUsWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-pin-and-bushing-kit-us-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-pin-and-bushing-kit-us-warehouse.ts new file mode 100644 index 000000000..4a8f14fd3 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-pin-and-bushing-kit-us-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .usWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .pinAndBushingKit01() + .build(); + +const skuPinAndBushingKitUsWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('pin-and-bushing-kit-us-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuPinAndBushingKitUsWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-pin-and-bushing-kit-us.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-pin-and-bushing-kit-us.spec.ts deleted file mode 100644 index 6860f006c..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-pin-and-bushing-kit-us.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuPinAndBushingKitUs from './sku-pin-and-bushing-kit-us'; - -describe(`with skuPinAndBushingKitUs preset and us-warehouse channel`, () => { - it(`should return a skuPinAndBushingKitUs preset`, () => { - const skuPinAndBushingKitUsPreset = - skuPinAndBushingKitUs().build(); - expect(skuPinAndBushingKitUsPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "pin-and-bushing-kit-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "pin-and-bushing-kit", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuPinAndBushingKitUs preset when built for graphql`, () => { - const skuPinAndBushingKitUsPresetGraphql = - skuPinAndBushingKitUs().buildGraphql(); - expect(skuPinAndBushingKitUsPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "pin-and-bushing-kit-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "pin-and-bushing-kit", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-pin-and-bushing-kit-us.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-pin-and-bushing-kit-us.ts deleted file mode 100644 index 7f1b58a46..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-pin-and-bushing-kit-us.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const usWarehouse = ChannelDraft.presets.sampleDataB2B - .usWarehouse() - .build(); - -const pinAndBushingKit01 = ProductVariantDraft.presets.sampleDataB2B - .pinAndBushingKit01() - .build(); - -const skuPinAndBushingKitUs = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${pinAndBushingKit01.sku}-${usWarehouse.key}`) - .sku(pinAndBushingKit01.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(usWarehouse.key)); - -export default skuPinAndBushingKitUs; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-piston-ring-set-default-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-piston-ring-set-default-warehouse.spec.ts new file mode 100644 index 000000000..368449931 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-piston-ring-set-default-warehouse.spec.ts @@ -0,0 +1,41 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuPistonRingSetDefaultWarehouse preset`, () => { + it(`should return a skuPistonRingSetDefaultWarehouse preset when built for rest`, () => { + const skuPistonRingSetDefaultWarehousePreset = + InventoryEntryDraftRest.presets + .skuPistonRingSetDefaultWarehouse() + .build(); + expect(skuPistonRingSetDefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuPistonRingSetDefaultWarehouse preset when built for graphql`, () => { + const skuPistonRingSetDefaultWarehousePreset = + InventoryEntryDraftGraphql.presets + .skuPistonRingSetDefaultWarehouse() + .build(); + expect(skuPistonRingSetDefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuPistonRingSetDefaultWarehouse preset when built for legacy rest`, () => { + const skuPistonRingSetDefaultWarehousePreset = InventoryEntryDraft.presets + .skuPistonRingSetDefaultWarehouse() + .buildRest(); + expect(skuPistonRingSetDefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuPistonRingSetDefaultWarehouse preset when built for legacy graphql`, () => { + const skuPistonRingSetDefaultWarehousePreset = InventoryEntryDraft.presets + .skuPistonRingSetDefaultWarehouse() + .buildGraphql(); + expect(skuPistonRingSetDefaultWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-piston-ring-set-default-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-piston-ring-set-default-warehouse.ts new file mode 100644 index 000000000..be58f5c54 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-piston-ring-set-default-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .defaultWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .pistonRingSet01() + .build(); + +const skuPistonRingSetDefaultWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('piston-ring-set-default-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuPistonRingSetDefaultWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-piston-ring-set-default.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-piston-ring-set-default.spec.ts deleted file mode 100644 index e608f0bae..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-piston-ring-set-default.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuPistonRingSetDefault from './sku-piston-ring-set-default'; - -describe(`with skuPistonRingSetDefault preset and default-warehouse channel`, () => { - it(`should return a skuPistonRingSetDefault preset`, () => { - const skuPistonRingSetDefaultPreset = - skuPistonRingSetDefault().build(); - expect(skuPistonRingSetDefaultPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "piston-ring-set-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "piston-ring-set", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuPistonRingSetDefault preset when built for graphql`, () => { - const skuPistonRingSetDefaultPresetGraphql = - skuPistonRingSetDefault().buildGraphql(); - expect(skuPistonRingSetDefaultPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "piston-ring-set-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "piston-ring-set", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-piston-ring-set-default.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-piston-ring-set-default.ts deleted file mode 100644 index 72c40e1f3..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-piston-ring-set-default.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const defaultWarehouse = ChannelDraft.presets.sampleDataB2B - .defaultWarehouse() - .build(); - -const pistonRingSet01 = ProductVariantDraft.presets.sampleDataB2B - .pistonRingSet01() - .build(); - -const skuPistonRingSetDefault = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${pistonRingSet01.sku}-${defaultWarehouse.key}`) - .sku(pistonRingSet01.sku!) - .quantityOnStock(1000) - .supplyChannel( - KeyReferenceDraft.presets.channel().key(defaultWarehouse.key) - ); - -export default skuPistonRingSetDefault; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-piston-ring-set-eu-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-piston-ring-set-eu-warehouse.spec.ts new file mode 100644 index 000000000..f58aea160 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-piston-ring-set-eu-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuPistonRingSetEuWarehouse preset`, () => { + it(`should return a skuPistonRingSetEuWarehouse preset when built for rest`, () => { + const skuPistonRingSetEuWarehousePreset = InventoryEntryDraftRest.presets + .skuPistonRingSetEuWarehouse() + .build(); + expect(skuPistonRingSetEuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuPistonRingSetEuWarehouse preset when built for graphql`, () => { + const skuPistonRingSetEuWarehousePreset = InventoryEntryDraftGraphql.presets + .skuPistonRingSetEuWarehouse() + .build(); + expect(skuPistonRingSetEuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuPistonRingSetEuWarehouse preset when built for legacy rest`, () => { + const skuPistonRingSetEuWarehousePreset = InventoryEntryDraft.presets + .skuPistonRingSetEuWarehouse() + .buildRest(); + expect(skuPistonRingSetEuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuPistonRingSetEuWarehouse preset when built for legacy graphql`, () => { + const skuPistonRingSetEuWarehousePreset = InventoryEntryDraft.presets + .skuPistonRingSetEuWarehouse() + .buildGraphql(); + expect(skuPistonRingSetEuWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-piston-ring-set-eu-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-piston-ring-set-eu-warehouse.ts new file mode 100644 index 000000000..193f40a16 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-piston-ring-set-eu-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .euWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .pistonRingSet01() + .build(); + +const skuPistonRingSetEuWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('piston-ring-set-eu-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuPistonRingSetEuWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-piston-ring-set-eu.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-piston-ring-set-eu.spec.ts deleted file mode 100644 index cc3b261ac..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-piston-ring-set-eu.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuPistonRingSetEu from './sku-piston-ring-set-eu'; - -describe(`with skuPistonRingSetEu preset and eu-warehouse channel`, () => { - it(`should return a skuPistonRingSetEu preset`, () => { - const skuPistonRingSetEuPreset = - skuPistonRingSetEu().build(); - expect(skuPistonRingSetEuPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "piston-ring-set-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "piston-ring-set", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuPistonRingSetEu preset when built for graphql`, () => { - const skuPistonRingSetEuPresetGraphql = - skuPistonRingSetEu().buildGraphql(); - expect(skuPistonRingSetEuPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "piston-ring-set-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "piston-ring-set", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-piston-ring-set-eu.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-piston-ring-set-eu.ts deleted file mode 100644 index 5532b6950..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-piston-ring-set-eu.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const euWarehouse = ChannelDraft.presets.sampleDataB2B - .euWarehouse() - .build(); - -const pistonRingSet01 = ProductVariantDraft.presets.sampleDataB2B - .pistonRingSet01() - .build(); - -const skuPistonRingSetEu = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${pistonRingSet01.sku}-${euWarehouse.key}`) - .sku(pistonRingSet01.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(euWarehouse.key)); - -export default skuPistonRingSetEu; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-piston-ring-set-us-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-piston-ring-set-us-warehouse.spec.ts new file mode 100644 index 000000000..cbc45ea17 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-piston-ring-set-us-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuPistonRingSetUsWarehouse preset`, () => { + it(`should return a skuPistonRingSetUsWarehouse preset when built for rest`, () => { + const skuPistonRingSetUsWarehousePreset = InventoryEntryDraftRest.presets + .skuPistonRingSetUsWarehouse() + .build(); + expect(skuPistonRingSetUsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuPistonRingSetUsWarehouse preset when built for graphql`, () => { + const skuPistonRingSetUsWarehousePreset = InventoryEntryDraftGraphql.presets + .skuPistonRingSetUsWarehouse() + .build(); + expect(skuPistonRingSetUsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuPistonRingSetUsWarehouse preset when built for legacy rest`, () => { + const skuPistonRingSetUsWarehousePreset = InventoryEntryDraft.presets + .skuPistonRingSetUsWarehouse() + .buildRest(); + expect(skuPistonRingSetUsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuPistonRingSetUsWarehouse preset when built for legacy graphql`, () => { + const skuPistonRingSetUsWarehousePreset = InventoryEntryDraft.presets + .skuPistonRingSetUsWarehouse() + .buildGraphql(); + expect(skuPistonRingSetUsWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-piston-ring-set-us-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-piston-ring-set-us-warehouse.ts new file mode 100644 index 000000000..39163eec3 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-piston-ring-set-us-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .usWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .pistonRingSet01() + .build(); + +const skuPistonRingSetUsWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('piston-ring-set-us-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuPistonRingSetUsWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-piston-ring-set-us.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-piston-ring-set-us.spec.ts deleted file mode 100644 index 409c86567..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-piston-ring-set-us.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuPistonRingSetUs from './sku-piston-ring-set-us'; - -describe(`with skuPistonRingSetUs preset and us-warehouse channel`, () => { - it(`should return a skuPistonRingSetUs preset`, () => { - const skuPistonRingSetUsPreset = - skuPistonRingSetUs().build(); - expect(skuPistonRingSetUsPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "piston-ring-set-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "piston-ring-set", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuPistonRingSetUs preset when built for graphql`, () => { - const skuPistonRingSetUsPresetGraphql = - skuPistonRingSetUs().buildGraphql(); - expect(skuPistonRingSetUsPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "piston-ring-set-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "piston-ring-set", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-piston-ring-set-us.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-piston-ring-set-us.ts deleted file mode 100644 index 1754b7e47..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-piston-ring-set-us.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const usWarehouse = ChannelDraft.presets.sampleDataB2B - .usWarehouse() - .build(); - -const pistonRingSet01 = ProductVariantDraft.presets.sampleDataB2B - .pistonRingSet01() - .build(); - -const skuPistonRingSetUs = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${pistonRingSet01.sku}-${usWarehouse.key}`) - .sku(pistonRingSet01.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(usWarehouse.key)); - -export default skuPistonRingSetUs; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-pneumatic-tire-default-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-pneumatic-tire-default-warehouse.spec.ts new file mode 100644 index 000000000..55fd2398e --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-pneumatic-tire-default-warehouse.spec.ts @@ -0,0 +1,41 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuPneumaticTireDefaultWarehouse preset`, () => { + it(`should return a skuPneumaticTireDefaultWarehouse preset when built for rest`, () => { + const skuPneumaticTireDefaultWarehousePreset = + InventoryEntryDraftRest.presets + .skuPneumaticTireDefaultWarehouse() + .build(); + expect(skuPneumaticTireDefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuPneumaticTireDefaultWarehouse preset when built for graphql`, () => { + const skuPneumaticTireDefaultWarehousePreset = + InventoryEntryDraftGraphql.presets + .skuPneumaticTireDefaultWarehouse() + .build(); + expect(skuPneumaticTireDefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuPneumaticTireDefaultWarehouse preset when built for legacy rest`, () => { + const skuPneumaticTireDefaultWarehousePreset = InventoryEntryDraft.presets + .skuPneumaticTireDefaultWarehouse() + .buildRest(); + expect(skuPneumaticTireDefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuPneumaticTireDefaultWarehouse preset when built for legacy graphql`, () => { + const skuPneumaticTireDefaultWarehousePreset = InventoryEntryDraft.presets + .skuPneumaticTireDefaultWarehouse() + .buildGraphql(); + expect(skuPneumaticTireDefaultWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-pneumatic-tire-default-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-pneumatic-tire-default-warehouse.ts new file mode 100644 index 000000000..4bb8b7db0 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-pneumatic-tire-default-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .defaultWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .pneumaticTire01() + .build(); + +const skuPneumaticTireDefaultWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('pneumatic-tire-default-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuPneumaticTireDefaultWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-pneumatic-tire-default.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-pneumatic-tire-default.spec.ts deleted file mode 100644 index 187002a46..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-pneumatic-tire-default.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuPneumaticTireDefault from './sku-pneumatic-tire-default'; - -describe(`with skuPneumaticTireDefault preset and default-warehouse channel`, () => { - it(`should return a skuPneumaticTireDefault preset`, () => { - const skuPneumaticTireDefaultPreset = - skuPneumaticTireDefault().build(); - expect(skuPneumaticTireDefaultPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "pneumatic-tire-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "pneumatic-tire", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuPneumaticTireDefault preset when built for graphql`, () => { - const skuPneumaticTireDefaultPresetGraphql = - skuPneumaticTireDefault().buildGraphql(); - expect(skuPneumaticTireDefaultPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "pneumatic-tire-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "pneumatic-tire", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-pneumatic-tire-default.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-pneumatic-tire-default.ts deleted file mode 100644 index 76511db7f..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-pneumatic-tire-default.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const defaultWarehouse = ChannelDraft.presets.sampleDataB2B - .defaultWarehouse() - .build(); - -const pneumaticTire01 = ProductVariantDraft.presets.sampleDataB2B - .pneumaticTire01() - .build(); - -const skuPneumaticTireDefault = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${pneumaticTire01.sku}-${defaultWarehouse.key}`) - .sku(pneumaticTire01.sku!) - .quantityOnStock(1000) - .supplyChannel( - KeyReferenceDraft.presets.channel().key(defaultWarehouse.key) - ); - -export default skuPneumaticTireDefault; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-pneumatic-tire-eu-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-pneumatic-tire-eu-warehouse.spec.ts new file mode 100644 index 000000000..e3c612f91 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-pneumatic-tire-eu-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuPneumaticTireEuWarehouse preset`, () => { + it(`should return a skuPneumaticTireEuWarehouse preset when built for rest`, () => { + const skuPneumaticTireEuWarehousePreset = InventoryEntryDraftRest.presets + .skuPneumaticTireEuWarehouse() + .build(); + expect(skuPneumaticTireEuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuPneumaticTireEuWarehouse preset when built for graphql`, () => { + const skuPneumaticTireEuWarehousePreset = InventoryEntryDraftGraphql.presets + .skuPneumaticTireEuWarehouse() + .build(); + expect(skuPneumaticTireEuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuPneumaticTireEuWarehouse preset when built for legacy rest`, () => { + const skuPneumaticTireEuWarehousePreset = InventoryEntryDraft.presets + .skuPneumaticTireEuWarehouse() + .buildRest(); + expect(skuPneumaticTireEuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuPneumaticTireEuWarehouse preset when built for legacy graphql`, () => { + const skuPneumaticTireEuWarehousePreset = InventoryEntryDraft.presets + .skuPneumaticTireEuWarehouse() + .buildGraphql(); + expect(skuPneumaticTireEuWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-pneumatic-tire-eu-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-pneumatic-tire-eu-warehouse.ts new file mode 100644 index 000000000..e3f88a442 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-pneumatic-tire-eu-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .euWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .pneumaticTire01() + .build(); + +const skuPneumaticTireEuWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('pneumatic-tire-eu-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuPneumaticTireEuWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-pneumatic-tire-eu.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-pneumatic-tire-eu.spec.ts deleted file mode 100644 index 3e88c9325..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-pneumatic-tire-eu.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuPneumaticTireEu from './sku-pneumatic-tire-eu'; - -describe(`with skuPneumaticTireEu preset and eu-warehouse channel`, () => { - it(`should return a skuPneumaticTireEu preset`, () => { - const skuPneumaticTireEuPreset = - skuPneumaticTireEu().build(); - expect(skuPneumaticTireEuPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "pneumatic-tire-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "pneumatic-tire", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuPneumaticTireEu preset when built for graphql`, () => { - const skuPneumaticTireEuPresetGraphql = - skuPneumaticTireEu().buildGraphql(); - expect(skuPneumaticTireEuPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "pneumatic-tire-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "pneumatic-tire", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-pneumatic-tire-eu.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-pneumatic-tire-eu.ts deleted file mode 100644 index 68c2adc17..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-pneumatic-tire-eu.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const euWarehouse = ChannelDraft.presets.sampleDataB2B - .euWarehouse() - .build(); - -const pneumaticTire01 = ProductVariantDraft.presets.sampleDataB2B - .pneumaticTire01() - .build(); - -const skuPneumaticTireEu = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${pneumaticTire01.sku}-${euWarehouse.key}`) - .sku(pneumaticTire01.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(euWarehouse.key)); - -export default skuPneumaticTireEu; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-pneumatic-tire-us-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-pneumatic-tire-us-warehouse.spec.ts new file mode 100644 index 000000000..0140ddc22 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-pneumatic-tire-us-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuPneumaticTireUsWarehouse preset`, () => { + it(`should return a skuPneumaticTireUsWarehouse preset when built for rest`, () => { + const skuPneumaticTireUsWarehousePreset = InventoryEntryDraftRest.presets + .skuPneumaticTireUsWarehouse() + .build(); + expect(skuPneumaticTireUsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuPneumaticTireUsWarehouse preset when built for graphql`, () => { + const skuPneumaticTireUsWarehousePreset = InventoryEntryDraftGraphql.presets + .skuPneumaticTireUsWarehouse() + .build(); + expect(skuPneumaticTireUsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuPneumaticTireUsWarehouse preset when built for legacy rest`, () => { + const skuPneumaticTireUsWarehousePreset = InventoryEntryDraft.presets + .skuPneumaticTireUsWarehouse() + .buildRest(); + expect(skuPneumaticTireUsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuPneumaticTireUsWarehouse preset when built for legacy graphql`, () => { + const skuPneumaticTireUsWarehousePreset = InventoryEntryDraft.presets + .skuPneumaticTireUsWarehouse() + .buildGraphql(); + expect(skuPneumaticTireUsWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-pneumatic-tire-us-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-pneumatic-tire-us-warehouse.ts new file mode 100644 index 000000000..13b386c4b --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-pneumatic-tire-us-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .usWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .pneumaticTire01() + .build(); + +const skuPneumaticTireUsWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('pneumatic-tire-us-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuPneumaticTireUsWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-pneumatic-tire-us.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-pneumatic-tire-us.spec.ts deleted file mode 100644 index 01842db2b..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-pneumatic-tire-us.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuPneumaticTireUs from './sku-pneumatic-tire-us'; - -describe(`with skuPneumaticTireUs preset and us-warehouse channel`, () => { - it(`should return a skuPneumaticTireUs preset`, () => { - const skuPneumaticTireUsPreset = - skuPneumaticTireUs().build(); - expect(skuPneumaticTireUsPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "pneumatic-tire-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "pneumatic-tire", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuPneumaticTireUs preset when built for graphql`, () => { - const skuPneumaticTireUsPresetGraphql = - skuPneumaticTireUs().buildGraphql(); - expect(skuPneumaticTireUsPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "pneumatic-tire-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "pneumatic-tire", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-pneumatic-tire-us.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-pneumatic-tire-us.ts deleted file mode 100644 index e65e99958..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-pneumatic-tire-us.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const usWarehouse = ChannelDraft.presets.sampleDataB2B - .usWarehouse() - .build(); - -const pneumaticTire01 = ProductVariantDraft.presets.sampleDataB2B - .pneumaticTire01() - .build(); - -const skuPneumaticTireUs = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${pneumaticTire01.sku}-${usWarehouse.key}`) - .sku(pneumaticTire01.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(usWarehouse.key)); - -export default skuPneumaticTireUs; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-pp-234-wx-2015-default-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-pp-234-wx-2015-default-warehouse.spec.ts new file mode 100644 index 000000000..a07f5a9de --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-pp-234-wx-2015-default-warehouse.spec.ts @@ -0,0 +1,40 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuPp234Wx2015DefaultWarehouse preset`, () => { + it(`should return a skuPp234Wx2015DefaultWarehouse preset when built for rest`, () => { + const skuPp234Wx2015DefaultWarehousePreset = InventoryEntryDraftRest.presets + .skuPp234Wx2015DefaultWarehouse() + .build(); + expect(skuPp234Wx2015DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuPp234Wx2015DefaultWarehouse preset when built for graphql`, () => { + const skuPp234Wx2015DefaultWarehousePreset = + InventoryEntryDraftGraphql.presets + .skuPp234Wx2015DefaultWarehouse() + .build(); + expect(skuPp234Wx2015DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuPp234Wx2015DefaultWarehouse preset when built for legacy rest`, () => { + const skuPp234Wx2015DefaultWarehousePreset = InventoryEntryDraft.presets + .skuPp234Wx2015DefaultWarehouse() + .buildRest(); + expect(skuPp234Wx2015DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuPp234Wx2015DefaultWarehouse preset when built for legacy graphql`, () => { + const skuPp234Wx2015DefaultWarehousePreset = InventoryEntryDraft.presets + .skuPp234Wx2015DefaultWarehouse() + .buildGraphql(); + expect(skuPp234Wx2015DefaultWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-pp-234-wx-2015-default-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-pp-234-wx-2015-default-warehouse.ts new file mode 100644 index 000000000..418547137 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-pp-234-wx-2015-default-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .defaultWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .pp234Wx01() + .build(); + +const skuPp234Wx2015DefaultWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('pp234-wx-2015-default-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuPp234Wx2015DefaultWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-pp-234-wx-2015-eu-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-pp-234-wx-2015-eu-warehouse.spec.ts new file mode 100644 index 000000000..be3276a2d --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-pp-234-wx-2015-eu-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuPp234Wx2015EuWarehouse preset`, () => { + it(`should return a skuPp234Wx2015EuWarehouse preset when built for rest`, () => { + const skuPp234Wx2015EuWarehousePreset = InventoryEntryDraftRest.presets + .skuPp234Wx2015EuWarehouse() + .build(); + expect(skuPp234Wx2015EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuPp234Wx2015EuWarehouse preset when built for graphql`, () => { + const skuPp234Wx2015EuWarehousePreset = InventoryEntryDraftGraphql.presets + .skuPp234Wx2015EuWarehouse() + .build(); + expect(skuPp234Wx2015EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuPp234Wx2015EuWarehouse preset when built for legacy rest`, () => { + const skuPp234Wx2015EuWarehousePreset = InventoryEntryDraft.presets + .skuPp234Wx2015EuWarehouse() + .buildRest(); + expect(skuPp234Wx2015EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuPp234Wx2015EuWarehouse preset when built for legacy graphql`, () => { + const skuPp234Wx2015EuWarehousePreset = InventoryEntryDraft.presets + .skuPp234Wx2015EuWarehouse() + .buildGraphql(); + expect(skuPp234Wx2015EuWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-pp-234-wx-2015-eu-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-pp-234-wx-2015-eu-warehouse.ts new file mode 100644 index 000000000..975dc6a07 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-pp-234-wx-2015-eu-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .euWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .pp234Wx01() + .build(); + +const skuPp234Wx2015EuWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('pp234-wx-2015-eu-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuPp234Wx2015EuWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-pp-234-wx-2015-us-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-pp-234-wx-2015-us-warehouse.spec.ts new file mode 100644 index 000000000..830f7edb4 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-pp-234-wx-2015-us-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuPp234Wx2015UsWarehouse preset`, () => { + it(`should return a skuPp234Wx2015UsWarehouse preset when built for rest`, () => { + const skuPp234Wx2015UsWarehousePreset = InventoryEntryDraftRest.presets + .skuPp234Wx2015UsWarehouse() + .build(); + expect(skuPp234Wx2015UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuPp234Wx2015UsWarehouse preset when built for graphql`, () => { + const skuPp234Wx2015UsWarehousePreset = InventoryEntryDraftGraphql.presets + .skuPp234Wx2015UsWarehouse() + .build(); + expect(skuPp234Wx2015UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuPp234Wx2015UsWarehouse preset when built for legacy rest`, () => { + const skuPp234Wx2015UsWarehousePreset = InventoryEntryDraft.presets + .skuPp234Wx2015UsWarehouse() + .buildRest(); + expect(skuPp234Wx2015UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuPp234Wx2015UsWarehouse preset when built for legacy graphql`, () => { + const skuPp234Wx2015UsWarehousePreset = InventoryEntryDraft.presets + .skuPp234Wx2015UsWarehouse() + .buildGraphql(); + expect(skuPp234Wx2015UsWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-pp-234-wx-2015-us-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-pp-234-wx-2015-us-warehouse.ts new file mode 100644 index 000000000..e342f9e95 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-pp-234-wx-2015-us-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .usWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .pp234Wx01() + .build(); + +const skuPp234Wx2015UsWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('pp234-wx-2015-us-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuPp234Wx2015UsWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-pp-234-wx-2019-default-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-pp-234-wx-2019-default-warehouse.spec.ts new file mode 100644 index 000000000..31b93cbed --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-pp-234-wx-2019-default-warehouse.spec.ts @@ -0,0 +1,40 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuPp234Wx2019DefaultWarehouse preset`, () => { + it(`should return a skuPp234Wx2019DefaultWarehouse preset when built for rest`, () => { + const skuPp234Wx2019DefaultWarehousePreset = InventoryEntryDraftRest.presets + .skuPp234Wx2019DefaultWarehouse() + .build(); + expect(skuPp234Wx2019DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuPp234Wx2019DefaultWarehouse preset when built for graphql`, () => { + const skuPp234Wx2019DefaultWarehousePreset = + InventoryEntryDraftGraphql.presets + .skuPp234Wx2019DefaultWarehouse() + .build(); + expect(skuPp234Wx2019DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuPp234Wx2019DefaultWarehouse preset when built for legacy rest`, () => { + const skuPp234Wx2019DefaultWarehousePreset = InventoryEntryDraft.presets + .skuPp234Wx2019DefaultWarehouse() + .buildRest(); + expect(skuPp234Wx2019DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuPp234Wx2019DefaultWarehouse preset when built for legacy graphql`, () => { + const skuPp234Wx2019DefaultWarehousePreset = InventoryEntryDraft.presets + .skuPp234Wx2019DefaultWarehouse() + .buildGraphql(); + expect(skuPp234Wx2019DefaultWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-pp-234-wx-2019-default-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-pp-234-wx-2019-default-warehouse.ts new file mode 100644 index 000000000..6cc1128b9 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-pp-234-wx-2019-default-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .defaultWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .pp234Wx02() + .build(); + +const skuPp234Wx2019DefaultWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('pp234-wx-2019-default-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuPp234Wx2019DefaultWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-pp-234-wx-2019-eu-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-pp-234-wx-2019-eu-warehouse.spec.ts new file mode 100644 index 000000000..632d33002 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-pp-234-wx-2019-eu-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuPp234Wx2019EuWarehouse preset`, () => { + it(`should return a skuPp234Wx2019EuWarehouse preset when built for rest`, () => { + const skuPp234Wx2019EuWarehousePreset = InventoryEntryDraftRest.presets + .skuPp234Wx2019EuWarehouse() + .build(); + expect(skuPp234Wx2019EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuPp234Wx2019EuWarehouse preset when built for graphql`, () => { + const skuPp234Wx2019EuWarehousePreset = InventoryEntryDraftGraphql.presets + .skuPp234Wx2019EuWarehouse() + .build(); + expect(skuPp234Wx2019EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuPp234Wx2019EuWarehouse preset when built for legacy rest`, () => { + const skuPp234Wx2019EuWarehousePreset = InventoryEntryDraft.presets + .skuPp234Wx2019EuWarehouse() + .buildRest(); + expect(skuPp234Wx2019EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuPp234Wx2019EuWarehouse preset when built for legacy graphql`, () => { + const skuPp234Wx2019EuWarehousePreset = InventoryEntryDraft.presets + .skuPp234Wx2019EuWarehouse() + .buildGraphql(); + expect(skuPp234Wx2019EuWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-pp-234-wx-2019-eu-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-pp-234-wx-2019-eu-warehouse.ts new file mode 100644 index 000000000..56d50ffe8 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-pp-234-wx-2019-eu-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .euWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .pp234Wx02() + .build(); + +const skuPp234Wx2019EuWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('pp234-wx-2019-eu-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuPp234Wx2019EuWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-pp-234-wx-2019-us-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-pp-234-wx-2019-us-warehouse.spec.ts new file mode 100644 index 000000000..d933f5d69 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-pp-234-wx-2019-us-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuPp234Wx2019UsWarehouse preset`, () => { + it(`should return a skuPp234Wx2019UsWarehouse preset when built for rest`, () => { + const skuPp234Wx2019UsWarehousePreset = InventoryEntryDraftRest.presets + .skuPp234Wx2019UsWarehouse() + .build(); + expect(skuPp234Wx2019UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuPp234Wx2019UsWarehouse preset when built for graphql`, () => { + const skuPp234Wx2019UsWarehousePreset = InventoryEntryDraftGraphql.presets + .skuPp234Wx2019UsWarehouse() + .build(); + expect(skuPp234Wx2019UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuPp234Wx2019UsWarehouse preset when built for legacy rest`, () => { + const skuPp234Wx2019UsWarehousePreset = InventoryEntryDraft.presets + .skuPp234Wx2019UsWarehouse() + .buildRest(); + expect(skuPp234Wx2019UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuPp234Wx2019UsWarehouse preset when built for legacy graphql`, () => { + const skuPp234Wx2019UsWarehousePreset = InventoryEntryDraft.presets + .skuPp234Wx2019UsWarehouse() + .buildGraphql(); + expect(skuPp234Wx2019UsWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-pp-234-wx-2019-us-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-pp-234-wx-2019-us-warehouse.ts new file mode 100644 index 000000000..221f1fa75 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-pp-234-wx-2019-us-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .usWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .pp234Wx02() + .build(); + +const skuPp234Wx2019UsWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('pp234-wx-2019-us-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuPp234Wx2019UsWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-pp-234-wx-2023-default-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-pp-234-wx-2023-default-warehouse.spec.ts new file mode 100644 index 000000000..24f1673fe --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-pp-234-wx-2023-default-warehouse.spec.ts @@ -0,0 +1,40 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuPp234Wx2023DefaultWarehouse preset`, () => { + it(`should return a skuPp234Wx2023DefaultWarehouse preset when built for rest`, () => { + const skuPp234Wx2023DefaultWarehousePreset = InventoryEntryDraftRest.presets + .skuPp234Wx2023DefaultWarehouse() + .build(); + expect(skuPp234Wx2023DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuPp234Wx2023DefaultWarehouse preset when built for graphql`, () => { + const skuPp234Wx2023DefaultWarehousePreset = + InventoryEntryDraftGraphql.presets + .skuPp234Wx2023DefaultWarehouse() + .build(); + expect(skuPp234Wx2023DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuPp234Wx2023DefaultWarehouse preset when built for legacy rest`, () => { + const skuPp234Wx2023DefaultWarehousePreset = InventoryEntryDraft.presets + .skuPp234Wx2023DefaultWarehouse() + .buildRest(); + expect(skuPp234Wx2023DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuPp234Wx2023DefaultWarehouse preset when built for legacy graphql`, () => { + const skuPp234Wx2023DefaultWarehousePreset = InventoryEntryDraft.presets + .skuPp234Wx2023DefaultWarehouse() + .buildGraphql(); + expect(skuPp234Wx2023DefaultWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-pp-234-wx-2023-default-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-pp-234-wx-2023-default-warehouse.ts new file mode 100644 index 000000000..aa60bf5c8 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-pp-234-wx-2023-default-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .defaultWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .pp234Wx03() + .build(); + +const skuPp234Wx2023DefaultWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('pp234-wx-2023-default-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuPp234Wx2023DefaultWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-pp-234-wx-2023-eu-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-pp-234-wx-2023-eu-warehouse.spec.ts new file mode 100644 index 000000000..24ba7f475 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-pp-234-wx-2023-eu-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuPp234Wx2023EuWarehouse preset`, () => { + it(`should return a skuPp234Wx2023EuWarehouse preset when built for rest`, () => { + const skuPp234Wx2023EuWarehousePreset = InventoryEntryDraftRest.presets + .skuPp234Wx2023EuWarehouse() + .build(); + expect(skuPp234Wx2023EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuPp234Wx2023EuWarehouse preset when built for graphql`, () => { + const skuPp234Wx2023EuWarehousePreset = InventoryEntryDraftGraphql.presets + .skuPp234Wx2023EuWarehouse() + .build(); + expect(skuPp234Wx2023EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuPp234Wx2023EuWarehouse preset when built for legacy rest`, () => { + const skuPp234Wx2023EuWarehousePreset = InventoryEntryDraft.presets + .skuPp234Wx2023EuWarehouse() + .buildRest(); + expect(skuPp234Wx2023EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuPp234Wx2023EuWarehouse preset when built for legacy graphql`, () => { + const skuPp234Wx2023EuWarehousePreset = InventoryEntryDraft.presets + .skuPp234Wx2023EuWarehouse() + .buildGraphql(); + expect(skuPp234Wx2023EuWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-pp-234-wx-2023-eu-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-pp-234-wx-2023-eu-warehouse.ts new file mode 100644 index 000000000..987cf8edc --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-pp-234-wx-2023-eu-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .euWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .pp234Wx03() + .build(); + +const skuPp234Wx2023EuWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('pp234-wx-2023-eu-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuPp234Wx2023EuWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-pp-234-wx-2023-us-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-pp-234-wx-2023-us-warehouse.spec.ts new file mode 100644 index 000000000..e1fdb02fe --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-pp-234-wx-2023-us-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuPp234Wx2023UsWarehouse preset`, () => { + it(`should return a skuPp234Wx2023UsWarehouse preset when built for rest`, () => { + const skuPp234Wx2023UsWarehousePreset = InventoryEntryDraftRest.presets + .skuPp234Wx2023UsWarehouse() + .build(); + expect(skuPp234Wx2023UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuPp234Wx2023UsWarehouse preset when built for graphql`, () => { + const skuPp234Wx2023UsWarehousePreset = InventoryEntryDraftGraphql.presets + .skuPp234Wx2023UsWarehouse() + .build(); + expect(skuPp234Wx2023UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuPp234Wx2023UsWarehouse preset when built for legacy rest`, () => { + const skuPp234Wx2023UsWarehousePreset = InventoryEntryDraft.presets + .skuPp234Wx2023UsWarehouse() + .buildRest(); + expect(skuPp234Wx2023UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuPp234Wx2023UsWarehouse preset when built for legacy graphql`, () => { + const skuPp234Wx2023UsWarehousePreset = InventoryEntryDraft.presets + .skuPp234Wx2023UsWarehouse() + .buildGraphql(); + expect(skuPp234Wx2023UsWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-pp-234-wx-2023-us-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-pp-234-wx-2023-us-warehouse.ts new file mode 100644 index 000000000..18751eb63 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-pp-234-wx-2023-us-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .usWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .pp234Wx03() + .build(); + +const skuPp234Wx2023UsWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('pp234-wx-2023-us-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuPp234Wx2023UsWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-pp234-wx-2015-default.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-pp234-wx-2015-default.spec.ts deleted file mode 100644 index d6fb45f3d..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-pp234-wx-2015-default.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuPp234Wx2015Default from './sku-pp234-wx-2015-default'; - -describe(`with skuPp234Wx2015Default preset and default-warehouse channel`, () => { - it(`should return a skuPp234Wx2015Default preset`, () => { - const skuPp234Wx2015DefaultPreset = - skuPp234Wx2015Default().build(); - expect(skuPp234Wx2015DefaultPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "pp234-wx-2015-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "pp234-wx-2015", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuPp234Wx2015Default preset when built for graphql`, () => { - const skuPp234Wx2015DefaultPresetGraphql = - skuPp234Wx2015Default().buildGraphql(); - expect(skuPp234Wx2015DefaultPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "pp234-wx-2015-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "pp234-wx-2015", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-pp234-wx-2015-default.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-pp234-wx-2015-default.ts deleted file mode 100644 index bfaab415b..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-pp234-wx-2015-default.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const defaultWarehouse = ChannelDraft.presets.sampleDataB2B - .defaultWarehouse() - .build(); - -const pp234Wx01 = ProductVariantDraft.presets.sampleDataB2B - .pp234Wx01() - .build(); - -const skuPp234Wx2015Default = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${pp234Wx01.sku}-${defaultWarehouse.key}`) - .sku(pp234Wx01.sku!) - .quantityOnStock(1000) - .supplyChannel( - KeyReferenceDraft.presets.channel().key(defaultWarehouse.key) - ); - -export default skuPp234Wx2015Default; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-pp234-wx-2015-eu.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-pp234-wx-2015-eu.spec.ts deleted file mode 100644 index 1fbfb8aaf..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-pp234-wx-2015-eu.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuPp234Wx2015Eu from './sku-pp234-wx-2015-eu'; - -describe(`with skuPp234Wx2015Eu preset and eu-warehouse channel`, () => { - it(`should return a skuPp234Wx2015Eu preset`, () => { - const skuPp234Wx2015EuPreset = - skuPp234Wx2015Eu().build(); - expect(skuPp234Wx2015EuPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "pp234-wx-2015-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "pp234-wx-2015", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuPp234Wx2015Eu preset when built for graphql`, () => { - const skuPp234Wx2015EuPresetGraphql = - skuPp234Wx2015Eu().buildGraphql(); - expect(skuPp234Wx2015EuPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "pp234-wx-2015-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "pp234-wx-2015", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-pp234-wx-2015-eu.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-pp234-wx-2015-eu.ts deleted file mode 100644 index ee3e4b129..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-pp234-wx-2015-eu.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const euWarehouse = ChannelDraft.presets.sampleDataB2B - .euWarehouse() - .build(); - -const pp234Wx01 = ProductVariantDraft.presets.sampleDataB2B - .pp234Wx01() - .build(); - -const skuPp234Wx2015Eu = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${pp234Wx01.sku}-${euWarehouse.key}`) - .sku(pp234Wx01.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(euWarehouse.key)); - -export default skuPp234Wx2015Eu; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-pp234-wx-2015-us.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-pp234-wx-2015-us.spec.ts deleted file mode 100644 index cc448c85a..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-pp234-wx-2015-us.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuPp234Wx2015Us from './sku-pp234-wx-2015-us'; - -describe(`with skuPp234Wx2015Us preset and us-warehouse channel`, () => { - it(`should return a skuPp234Wx2015Us preset`, () => { - const skuPp234Wx2015UsPreset = - skuPp234Wx2015Us().build(); - expect(skuPp234Wx2015UsPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "pp234-wx-2015-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "pp234-wx-2015", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuPp234Wx2015Us preset when built for graphql`, () => { - const skuPp234Wx2015UsPresetGraphql = - skuPp234Wx2015Us().buildGraphql(); - expect(skuPp234Wx2015UsPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "pp234-wx-2015-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "pp234-wx-2015", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-pp234-wx-2015-us.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-pp234-wx-2015-us.ts deleted file mode 100644 index 21f4eb43f..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-pp234-wx-2015-us.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const usWarehouse = ChannelDraft.presets.sampleDataB2B - .usWarehouse() - .build(); - -const pp234Wx01 = ProductVariantDraft.presets.sampleDataB2B - .pp234Wx01() - .build(); - -const skuPp234Wx2015Us = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${pp234Wx01.sku}-${usWarehouse.key}`) - .sku(pp234Wx01.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(usWarehouse.key)); - -export default skuPp234Wx2015Us; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-pp234-wx-2019-default.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-pp234-wx-2019-default.spec.ts deleted file mode 100644 index c14e5eda2..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-pp234-wx-2019-default.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuPp234Wx2019Default from './sku-pp234-wx-2019-default'; - -describe(`with skuPp234Wx2019Default preset and default-warehouse channel`, () => { - it(`should return a skuPp234Wx2019Default preset`, () => { - const skuPp234Wx2019DefaultPreset = - skuPp234Wx2019Default().build(); - expect(skuPp234Wx2019DefaultPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "pp234-wx-2019-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "pp234-wx-2019", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuPp234Wx2019Default preset when built for graphql`, () => { - const skuPp234Wx2019DefaultPresetGraphql = - skuPp234Wx2019Default().buildGraphql(); - expect(skuPp234Wx2019DefaultPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "pp234-wx-2019-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "pp234-wx-2019", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-pp234-wx-2019-default.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-pp234-wx-2019-default.ts deleted file mode 100644 index 18f834f14..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-pp234-wx-2019-default.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const defaultWarehouse = ChannelDraft.presets.sampleDataB2B - .defaultWarehouse() - .build(); - -const pp234Wx02 = ProductVariantDraft.presets.sampleDataB2B - .pp234Wx02() - .build(); - -const skuPp234Wx2019Default = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${pp234Wx02.sku}-${defaultWarehouse.key}`) - .sku(pp234Wx02.sku!) - .quantityOnStock(1000) - .supplyChannel( - KeyReferenceDraft.presets.channel().key(defaultWarehouse.key) - ); - -export default skuPp234Wx2019Default; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-pp234-wx-2019-eu.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-pp234-wx-2019-eu.spec.ts deleted file mode 100644 index f1bd80b47..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-pp234-wx-2019-eu.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuPp234Wx2019Eu from './sku-pp234-wx-2019-eu'; - -describe(`with skuPp234Wx2019Eu preset and eu-warehouse channel`, () => { - it(`should return a skuPp234Wx2019Eu preset`, () => { - const skuPp234Wx2019EuPreset = - skuPp234Wx2019Eu().build(); - expect(skuPp234Wx2019EuPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "pp234-wx-2019-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "pp234-wx-2019", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuPp234Wx2019Eu preset when built for graphql`, () => { - const skuPp234Wx2019EuPresetGraphql = - skuPp234Wx2019Eu().buildGraphql(); - expect(skuPp234Wx2019EuPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "pp234-wx-2019-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "pp234-wx-2019", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-pp234-wx-2019-eu.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-pp234-wx-2019-eu.ts deleted file mode 100644 index 94f09aa44..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-pp234-wx-2019-eu.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const euWarehouse = ChannelDraft.presets.sampleDataB2B - .euWarehouse() - .build(); - -const pp234Wx02 = ProductVariantDraft.presets.sampleDataB2B - .pp234Wx02() - .build(); - -const skuPp234Wx2019Eu = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${pp234Wx02.sku}-${euWarehouse.key}`) - .sku(pp234Wx02.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(euWarehouse.key)); - -export default skuPp234Wx2019Eu; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-pp234-wx-2019-us.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-pp234-wx-2019-us.spec.ts deleted file mode 100644 index a792968e0..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-pp234-wx-2019-us.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuPp234Wx2019Us from './sku-pp234-wx-2019-us'; - -describe(`with skuPp234Wx2019Us preset and us-warehouse channel`, () => { - it(`should return a skuPp234Wx2019Us preset`, () => { - const skuPp234Wx2019UsPreset = - skuPp234Wx2019Us().build(); - expect(skuPp234Wx2019UsPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "pp234-wx-2019-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "pp234-wx-2019", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuPp234Wx2019Us preset when built for graphql`, () => { - const skuPp234Wx2019UsPresetGraphql = - skuPp234Wx2019Us().buildGraphql(); - expect(skuPp234Wx2019UsPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "pp234-wx-2019-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "pp234-wx-2019", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-pp234-wx-2019-us.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-pp234-wx-2019-us.ts deleted file mode 100644 index 7544909cf..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-pp234-wx-2019-us.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const usWarehouse = ChannelDraft.presets.sampleDataB2B - .usWarehouse() - .build(); - -const pp234Wx02 = ProductVariantDraft.presets.sampleDataB2B - .pp234Wx02() - .build(); - -const skuPp234Wx2019Us = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${pp234Wx02.sku}-${usWarehouse.key}`) - .sku(pp234Wx02.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(usWarehouse.key)); - -export default skuPp234Wx2019Us; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-pp234-wx-2023-default.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-pp234-wx-2023-default.spec.ts deleted file mode 100644 index 9bee250db..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-pp234-wx-2023-default.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuPp234Wx2023Default from './sku-pp234-wx-2023-default'; - -describe(`with skuPp234Wx2023Default preset and default-warehouse channel`, () => { - it(`should return a skuPp234Wx2023Default preset`, () => { - const skuPp234Wx2023DefaultPreset = - skuPp234Wx2023Default().build(); - expect(skuPp234Wx2023DefaultPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "pp234-wx-2023-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "pp234-wx-2023", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuPp234Wx2023Default preset when built for graphql`, () => { - const skuPp234Wx2023DefaultPresetGraphql = - skuPp234Wx2023Default().buildGraphql(); - expect(skuPp234Wx2023DefaultPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "pp234-wx-2023-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "pp234-wx-2023", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-pp234-wx-2023-default.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-pp234-wx-2023-default.ts deleted file mode 100644 index 643a46316..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-pp234-wx-2023-default.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const defaultWarehouse = ChannelDraft.presets.sampleDataB2B - .defaultWarehouse() - .build(); - -const pp234Wx03 = ProductVariantDraft.presets.sampleDataB2B - .pp234Wx03() - .build(); - -const skuPp234Wx2023Default = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${pp234Wx03.sku}-${defaultWarehouse.key}`) - .sku(pp234Wx03.sku!) - .quantityOnStock(1000) - .supplyChannel( - KeyReferenceDraft.presets.channel().key(defaultWarehouse.key) - ); - -export default skuPp234Wx2023Default; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-pp234-wx-2023-eu.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-pp234-wx-2023-eu.spec.ts deleted file mode 100644 index 89193147c..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-pp234-wx-2023-eu.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuPp234Wx2023Eu from './sku-pp234-wx-2023-eu'; - -describe(`with skuPp234Wx2023Eu preset and eu-warehouse channel`, () => { - it(`should return a skuPp234Wx2023Eu preset`, () => { - const skuPp234Wx2023EuPreset = - skuPp234Wx2023Eu().build(); - expect(skuPp234Wx2023EuPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "pp234-wx-2023-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "pp234-wx-2023", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuPp234Wx2023Eu preset when built for graphql`, () => { - const skuPp234Wx2023EuPresetGraphql = - skuPp234Wx2023Eu().buildGraphql(); - expect(skuPp234Wx2023EuPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "pp234-wx-2023-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "pp234-wx-2023", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-pp234-wx-2023-eu.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-pp234-wx-2023-eu.ts deleted file mode 100644 index 10f11d0ff..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-pp234-wx-2023-eu.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const euWarehouse = ChannelDraft.presets.sampleDataB2B - .euWarehouse() - .build(); - -const pp234Wx03 = ProductVariantDraft.presets.sampleDataB2B - .pp234Wx03() - .build(); - -const skuPp234Wx2023Eu = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${pp234Wx03.sku}-${euWarehouse.key}`) - .sku(pp234Wx03.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(euWarehouse.key)); - -export default skuPp234Wx2023Eu; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-pp234-wx-2023-us.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-pp234-wx-2023-us.spec.ts deleted file mode 100644 index 8f373b6a9..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-pp234-wx-2023-us.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuPp234Wx2023Us from './sku-pp234-wx-2023-us'; - -describe(`with skuPp234Wx2023Us preset and us-warehouse channel`, () => { - it(`should return a skuPp234Wx2023Us preset`, () => { - const skuPp234Wx2023UsPreset = - skuPp234Wx2023Us().build(); - expect(skuPp234Wx2023UsPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "pp234-wx-2023-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "pp234-wx-2023", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuPp234Wx2023Us preset when built for graphql`, () => { - const skuPp234Wx2023UsPresetGraphql = - skuPp234Wx2023Us().buildGraphql(); - expect(skuPp234Wx2023UsPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "pp234-wx-2023-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "pp234-wx-2023", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-pp234-wx-2023-us.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-pp234-wx-2023-us.ts deleted file mode 100644 index 6ddf06ae6..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-pp234-wx-2023-us.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const usWarehouse = ChannelDraft.presets.sampleDataB2B - .usWarehouse() - .build(); - -const pp234Wx03 = ProductVariantDraft.presets.sampleDataB2B - .pp234Wx03() - .build(); - -const skuPp234Wx2023Us = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${pp234Wx03.sku}-${usWarehouse.key}`) - .sku(pp234Wx03.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(usWarehouse.key)); - -export default skuPp234Wx2023Us; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-qq-567-yz-2015-default-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-qq-567-yz-2015-default-warehouse.spec.ts new file mode 100644 index 000000000..d7cb233ef --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-qq-567-yz-2015-default-warehouse.spec.ts @@ -0,0 +1,40 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuQq567Yz2015DefaultWarehouse preset`, () => { + it(`should return a skuQq567Yz2015DefaultWarehouse preset when built for rest`, () => { + const skuQq567Yz2015DefaultWarehousePreset = InventoryEntryDraftRest.presets + .skuQq567Yz2015DefaultWarehouse() + .build(); + expect(skuQq567Yz2015DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuQq567Yz2015DefaultWarehouse preset when built for graphql`, () => { + const skuQq567Yz2015DefaultWarehousePreset = + InventoryEntryDraftGraphql.presets + .skuQq567Yz2015DefaultWarehouse() + .build(); + expect(skuQq567Yz2015DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuQq567Yz2015DefaultWarehouse preset when built for legacy rest`, () => { + const skuQq567Yz2015DefaultWarehousePreset = InventoryEntryDraft.presets + .skuQq567Yz2015DefaultWarehouse() + .buildRest(); + expect(skuQq567Yz2015DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuQq567Yz2015DefaultWarehouse preset when built for legacy graphql`, () => { + const skuQq567Yz2015DefaultWarehousePreset = InventoryEntryDraft.presets + .skuQq567Yz2015DefaultWarehouse() + .buildGraphql(); + expect(skuQq567Yz2015DefaultWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-qq-567-yz-2015-default-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-qq-567-yz-2015-default-warehouse.ts new file mode 100644 index 000000000..371579e81 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-qq-567-yz-2015-default-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .defaultWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .qq567Yz01() + .build(); + +const skuQq567Yz2015DefaultWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('qq567-yz-2015-default-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuQq567Yz2015DefaultWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-qq-567-yz-2015-eu-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-qq-567-yz-2015-eu-warehouse.spec.ts new file mode 100644 index 000000000..63517dbf8 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-qq-567-yz-2015-eu-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuQq567Yz2015EuWarehouse preset`, () => { + it(`should return a skuQq567Yz2015EuWarehouse preset when built for rest`, () => { + const skuQq567Yz2015EuWarehousePreset = InventoryEntryDraftRest.presets + .skuQq567Yz2015EuWarehouse() + .build(); + expect(skuQq567Yz2015EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuQq567Yz2015EuWarehouse preset when built for graphql`, () => { + const skuQq567Yz2015EuWarehousePreset = InventoryEntryDraftGraphql.presets + .skuQq567Yz2015EuWarehouse() + .build(); + expect(skuQq567Yz2015EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuQq567Yz2015EuWarehouse preset when built for legacy rest`, () => { + const skuQq567Yz2015EuWarehousePreset = InventoryEntryDraft.presets + .skuQq567Yz2015EuWarehouse() + .buildRest(); + expect(skuQq567Yz2015EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuQq567Yz2015EuWarehouse preset when built for legacy graphql`, () => { + const skuQq567Yz2015EuWarehousePreset = InventoryEntryDraft.presets + .skuQq567Yz2015EuWarehouse() + .buildGraphql(); + expect(skuQq567Yz2015EuWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-qq-567-yz-2015-eu-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-qq-567-yz-2015-eu-warehouse.ts new file mode 100644 index 000000000..f710a3856 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-qq-567-yz-2015-eu-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .euWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .qq567Yz01() + .build(); + +const skuQq567Yz2015EuWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('qq567-yz-2015-eu-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuQq567Yz2015EuWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-qq-567-yz-2015-us-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-qq-567-yz-2015-us-warehouse.spec.ts new file mode 100644 index 000000000..13a30b015 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-qq-567-yz-2015-us-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuQq567Yz2015UsWarehouse preset`, () => { + it(`should return a skuQq567Yz2015UsWarehouse preset when built for rest`, () => { + const skuQq567Yz2015UsWarehousePreset = InventoryEntryDraftRest.presets + .skuQq567Yz2015UsWarehouse() + .build(); + expect(skuQq567Yz2015UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuQq567Yz2015UsWarehouse preset when built for graphql`, () => { + const skuQq567Yz2015UsWarehousePreset = InventoryEntryDraftGraphql.presets + .skuQq567Yz2015UsWarehouse() + .build(); + expect(skuQq567Yz2015UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuQq567Yz2015UsWarehouse preset when built for legacy rest`, () => { + const skuQq567Yz2015UsWarehousePreset = InventoryEntryDraft.presets + .skuQq567Yz2015UsWarehouse() + .buildRest(); + expect(skuQq567Yz2015UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuQq567Yz2015UsWarehouse preset when built for legacy graphql`, () => { + const skuQq567Yz2015UsWarehousePreset = InventoryEntryDraft.presets + .skuQq567Yz2015UsWarehouse() + .buildGraphql(); + expect(skuQq567Yz2015UsWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-qq-567-yz-2015-us-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-qq-567-yz-2015-us-warehouse.ts new file mode 100644 index 000000000..ec04ce687 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-qq-567-yz-2015-us-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .usWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .qq567Yz01() + .build(); + +const skuQq567Yz2015UsWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('qq567-yz-2015-us-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuQq567Yz2015UsWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-qq-567-yz-2019-default-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-qq-567-yz-2019-default-warehouse.spec.ts new file mode 100644 index 000000000..d65a6429f --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-qq-567-yz-2019-default-warehouse.spec.ts @@ -0,0 +1,40 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuQq567Yz2019DefaultWarehouse preset`, () => { + it(`should return a skuQq567Yz2019DefaultWarehouse preset when built for rest`, () => { + const skuQq567Yz2019DefaultWarehousePreset = InventoryEntryDraftRest.presets + .skuQq567Yz2019DefaultWarehouse() + .build(); + expect(skuQq567Yz2019DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuQq567Yz2019DefaultWarehouse preset when built for graphql`, () => { + const skuQq567Yz2019DefaultWarehousePreset = + InventoryEntryDraftGraphql.presets + .skuQq567Yz2019DefaultWarehouse() + .build(); + expect(skuQq567Yz2019DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuQq567Yz2019DefaultWarehouse preset when built for legacy rest`, () => { + const skuQq567Yz2019DefaultWarehousePreset = InventoryEntryDraft.presets + .skuQq567Yz2019DefaultWarehouse() + .buildRest(); + expect(skuQq567Yz2019DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuQq567Yz2019DefaultWarehouse preset when built for legacy graphql`, () => { + const skuQq567Yz2019DefaultWarehousePreset = InventoryEntryDraft.presets + .skuQq567Yz2019DefaultWarehouse() + .buildGraphql(); + expect(skuQq567Yz2019DefaultWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-qq-567-yz-2019-default-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-qq-567-yz-2019-default-warehouse.ts new file mode 100644 index 000000000..f0440b3e6 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-qq-567-yz-2019-default-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .defaultWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .qq567Yz02() + .build(); + +const skuQq567Yz2019DefaultWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('qq567-yz-2019-default-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuQq567Yz2019DefaultWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-qq-567-yz-2019-eu-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-qq-567-yz-2019-eu-warehouse.spec.ts new file mode 100644 index 000000000..1937c51ea --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-qq-567-yz-2019-eu-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuQq567Yz2019EuWarehouse preset`, () => { + it(`should return a skuQq567Yz2019EuWarehouse preset when built for rest`, () => { + const skuQq567Yz2019EuWarehousePreset = InventoryEntryDraftRest.presets + .skuQq567Yz2019EuWarehouse() + .build(); + expect(skuQq567Yz2019EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuQq567Yz2019EuWarehouse preset when built for graphql`, () => { + const skuQq567Yz2019EuWarehousePreset = InventoryEntryDraftGraphql.presets + .skuQq567Yz2019EuWarehouse() + .build(); + expect(skuQq567Yz2019EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuQq567Yz2019EuWarehouse preset when built for legacy rest`, () => { + const skuQq567Yz2019EuWarehousePreset = InventoryEntryDraft.presets + .skuQq567Yz2019EuWarehouse() + .buildRest(); + expect(skuQq567Yz2019EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuQq567Yz2019EuWarehouse preset when built for legacy graphql`, () => { + const skuQq567Yz2019EuWarehousePreset = InventoryEntryDraft.presets + .skuQq567Yz2019EuWarehouse() + .buildGraphql(); + expect(skuQq567Yz2019EuWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-qq-567-yz-2019-eu-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-qq-567-yz-2019-eu-warehouse.ts new file mode 100644 index 000000000..8a7974a9b --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-qq-567-yz-2019-eu-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .euWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .qq567Yz02() + .build(); + +const skuQq567Yz2019EuWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('qq567-yz-2019-eu-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuQq567Yz2019EuWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-qq-567-yz-2019-us-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-qq-567-yz-2019-us-warehouse.spec.ts new file mode 100644 index 000000000..6fc32f7fe --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-qq-567-yz-2019-us-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuQq567Yz2019UsWarehouse preset`, () => { + it(`should return a skuQq567Yz2019UsWarehouse preset when built for rest`, () => { + const skuQq567Yz2019UsWarehousePreset = InventoryEntryDraftRest.presets + .skuQq567Yz2019UsWarehouse() + .build(); + expect(skuQq567Yz2019UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuQq567Yz2019UsWarehouse preset when built for graphql`, () => { + const skuQq567Yz2019UsWarehousePreset = InventoryEntryDraftGraphql.presets + .skuQq567Yz2019UsWarehouse() + .build(); + expect(skuQq567Yz2019UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuQq567Yz2019UsWarehouse preset when built for legacy rest`, () => { + const skuQq567Yz2019UsWarehousePreset = InventoryEntryDraft.presets + .skuQq567Yz2019UsWarehouse() + .buildRest(); + expect(skuQq567Yz2019UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuQq567Yz2019UsWarehouse preset when built for legacy graphql`, () => { + const skuQq567Yz2019UsWarehousePreset = InventoryEntryDraft.presets + .skuQq567Yz2019UsWarehouse() + .buildGraphql(); + expect(skuQq567Yz2019UsWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-qq-567-yz-2019-us-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-qq-567-yz-2019-us-warehouse.ts new file mode 100644 index 000000000..ad7a933c4 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-qq-567-yz-2019-us-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .usWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .qq567Yz02() + .build(); + +const skuQq567Yz2019UsWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('qq567-yz-2019-us-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuQq567Yz2019UsWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-qq-567-yz-2023-default-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-qq-567-yz-2023-default-warehouse.spec.ts new file mode 100644 index 000000000..6163741be --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-qq-567-yz-2023-default-warehouse.spec.ts @@ -0,0 +1,40 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuQq567Yz2023DefaultWarehouse preset`, () => { + it(`should return a skuQq567Yz2023DefaultWarehouse preset when built for rest`, () => { + const skuQq567Yz2023DefaultWarehousePreset = InventoryEntryDraftRest.presets + .skuQq567Yz2023DefaultWarehouse() + .build(); + expect(skuQq567Yz2023DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuQq567Yz2023DefaultWarehouse preset when built for graphql`, () => { + const skuQq567Yz2023DefaultWarehousePreset = + InventoryEntryDraftGraphql.presets + .skuQq567Yz2023DefaultWarehouse() + .build(); + expect(skuQq567Yz2023DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuQq567Yz2023DefaultWarehouse preset when built for legacy rest`, () => { + const skuQq567Yz2023DefaultWarehousePreset = InventoryEntryDraft.presets + .skuQq567Yz2023DefaultWarehouse() + .buildRest(); + expect(skuQq567Yz2023DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuQq567Yz2023DefaultWarehouse preset when built for legacy graphql`, () => { + const skuQq567Yz2023DefaultWarehousePreset = InventoryEntryDraft.presets + .skuQq567Yz2023DefaultWarehouse() + .buildGraphql(); + expect(skuQq567Yz2023DefaultWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-qq-567-yz-2023-default-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-qq-567-yz-2023-default-warehouse.ts new file mode 100644 index 000000000..ff3e2aa38 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-qq-567-yz-2023-default-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .defaultWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .qq567Yz03() + .build(); + +const skuQq567Yz2023DefaultWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('qq567-yz-2023-default-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuQq567Yz2023DefaultWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-qq-567-yz-2023-eu-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-qq-567-yz-2023-eu-warehouse.spec.ts new file mode 100644 index 000000000..9c180f703 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-qq-567-yz-2023-eu-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuQq567Yz2023EuWarehouse preset`, () => { + it(`should return a skuQq567Yz2023EuWarehouse preset when built for rest`, () => { + const skuQq567Yz2023EuWarehousePreset = InventoryEntryDraftRest.presets + .skuQq567Yz2023EuWarehouse() + .build(); + expect(skuQq567Yz2023EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuQq567Yz2023EuWarehouse preset when built for graphql`, () => { + const skuQq567Yz2023EuWarehousePreset = InventoryEntryDraftGraphql.presets + .skuQq567Yz2023EuWarehouse() + .build(); + expect(skuQq567Yz2023EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuQq567Yz2023EuWarehouse preset when built for legacy rest`, () => { + const skuQq567Yz2023EuWarehousePreset = InventoryEntryDraft.presets + .skuQq567Yz2023EuWarehouse() + .buildRest(); + expect(skuQq567Yz2023EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuQq567Yz2023EuWarehouse preset when built for legacy graphql`, () => { + const skuQq567Yz2023EuWarehousePreset = InventoryEntryDraft.presets + .skuQq567Yz2023EuWarehouse() + .buildGraphql(); + expect(skuQq567Yz2023EuWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-qq-567-yz-2023-eu-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-qq-567-yz-2023-eu-warehouse.ts new file mode 100644 index 000000000..11044f2e0 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-qq-567-yz-2023-eu-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .euWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .qq567Yz03() + .build(); + +const skuQq567Yz2023EuWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('qq567-yz-2023-eu-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuQq567Yz2023EuWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-qq-567-yz-2023-us-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-qq-567-yz-2023-us-warehouse.spec.ts new file mode 100644 index 000000000..cf12c3be6 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-qq-567-yz-2023-us-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuQq567Yz2023UsWarehouse preset`, () => { + it(`should return a skuQq567Yz2023UsWarehouse preset when built for rest`, () => { + const skuQq567Yz2023UsWarehousePreset = InventoryEntryDraftRest.presets + .skuQq567Yz2023UsWarehouse() + .build(); + expect(skuQq567Yz2023UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuQq567Yz2023UsWarehouse preset when built for graphql`, () => { + const skuQq567Yz2023UsWarehousePreset = InventoryEntryDraftGraphql.presets + .skuQq567Yz2023UsWarehouse() + .build(); + expect(skuQq567Yz2023UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuQq567Yz2023UsWarehouse preset when built for legacy rest`, () => { + const skuQq567Yz2023UsWarehousePreset = InventoryEntryDraft.presets + .skuQq567Yz2023UsWarehouse() + .buildRest(); + expect(skuQq567Yz2023UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuQq567Yz2023UsWarehouse preset when built for legacy graphql`, () => { + const skuQq567Yz2023UsWarehousePreset = InventoryEntryDraft.presets + .skuQq567Yz2023UsWarehouse() + .buildGraphql(); + expect(skuQq567Yz2023UsWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-qq-567-yz-2023-us-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-qq-567-yz-2023-us-warehouse.ts new file mode 100644 index 000000000..3f36fa6a6 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-qq-567-yz-2023-us-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .usWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .qq567Yz03() + .build(); + +const skuQq567Yz2023UsWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('qq567-yz-2023-us-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuQq567Yz2023UsWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-qq567-yz-2015-default.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-qq567-yz-2015-default.spec.ts deleted file mode 100644 index 6745a9686..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-qq567-yz-2015-default.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuQq567Yz2015Default from './sku-qq567-yz-2015-default'; - -describe(`with skuQq567Yz2015Default preset and default-warehouse channel`, () => { - it(`should return a skuQq567Yz2015Default preset`, () => { - const skuQq567Yz2015DefaultPreset = - skuQq567Yz2015Default().build(); - expect(skuQq567Yz2015DefaultPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "qq567-yz-2015-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "qq567-yz-2015", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuQq567Yz2015Default preset when built for graphql`, () => { - const skuQq567Yz2015DefaultPresetGraphql = - skuQq567Yz2015Default().buildGraphql(); - expect(skuQq567Yz2015DefaultPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "qq567-yz-2015-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "qq567-yz-2015", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-qq567-yz-2015-default.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-qq567-yz-2015-default.ts deleted file mode 100644 index 84c72df21..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-qq567-yz-2015-default.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const defaultWarehouse = ChannelDraft.presets.sampleDataB2B - .defaultWarehouse() - .build(); - -const qq567Yz01 = ProductVariantDraft.presets.sampleDataB2B - .qq567Yz01() - .build(); - -const skuQq567Yz2015Default = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${qq567Yz01.sku}-${defaultWarehouse.key}`) - .sku(qq567Yz01.sku!) - .quantityOnStock(1000) - .supplyChannel( - KeyReferenceDraft.presets.channel().key(defaultWarehouse.key) - ); - -export default skuQq567Yz2015Default; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-qq567-yz-2015-eu.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-qq567-yz-2015-eu.spec.ts deleted file mode 100644 index f124a2fcd..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-qq567-yz-2015-eu.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuQq567Yz2015Eu from './sku-qq567-yz-2015-eu'; - -describe(`with skuQq567Yz2015Eu preset and eu-warehouse channel`, () => { - it(`should return a skuQq567Yz2015Eu preset`, () => { - const skuQq567Yz2015EuPreset = - skuQq567Yz2015Eu().build(); - expect(skuQq567Yz2015EuPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "qq567-yz-2015-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "qq567-yz-2015", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuQq567Yz2015Eu preset when built for graphql`, () => { - const skuQq567Yz2015EuPresetGraphql = - skuQq567Yz2015Eu().buildGraphql(); - expect(skuQq567Yz2015EuPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "qq567-yz-2015-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "qq567-yz-2015", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-qq567-yz-2015-eu.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-qq567-yz-2015-eu.ts deleted file mode 100644 index fb48e3034..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-qq567-yz-2015-eu.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const euWarehouse = ChannelDraft.presets.sampleDataB2B - .euWarehouse() - .build(); - -const qq567Yz01 = ProductVariantDraft.presets.sampleDataB2B - .qq567Yz01() - .build(); - -const skuQq567Yz2015Eu = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${qq567Yz01.sku}-${euWarehouse.key}`) - .sku(qq567Yz01.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(euWarehouse.key)); - -export default skuQq567Yz2015Eu; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-qq567-yz-2015-us.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-qq567-yz-2015-us.spec.ts deleted file mode 100644 index c75c2dae2..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-qq567-yz-2015-us.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuQq567Yz2015Us from './sku-qq567-yz-2015-us'; - -describe(`with skuQq567Yz2015Us preset and us-warehouse channel`, () => { - it(`should return a skuQq567Yz2015Us preset`, () => { - const skuQq567Yz2015UsPreset = - skuQq567Yz2015Us().build(); - expect(skuQq567Yz2015UsPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "qq567-yz-2015-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "qq567-yz-2015", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuQq567Yz2015Us preset when built for graphql`, () => { - const skuQq567Yz2015UsPresetGraphql = - skuQq567Yz2015Us().buildGraphql(); - expect(skuQq567Yz2015UsPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "qq567-yz-2015-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "qq567-yz-2015", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-qq567-yz-2015-us.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-qq567-yz-2015-us.ts deleted file mode 100644 index b0ced7769..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-qq567-yz-2015-us.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const usWarehouse = ChannelDraft.presets.sampleDataB2B - .usWarehouse() - .build(); - -const qq567Yz01 = ProductVariantDraft.presets.sampleDataB2B - .qq567Yz01() - .build(); - -const skuQq567Yz2015Us = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${qq567Yz01.sku}-${usWarehouse.key}`) - .sku(qq567Yz01.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(usWarehouse.key)); - -export default skuQq567Yz2015Us; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-qq567-yz-2019-default.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-qq567-yz-2019-default.spec.ts deleted file mode 100644 index 88791c46c..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-qq567-yz-2019-default.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuQq567Yz2019Default from './sku-qq567-yz-2019-default'; - -describe(`with skuQq567Yz2019Default preset and default-warehouse channel`, () => { - it(`should return a skuQq567Yz2019Default preset`, () => { - const skuQq567Yz2019DefaultPreset = - skuQq567Yz2019Default().build(); - expect(skuQq567Yz2019DefaultPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "qq567-yz-2019-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "qq567-yz-2019", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuQq567Yz2019Default preset when built for graphql`, () => { - const skuQq567Yz2019DefaultPresetGraphql = - skuQq567Yz2019Default().buildGraphql(); - expect(skuQq567Yz2019DefaultPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "qq567-yz-2019-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "qq567-yz-2019", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-qq567-yz-2019-default.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-qq567-yz-2019-default.ts deleted file mode 100644 index fa6bee7da..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-qq567-yz-2019-default.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const defaultWarehouse = ChannelDraft.presets.sampleDataB2B - .defaultWarehouse() - .build(); - -const qq567Yz02 = ProductVariantDraft.presets.sampleDataB2B - .qq567Yz02() - .build(); - -const skuQq567Yz2019Default = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${qq567Yz02.sku}-${defaultWarehouse.key}`) - .sku(qq567Yz02.sku!) - .quantityOnStock(1000) - .supplyChannel( - KeyReferenceDraft.presets.channel().key(defaultWarehouse.key) - ); - -export default skuQq567Yz2019Default; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-qq567-yz-2019-eu.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-qq567-yz-2019-eu.spec.ts deleted file mode 100644 index 5ccbb797f..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-qq567-yz-2019-eu.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuQq567Yz2019Eu from './sku-qq567-yz-2019-eu'; - -describe(`with skuQq567Yz2019Eu preset and eu-warehouse channel`, () => { - it(`should return a skuQq567Yz2019Eu preset`, () => { - const skuQq567Yz2019EuPreset = - skuQq567Yz2019Eu().build(); - expect(skuQq567Yz2019EuPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "qq567-yz-2019-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "qq567-yz-2019", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuQq567Yz2019Eu preset when built for graphql`, () => { - const skuQq567Yz2019EuPresetGraphql = - skuQq567Yz2019Eu().buildGraphql(); - expect(skuQq567Yz2019EuPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "qq567-yz-2019-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "qq567-yz-2019", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-qq567-yz-2019-eu.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-qq567-yz-2019-eu.ts deleted file mode 100644 index 9448de5f2..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-qq567-yz-2019-eu.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const euWarehouse = ChannelDraft.presets.sampleDataB2B - .euWarehouse() - .build(); - -const qq567Yz02 = ProductVariantDraft.presets.sampleDataB2B - .qq567Yz02() - .build(); - -const skuQq567Yz2019Eu = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${qq567Yz02.sku}-${euWarehouse.key}`) - .sku(qq567Yz02.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(euWarehouse.key)); - -export default skuQq567Yz2019Eu; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-qq567-yz-2019-us.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-qq567-yz-2019-us.spec.ts deleted file mode 100644 index 6c0c99f10..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-qq567-yz-2019-us.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuQq567Yz2019Us from './sku-qq567-yz-2019-us'; - -describe(`with skuQq567Yz2019Us preset and us-warehouse channel`, () => { - it(`should return a skuQq567Yz2019Us preset`, () => { - const skuQq567Yz2019UsPreset = - skuQq567Yz2019Us().build(); - expect(skuQq567Yz2019UsPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "qq567-yz-2019-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "qq567-yz-2019", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuQq567Yz2019Us preset when built for graphql`, () => { - const skuQq567Yz2019UsPresetGraphql = - skuQq567Yz2019Us().buildGraphql(); - expect(skuQq567Yz2019UsPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "qq567-yz-2019-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "qq567-yz-2019", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-qq567-yz-2019-us.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-qq567-yz-2019-us.ts deleted file mode 100644 index 9867b5b9f..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-qq567-yz-2019-us.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const usWarehouse = ChannelDraft.presets.sampleDataB2B - .usWarehouse() - .build(); - -const qq567Yz02 = ProductVariantDraft.presets.sampleDataB2B - .qq567Yz02() - .build(); - -const skuQq567Yz2019Us = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${qq567Yz02.sku}-${usWarehouse.key}`) - .sku(qq567Yz02.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(usWarehouse.key)); - -export default skuQq567Yz2019Us; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-qq567-yz-2023-default.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-qq567-yz-2023-default.spec.ts deleted file mode 100644 index 4c796de38..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-qq567-yz-2023-default.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuQq567Yz2023Default from './sku-qq567-yz-2023-default'; - -describe(`with skuQq567Yz2023Default preset and default-warehouse channel`, () => { - it(`should return a skuQq567Yz2023Default preset`, () => { - const skuQq567Yz2023DefaultPreset = - skuQq567Yz2023Default().build(); - expect(skuQq567Yz2023DefaultPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "qq567-yz-2023-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "qq567-yz-2023", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuQq567Yz2023Default preset when built for graphql`, () => { - const skuQq567Yz2023DefaultPresetGraphql = - skuQq567Yz2023Default().buildGraphql(); - expect(skuQq567Yz2023DefaultPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "qq567-yz-2023-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "qq567-yz-2023", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-qq567-yz-2023-default.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-qq567-yz-2023-default.ts deleted file mode 100644 index 039bd3c43..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-qq567-yz-2023-default.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const defaultWarehouse = ChannelDraft.presets.sampleDataB2B - .defaultWarehouse() - .build(); - -const qq567Yz03 = ProductVariantDraft.presets.sampleDataB2B - .qq567Yz03() - .build(); - -const skuQq567Yz2023Default = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${qq567Yz03.sku}-${defaultWarehouse.key}`) - .sku(qq567Yz03.sku!) - .quantityOnStock(1000) - .supplyChannel( - KeyReferenceDraft.presets.channel().key(defaultWarehouse.key) - ); - -export default skuQq567Yz2023Default; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-qq567-yz-2023-eu.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-qq567-yz-2023-eu.spec.ts deleted file mode 100644 index 52b84d8a0..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-qq567-yz-2023-eu.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuQq567Yz2023Eu from './sku-qq567-yz-2023-eu'; - -describe(`with skuQq567Yz2023Eu preset and eu-warehouse channel`, () => { - it(`should return a skuQq567Yz2023Eu preset`, () => { - const skuQq567Yz2023EuPreset = - skuQq567Yz2023Eu().build(); - expect(skuQq567Yz2023EuPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "qq567-yz-2023-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "qq567-yz-2023", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuQq567Yz2023Eu preset when built for graphql`, () => { - const skuQq567Yz2023EuPresetGraphql = - skuQq567Yz2023Eu().buildGraphql(); - expect(skuQq567Yz2023EuPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "qq567-yz-2023-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "qq567-yz-2023", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-qq567-yz-2023-eu.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-qq567-yz-2023-eu.ts deleted file mode 100644 index d978d6d32..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-qq567-yz-2023-eu.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const euWarehouse = ChannelDraft.presets.sampleDataB2B - .euWarehouse() - .build(); - -const qq567Yz03 = ProductVariantDraft.presets.sampleDataB2B - .qq567Yz03() - .build(); - -const skuQq567Yz2023Eu = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${qq567Yz03.sku}-${euWarehouse.key}`) - .sku(qq567Yz03.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(euWarehouse.key)); - -export default skuQq567Yz2023Eu; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-qq567-yz-2023-us.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-qq567-yz-2023-us.spec.ts deleted file mode 100644 index 96279ecaf..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-qq567-yz-2023-us.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuQq567Yz2023Us from './sku-qq567-yz-2023-us'; - -describe(`with skuQq567Yz2023Us preset and us-warehouse channel`, () => { - it(`should return a skuQq567Yz2023Us preset`, () => { - const skuQq567Yz2023UsPreset = - skuQq567Yz2023Us().build(); - expect(skuQq567Yz2023UsPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "qq567-yz-2023-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "qq567-yz-2023", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuQq567Yz2023Us preset when built for graphql`, () => { - const skuQq567Yz2023UsPresetGraphql = - skuQq567Yz2023Us().buildGraphql(); - expect(skuQq567Yz2023UsPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "qq567-yz-2023-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "qq567-yz-2023", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-qq567-yz-2023-us.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-qq567-yz-2023-us.ts deleted file mode 100644 index 7ead8885b..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-qq567-yz-2023-us.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const usWarehouse = ChannelDraft.presets.sampleDataB2B - .usWarehouse() - .build(); - -const qq567Yz03 = ProductVariantDraft.presets.sampleDataB2B - .qq567Yz03() - .build(); - -const skuQq567Yz2023Us = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${qq567Yz03.sku}-${usWarehouse.key}`) - .sku(qq567Yz03.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(usWarehouse.key)); - -export default skuQq567Yz2023Us; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-r-123-ts-2015-default-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-r-123-ts-2015-default-warehouse.spec.ts new file mode 100644 index 000000000..d88249916 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-r-123-ts-2015-default-warehouse.spec.ts @@ -0,0 +1,40 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuR123Ts2015DefaultWarehouse preset`, () => { + it(`should return a skuR123Ts2015DefaultWarehouse preset when built for rest`, () => { + const skuR123Ts2015DefaultWarehousePreset = InventoryEntryDraftRest.presets + .skuR123Ts2015DefaultWarehouse() + .build(); + expect(skuR123Ts2015DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuR123Ts2015DefaultWarehouse preset when built for graphql`, () => { + const skuR123Ts2015DefaultWarehousePreset = + InventoryEntryDraftGraphql.presets + .skuR123Ts2015DefaultWarehouse() + .build(); + expect(skuR123Ts2015DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuR123Ts2015DefaultWarehouse preset when built for legacy rest`, () => { + const skuR123Ts2015DefaultWarehousePreset = InventoryEntryDraft.presets + .skuR123Ts2015DefaultWarehouse() + .buildRest(); + expect(skuR123Ts2015DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuR123Ts2015DefaultWarehouse preset when built for legacy graphql`, () => { + const skuR123Ts2015DefaultWarehousePreset = InventoryEntryDraft.presets + .skuR123Ts2015DefaultWarehouse() + .buildGraphql(); + expect(skuR123Ts2015DefaultWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-r-123-ts-2015-default-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-r-123-ts-2015-default-warehouse.ts new file mode 100644 index 000000000..cb30d95ba --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-r-123-ts-2015-default-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .defaultWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .r123Ts01() + .build(); + +const skuR123Ts2015DefaultWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('r123-ts-2015-default-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuR123Ts2015DefaultWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-r-123-ts-2015-eu-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-r-123-ts-2015-eu-warehouse.spec.ts new file mode 100644 index 000000000..e539bf00b --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-r-123-ts-2015-eu-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuR123Ts2015EuWarehouse preset`, () => { + it(`should return a skuR123Ts2015EuWarehouse preset when built for rest`, () => { + const skuR123Ts2015EuWarehousePreset = InventoryEntryDraftRest.presets + .skuR123Ts2015EuWarehouse() + .build(); + expect(skuR123Ts2015EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuR123Ts2015EuWarehouse preset when built for graphql`, () => { + const skuR123Ts2015EuWarehousePreset = InventoryEntryDraftGraphql.presets + .skuR123Ts2015EuWarehouse() + .build(); + expect(skuR123Ts2015EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuR123Ts2015EuWarehouse preset when built for legacy rest`, () => { + const skuR123Ts2015EuWarehousePreset = InventoryEntryDraft.presets + .skuR123Ts2015EuWarehouse() + .buildRest(); + expect(skuR123Ts2015EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuR123Ts2015EuWarehouse preset when built for legacy graphql`, () => { + const skuR123Ts2015EuWarehousePreset = InventoryEntryDraft.presets + .skuR123Ts2015EuWarehouse() + .buildGraphql(); + expect(skuR123Ts2015EuWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-r-123-ts-2015-eu-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-r-123-ts-2015-eu-warehouse.ts new file mode 100644 index 000000000..33e6b5f3c --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-r-123-ts-2015-eu-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .euWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .r123Ts01() + .build(); + +const skuR123Ts2015EuWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('r123-ts-2015-eu-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuR123Ts2015EuWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-r-123-ts-2015-us-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-r-123-ts-2015-us-warehouse.spec.ts new file mode 100644 index 000000000..7b10896e8 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-r-123-ts-2015-us-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuR123Ts2015UsWarehouse preset`, () => { + it(`should return a skuR123Ts2015UsWarehouse preset when built for rest`, () => { + const skuR123Ts2015UsWarehousePreset = InventoryEntryDraftRest.presets + .skuR123Ts2015UsWarehouse() + .build(); + expect(skuR123Ts2015UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuR123Ts2015UsWarehouse preset when built for graphql`, () => { + const skuR123Ts2015UsWarehousePreset = InventoryEntryDraftGraphql.presets + .skuR123Ts2015UsWarehouse() + .build(); + expect(skuR123Ts2015UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuR123Ts2015UsWarehouse preset when built for legacy rest`, () => { + const skuR123Ts2015UsWarehousePreset = InventoryEntryDraft.presets + .skuR123Ts2015UsWarehouse() + .buildRest(); + expect(skuR123Ts2015UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuR123Ts2015UsWarehouse preset when built for legacy graphql`, () => { + const skuR123Ts2015UsWarehousePreset = InventoryEntryDraft.presets + .skuR123Ts2015UsWarehouse() + .buildGraphql(); + expect(skuR123Ts2015UsWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-r-123-ts-2015-us-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-r-123-ts-2015-us-warehouse.ts new file mode 100644 index 000000000..783d721f9 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-r-123-ts-2015-us-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .usWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .r123Ts01() + .build(); + +const skuR123Ts2015UsWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('r123-ts-2015-us-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuR123Ts2015UsWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-r-123-ts-2019-default-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-r-123-ts-2019-default-warehouse.spec.ts new file mode 100644 index 000000000..b4e6d269d --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-r-123-ts-2019-default-warehouse.spec.ts @@ -0,0 +1,40 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuR123Ts2019DefaultWarehouse preset`, () => { + it(`should return a skuR123Ts2019DefaultWarehouse preset when built for rest`, () => { + const skuR123Ts2019DefaultWarehousePreset = InventoryEntryDraftRest.presets + .skuR123Ts2019DefaultWarehouse() + .build(); + expect(skuR123Ts2019DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuR123Ts2019DefaultWarehouse preset when built for graphql`, () => { + const skuR123Ts2019DefaultWarehousePreset = + InventoryEntryDraftGraphql.presets + .skuR123Ts2019DefaultWarehouse() + .build(); + expect(skuR123Ts2019DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuR123Ts2019DefaultWarehouse preset when built for legacy rest`, () => { + const skuR123Ts2019DefaultWarehousePreset = InventoryEntryDraft.presets + .skuR123Ts2019DefaultWarehouse() + .buildRest(); + expect(skuR123Ts2019DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuR123Ts2019DefaultWarehouse preset when built for legacy graphql`, () => { + const skuR123Ts2019DefaultWarehousePreset = InventoryEntryDraft.presets + .skuR123Ts2019DefaultWarehouse() + .buildGraphql(); + expect(skuR123Ts2019DefaultWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-r-123-ts-2019-default-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-r-123-ts-2019-default-warehouse.ts new file mode 100644 index 000000000..56ce9c754 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-r-123-ts-2019-default-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .defaultWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .r123Ts02() + .build(); + +const skuR123Ts2019DefaultWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('r123-ts-2019-default-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuR123Ts2019DefaultWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-r-123-ts-2019-eu-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-r-123-ts-2019-eu-warehouse.spec.ts new file mode 100644 index 000000000..97284b074 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-r-123-ts-2019-eu-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuR123Ts2019EuWarehouse preset`, () => { + it(`should return a skuR123Ts2019EuWarehouse preset when built for rest`, () => { + const skuR123Ts2019EuWarehousePreset = InventoryEntryDraftRest.presets + .skuR123Ts2019EuWarehouse() + .build(); + expect(skuR123Ts2019EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuR123Ts2019EuWarehouse preset when built for graphql`, () => { + const skuR123Ts2019EuWarehousePreset = InventoryEntryDraftGraphql.presets + .skuR123Ts2019EuWarehouse() + .build(); + expect(skuR123Ts2019EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuR123Ts2019EuWarehouse preset when built for legacy rest`, () => { + const skuR123Ts2019EuWarehousePreset = InventoryEntryDraft.presets + .skuR123Ts2019EuWarehouse() + .buildRest(); + expect(skuR123Ts2019EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuR123Ts2019EuWarehouse preset when built for legacy graphql`, () => { + const skuR123Ts2019EuWarehousePreset = InventoryEntryDraft.presets + .skuR123Ts2019EuWarehouse() + .buildGraphql(); + expect(skuR123Ts2019EuWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-r-123-ts-2019-eu-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-r-123-ts-2019-eu-warehouse.ts new file mode 100644 index 000000000..5dbcb212d --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-r-123-ts-2019-eu-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .euWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .r123Ts02() + .build(); + +const skuR123Ts2019EuWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('r123-ts-2019-eu-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuR123Ts2019EuWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-r-123-ts-2019-us-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-r-123-ts-2019-us-warehouse.spec.ts new file mode 100644 index 000000000..4863d7b68 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-r-123-ts-2019-us-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuR123Ts2019UsWarehouse preset`, () => { + it(`should return a skuR123Ts2019UsWarehouse preset when built for rest`, () => { + const skuR123Ts2019UsWarehousePreset = InventoryEntryDraftRest.presets + .skuR123Ts2019UsWarehouse() + .build(); + expect(skuR123Ts2019UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuR123Ts2019UsWarehouse preset when built for graphql`, () => { + const skuR123Ts2019UsWarehousePreset = InventoryEntryDraftGraphql.presets + .skuR123Ts2019UsWarehouse() + .build(); + expect(skuR123Ts2019UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuR123Ts2019UsWarehouse preset when built for legacy rest`, () => { + const skuR123Ts2019UsWarehousePreset = InventoryEntryDraft.presets + .skuR123Ts2019UsWarehouse() + .buildRest(); + expect(skuR123Ts2019UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuR123Ts2019UsWarehouse preset when built for legacy graphql`, () => { + const skuR123Ts2019UsWarehousePreset = InventoryEntryDraft.presets + .skuR123Ts2019UsWarehouse() + .buildGraphql(); + expect(skuR123Ts2019UsWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-r-123-ts-2019-us-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-r-123-ts-2019-us-warehouse.ts new file mode 100644 index 000000000..5613e4205 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-r-123-ts-2019-us-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .usWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .r123Ts02() + .build(); + +const skuR123Ts2019UsWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('r123-ts-2019-us-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuR123Ts2019UsWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-r-123-ts-2023-default-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-r-123-ts-2023-default-warehouse.spec.ts new file mode 100644 index 000000000..e5270d402 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-r-123-ts-2023-default-warehouse.spec.ts @@ -0,0 +1,40 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuR123Ts2023DefaultWarehouse preset`, () => { + it(`should return a skuR123Ts2023DefaultWarehouse preset when built for rest`, () => { + const skuR123Ts2023DefaultWarehousePreset = InventoryEntryDraftRest.presets + .skuR123Ts2023DefaultWarehouse() + .build(); + expect(skuR123Ts2023DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuR123Ts2023DefaultWarehouse preset when built for graphql`, () => { + const skuR123Ts2023DefaultWarehousePreset = + InventoryEntryDraftGraphql.presets + .skuR123Ts2023DefaultWarehouse() + .build(); + expect(skuR123Ts2023DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuR123Ts2023DefaultWarehouse preset when built for legacy rest`, () => { + const skuR123Ts2023DefaultWarehousePreset = InventoryEntryDraft.presets + .skuR123Ts2023DefaultWarehouse() + .buildRest(); + expect(skuR123Ts2023DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuR123Ts2023DefaultWarehouse preset when built for legacy graphql`, () => { + const skuR123Ts2023DefaultWarehousePreset = InventoryEntryDraft.presets + .skuR123Ts2023DefaultWarehouse() + .buildGraphql(); + expect(skuR123Ts2023DefaultWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-r-123-ts-2023-default-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-r-123-ts-2023-default-warehouse.ts new file mode 100644 index 000000000..321271a5e --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-r-123-ts-2023-default-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .defaultWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .r123Ts03() + .build(); + +const skuR123Ts2023DefaultWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('r123-ts-2023-default-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuR123Ts2023DefaultWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-r-123-ts-2023-eu-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-r-123-ts-2023-eu-warehouse.spec.ts new file mode 100644 index 000000000..cdac2b2b1 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-r-123-ts-2023-eu-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuR123Ts2023EuWarehouse preset`, () => { + it(`should return a skuR123Ts2023EuWarehouse preset when built for rest`, () => { + const skuR123Ts2023EuWarehousePreset = InventoryEntryDraftRest.presets + .skuR123Ts2023EuWarehouse() + .build(); + expect(skuR123Ts2023EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuR123Ts2023EuWarehouse preset when built for graphql`, () => { + const skuR123Ts2023EuWarehousePreset = InventoryEntryDraftGraphql.presets + .skuR123Ts2023EuWarehouse() + .build(); + expect(skuR123Ts2023EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuR123Ts2023EuWarehouse preset when built for legacy rest`, () => { + const skuR123Ts2023EuWarehousePreset = InventoryEntryDraft.presets + .skuR123Ts2023EuWarehouse() + .buildRest(); + expect(skuR123Ts2023EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuR123Ts2023EuWarehouse preset when built for legacy graphql`, () => { + const skuR123Ts2023EuWarehousePreset = InventoryEntryDraft.presets + .skuR123Ts2023EuWarehouse() + .buildGraphql(); + expect(skuR123Ts2023EuWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-r-123-ts-2023-eu-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-r-123-ts-2023-eu-warehouse.ts new file mode 100644 index 000000000..a34ce8888 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-r-123-ts-2023-eu-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .euWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .r123Ts03() + .build(); + +const skuR123Ts2023EuWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('r123-ts-2023-eu-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuR123Ts2023EuWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-r-123-ts-2023-us-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-r-123-ts-2023-us-warehouse.spec.ts new file mode 100644 index 000000000..6975d39b1 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-r-123-ts-2023-us-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuR123Ts2023UsWarehouse preset`, () => { + it(`should return a skuR123Ts2023UsWarehouse preset when built for rest`, () => { + const skuR123Ts2023UsWarehousePreset = InventoryEntryDraftRest.presets + .skuR123Ts2023UsWarehouse() + .build(); + expect(skuR123Ts2023UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuR123Ts2023UsWarehouse preset when built for graphql`, () => { + const skuR123Ts2023UsWarehousePreset = InventoryEntryDraftGraphql.presets + .skuR123Ts2023UsWarehouse() + .build(); + expect(skuR123Ts2023UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuR123Ts2023UsWarehouse preset when built for legacy rest`, () => { + const skuR123Ts2023UsWarehousePreset = InventoryEntryDraft.presets + .skuR123Ts2023UsWarehouse() + .buildRest(); + expect(skuR123Ts2023UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuR123Ts2023UsWarehouse preset when built for legacy graphql`, () => { + const skuR123Ts2023UsWarehousePreset = InventoryEntryDraft.presets + .skuR123Ts2023UsWarehouse() + .buildGraphql(); + expect(skuR123Ts2023UsWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-r-123-ts-2023-us-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-r-123-ts-2023-us-warehouse.ts new file mode 100644 index 000000000..7045f44b1 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-r-123-ts-2023-us-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .usWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .r123Ts03() + .build(); + +const skuR123Ts2023UsWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('r123-ts-2023-us-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuR123Ts2023UsWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-r123-ts-2015-default.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-r123-ts-2015-default.spec.ts deleted file mode 100644 index 497257e25..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-r123-ts-2015-default.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuR123Ts2015Default from './sku-r123-ts-2015-default'; - -describe(`with skuR123Ts2015Default preset and default-warehouse channel`, () => { - it(`should return a skuR123Ts2015Default preset`, () => { - const skuR123Ts2015DefaultPreset = - skuR123Ts2015Default().build(); - expect(skuR123Ts2015DefaultPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "r123-ts-2015-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "r123-ts-2015", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuR123Ts2015Default preset when built for graphql`, () => { - const skuR123Ts2015DefaultPresetGraphql = - skuR123Ts2015Default().buildGraphql(); - expect(skuR123Ts2015DefaultPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "r123-ts-2015-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "r123-ts-2015", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-r123-ts-2015-default.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-r123-ts-2015-default.ts deleted file mode 100644 index 9b87e6b4c..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-r123-ts-2015-default.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const defaultWarehouse = ChannelDraft.presets.sampleDataB2B - .defaultWarehouse() - .build(); - -const r123Ts01 = ProductVariantDraft.presets.sampleDataB2B - .r123Ts01() - .build(); - -const skuR123Ts2015Default = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${r123Ts01.sku}-${defaultWarehouse.key}`) - .sku(r123Ts01.sku!) - .quantityOnStock(1000) - .supplyChannel( - KeyReferenceDraft.presets.channel().key(defaultWarehouse.key) - ); - -export default skuR123Ts2015Default; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-r123-ts-2015-eu.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-r123-ts-2015-eu.spec.ts deleted file mode 100644 index dfabd9b64..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-r123-ts-2015-eu.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuR123Ts2015Eu from './sku-r123-ts-2015-eu'; - -describe(`with skuR123Ts2015Eu preset and eu-warehouse channel`, () => { - it(`should return a skuR123Ts2015Eu preset`, () => { - const skuR123Ts2015EuPreset = - skuR123Ts2015Eu().build(); - expect(skuR123Ts2015EuPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "r123-ts-2015-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "r123-ts-2015", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuR123Ts2015Eu preset when built for graphql`, () => { - const skuR123Ts2015EuPresetGraphql = - skuR123Ts2015Eu().buildGraphql(); - expect(skuR123Ts2015EuPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "r123-ts-2015-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "r123-ts-2015", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-r123-ts-2015-eu.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-r123-ts-2015-eu.ts deleted file mode 100644 index dce64ff31..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-r123-ts-2015-eu.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const euWarehouse = ChannelDraft.presets.sampleDataB2B - .euWarehouse() - .build(); - -const r123Ts01 = ProductVariantDraft.presets.sampleDataB2B - .r123Ts01() - .build(); - -const skuR123Ts2015Eu = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${r123Ts01.sku}-${euWarehouse.key}`) - .sku(r123Ts01.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(euWarehouse.key)); - -export default skuR123Ts2015Eu; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-r123-ts-2015-us.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-r123-ts-2015-us.spec.ts deleted file mode 100644 index b3ec6cede..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-r123-ts-2015-us.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuR123Ts2015Us from './sku-r123-ts-2015-us'; - -describe(`with skuR123Ts2015Us preset and us-warehouse channel`, () => { - it(`should return a skuR123Ts2015Us preset`, () => { - const skuR123Ts2015UsPreset = - skuR123Ts2015Us().build(); - expect(skuR123Ts2015UsPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "r123-ts-2015-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "r123-ts-2015", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuR123Ts2015Us preset when built for graphql`, () => { - const skuR123Ts2015UsPresetGraphql = - skuR123Ts2015Us().buildGraphql(); - expect(skuR123Ts2015UsPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "r123-ts-2015-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "r123-ts-2015", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-r123-ts-2015-us.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-r123-ts-2015-us.ts deleted file mode 100644 index 07c1aa885..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-r123-ts-2015-us.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const usWarehouse = ChannelDraft.presets.sampleDataB2B - .usWarehouse() - .build(); - -const r123Ts01 = ProductVariantDraft.presets.sampleDataB2B - .r123Ts01() - .build(); - -const skuR123Ts2015Us = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${r123Ts01.sku}-${usWarehouse.key}`) - .sku(r123Ts01.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(usWarehouse.key)); - -export default skuR123Ts2015Us; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-r123-ts-2019-default.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-r123-ts-2019-default.spec.ts deleted file mode 100644 index 6939798a5..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-r123-ts-2019-default.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuR123Ts2019Default from './sku-r123-ts-2019-default'; - -describe(`with skuR123Ts2019Default preset and default-warehouse channel`, () => { - it(`should return a skuR123Ts2019Default preset`, () => { - const skuR123Ts2019DefaultPreset = - skuR123Ts2019Default().build(); - expect(skuR123Ts2019DefaultPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "r123-ts-2019-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "r123-ts-2019", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuR123Ts2019Default preset when built for graphql`, () => { - const skuR123Ts2019DefaultPresetGraphql = - skuR123Ts2019Default().buildGraphql(); - expect(skuR123Ts2019DefaultPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "r123-ts-2019-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "r123-ts-2019", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-r123-ts-2019-default.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-r123-ts-2019-default.ts deleted file mode 100644 index f11c5a151..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-r123-ts-2019-default.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const defaultWarehouse = ChannelDraft.presets.sampleDataB2B - .defaultWarehouse() - .build(); - -const r123Ts02 = ProductVariantDraft.presets.sampleDataB2B - .r123Ts02() - .build(); - -const skuR123Ts2019Default = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${r123Ts02.sku}-${defaultWarehouse.key}`) - .sku(r123Ts02.sku!) - .quantityOnStock(1000) - .supplyChannel( - KeyReferenceDraft.presets.channel().key(defaultWarehouse.key) - ); - -export default skuR123Ts2019Default; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-r123-ts-2019-eu.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-r123-ts-2019-eu.spec.ts deleted file mode 100644 index 28d01839d..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-r123-ts-2019-eu.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuR123Ts2019Eu from './sku-r123-ts-2019-eu'; - -describe(`with skuR123Ts2019Eu preset and eu-warehouse channel`, () => { - it(`should return a skuR123Ts2019Eu preset`, () => { - const skuR123Ts2019EuPreset = - skuR123Ts2019Eu().build(); - expect(skuR123Ts2019EuPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "r123-ts-2019-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "r123-ts-2019", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuR123Ts2019Eu preset when built for graphql`, () => { - const skuR123Ts2019EuPresetGraphql = - skuR123Ts2019Eu().buildGraphql(); - expect(skuR123Ts2019EuPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "r123-ts-2019-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "r123-ts-2019", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-r123-ts-2019-eu.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-r123-ts-2019-eu.ts deleted file mode 100644 index b75f1acc3..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-r123-ts-2019-eu.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const euWarehouse = ChannelDraft.presets.sampleDataB2B - .euWarehouse() - .build(); - -const r123Ts02 = ProductVariantDraft.presets.sampleDataB2B - .r123Ts02() - .build(); - -const skuR123Ts2019Eu = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${r123Ts02.sku}-${euWarehouse.key}`) - .sku(r123Ts02.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(euWarehouse.key)); - -export default skuR123Ts2019Eu; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-r123-ts-2019-us.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-r123-ts-2019-us.spec.ts deleted file mode 100644 index 7a6035a04..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-r123-ts-2019-us.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuR123Ts2019Us from './sku-r123-ts-2019-us'; - -describe(`with skuR123Ts2019Us preset and us-warehouse channel`, () => { - it(`should return a skuR123Ts2019Us preset`, () => { - const skuR123Ts2019UsPreset = - skuR123Ts2019Us().build(); - expect(skuR123Ts2019UsPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "r123-ts-2019-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "r123-ts-2019", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuR123Ts2019Us preset when built for graphql`, () => { - const skuR123Ts2019UsPresetGraphql = - skuR123Ts2019Us().buildGraphql(); - expect(skuR123Ts2019UsPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "r123-ts-2019-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "r123-ts-2019", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-r123-ts-2019-us.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-r123-ts-2019-us.ts deleted file mode 100644 index 9b6a16b45..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-r123-ts-2019-us.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const usWarehouse = ChannelDraft.presets.sampleDataB2B - .usWarehouse() - .build(); - -const r123Ts02 = ProductVariantDraft.presets.sampleDataB2B - .r123Ts02() - .build(); - -const skuR123Ts2019Us = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${r123Ts02.sku}-${usWarehouse.key}`) - .sku(r123Ts02.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(usWarehouse.key)); - -export default skuR123Ts2019Us; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-r123-ts-2023-default.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-r123-ts-2023-default.spec.ts deleted file mode 100644 index 6e035d970..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-r123-ts-2023-default.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuR123Ts2023Default from './sku-r123-ts-2023-default'; - -describe(`with skuR123Ts2023Default preset and default-warehouse channel`, () => { - it(`should return a skuR123Ts2023Default preset`, () => { - const skuR123Ts2023DefaultPreset = - skuR123Ts2023Default().build(); - expect(skuR123Ts2023DefaultPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "r123-ts-2023-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "r123-ts-2023", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuR123Ts2023Default preset when built for graphql`, () => { - const skuR123Ts2023DefaultPresetGraphql = - skuR123Ts2023Default().buildGraphql(); - expect(skuR123Ts2023DefaultPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "r123-ts-2023-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "r123-ts-2023", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-r123-ts-2023-default.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-r123-ts-2023-default.ts deleted file mode 100644 index fe42c59ba..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-r123-ts-2023-default.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const defaultWarehouse = ChannelDraft.presets.sampleDataB2B - .defaultWarehouse() - .build(); - -const r123Ts03 = ProductVariantDraft.presets.sampleDataB2B - .r123Ts03() - .build(); - -const skuR123Ts2023Default = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${r123Ts03.sku}-${defaultWarehouse.key}`) - .sku(r123Ts03.sku!) - .quantityOnStock(1000) - .supplyChannel( - KeyReferenceDraft.presets.channel().key(defaultWarehouse.key) - ); - -export default skuR123Ts2023Default; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-r123-ts-2023-eu.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-r123-ts-2023-eu.spec.ts deleted file mode 100644 index ffc78f564..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-r123-ts-2023-eu.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuR123Ts2023Eu from './sku-r123-ts-2023-eu'; - -describe(`with skuR123Ts2023Eu preset and eu-warehouse channel`, () => { - it(`should return a skuR123Ts2023Eu preset`, () => { - const skuR123Ts2023EuPreset = - skuR123Ts2023Eu().build(); - expect(skuR123Ts2023EuPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "r123-ts-2023-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "r123-ts-2023", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuR123Ts2023Eu preset when built for graphql`, () => { - const skuR123Ts2023EuPresetGraphql = - skuR123Ts2023Eu().buildGraphql(); - expect(skuR123Ts2023EuPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "r123-ts-2023-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "r123-ts-2023", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-r123-ts-2023-eu.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-r123-ts-2023-eu.ts deleted file mode 100644 index c4fd91f96..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-r123-ts-2023-eu.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const euWarehouse = ChannelDraft.presets.sampleDataB2B - .euWarehouse() - .build(); - -const r123Ts03 = ProductVariantDraft.presets.sampleDataB2B - .r123Ts03() - .build(); - -const skuR123Ts2023Eu = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${r123Ts03.sku}-${euWarehouse.key}`) - .sku(r123Ts03.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(euWarehouse.key)); - -export default skuR123Ts2023Eu; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-r123-ts-2023-us.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-r123-ts-2023-us.spec.ts deleted file mode 100644 index 32628ec2f..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-r123-ts-2023-us.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuR123Ts2023Us from './sku-r123-ts-2023-us'; - -describe(`with skuR123Ts2023Us preset and us-warehouse channel`, () => { - it(`should return a skuR123Ts2023Us preset`, () => { - const skuR123Ts2023UsPreset = - skuR123Ts2023Us().build(); - expect(skuR123Ts2023UsPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "r123-ts-2023-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "r123-ts-2023", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuR123Ts2023Us preset when built for graphql`, () => { - const skuR123Ts2023UsPresetGraphql = - skuR123Ts2023Us().buildGraphql(); - expect(skuR123Ts2023UsPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "r123-ts-2023-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "r123-ts-2023", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-r123-ts-2023-us.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-r123-ts-2023-us.ts deleted file mode 100644 index 456c32417..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-r123-ts-2023-us.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const usWarehouse = ChannelDraft.presets.sampleDataB2B - .usWarehouse() - .build(); - -const r123Ts03 = ProductVariantDraft.presets.sampleDataB2B - .r123Ts03() - .build(); - -const skuR123Ts2023Us = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${r123Ts03.sku}-${usWarehouse.key}`) - .sku(r123Ts03.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(usWarehouse.key)); - -export default skuR123Ts2023Us; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-rr-890-op-2015-default-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-rr-890-op-2015-default-warehouse.spec.ts new file mode 100644 index 000000000..49b6547e7 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-rr-890-op-2015-default-warehouse.spec.ts @@ -0,0 +1,40 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuRr890Op2015DefaultWarehouse preset`, () => { + it(`should return a skuRr890Op2015DefaultWarehouse preset when built for rest`, () => { + const skuRr890Op2015DefaultWarehousePreset = InventoryEntryDraftRest.presets + .skuRr890Op2015DefaultWarehouse() + .build(); + expect(skuRr890Op2015DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuRr890Op2015DefaultWarehouse preset when built for graphql`, () => { + const skuRr890Op2015DefaultWarehousePreset = + InventoryEntryDraftGraphql.presets + .skuRr890Op2015DefaultWarehouse() + .build(); + expect(skuRr890Op2015DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuRr890Op2015DefaultWarehouse preset when built for legacy rest`, () => { + const skuRr890Op2015DefaultWarehousePreset = InventoryEntryDraft.presets + .skuRr890Op2015DefaultWarehouse() + .buildRest(); + expect(skuRr890Op2015DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuRr890Op2015DefaultWarehouse preset when built for legacy graphql`, () => { + const skuRr890Op2015DefaultWarehousePreset = InventoryEntryDraft.presets + .skuRr890Op2015DefaultWarehouse() + .buildGraphql(); + expect(skuRr890Op2015DefaultWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-rr-890-op-2015-default-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-rr-890-op-2015-default-warehouse.ts new file mode 100644 index 000000000..0da1871b7 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-rr-890-op-2015-default-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .defaultWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .rr890Op01() + .build(); + +const skuRr890Op2015DefaultWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('rr890-op-2015-default-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuRr890Op2015DefaultWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-rr-890-op-2015-eu-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-rr-890-op-2015-eu-warehouse.spec.ts new file mode 100644 index 000000000..16f0f3c47 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-rr-890-op-2015-eu-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuRr890Op2015EuWarehouse preset`, () => { + it(`should return a skuRr890Op2015EuWarehouse preset when built for rest`, () => { + const skuRr890Op2015EuWarehousePreset = InventoryEntryDraftRest.presets + .skuRr890Op2015EuWarehouse() + .build(); + expect(skuRr890Op2015EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuRr890Op2015EuWarehouse preset when built for graphql`, () => { + const skuRr890Op2015EuWarehousePreset = InventoryEntryDraftGraphql.presets + .skuRr890Op2015EuWarehouse() + .build(); + expect(skuRr890Op2015EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuRr890Op2015EuWarehouse preset when built for legacy rest`, () => { + const skuRr890Op2015EuWarehousePreset = InventoryEntryDraft.presets + .skuRr890Op2015EuWarehouse() + .buildRest(); + expect(skuRr890Op2015EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuRr890Op2015EuWarehouse preset when built for legacy graphql`, () => { + const skuRr890Op2015EuWarehousePreset = InventoryEntryDraft.presets + .skuRr890Op2015EuWarehouse() + .buildGraphql(); + expect(skuRr890Op2015EuWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-rr-890-op-2015-eu-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-rr-890-op-2015-eu-warehouse.ts new file mode 100644 index 000000000..ac7975114 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-rr-890-op-2015-eu-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .euWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .rr890Op01() + .build(); + +const skuRr890Op2015EuWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('rr890-op-2015-eu-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuRr890Op2015EuWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-rr-890-op-2015-us-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-rr-890-op-2015-us-warehouse.spec.ts new file mode 100644 index 000000000..3391d7ec4 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-rr-890-op-2015-us-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuRr890Op2015UsWarehouse preset`, () => { + it(`should return a skuRr890Op2015UsWarehouse preset when built for rest`, () => { + const skuRr890Op2015UsWarehousePreset = InventoryEntryDraftRest.presets + .skuRr890Op2015UsWarehouse() + .build(); + expect(skuRr890Op2015UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuRr890Op2015UsWarehouse preset when built for graphql`, () => { + const skuRr890Op2015UsWarehousePreset = InventoryEntryDraftGraphql.presets + .skuRr890Op2015UsWarehouse() + .build(); + expect(skuRr890Op2015UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuRr890Op2015UsWarehouse preset when built for legacy rest`, () => { + const skuRr890Op2015UsWarehousePreset = InventoryEntryDraft.presets + .skuRr890Op2015UsWarehouse() + .buildRest(); + expect(skuRr890Op2015UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuRr890Op2015UsWarehouse preset when built for legacy graphql`, () => { + const skuRr890Op2015UsWarehousePreset = InventoryEntryDraft.presets + .skuRr890Op2015UsWarehouse() + .buildGraphql(); + expect(skuRr890Op2015UsWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-rr-890-op-2015-us-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-rr-890-op-2015-us-warehouse.ts new file mode 100644 index 000000000..2953af0cc --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-rr-890-op-2015-us-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .usWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .rr890Op01() + .build(); + +const skuRr890Op2015UsWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('rr890-op-2015-us-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuRr890Op2015UsWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-rr-890-op-2019-default-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-rr-890-op-2019-default-warehouse.spec.ts new file mode 100644 index 000000000..c82ad7258 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-rr-890-op-2019-default-warehouse.spec.ts @@ -0,0 +1,40 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuRr890Op2019DefaultWarehouse preset`, () => { + it(`should return a skuRr890Op2019DefaultWarehouse preset when built for rest`, () => { + const skuRr890Op2019DefaultWarehousePreset = InventoryEntryDraftRest.presets + .skuRr890Op2019DefaultWarehouse() + .build(); + expect(skuRr890Op2019DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuRr890Op2019DefaultWarehouse preset when built for graphql`, () => { + const skuRr890Op2019DefaultWarehousePreset = + InventoryEntryDraftGraphql.presets + .skuRr890Op2019DefaultWarehouse() + .build(); + expect(skuRr890Op2019DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuRr890Op2019DefaultWarehouse preset when built for legacy rest`, () => { + const skuRr890Op2019DefaultWarehousePreset = InventoryEntryDraft.presets + .skuRr890Op2019DefaultWarehouse() + .buildRest(); + expect(skuRr890Op2019DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuRr890Op2019DefaultWarehouse preset when built for legacy graphql`, () => { + const skuRr890Op2019DefaultWarehousePreset = InventoryEntryDraft.presets + .skuRr890Op2019DefaultWarehouse() + .buildGraphql(); + expect(skuRr890Op2019DefaultWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-rr-890-op-2019-default-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-rr-890-op-2019-default-warehouse.ts new file mode 100644 index 000000000..ac0fa7d9a --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-rr-890-op-2019-default-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .defaultWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .rr890Op02() + .build(); + +const skuRr890Op2019DefaultWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('rr890-op-2019-default-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuRr890Op2019DefaultWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-rr-890-op-2019-eu-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-rr-890-op-2019-eu-warehouse.spec.ts new file mode 100644 index 000000000..e13884615 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-rr-890-op-2019-eu-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuRr890Op2019EuWarehouse preset`, () => { + it(`should return a skuRr890Op2019EuWarehouse preset when built for rest`, () => { + const skuRr890Op2019EuWarehousePreset = InventoryEntryDraftRest.presets + .skuRr890Op2019EuWarehouse() + .build(); + expect(skuRr890Op2019EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuRr890Op2019EuWarehouse preset when built for graphql`, () => { + const skuRr890Op2019EuWarehousePreset = InventoryEntryDraftGraphql.presets + .skuRr890Op2019EuWarehouse() + .build(); + expect(skuRr890Op2019EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuRr890Op2019EuWarehouse preset when built for legacy rest`, () => { + const skuRr890Op2019EuWarehousePreset = InventoryEntryDraft.presets + .skuRr890Op2019EuWarehouse() + .buildRest(); + expect(skuRr890Op2019EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuRr890Op2019EuWarehouse preset when built for legacy graphql`, () => { + const skuRr890Op2019EuWarehousePreset = InventoryEntryDraft.presets + .skuRr890Op2019EuWarehouse() + .buildGraphql(); + expect(skuRr890Op2019EuWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-rr-890-op-2019-eu-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-rr-890-op-2019-eu-warehouse.ts new file mode 100644 index 000000000..e02e974a3 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-rr-890-op-2019-eu-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .euWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .rr890Op02() + .build(); + +const skuRr890Op2019EuWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('rr890-op-2019-eu-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuRr890Op2019EuWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-rr-890-op-2019-us-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-rr-890-op-2019-us-warehouse.spec.ts new file mode 100644 index 000000000..3c2457c82 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-rr-890-op-2019-us-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuRr890Op2019UsWarehouse preset`, () => { + it(`should return a skuRr890Op2019UsWarehouse preset when built for rest`, () => { + const skuRr890Op2019UsWarehousePreset = InventoryEntryDraftRest.presets + .skuRr890Op2019UsWarehouse() + .build(); + expect(skuRr890Op2019UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuRr890Op2019UsWarehouse preset when built for graphql`, () => { + const skuRr890Op2019UsWarehousePreset = InventoryEntryDraftGraphql.presets + .skuRr890Op2019UsWarehouse() + .build(); + expect(skuRr890Op2019UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuRr890Op2019UsWarehouse preset when built for legacy rest`, () => { + const skuRr890Op2019UsWarehousePreset = InventoryEntryDraft.presets + .skuRr890Op2019UsWarehouse() + .buildRest(); + expect(skuRr890Op2019UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuRr890Op2019UsWarehouse preset when built for legacy graphql`, () => { + const skuRr890Op2019UsWarehousePreset = InventoryEntryDraft.presets + .skuRr890Op2019UsWarehouse() + .buildGraphql(); + expect(skuRr890Op2019UsWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-rr-890-op-2019-us-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-rr-890-op-2019-us-warehouse.ts new file mode 100644 index 000000000..59ca7f9c4 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-rr-890-op-2019-us-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .usWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .rr890Op02() + .build(); + +const skuRr890Op2019UsWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('rr890-op-2019-us-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuRr890Op2019UsWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-rr-890-op-2023-default-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-rr-890-op-2023-default-warehouse.spec.ts new file mode 100644 index 000000000..4c005f776 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-rr-890-op-2023-default-warehouse.spec.ts @@ -0,0 +1,40 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuRr890Op2023DefaultWarehouse preset`, () => { + it(`should return a skuRr890Op2023DefaultWarehouse preset when built for rest`, () => { + const skuRr890Op2023DefaultWarehousePreset = InventoryEntryDraftRest.presets + .skuRr890Op2023DefaultWarehouse() + .build(); + expect(skuRr890Op2023DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuRr890Op2023DefaultWarehouse preset when built for graphql`, () => { + const skuRr890Op2023DefaultWarehousePreset = + InventoryEntryDraftGraphql.presets + .skuRr890Op2023DefaultWarehouse() + .build(); + expect(skuRr890Op2023DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuRr890Op2023DefaultWarehouse preset when built for legacy rest`, () => { + const skuRr890Op2023DefaultWarehousePreset = InventoryEntryDraft.presets + .skuRr890Op2023DefaultWarehouse() + .buildRest(); + expect(skuRr890Op2023DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuRr890Op2023DefaultWarehouse preset when built for legacy graphql`, () => { + const skuRr890Op2023DefaultWarehousePreset = InventoryEntryDraft.presets + .skuRr890Op2023DefaultWarehouse() + .buildGraphql(); + expect(skuRr890Op2023DefaultWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-rr-890-op-2023-default-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-rr-890-op-2023-default-warehouse.ts new file mode 100644 index 000000000..5e4f36f53 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-rr-890-op-2023-default-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .defaultWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .rr890Op03() + .build(); + +const skuRr890Op2023DefaultWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('rr890-op-2023-default-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuRr890Op2023DefaultWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-rr-890-op-2023-eu-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-rr-890-op-2023-eu-warehouse.spec.ts new file mode 100644 index 000000000..46bbcb09b --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-rr-890-op-2023-eu-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuRr890Op2023EuWarehouse preset`, () => { + it(`should return a skuRr890Op2023EuWarehouse preset when built for rest`, () => { + const skuRr890Op2023EuWarehousePreset = InventoryEntryDraftRest.presets + .skuRr890Op2023EuWarehouse() + .build(); + expect(skuRr890Op2023EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuRr890Op2023EuWarehouse preset when built for graphql`, () => { + const skuRr890Op2023EuWarehousePreset = InventoryEntryDraftGraphql.presets + .skuRr890Op2023EuWarehouse() + .build(); + expect(skuRr890Op2023EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuRr890Op2023EuWarehouse preset when built for legacy rest`, () => { + const skuRr890Op2023EuWarehousePreset = InventoryEntryDraft.presets + .skuRr890Op2023EuWarehouse() + .buildRest(); + expect(skuRr890Op2023EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuRr890Op2023EuWarehouse preset when built for legacy graphql`, () => { + const skuRr890Op2023EuWarehousePreset = InventoryEntryDraft.presets + .skuRr890Op2023EuWarehouse() + .buildGraphql(); + expect(skuRr890Op2023EuWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-rr-890-op-2023-eu-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-rr-890-op-2023-eu-warehouse.ts new file mode 100644 index 000000000..79808e735 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-rr-890-op-2023-eu-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .euWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .rr890Op03() + .build(); + +const skuRr890Op2023EuWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('rr890-op-2023-eu-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuRr890Op2023EuWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-rr-890-op-2023-us-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-rr-890-op-2023-us-warehouse.spec.ts new file mode 100644 index 000000000..f6a45e216 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-rr-890-op-2023-us-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuRr890Op2023UsWarehouse preset`, () => { + it(`should return a skuRr890Op2023UsWarehouse preset when built for rest`, () => { + const skuRr890Op2023UsWarehousePreset = InventoryEntryDraftRest.presets + .skuRr890Op2023UsWarehouse() + .build(); + expect(skuRr890Op2023UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuRr890Op2023UsWarehouse preset when built for graphql`, () => { + const skuRr890Op2023UsWarehousePreset = InventoryEntryDraftGraphql.presets + .skuRr890Op2023UsWarehouse() + .build(); + expect(skuRr890Op2023UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuRr890Op2023UsWarehouse preset when built for legacy rest`, () => { + const skuRr890Op2023UsWarehousePreset = InventoryEntryDraft.presets + .skuRr890Op2023UsWarehouse() + .buildRest(); + expect(skuRr890Op2023UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuRr890Op2023UsWarehouse preset when built for legacy graphql`, () => { + const skuRr890Op2023UsWarehousePreset = InventoryEntryDraft.presets + .skuRr890Op2023UsWarehouse() + .buildGraphql(); + expect(skuRr890Op2023UsWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-rr-890-op-2023-us-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-rr-890-op-2023-us-warehouse.ts new file mode 100644 index 000000000..c189b5319 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-rr-890-op-2023-us-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .usWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .rr890Op03() + .build(); + +const skuRr890Op2023UsWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('rr890-op-2023-us-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuRr890Op2023UsWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-rr890-op-2015-default.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-rr890-op-2015-default.spec.ts deleted file mode 100644 index 7362d8146..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-rr890-op-2015-default.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuRr890Op2015Default from './sku-rr890-op-2015-default'; - -describe(`with skuRr890Op2015Default preset and default-warehouse channel`, () => { - it(`should return a skuRr890Op2015Default preset`, () => { - const skuRr890Op2015DefaultPreset = - skuRr890Op2015Default().build(); - expect(skuRr890Op2015DefaultPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "rr890-op-2015-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "rr890-op-2015", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuRr890Op2015Default preset when built for graphql`, () => { - const skuRr890Op2015DefaultPresetGraphql = - skuRr890Op2015Default().buildGraphql(); - expect(skuRr890Op2015DefaultPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "rr890-op-2015-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "rr890-op-2015", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-rr890-op-2015-default.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-rr890-op-2015-default.ts deleted file mode 100644 index dec10dbb2..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-rr890-op-2015-default.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const defaultWarehouse = ChannelDraft.presets.sampleDataB2B - .defaultWarehouse() - .build(); - -const rr890Op01 = ProductVariantDraft.presets.sampleDataB2B - .rr890Op01() - .build(); - -const skuRr890Op2015Default = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${rr890Op01.sku}-${defaultWarehouse.key}`) - .sku(rr890Op01.sku!) - .quantityOnStock(1000) - .supplyChannel( - KeyReferenceDraft.presets.channel().key(defaultWarehouse.key) - ); - -export default skuRr890Op2015Default; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-rr890-op-2015-eu.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-rr890-op-2015-eu.spec.ts deleted file mode 100644 index d9645fe5c..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-rr890-op-2015-eu.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuRr890Op2015Eu from './sku-rr890-op-2015-eu'; - -describe(`with skuRr890Op2015Eu preset and eu-warehouse channel`, () => { - it(`should return a skuRr890Op2015Eu preset`, () => { - const skuRr890Op2015EuPreset = - skuRr890Op2015Eu().build(); - expect(skuRr890Op2015EuPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "rr890-op-2015-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "rr890-op-2015", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuRr890Op2015Eu preset when built for graphql`, () => { - const skuRr890Op2015EuPresetGraphql = - skuRr890Op2015Eu().buildGraphql(); - expect(skuRr890Op2015EuPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "rr890-op-2015-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "rr890-op-2015", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-rr890-op-2015-eu.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-rr890-op-2015-eu.ts deleted file mode 100644 index bcde106b1..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-rr890-op-2015-eu.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const euWarehouse = ChannelDraft.presets.sampleDataB2B - .euWarehouse() - .build(); - -const rr890Op01 = ProductVariantDraft.presets.sampleDataB2B - .rr890Op01() - .build(); - -const skuRr890Op2015Eu = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${rr890Op01.sku}-${euWarehouse.key}`) - .sku(rr890Op01.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(euWarehouse.key)); - -export default skuRr890Op2015Eu; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-rr890-op-2015-us.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-rr890-op-2015-us.spec.ts deleted file mode 100644 index 91fbcf02a..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-rr890-op-2015-us.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuRr890Op2015Us from './sku-rr890-op-2015-us'; - -describe(`with skuRr890Op2015Us preset and us-warehouse channel`, () => { - it(`should return a skuRr890Op2015Us preset`, () => { - const skuRr890Op2015UsPreset = - skuRr890Op2015Us().build(); - expect(skuRr890Op2015UsPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "rr890-op-2015-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "rr890-op-2015", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuRr890Op2015Us preset when built for graphql`, () => { - const skuRr890Op2015UsPresetGraphql = - skuRr890Op2015Us().buildGraphql(); - expect(skuRr890Op2015UsPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "rr890-op-2015-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "rr890-op-2015", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-rr890-op-2015-us.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-rr890-op-2015-us.ts deleted file mode 100644 index 9cba558e1..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-rr890-op-2015-us.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const usWarehouse = ChannelDraft.presets.sampleDataB2B - .usWarehouse() - .build(); - -const rr890Op01 = ProductVariantDraft.presets.sampleDataB2B - .rr890Op01() - .build(); - -const skuRr890Op2015Us = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${rr890Op01.sku}-${usWarehouse.key}`) - .sku(rr890Op01.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(usWarehouse.key)); - -export default skuRr890Op2015Us; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-rr890-op-2019-default.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-rr890-op-2019-default.spec.ts deleted file mode 100644 index 72cc9bbce..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-rr890-op-2019-default.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuRr890Op2019Default from './sku-rr890-op-2019-default'; - -describe(`with skuRr890Op2019Default preset and default-warehouse channel`, () => { - it(`should return a skuRr890Op2019Default preset`, () => { - const skuRr890Op2019DefaultPreset = - skuRr890Op2019Default().build(); - expect(skuRr890Op2019DefaultPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "rr890-op-2019-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "rr890-op-2019", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuRr890Op2019Default preset when built for graphql`, () => { - const skuRr890Op2019DefaultPresetGraphql = - skuRr890Op2019Default().buildGraphql(); - expect(skuRr890Op2019DefaultPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "rr890-op-2019-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "rr890-op-2019", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-rr890-op-2019-default.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-rr890-op-2019-default.ts deleted file mode 100644 index 6c16b2117..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-rr890-op-2019-default.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const defaultWarehouse = ChannelDraft.presets.sampleDataB2B - .defaultWarehouse() - .build(); - -const rr890Op02 = ProductVariantDraft.presets.sampleDataB2B - .rr890Op02() - .build(); - -const skuRr890Op2019Default = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${rr890Op02.sku}-${defaultWarehouse.key}`) - .sku(rr890Op02.sku!) - .quantityOnStock(1000) - .supplyChannel( - KeyReferenceDraft.presets.channel().key(defaultWarehouse.key) - ); - -export default skuRr890Op2019Default; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-rr890-op-2019-eu.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-rr890-op-2019-eu.spec.ts deleted file mode 100644 index 56ececd7c..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-rr890-op-2019-eu.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuRr890Op2019Eu from './sku-rr890-op-2019-eu'; - -describe(`with skuRr890Op2019Eu preset and eu-warehouse channel`, () => { - it(`should return a skuRr890Op2019Eu preset`, () => { - const skuRr890Op2019EuPreset = - skuRr890Op2019Eu().build(); - expect(skuRr890Op2019EuPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "rr890-op-2019-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "rr890-op-2019", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuRr890Op2019Eu preset when built for graphql`, () => { - const skuRr890Op2019EuPresetGraphql = - skuRr890Op2019Eu().buildGraphql(); - expect(skuRr890Op2019EuPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "rr890-op-2019-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "rr890-op-2019", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-rr890-op-2019-eu.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-rr890-op-2019-eu.ts deleted file mode 100644 index 082cd856f..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-rr890-op-2019-eu.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const euWarehouse = ChannelDraft.presets.sampleDataB2B - .euWarehouse() - .build(); - -const rr890Op02 = ProductVariantDraft.presets.sampleDataB2B - .rr890Op02() - .build(); - -const skuRr890Op2019Eu = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${rr890Op02.sku}-${euWarehouse.key}`) - .sku(rr890Op02.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(euWarehouse.key)); - -export default skuRr890Op2019Eu; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-rr890-op-2019-us.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-rr890-op-2019-us.spec.ts deleted file mode 100644 index abb4c0b38..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-rr890-op-2019-us.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuRr890Op2019Us from './sku-rr890-op-2019-us'; - -describe(`with skuRr890Op2019Us preset and us-warehouse channel`, () => { - it(`should return a skuRr890Op2019Us preset`, () => { - const skuRr890Op2019UsPreset = - skuRr890Op2019Us().build(); - expect(skuRr890Op2019UsPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "rr890-op-2019-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "rr890-op-2019", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuRr890Op2019Us preset when built for graphql`, () => { - const skuRr890Op2019UsPresetGraphql = - skuRr890Op2019Us().buildGraphql(); - expect(skuRr890Op2019UsPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "rr890-op-2019-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "rr890-op-2019", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-rr890-op-2019-us.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-rr890-op-2019-us.ts deleted file mode 100644 index 4580cba3b..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-rr890-op-2019-us.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const usWarehouse = ChannelDraft.presets.sampleDataB2B - .usWarehouse() - .build(); - -const rr890Op02 = ProductVariantDraft.presets.sampleDataB2B - .rr890Op02() - .build(); - -const skuRr890Op2019Us = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${rr890Op02.sku}-${usWarehouse.key}`) - .sku(rr890Op02.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(usWarehouse.key)); - -export default skuRr890Op2019Us; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-rr890-op-2023-default.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-rr890-op-2023-default.spec.ts deleted file mode 100644 index cfe59582f..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-rr890-op-2023-default.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuRr890Op2023Default from './sku-rr890-op-2023-default'; - -describe(`with skuRr890Op2023Default preset and default-warehouse channel`, () => { - it(`should return a skuRr890Op2023Default preset`, () => { - const skuRr890Op2023DefaultPreset = - skuRr890Op2023Default().build(); - expect(skuRr890Op2023DefaultPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "rr890-op-2023-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "rr890-op-2023", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuRr890Op2023Default preset when built for graphql`, () => { - const skuRr890Op2023DefaultPresetGraphql = - skuRr890Op2023Default().buildGraphql(); - expect(skuRr890Op2023DefaultPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "rr890-op-2023-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "rr890-op-2023", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-rr890-op-2023-default.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-rr890-op-2023-default.ts deleted file mode 100644 index dbd14a4da..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-rr890-op-2023-default.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const defaultWarehouse = ChannelDraft.presets.sampleDataB2B - .defaultWarehouse() - .build(); - -const rr890Op03 = ProductVariantDraft.presets.sampleDataB2B - .rr890Op03() - .build(); - -const skuRr890Op2023Default = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${rr890Op03.sku}-${defaultWarehouse.key}`) - .sku(rr890Op03.sku!) - .quantityOnStock(1000) - .supplyChannel( - KeyReferenceDraft.presets.channel().key(defaultWarehouse.key) - ); - -export default skuRr890Op2023Default; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-rr890-op-2023-eu.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-rr890-op-2023-eu.spec.ts deleted file mode 100644 index ce863f249..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-rr890-op-2023-eu.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuRr890Op2023Eu from './sku-rr890-op-2023-eu'; - -describe(`with skuRr890Op2023Eu preset and eu-warehouse channel`, () => { - it(`should return a skuRr890Op2023Eu preset`, () => { - const skuRr890Op2023EuPreset = - skuRr890Op2023Eu().build(); - expect(skuRr890Op2023EuPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "rr890-op-2023-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "rr890-op-2023", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuRr890Op2023Eu preset when built for graphql`, () => { - const skuRr890Op2023EuPresetGraphql = - skuRr890Op2023Eu().buildGraphql(); - expect(skuRr890Op2023EuPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "rr890-op-2023-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "rr890-op-2023", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-rr890-op-2023-eu.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-rr890-op-2023-eu.ts deleted file mode 100644 index c459e680f..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-rr890-op-2023-eu.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const euWarehouse = ChannelDraft.presets.sampleDataB2B - .euWarehouse() - .build(); - -const rr890Op03 = ProductVariantDraft.presets.sampleDataB2B - .rr890Op03() - .build(); - -const skuRr890Op2023Eu = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${rr890Op03.sku}-${euWarehouse.key}`) - .sku(rr890Op03.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(euWarehouse.key)); - -export default skuRr890Op2023Eu; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-rr890-op-2023-us.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-rr890-op-2023-us.spec.ts deleted file mode 100644 index 665a3635a..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-rr890-op-2023-us.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuRr890Op2023Us from './sku-rr890-op-2023-us'; - -describe(`with skuRr890Op2023Us preset and us-warehouse channel`, () => { - it(`should return a skuRr890Op2023Us preset`, () => { - const skuRr890Op2023UsPreset = - skuRr890Op2023Us().build(); - expect(skuRr890Op2023UsPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "rr890-op-2023-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "rr890-op-2023", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuRr890Op2023Us preset when built for graphql`, () => { - const skuRr890Op2023UsPresetGraphql = - skuRr890Op2023Us().buildGraphql(); - expect(skuRr890Op2023UsPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "rr890-op-2023-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "rr890-op-2023", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-rr890-op-2023-us.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-rr890-op-2023-us.ts deleted file mode 100644 index 5b5c4409b..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-rr890-op-2023-us.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const usWarehouse = ChannelDraft.presets.sampleDataB2B - .usWarehouse() - .build(); - -const rr890Op03 = ProductVariantDraft.presets.sampleDataB2B - .rr890Op03() - .build(); - -const skuRr890Op2023Us = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${rr890Op03.sku}-${usWarehouse.key}`) - .sku(rr890Op03.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(usWarehouse.key)); - -export default skuRr890Op2023Us; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-s-567-uv-2015-default-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-s-567-uv-2015-default-warehouse.spec.ts new file mode 100644 index 000000000..41e0602c1 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-s-567-uv-2015-default-warehouse.spec.ts @@ -0,0 +1,40 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuS567Uv2015DefaultWarehouse preset`, () => { + it(`should return a skuS567Uv2015DefaultWarehouse preset when built for rest`, () => { + const skuS567Uv2015DefaultWarehousePreset = InventoryEntryDraftRest.presets + .skuS567Uv2015DefaultWarehouse() + .build(); + expect(skuS567Uv2015DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuS567Uv2015DefaultWarehouse preset when built for graphql`, () => { + const skuS567Uv2015DefaultWarehousePreset = + InventoryEntryDraftGraphql.presets + .skuS567Uv2015DefaultWarehouse() + .build(); + expect(skuS567Uv2015DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuS567Uv2015DefaultWarehouse preset when built for legacy rest`, () => { + const skuS567Uv2015DefaultWarehousePreset = InventoryEntryDraft.presets + .skuS567Uv2015DefaultWarehouse() + .buildRest(); + expect(skuS567Uv2015DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuS567Uv2015DefaultWarehouse preset when built for legacy graphql`, () => { + const skuS567Uv2015DefaultWarehousePreset = InventoryEntryDraft.presets + .skuS567Uv2015DefaultWarehouse() + .buildGraphql(); + expect(skuS567Uv2015DefaultWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-s-567-uv-2015-default-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-s-567-uv-2015-default-warehouse.ts new file mode 100644 index 000000000..5939f0baf --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-s-567-uv-2015-default-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .defaultWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .s567Uv01() + .build(); + +const skuS567Uv2015DefaultWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('s567-uv-2015-default-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuS567Uv2015DefaultWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-s-567-uv-2015-eu-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-s-567-uv-2015-eu-warehouse.spec.ts new file mode 100644 index 000000000..bcc6cd69b --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-s-567-uv-2015-eu-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuS567Uv2015EuWarehouse preset`, () => { + it(`should return a skuS567Uv2015EuWarehouse preset when built for rest`, () => { + const skuS567Uv2015EuWarehousePreset = InventoryEntryDraftRest.presets + .skuS567Uv2015EuWarehouse() + .build(); + expect(skuS567Uv2015EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuS567Uv2015EuWarehouse preset when built for graphql`, () => { + const skuS567Uv2015EuWarehousePreset = InventoryEntryDraftGraphql.presets + .skuS567Uv2015EuWarehouse() + .build(); + expect(skuS567Uv2015EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuS567Uv2015EuWarehouse preset when built for legacy rest`, () => { + const skuS567Uv2015EuWarehousePreset = InventoryEntryDraft.presets + .skuS567Uv2015EuWarehouse() + .buildRest(); + expect(skuS567Uv2015EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuS567Uv2015EuWarehouse preset when built for legacy graphql`, () => { + const skuS567Uv2015EuWarehousePreset = InventoryEntryDraft.presets + .skuS567Uv2015EuWarehouse() + .buildGraphql(); + expect(skuS567Uv2015EuWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-s-567-uv-2015-eu-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-s-567-uv-2015-eu-warehouse.ts new file mode 100644 index 000000000..77f2692d3 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-s-567-uv-2015-eu-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .euWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .s567Uv01() + .build(); + +const skuS567Uv2015EuWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('s567-uv-2015-eu-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuS567Uv2015EuWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-s-567-uv-2015-us-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-s-567-uv-2015-us-warehouse.spec.ts new file mode 100644 index 000000000..a421c791f --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-s-567-uv-2015-us-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuS567Uv2015UsWarehouse preset`, () => { + it(`should return a skuS567Uv2015UsWarehouse preset when built for rest`, () => { + const skuS567Uv2015UsWarehousePreset = InventoryEntryDraftRest.presets + .skuS567Uv2015UsWarehouse() + .build(); + expect(skuS567Uv2015UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuS567Uv2015UsWarehouse preset when built for graphql`, () => { + const skuS567Uv2015UsWarehousePreset = InventoryEntryDraftGraphql.presets + .skuS567Uv2015UsWarehouse() + .build(); + expect(skuS567Uv2015UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuS567Uv2015UsWarehouse preset when built for legacy rest`, () => { + const skuS567Uv2015UsWarehousePreset = InventoryEntryDraft.presets + .skuS567Uv2015UsWarehouse() + .buildRest(); + expect(skuS567Uv2015UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuS567Uv2015UsWarehouse preset when built for legacy graphql`, () => { + const skuS567Uv2015UsWarehousePreset = InventoryEntryDraft.presets + .skuS567Uv2015UsWarehouse() + .buildGraphql(); + expect(skuS567Uv2015UsWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-s-567-uv-2015-us-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-s-567-uv-2015-us-warehouse.ts new file mode 100644 index 000000000..e106f84a4 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-s-567-uv-2015-us-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .usWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .s567Uv01() + .build(); + +const skuS567Uv2015UsWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('s567-uv-2015-us-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuS567Uv2015UsWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-s-567-uv-2019-default-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-s-567-uv-2019-default-warehouse.spec.ts new file mode 100644 index 000000000..805560187 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-s-567-uv-2019-default-warehouse.spec.ts @@ -0,0 +1,40 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuS567Uv2019DefaultWarehouse preset`, () => { + it(`should return a skuS567Uv2019DefaultWarehouse preset when built for rest`, () => { + const skuS567Uv2019DefaultWarehousePreset = InventoryEntryDraftRest.presets + .skuS567Uv2019DefaultWarehouse() + .build(); + expect(skuS567Uv2019DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuS567Uv2019DefaultWarehouse preset when built for graphql`, () => { + const skuS567Uv2019DefaultWarehousePreset = + InventoryEntryDraftGraphql.presets + .skuS567Uv2019DefaultWarehouse() + .build(); + expect(skuS567Uv2019DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuS567Uv2019DefaultWarehouse preset when built for legacy rest`, () => { + const skuS567Uv2019DefaultWarehousePreset = InventoryEntryDraft.presets + .skuS567Uv2019DefaultWarehouse() + .buildRest(); + expect(skuS567Uv2019DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuS567Uv2019DefaultWarehouse preset when built for legacy graphql`, () => { + const skuS567Uv2019DefaultWarehousePreset = InventoryEntryDraft.presets + .skuS567Uv2019DefaultWarehouse() + .buildGraphql(); + expect(skuS567Uv2019DefaultWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-s-567-uv-2019-default-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-s-567-uv-2019-default-warehouse.ts new file mode 100644 index 000000000..23e01c742 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-s-567-uv-2019-default-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .defaultWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .s567Uv02() + .build(); + +const skuS567Uv2019DefaultWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('s567-uv-2019-default-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuS567Uv2019DefaultWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-s-567-uv-2019-eu-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-s-567-uv-2019-eu-warehouse.spec.ts new file mode 100644 index 000000000..5586d5ed3 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-s-567-uv-2019-eu-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuS567Uv2019EuWarehouse preset`, () => { + it(`should return a skuS567Uv2019EuWarehouse preset when built for rest`, () => { + const skuS567Uv2019EuWarehousePreset = InventoryEntryDraftRest.presets + .skuS567Uv2019EuWarehouse() + .build(); + expect(skuS567Uv2019EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuS567Uv2019EuWarehouse preset when built for graphql`, () => { + const skuS567Uv2019EuWarehousePreset = InventoryEntryDraftGraphql.presets + .skuS567Uv2019EuWarehouse() + .build(); + expect(skuS567Uv2019EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuS567Uv2019EuWarehouse preset when built for legacy rest`, () => { + const skuS567Uv2019EuWarehousePreset = InventoryEntryDraft.presets + .skuS567Uv2019EuWarehouse() + .buildRest(); + expect(skuS567Uv2019EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuS567Uv2019EuWarehouse preset when built for legacy graphql`, () => { + const skuS567Uv2019EuWarehousePreset = InventoryEntryDraft.presets + .skuS567Uv2019EuWarehouse() + .buildGraphql(); + expect(skuS567Uv2019EuWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-s-567-uv-2019-eu-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-s-567-uv-2019-eu-warehouse.ts new file mode 100644 index 000000000..e34748e26 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-s-567-uv-2019-eu-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .euWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .s567Uv02() + .build(); + +const skuS567Uv2019EuWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('s567-uv-2019-eu-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuS567Uv2019EuWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-s-567-uv-2019-us-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-s-567-uv-2019-us-warehouse.spec.ts new file mode 100644 index 000000000..e476641cf --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-s-567-uv-2019-us-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuS567Uv2019UsWarehouse preset`, () => { + it(`should return a skuS567Uv2019UsWarehouse preset when built for rest`, () => { + const skuS567Uv2019UsWarehousePreset = InventoryEntryDraftRest.presets + .skuS567Uv2019UsWarehouse() + .build(); + expect(skuS567Uv2019UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuS567Uv2019UsWarehouse preset when built for graphql`, () => { + const skuS567Uv2019UsWarehousePreset = InventoryEntryDraftGraphql.presets + .skuS567Uv2019UsWarehouse() + .build(); + expect(skuS567Uv2019UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuS567Uv2019UsWarehouse preset when built for legacy rest`, () => { + const skuS567Uv2019UsWarehousePreset = InventoryEntryDraft.presets + .skuS567Uv2019UsWarehouse() + .buildRest(); + expect(skuS567Uv2019UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuS567Uv2019UsWarehouse preset when built for legacy graphql`, () => { + const skuS567Uv2019UsWarehousePreset = InventoryEntryDraft.presets + .skuS567Uv2019UsWarehouse() + .buildGraphql(); + expect(skuS567Uv2019UsWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-s-567-uv-2019-us-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-s-567-uv-2019-us-warehouse.ts new file mode 100644 index 000000000..3c76bbde6 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-s-567-uv-2019-us-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .usWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .s567Uv02() + .build(); + +const skuS567Uv2019UsWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('s567-uv-2019-us-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuS567Uv2019UsWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-s-567-uv-2023-default-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-s-567-uv-2023-default-warehouse.spec.ts new file mode 100644 index 000000000..1aeabaa3b --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-s-567-uv-2023-default-warehouse.spec.ts @@ -0,0 +1,40 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuS567Uv2023DefaultWarehouse preset`, () => { + it(`should return a skuS567Uv2023DefaultWarehouse preset when built for rest`, () => { + const skuS567Uv2023DefaultWarehousePreset = InventoryEntryDraftRest.presets + .skuS567Uv2023DefaultWarehouse() + .build(); + expect(skuS567Uv2023DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuS567Uv2023DefaultWarehouse preset when built for graphql`, () => { + const skuS567Uv2023DefaultWarehousePreset = + InventoryEntryDraftGraphql.presets + .skuS567Uv2023DefaultWarehouse() + .build(); + expect(skuS567Uv2023DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuS567Uv2023DefaultWarehouse preset when built for legacy rest`, () => { + const skuS567Uv2023DefaultWarehousePreset = InventoryEntryDraft.presets + .skuS567Uv2023DefaultWarehouse() + .buildRest(); + expect(skuS567Uv2023DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuS567Uv2023DefaultWarehouse preset when built for legacy graphql`, () => { + const skuS567Uv2023DefaultWarehousePreset = InventoryEntryDraft.presets + .skuS567Uv2023DefaultWarehouse() + .buildGraphql(); + expect(skuS567Uv2023DefaultWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-s-567-uv-2023-default-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-s-567-uv-2023-default-warehouse.ts new file mode 100644 index 000000000..b3510ae3a --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-s-567-uv-2023-default-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .defaultWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .s567Uv03() + .build(); + +const skuS567Uv2023DefaultWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('s567-uv-2023-default-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuS567Uv2023DefaultWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-s-567-uv-2023-eu-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-s-567-uv-2023-eu-warehouse.spec.ts new file mode 100644 index 000000000..0ccd9b949 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-s-567-uv-2023-eu-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuS567Uv2023EuWarehouse preset`, () => { + it(`should return a skuS567Uv2023EuWarehouse preset when built for rest`, () => { + const skuS567Uv2023EuWarehousePreset = InventoryEntryDraftRest.presets + .skuS567Uv2023EuWarehouse() + .build(); + expect(skuS567Uv2023EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuS567Uv2023EuWarehouse preset when built for graphql`, () => { + const skuS567Uv2023EuWarehousePreset = InventoryEntryDraftGraphql.presets + .skuS567Uv2023EuWarehouse() + .build(); + expect(skuS567Uv2023EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuS567Uv2023EuWarehouse preset when built for legacy rest`, () => { + const skuS567Uv2023EuWarehousePreset = InventoryEntryDraft.presets + .skuS567Uv2023EuWarehouse() + .buildRest(); + expect(skuS567Uv2023EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuS567Uv2023EuWarehouse preset when built for legacy graphql`, () => { + const skuS567Uv2023EuWarehousePreset = InventoryEntryDraft.presets + .skuS567Uv2023EuWarehouse() + .buildGraphql(); + expect(skuS567Uv2023EuWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-s-567-uv-2023-eu-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-s-567-uv-2023-eu-warehouse.ts new file mode 100644 index 000000000..7e6235f71 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-s-567-uv-2023-eu-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .euWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .s567Uv03() + .build(); + +const skuS567Uv2023EuWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('s567-uv-2023-eu-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuS567Uv2023EuWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-s-567-uv-2023-us-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-s-567-uv-2023-us-warehouse.spec.ts new file mode 100644 index 000000000..23aa11360 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-s-567-uv-2023-us-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuS567Uv2023UsWarehouse preset`, () => { + it(`should return a skuS567Uv2023UsWarehouse preset when built for rest`, () => { + const skuS567Uv2023UsWarehousePreset = InventoryEntryDraftRest.presets + .skuS567Uv2023UsWarehouse() + .build(); + expect(skuS567Uv2023UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuS567Uv2023UsWarehouse preset when built for graphql`, () => { + const skuS567Uv2023UsWarehousePreset = InventoryEntryDraftGraphql.presets + .skuS567Uv2023UsWarehouse() + .build(); + expect(skuS567Uv2023UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuS567Uv2023UsWarehouse preset when built for legacy rest`, () => { + const skuS567Uv2023UsWarehousePreset = InventoryEntryDraft.presets + .skuS567Uv2023UsWarehouse() + .buildRest(); + expect(skuS567Uv2023UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuS567Uv2023UsWarehouse preset when built for legacy graphql`, () => { + const skuS567Uv2023UsWarehousePreset = InventoryEntryDraft.presets + .skuS567Uv2023UsWarehouse() + .buildGraphql(); + expect(skuS567Uv2023UsWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-s-567-uv-2023-us-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-s-567-uv-2023-us-warehouse.ts new file mode 100644 index 000000000..53e17448d --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-s-567-uv-2023-us-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .usWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .s567Uv03() + .build(); + +const skuS567Uv2023UsWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('s567-uv-2023-us-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuS567Uv2023UsWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-s567-uv-2015-default.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-s567-uv-2015-default.spec.ts deleted file mode 100644 index 0aa681246..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-s567-uv-2015-default.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuS567Uv2015Default from './sku-s567-uv-2015-default'; - -describe(`with skuS567Uv2015Default preset and default-warehouse channel`, () => { - it(`should return a skuS567Uv2015Default preset`, () => { - const skuS567Uv2015DefaultPreset = - skuS567Uv2015Default().build(); - expect(skuS567Uv2015DefaultPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "s567-uv-2015-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "s567-uv-2015", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuS567Uv2015Default preset when built for graphql`, () => { - const skuS567Uv2015DefaultPresetGraphql = - skuS567Uv2015Default().buildGraphql(); - expect(skuS567Uv2015DefaultPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "s567-uv-2015-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "s567-uv-2015", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-s567-uv-2015-default.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-s567-uv-2015-default.ts deleted file mode 100644 index 2e4da229b..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-s567-uv-2015-default.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const defaultWarehouse = ChannelDraft.presets.sampleDataB2B - .defaultWarehouse() - .build(); - -const s567Uv01 = ProductVariantDraft.presets.sampleDataB2B - .s567Uv01() - .build(); - -const skuS567Uv2015Default = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${s567Uv01.sku}-${defaultWarehouse.key}`) - .sku(s567Uv01.sku!) - .quantityOnStock(1000) - .supplyChannel( - KeyReferenceDraft.presets.channel().key(defaultWarehouse.key) - ); - -export default skuS567Uv2015Default; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-s567-uv-2015-eu.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-s567-uv-2015-eu.spec.ts deleted file mode 100644 index 76b0dd6d9..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-s567-uv-2015-eu.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuS567Uv2015Eu from './sku-s567-uv-2015-eu'; - -describe(`with skuS567Uv2015Eu preset and eu-warehouse channel`, () => { - it(`should return a skuS567Uv2015Eu preset`, () => { - const skuS567Uv2015EuPreset = - skuS567Uv2015Eu().build(); - expect(skuS567Uv2015EuPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "s567-uv-2015-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "s567-uv-2015", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuS567Uv2015Eu preset when built for graphql`, () => { - const skuS567Uv2015EuPresetGraphql = - skuS567Uv2015Eu().buildGraphql(); - expect(skuS567Uv2015EuPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "s567-uv-2015-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "s567-uv-2015", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-s567-uv-2015-eu.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-s567-uv-2015-eu.ts deleted file mode 100644 index 128f598c2..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-s567-uv-2015-eu.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const euWarehouse = ChannelDraft.presets.sampleDataB2B - .euWarehouse() - .build(); - -const s567Uv01 = ProductVariantDraft.presets.sampleDataB2B - .s567Uv01() - .build(); - -const skuS567Uv2015Eu = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${s567Uv01.sku}-${euWarehouse.key}`) - .sku(s567Uv01.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(euWarehouse.key)); - -export default skuS567Uv2015Eu; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-s567-uv-2015-us.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-s567-uv-2015-us.spec.ts deleted file mode 100644 index 15a097e35..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-s567-uv-2015-us.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuS567Uv2015Us from './sku-s567-uv-2015-us'; - -describe(`with skuS567Uv2015Us preset and us-warehouse channel`, () => { - it(`should return a skuS567Uv2015Us preset`, () => { - const skuS567Uv2015UsPreset = - skuS567Uv2015Us().build(); - expect(skuS567Uv2015UsPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "s567-uv-2015-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "s567-uv-2015", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuS567Uv2015Us preset when built for graphql`, () => { - const skuS567Uv2015UsPresetGraphql = - skuS567Uv2015Us().buildGraphql(); - expect(skuS567Uv2015UsPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "s567-uv-2015-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "s567-uv-2015", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-s567-uv-2015-us.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-s567-uv-2015-us.ts deleted file mode 100644 index f7494e37d..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-s567-uv-2015-us.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const usWarehouse = ChannelDraft.presets.sampleDataB2B - .usWarehouse() - .build(); - -const s567Uv01 = ProductVariantDraft.presets.sampleDataB2B - .s567Uv01() - .build(); - -const skuS567Uv2015Us = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${s567Uv01.sku}-${usWarehouse.key}`) - .sku(s567Uv01.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(usWarehouse.key)); - -export default skuS567Uv2015Us; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-s567-uv-2019-default.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-s567-uv-2019-default.spec.ts deleted file mode 100644 index 07e34c3d4..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-s567-uv-2019-default.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuS567Uv2019Default from './sku-s567-uv-2019-default'; - -describe(`with skuS567Uv2019Default preset and default-warehouse channel`, () => { - it(`should return a skuS567Uv2019Default preset`, () => { - const skuS567Uv2019DefaultPreset = - skuS567Uv2019Default().build(); - expect(skuS567Uv2019DefaultPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "s567-uv-2019-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "s567-uv-2019", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuS567Uv2019Default preset when built for graphql`, () => { - const skuS567Uv2019DefaultPresetGraphql = - skuS567Uv2019Default().buildGraphql(); - expect(skuS567Uv2019DefaultPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "s567-uv-2019-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "s567-uv-2019", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-s567-uv-2019-default.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-s567-uv-2019-default.ts deleted file mode 100644 index 71091ed8d..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-s567-uv-2019-default.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const defaultWarehouse = ChannelDraft.presets.sampleDataB2B - .defaultWarehouse() - .build(); - -const s567Uv02 = ProductVariantDraft.presets.sampleDataB2B - .s567Uv02() - .build(); - -const skuS567Uv2019Default = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${s567Uv02.sku}-${defaultWarehouse.key}`) - .sku(s567Uv02.sku!) - .quantityOnStock(1000) - .supplyChannel( - KeyReferenceDraft.presets.channel().key(defaultWarehouse.key) - ); - -export default skuS567Uv2019Default; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-s567-uv-2019-eu.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-s567-uv-2019-eu.spec.ts deleted file mode 100644 index e8f2c0953..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-s567-uv-2019-eu.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuS567Uv2019Eu from './sku-s567-uv-2019-eu'; - -describe(`with skuS567Uv2019Eu preset and eu-warehouse channel`, () => { - it(`should return a skuS567Uv2019Eu preset`, () => { - const skuS567Uv2019EuPreset = - skuS567Uv2019Eu().build(); - expect(skuS567Uv2019EuPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "s567-uv-2019-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "s567-uv-2019", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuS567Uv2019Eu preset when built for graphql`, () => { - const skuS567Uv2019EuPresetGraphql = - skuS567Uv2019Eu().buildGraphql(); - expect(skuS567Uv2019EuPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "s567-uv-2019-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "s567-uv-2019", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-s567-uv-2019-eu.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-s567-uv-2019-eu.ts deleted file mode 100644 index 327ff2a82..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-s567-uv-2019-eu.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const euWarehouse = ChannelDraft.presets.sampleDataB2B - .euWarehouse() - .build(); - -const s567Uv02 = ProductVariantDraft.presets.sampleDataB2B - .s567Uv02() - .build(); - -const skuS567Uv2019Eu = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${s567Uv02.sku}-${euWarehouse.key}`) - .sku(s567Uv02.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(euWarehouse.key)); - -export default skuS567Uv2019Eu; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-s567-uv-2019-us.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-s567-uv-2019-us.spec.ts deleted file mode 100644 index 3209b6b25..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-s567-uv-2019-us.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuS567Uv2019Us from './sku-s567-uv-2019-us'; - -describe(`with skuS567Uv2019Us preset and us-warehouse channel`, () => { - it(`should return a skuS567Uv2019Us preset`, () => { - const skuS567Uv2019UsPreset = - skuS567Uv2019Us().build(); - expect(skuS567Uv2019UsPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "s567-uv-2019-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "s567-uv-2019", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuS567Uv2019Us preset when built for graphql`, () => { - const skuS567Uv2019UsPresetGraphql = - skuS567Uv2019Us().buildGraphql(); - expect(skuS567Uv2019UsPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "s567-uv-2019-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "s567-uv-2019", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-s567-uv-2019-us.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-s567-uv-2019-us.ts deleted file mode 100644 index 4bbdf0dd4..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-s567-uv-2019-us.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const usWarehouse = ChannelDraft.presets.sampleDataB2B - .usWarehouse() - .build(); - -const s567Uv02 = ProductVariantDraft.presets.sampleDataB2B - .s567Uv02() - .build(); - -const skuS567Uv2019Us = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${s567Uv02.sku}-${usWarehouse.key}`) - .sku(s567Uv02.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(usWarehouse.key)); - -export default skuS567Uv2019Us; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-s567-uv-2023-default.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-s567-uv-2023-default.spec.ts deleted file mode 100644 index e2ab02334..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-s567-uv-2023-default.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuS567Uv2023Default from './sku-s567-uv-2023-default'; - -describe(`with skuS567Uv2023Default preset and default-warehouse channel`, () => { - it(`should return a skuS567Uv2023Default preset`, () => { - const skuS567Uv2023DefaultPreset = - skuS567Uv2023Default().build(); - expect(skuS567Uv2023DefaultPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "s567-uv-2023-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "s567-uv-2023", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuS567Uv2023Default preset when built for graphql`, () => { - const skuS567Uv2023DefaultPresetGraphql = - skuS567Uv2023Default().buildGraphql(); - expect(skuS567Uv2023DefaultPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "s567-uv-2023-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "s567-uv-2023", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-s567-uv-2023-default.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-s567-uv-2023-default.ts deleted file mode 100644 index a8f3f7926..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-s567-uv-2023-default.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const defaultWarehouse = ChannelDraft.presets.sampleDataB2B - .defaultWarehouse() - .build(); - -const s567Uv03 = ProductVariantDraft.presets.sampleDataB2B - .s567Uv03() - .build(); - -const skuS567Uv2023Default = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${s567Uv03.sku}-${defaultWarehouse.key}`) - .sku(s567Uv03.sku!) - .quantityOnStock(1000) - .supplyChannel( - KeyReferenceDraft.presets.channel().key(defaultWarehouse.key) - ); - -export default skuS567Uv2023Default; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-s567-uv-2023-eu.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-s567-uv-2023-eu.spec.ts deleted file mode 100644 index 8d7b3af50..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-s567-uv-2023-eu.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuS567Uv2023Eu from './sku-s567-uv-2023-eu'; - -describe(`with skuS567Uv2023Eu preset and eu-warehouse channel`, () => { - it(`should return a skuS567Uv2023Eu preset`, () => { - const skuS567Uv2023EuPreset = - skuS567Uv2023Eu().build(); - expect(skuS567Uv2023EuPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "s567-uv-2023-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "s567-uv-2023", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuS567Uv2023Eu preset when built for graphql`, () => { - const skuS567Uv2023EuPresetGraphql = - skuS567Uv2023Eu().buildGraphql(); - expect(skuS567Uv2023EuPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "s567-uv-2023-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "s567-uv-2023", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-s567-uv-2023-eu.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-s567-uv-2023-eu.ts deleted file mode 100644 index a1751251d..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-s567-uv-2023-eu.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const euWarehouse = ChannelDraft.presets.sampleDataB2B - .euWarehouse() - .build(); - -const s567Uv03 = ProductVariantDraft.presets.sampleDataB2B - .s567Uv03() - .build(); - -const skuS567Uv2023Eu = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${s567Uv03.sku}-${euWarehouse.key}`) - .sku(s567Uv03.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(euWarehouse.key)); - -export default skuS567Uv2023Eu; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-s567-uv-2023-us.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-s567-uv-2023-us.spec.ts deleted file mode 100644 index 79079e74f..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-s567-uv-2023-us.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuS567Uv2023Us from './sku-s567-uv-2023-us'; - -describe(`with skuS567Uv2023Us preset and us-warehouse channel`, () => { - it(`should return a skuS567Uv2023Us preset`, () => { - const skuS567Uv2023UsPreset = - skuS567Uv2023Us().build(); - expect(skuS567Uv2023UsPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "s567-uv-2023-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "s567-uv-2023", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuS567Uv2023Us preset when built for graphql`, () => { - const skuS567Uv2023UsPresetGraphql = - skuS567Uv2023Us().buildGraphql(); - expect(skuS567Uv2023UsPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "s567-uv-2023-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "s567-uv-2023", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-s567-uv-2023-us.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-s567-uv-2023-us.ts deleted file mode 100644 index 2f292e0a3..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-s567-uv-2023-us.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const usWarehouse = ChannelDraft.presets.sampleDataB2B - .usWarehouse() - .build(); - -const s567Uv03 = ProductVariantDraft.presets.sampleDataB2B - .s567Uv03() - .build(); - -const skuS567Uv2023Us = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${s567Uv03.sku}-${usWarehouse.key}`) - .sku(s567Uv03.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(usWarehouse.key)); - -export default skuS567Uv2023Us; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ss-123-qr-blue-default-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ss-123-qr-blue-default-warehouse.spec.ts new file mode 100644 index 000000000..c23a77fd3 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ss-123-qr-blue-default-warehouse.spec.ts @@ -0,0 +1,40 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuSs123QrBlueDefaultWarehouse preset`, () => { + it(`should return a skuSs123QrBlueDefaultWarehouse preset when built for rest`, () => { + const skuSs123QrBlueDefaultWarehousePreset = InventoryEntryDraftRest.presets + .skuSs123QrBlueDefaultWarehouse() + .build(); + expect(skuSs123QrBlueDefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuSs123QrBlueDefaultWarehouse preset when built for graphql`, () => { + const skuSs123QrBlueDefaultWarehousePreset = + InventoryEntryDraftGraphql.presets + .skuSs123QrBlueDefaultWarehouse() + .build(); + expect(skuSs123QrBlueDefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuSs123QrBlueDefaultWarehouse preset when built for legacy rest`, () => { + const skuSs123QrBlueDefaultWarehousePreset = InventoryEntryDraft.presets + .skuSs123QrBlueDefaultWarehouse() + .buildRest(); + expect(skuSs123QrBlueDefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuSs123QrBlueDefaultWarehouse preset when built for legacy graphql`, () => { + const skuSs123QrBlueDefaultWarehousePreset = InventoryEntryDraft.presets + .skuSs123QrBlueDefaultWarehouse() + .buildGraphql(); + expect(skuSs123QrBlueDefaultWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ss-123-qr-blue-default-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ss-123-qr-blue-default-warehouse.ts new file mode 100644 index 000000000..dd967776f --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ss-123-qr-blue-default-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .defaultWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .ss123Qr02() + .build(); + +const skuSs123QrBlueDefaultWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('ss123-qr-blue-default-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuSs123QrBlueDefaultWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ss-123-qr-blue-eu-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ss-123-qr-blue-eu-warehouse.spec.ts new file mode 100644 index 000000000..11805b2e7 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ss-123-qr-blue-eu-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuSs123QrBlueEuWarehouse preset`, () => { + it(`should return a skuSs123QrBlueEuWarehouse preset when built for rest`, () => { + const skuSs123QrBlueEuWarehousePreset = InventoryEntryDraftRest.presets + .skuSs123QrBlueEuWarehouse() + .build(); + expect(skuSs123QrBlueEuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuSs123QrBlueEuWarehouse preset when built for graphql`, () => { + const skuSs123QrBlueEuWarehousePreset = InventoryEntryDraftGraphql.presets + .skuSs123QrBlueEuWarehouse() + .build(); + expect(skuSs123QrBlueEuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuSs123QrBlueEuWarehouse preset when built for legacy rest`, () => { + const skuSs123QrBlueEuWarehousePreset = InventoryEntryDraft.presets + .skuSs123QrBlueEuWarehouse() + .buildRest(); + expect(skuSs123QrBlueEuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuSs123QrBlueEuWarehouse preset when built for legacy graphql`, () => { + const skuSs123QrBlueEuWarehousePreset = InventoryEntryDraft.presets + .skuSs123QrBlueEuWarehouse() + .buildGraphql(); + expect(skuSs123QrBlueEuWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ss-123-qr-blue-eu-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ss-123-qr-blue-eu-warehouse.ts new file mode 100644 index 000000000..ea7d9d0d5 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ss-123-qr-blue-eu-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .euWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .ss123Qr02() + .build(); + +const skuSs123QrBlueEuWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('ss123-qr-blue-eu-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuSs123QrBlueEuWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ss-123-qr-blue-us-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ss-123-qr-blue-us-warehouse.spec.ts new file mode 100644 index 000000000..924017529 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ss-123-qr-blue-us-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuSs123QrBlueUsWarehouse preset`, () => { + it(`should return a skuSs123QrBlueUsWarehouse preset when built for rest`, () => { + const skuSs123QrBlueUsWarehousePreset = InventoryEntryDraftRest.presets + .skuSs123QrBlueUsWarehouse() + .build(); + expect(skuSs123QrBlueUsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuSs123QrBlueUsWarehouse preset when built for graphql`, () => { + const skuSs123QrBlueUsWarehousePreset = InventoryEntryDraftGraphql.presets + .skuSs123QrBlueUsWarehouse() + .build(); + expect(skuSs123QrBlueUsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuSs123QrBlueUsWarehouse preset when built for legacy rest`, () => { + const skuSs123QrBlueUsWarehousePreset = InventoryEntryDraft.presets + .skuSs123QrBlueUsWarehouse() + .buildRest(); + expect(skuSs123QrBlueUsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuSs123QrBlueUsWarehouse preset when built for legacy graphql`, () => { + const skuSs123QrBlueUsWarehousePreset = InventoryEntryDraft.presets + .skuSs123QrBlueUsWarehouse() + .buildGraphql(); + expect(skuSs123QrBlueUsWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ss-123-qr-blue-us-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ss-123-qr-blue-us-warehouse.ts new file mode 100644 index 000000000..13511348e --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ss-123-qr-blue-us-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .usWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .ss123Qr02() + .build(); + +const skuSs123QrBlueUsWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('ss123-qr-blue-us-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuSs123QrBlueUsWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ss-123-qr-green-default-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ss-123-qr-green-default-warehouse.spec.ts new file mode 100644 index 000000000..56eb542cb --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ss-123-qr-green-default-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuSs123QrGreenDefaultWarehouse preset`, () => { + it(`should return a skuSs123QrGreenDefaultWarehouse preset when built for rest`, () => { + const skuSs123QrGreenDefaultWarehousePreset = + InventoryEntryDraftRest.presets.skuSs123QrGreenDefaultWarehouse().build(); + expect(skuSs123QrGreenDefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuSs123QrGreenDefaultWarehouse preset when built for graphql`, () => { + const skuSs123QrGreenDefaultWarehousePreset = + InventoryEntryDraftGraphql.presets + .skuSs123QrGreenDefaultWarehouse() + .build(); + expect(skuSs123QrGreenDefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuSs123QrGreenDefaultWarehouse preset when built for legacy rest`, () => { + const skuSs123QrGreenDefaultWarehousePreset = InventoryEntryDraft.presets + .skuSs123QrGreenDefaultWarehouse() + .buildRest(); + expect(skuSs123QrGreenDefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuSs123QrGreenDefaultWarehouse preset when built for legacy graphql`, () => { + const skuSs123QrGreenDefaultWarehousePreset = InventoryEntryDraft.presets + .skuSs123QrGreenDefaultWarehouse() + .buildGraphql(); + expect(skuSs123QrGreenDefaultWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ss-123-qr-green-default-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ss-123-qr-green-default-warehouse.ts new file mode 100644 index 000000000..d9a667126 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ss-123-qr-green-default-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .defaultWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .ss123Qr03() + .build(); + +const skuSs123QrGreenDefaultWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('ss123-qr-green-default-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuSs123QrGreenDefaultWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ss-123-qr-green-eu-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ss-123-qr-green-eu-warehouse.spec.ts new file mode 100644 index 000000000..480c65da1 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ss-123-qr-green-eu-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuSs123QrGreenEuWarehouse preset`, () => { + it(`should return a skuSs123QrGreenEuWarehouse preset when built for rest`, () => { + const skuSs123QrGreenEuWarehousePreset = InventoryEntryDraftRest.presets + .skuSs123QrGreenEuWarehouse() + .build(); + expect(skuSs123QrGreenEuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuSs123QrGreenEuWarehouse preset when built for graphql`, () => { + const skuSs123QrGreenEuWarehousePreset = InventoryEntryDraftGraphql.presets + .skuSs123QrGreenEuWarehouse() + .build(); + expect(skuSs123QrGreenEuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuSs123QrGreenEuWarehouse preset when built for legacy rest`, () => { + const skuSs123QrGreenEuWarehousePreset = InventoryEntryDraft.presets + .skuSs123QrGreenEuWarehouse() + .buildRest(); + expect(skuSs123QrGreenEuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuSs123QrGreenEuWarehouse preset when built for legacy graphql`, () => { + const skuSs123QrGreenEuWarehousePreset = InventoryEntryDraft.presets + .skuSs123QrGreenEuWarehouse() + .buildGraphql(); + expect(skuSs123QrGreenEuWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ss-123-qr-green-eu-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ss-123-qr-green-eu-warehouse.ts new file mode 100644 index 000000000..5dc6401d9 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ss-123-qr-green-eu-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .euWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .ss123Qr03() + .build(); + +const skuSs123QrGreenEuWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('ss123-qr-green-eu-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuSs123QrGreenEuWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ss-123-qr-green-us-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ss-123-qr-green-us-warehouse.spec.ts new file mode 100644 index 000000000..c00f96b13 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ss-123-qr-green-us-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuSs123QrGreenUsWarehouse preset`, () => { + it(`should return a skuSs123QrGreenUsWarehouse preset when built for rest`, () => { + const skuSs123QrGreenUsWarehousePreset = InventoryEntryDraftRest.presets + .skuSs123QrGreenUsWarehouse() + .build(); + expect(skuSs123QrGreenUsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuSs123QrGreenUsWarehouse preset when built for graphql`, () => { + const skuSs123QrGreenUsWarehousePreset = InventoryEntryDraftGraphql.presets + .skuSs123QrGreenUsWarehouse() + .build(); + expect(skuSs123QrGreenUsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuSs123QrGreenUsWarehouse preset when built for legacy rest`, () => { + const skuSs123QrGreenUsWarehousePreset = InventoryEntryDraft.presets + .skuSs123QrGreenUsWarehouse() + .buildRest(); + expect(skuSs123QrGreenUsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuSs123QrGreenUsWarehouse preset when built for legacy graphql`, () => { + const skuSs123QrGreenUsWarehousePreset = InventoryEntryDraft.presets + .skuSs123QrGreenUsWarehouse() + .buildGraphql(); + expect(skuSs123QrGreenUsWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ss-123-qr-green-us-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ss-123-qr-green-us-warehouse.ts new file mode 100644 index 000000000..6c9db3c95 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ss-123-qr-green-us-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .usWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .ss123Qr03() + .build(); + +const skuSs123QrGreenUsWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('ss123-qr-green-us-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuSs123QrGreenUsWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ss-123-qr-red-default-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ss-123-qr-red-default-warehouse.spec.ts new file mode 100644 index 000000000..bb6c4161f --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ss-123-qr-red-default-warehouse.spec.ts @@ -0,0 +1,40 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuSs123QrRedDefaultWarehouse preset`, () => { + it(`should return a skuSs123QrRedDefaultWarehouse preset when built for rest`, () => { + const skuSs123QrRedDefaultWarehousePreset = InventoryEntryDraftRest.presets + .skuSs123QrRedDefaultWarehouse() + .build(); + expect(skuSs123QrRedDefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuSs123QrRedDefaultWarehouse preset when built for graphql`, () => { + const skuSs123QrRedDefaultWarehousePreset = + InventoryEntryDraftGraphql.presets + .skuSs123QrRedDefaultWarehouse() + .build(); + expect(skuSs123QrRedDefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuSs123QrRedDefaultWarehouse preset when built for legacy rest`, () => { + const skuSs123QrRedDefaultWarehousePreset = InventoryEntryDraft.presets + .skuSs123QrRedDefaultWarehouse() + .buildRest(); + expect(skuSs123QrRedDefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuSs123QrRedDefaultWarehouse preset when built for legacy graphql`, () => { + const skuSs123QrRedDefaultWarehousePreset = InventoryEntryDraft.presets + .skuSs123QrRedDefaultWarehouse() + .buildGraphql(); + expect(skuSs123QrRedDefaultWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ss-123-qr-red-default-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ss-123-qr-red-default-warehouse.ts new file mode 100644 index 000000000..b5a355387 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ss-123-qr-red-default-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .defaultWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .ss123Qr01() + .build(); + +const skuSs123QrRedDefaultWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('ss123-qr-red-default-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuSs123QrRedDefaultWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ss-123-qr-red-eu-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ss-123-qr-red-eu-warehouse.spec.ts new file mode 100644 index 000000000..18472db6f --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ss-123-qr-red-eu-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuSs123QrRedEuWarehouse preset`, () => { + it(`should return a skuSs123QrRedEuWarehouse preset when built for rest`, () => { + const skuSs123QrRedEuWarehousePreset = InventoryEntryDraftRest.presets + .skuSs123QrRedEuWarehouse() + .build(); + expect(skuSs123QrRedEuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuSs123QrRedEuWarehouse preset when built for graphql`, () => { + const skuSs123QrRedEuWarehousePreset = InventoryEntryDraftGraphql.presets + .skuSs123QrRedEuWarehouse() + .build(); + expect(skuSs123QrRedEuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuSs123QrRedEuWarehouse preset when built for legacy rest`, () => { + const skuSs123QrRedEuWarehousePreset = InventoryEntryDraft.presets + .skuSs123QrRedEuWarehouse() + .buildRest(); + expect(skuSs123QrRedEuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuSs123QrRedEuWarehouse preset when built for legacy graphql`, () => { + const skuSs123QrRedEuWarehousePreset = InventoryEntryDraft.presets + .skuSs123QrRedEuWarehouse() + .buildGraphql(); + expect(skuSs123QrRedEuWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ss-123-qr-red-eu-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ss-123-qr-red-eu-warehouse.ts new file mode 100644 index 000000000..87d554dda --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ss-123-qr-red-eu-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .euWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .ss123Qr01() + .build(); + +const skuSs123QrRedEuWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('ss123-qr-red-eu-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuSs123QrRedEuWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ss-123-qr-red-us-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ss-123-qr-red-us-warehouse.spec.ts new file mode 100644 index 000000000..2de86cb1d --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ss-123-qr-red-us-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuSs123QrRedUsWarehouse preset`, () => { + it(`should return a skuSs123QrRedUsWarehouse preset when built for rest`, () => { + const skuSs123QrRedUsWarehousePreset = InventoryEntryDraftRest.presets + .skuSs123QrRedUsWarehouse() + .build(); + expect(skuSs123QrRedUsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuSs123QrRedUsWarehouse preset when built for graphql`, () => { + const skuSs123QrRedUsWarehousePreset = InventoryEntryDraftGraphql.presets + .skuSs123QrRedUsWarehouse() + .build(); + expect(skuSs123QrRedUsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuSs123QrRedUsWarehouse preset when built for legacy rest`, () => { + const skuSs123QrRedUsWarehousePreset = InventoryEntryDraft.presets + .skuSs123QrRedUsWarehouse() + .buildRest(); + expect(skuSs123QrRedUsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuSs123QrRedUsWarehouse preset when built for legacy graphql`, () => { + const skuSs123QrRedUsWarehousePreset = InventoryEntryDraft.presets + .skuSs123QrRedUsWarehouse() + .buildGraphql(); + expect(skuSs123QrRedUsWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ss-123-qr-red-us-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ss-123-qr-red-us-warehouse.ts new file mode 100644 index 000000000..5552d8545 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ss-123-qr-red-us-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .usWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .ss123Qr01() + .build(); + +const skuSs123QrRedUsWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('ss123-qr-red-us-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuSs123QrRedUsWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ss123-qr-blue-default.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ss123-qr-blue-default.spec.ts deleted file mode 100644 index 3c497a273..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ss123-qr-blue-default.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuSs123QrBlueDefault from './sku-ss123-qr-blue-default'; - -describe(`with skuSs123QrBlueDefault preset and default-warehouse channel`, () => { - it(`should return a skuSs123QrBlueDefault preset`, () => { - const skuSs123QrBlueDefaultPreset = - skuSs123QrBlueDefault().build(); - expect(skuSs123QrBlueDefaultPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "ss123-qr-blue-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "ss123-qr-blue", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuSs123QrBlueDefault preset when built for graphql`, () => { - const skuSs123QrBlueDefaultPresetGraphql = - skuSs123QrBlueDefault().buildGraphql(); - expect(skuSs123QrBlueDefaultPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "ss123-qr-blue-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "ss123-qr-blue", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ss123-qr-blue-default.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ss123-qr-blue-default.ts deleted file mode 100644 index a7ce9ffb8..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ss123-qr-blue-default.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const defaultWarehouse = ChannelDraft.presets.sampleDataB2B - .defaultWarehouse() - .build(); - -const ss123Qr02 = ProductVariantDraft.presets.sampleDataB2B - .ss123Qr02() - .build(); - -const skuSs123QrBlueDefault = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${ss123Qr02.sku}-${defaultWarehouse.key}`) - .sku(ss123Qr02.sku!) - .quantityOnStock(1000) - .supplyChannel( - KeyReferenceDraft.presets.channel().key(defaultWarehouse.key) - ); - -export default skuSs123QrBlueDefault; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ss123-qr-blue-eu.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ss123-qr-blue-eu.spec.ts deleted file mode 100644 index 027edc2da..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ss123-qr-blue-eu.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuSs123QrBlueEu from './sku-ss123-qr-blue-eu'; - -describe(`with skuSs123QrBlueEu preset and eu-warehouse channel`, () => { - it(`should return a skuSs123QrBlueEu preset`, () => { - const skuSs123QrBlueEuPreset = - skuSs123QrBlueEu().build(); - expect(skuSs123QrBlueEuPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "ss123-qr-blue-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "ss123-qr-blue", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuSs123QrBlueEu preset when built for graphql`, () => { - const skuSs123QrBlueEuPresetGraphql = - skuSs123QrBlueEu().buildGraphql(); - expect(skuSs123QrBlueEuPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "ss123-qr-blue-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "ss123-qr-blue", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ss123-qr-blue-eu.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ss123-qr-blue-eu.ts deleted file mode 100644 index d82992961..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ss123-qr-blue-eu.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const euWarehouse = ChannelDraft.presets.sampleDataB2B - .euWarehouse() - .build(); - -const ss123Qr02 = ProductVariantDraft.presets.sampleDataB2B - .ss123Qr02() - .build(); - -const skuSs123QrBlueEu = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${ss123Qr02.sku}-${euWarehouse.key}`) - .sku(ss123Qr02.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(euWarehouse.key)); - -export default skuSs123QrBlueEu; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ss123-qr-blue-us.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ss123-qr-blue-us.spec.ts deleted file mode 100644 index e32f28470..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ss123-qr-blue-us.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuSs123QrBlueUs from './sku-ss123-qr-blue-us'; - -describe(`with skuSs123QrBlueUs preset and us-warehouse channel`, () => { - it(`should return a skuSs123QrBlueUs preset`, () => { - const skuSs123QrBlueUsPreset = - skuSs123QrBlueUs().build(); - expect(skuSs123QrBlueUsPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "ss123-qr-blue-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "ss123-qr-blue", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuSs123QrBlueUs preset when built for graphql`, () => { - const skuSs123QrBlueUsPresetGraphql = - skuSs123QrBlueUs().buildGraphql(); - expect(skuSs123QrBlueUsPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "ss123-qr-blue-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "ss123-qr-blue", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ss123-qr-blue-us.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ss123-qr-blue-us.ts deleted file mode 100644 index e74c40815..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ss123-qr-blue-us.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const usWarehouse = ChannelDraft.presets.sampleDataB2B - .usWarehouse() - .build(); - -const ss123Qr02 = ProductVariantDraft.presets.sampleDataB2B - .ss123Qr02() - .build(); - -const skuSs123QrBlueUs = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${ss123Qr02.sku}-${usWarehouse.key}`) - .sku(ss123Qr02.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(usWarehouse.key)); - -export default skuSs123QrBlueUs; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ss123-qr-green-default.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ss123-qr-green-default.spec.ts deleted file mode 100644 index f7799809d..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ss123-qr-green-default.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuSs123QrGreenDefault from './sku-ss123-qr-green-default'; - -describe(`with skuSs123QrGreenDefault preset and default-warehouse channel`, () => { - it(`should return a skuSs123QrGreenDefault preset`, () => { - const skuSs123QrGreenDefaultPreset = - skuSs123QrGreenDefault().build(); - expect(skuSs123QrGreenDefaultPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "ss123-qr-green-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "ss123-qr-green", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuSs123QrGreenDefault preset when built for graphql`, () => { - const skuSs123QrGreenDefaultPresetGraphql = - skuSs123QrGreenDefault().buildGraphql(); - expect(skuSs123QrGreenDefaultPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "ss123-qr-green-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "ss123-qr-green", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ss123-qr-green-default.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ss123-qr-green-default.ts deleted file mode 100644 index 4b6b28a23..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ss123-qr-green-default.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const defaultWarehouse = ChannelDraft.presets.sampleDataB2B - .defaultWarehouse() - .build(); - -const ss123Qr03 = ProductVariantDraft.presets.sampleDataB2B - .ss123Qr03() - .build(); - -const skuSs123QrGreenDefault = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${ss123Qr03.sku}-${defaultWarehouse.key}`) - .sku(ss123Qr03.sku!) - .quantityOnStock(1000) - .supplyChannel( - KeyReferenceDraft.presets.channel().key(defaultWarehouse.key) - ); - -export default skuSs123QrGreenDefault; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ss123-qr-green-eu.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ss123-qr-green-eu.spec.ts deleted file mode 100644 index 04b17eb79..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ss123-qr-green-eu.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuSs123QrGreenEu from './sku-ss123-qr-green-eu'; - -describe(`with skuSs123QrGreenEu preset and eu-warehouse channel`, () => { - it(`should return a skuSs123QrGreenEu preset`, () => { - const skuSs123QrGreenEuPreset = - skuSs123QrGreenEu().build(); - expect(skuSs123QrGreenEuPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "ss123-qr-green-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "ss123-qr-green", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuSs123QrGreenEu preset when built for graphql`, () => { - const skuSs123QrGreenEuPresetGraphql = - skuSs123QrGreenEu().buildGraphql(); - expect(skuSs123QrGreenEuPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "ss123-qr-green-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "ss123-qr-green", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ss123-qr-green-eu.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ss123-qr-green-eu.ts deleted file mode 100644 index 979ee1d2a..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ss123-qr-green-eu.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const euWarehouse = ChannelDraft.presets.sampleDataB2B - .euWarehouse() - .build(); - -const ss123Qr03 = ProductVariantDraft.presets.sampleDataB2B - .ss123Qr03() - .build(); - -const skuSs123QrGreenEu = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${ss123Qr03.sku}-${euWarehouse.key}`) - .sku(ss123Qr03.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(euWarehouse.key)); - -export default skuSs123QrGreenEu; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ss123-qr-green-us.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ss123-qr-green-us.spec.ts deleted file mode 100644 index 6a977341d..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ss123-qr-green-us.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuSs123QrGreenUs from './sku-ss123-qr-green-us'; - -describe(`with skuSs123QrGreenUs preset and us-warehouse channel`, () => { - it(`should return a skuSs123QrGreenUs preset`, () => { - const skuSs123QrGreenUsPreset = - skuSs123QrGreenUs().build(); - expect(skuSs123QrGreenUsPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "ss123-qr-green-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "ss123-qr-green", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuSs123QrGreenUs preset when built for graphql`, () => { - const skuSs123QrGreenUsPresetGraphql = - skuSs123QrGreenUs().buildGraphql(); - expect(skuSs123QrGreenUsPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "ss123-qr-green-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "ss123-qr-green", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ss123-qr-green-us.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ss123-qr-green-us.ts deleted file mode 100644 index 87cc0cf34..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ss123-qr-green-us.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const usWarehouse = ChannelDraft.presets.sampleDataB2B - .usWarehouse() - .build(); - -const ss123Qr03 = ProductVariantDraft.presets.sampleDataB2B - .ss123Qr03() - .build(); - -const skuSs123QrGreenUs = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${ss123Qr03.sku}-${usWarehouse.key}`) - .sku(ss123Qr03.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(usWarehouse.key)); - -export default skuSs123QrGreenUs; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ss123-qr-red-default.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ss123-qr-red-default.spec.ts deleted file mode 100644 index df1600260..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ss123-qr-red-default.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuSs123QrRedDefault from './sku-ss123-qr-red-default'; - -describe(`with skuSs123QrRedDefault preset and default-warehouse channel`, () => { - it(`should return a skuSs123QrRedDefault preset`, () => { - const skuSs123QrRedDefaultPreset = - skuSs123QrRedDefault().build(); - expect(skuSs123QrRedDefaultPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "ss123-qr-red-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "ss123-qr-red", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuSs123QrRedDefault preset when built for graphql`, () => { - const skuSs123QrRedDefaultPresetGraphql = - skuSs123QrRedDefault().buildGraphql(); - expect(skuSs123QrRedDefaultPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "ss123-qr-red-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "ss123-qr-red", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ss123-qr-red-default.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ss123-qr-red-default.ts deleted file mode 100644 index d95821a8e..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ss123-qr-red-default.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const defaultWarehouse = ChannelDraft.presets.sampleDataB2B - .defaultWarehouse() - .build(); - -const ss123Qr01 = ProductVariantDraft.presets.sampleDataB2B - .ss123Qr01() - .build(); - -const skuSs123QrRedDefault = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${ss123Qr01.sku}-${defaultWarehouse.key}`) - .sku(ss123Qr01.sku!) - .quantityOnStock(1000) - .supplyChannel( - KeyReferenceDraft.presets.channel().key(defaultWarehouse.key) - ); - -export default skuSs123QrRedDefault; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ss123-qr-red-eu.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ss123-qr-red-eu.spec.ts deleted file mode 100644 index a57ed1209..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ss123-qr-red-eu.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuSs123QrRedEu from './sku-ss123-qr-red-eu'; - -describe(`with skuSs123QrRedEu preset and eu-warehouse channel`, () => { - it(`should return a skuSs123QrRedEu preset`, () => { - const skuSs123QrRedEuPreset = - skuSs123QrRedEu().build(); - expect(skuSs123QrRedEuPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "ss123-qr-red-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "ss123-qr-red", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuSs123QrRedEu preset when built for graphql`, () => { - const skuSs123QrRedEuPresetGraphql = - skuSs123QrRedEu().buildGraphql(); - expect(skuSs123QrRedEuPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "ss123-qr-red-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "ss123-qr-red", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ss123-qr-red-eu.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ss123-qr-red-eu.ts deleted file mode 100644 index 41b447e1c..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ss123-qr-red-eu.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const euWarehouse = ChannelDraft.presets.sampleDataB2B - .euWarehouse() - .build(); - -const ss123Qr01 = ProductVariantDraft.presets.sampleDataB2B - .ss123Qr01() - .build(); - -const skuSs123QrRedEu = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${ss123Qr01.sku}-${euWarehouse.key}`) - .sku(ss123Qr01.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(euWarehouse.key)); - -export default skuSs123QrRedEu; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ss123-qr-red-us.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ss123-qr-red-us.spec.ts deleted file mode 100644 index 9f826a62a..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ss123-qr-red-us.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuSs123QrRedUs from './sku-ss123-qr-red-us'; - -describe(`with skuSs123QrRedUs preset and us-warehouse channel`, () => { - it(`should return a skuSs123QrRedUs preset`, () => { - const skuSs123QrRedUsPreset = - skuSs123QrRedUs().build(); - expect(skuSs123QrRedUsPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "ss123-qr-red-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "ss123-qr-red", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuSs123QrRedUs preset when built for graphql`, () => { - const skuSs123QrRedUsPresetGraphql = - skuSs123QrRedUs().buildGraphql(); - expect(skuSs123QrRedUsPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "ss123-qr-red-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "ss123-qr-red", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ss123-qr-red-us.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ss123-qr-red-us.ts deleted file mode 100644 index fbe49f341..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ss123-qr-red-us.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const usWarehouse = ChannelDraft.presets.sampleDataB2B - .usWarehouse() - .build(); - -const ss123Qr01 = ProductVariantDraft.presets.sampleDataB2B - .ss123Qr01() - .build(); - -const skuSs123QrRedUs = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${ss123Qr01.sku}-${usWarehouse.key}`) - .sku(ss123Qr01.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(usWarehouse.key)); - -export default skuSs123QrRedUs; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-starter-motor-default-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-starter-motor-default-warehouse.spec.ts new file mode 100644 index 000000000..41e826906 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-starter-motor-default-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuStarterMotorDefaultWarehouse preset`, () => { + it(`should return a skuStarterMotorDefaultWarehouse preset when built for rest`, () => { + const skuStarterMotorDefaultWarehousePreset = + InventoryEntryDraftRest.presets.skuStarterMotorDefaultWarehouse().build(); + expect(skuStarterMotorDefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuStarterMotorDefaultWarehouse preset when built for graphql`, () => { + const skuStarterMotorDefaultWarehousePreset = + InventoryEntryDraftGraphql.presets + .skuStarterMotorDefaultWarehouse() + .build(); + expect(skuStarterMotorDefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuStarterMotorDefaultWarehouse preset when built for legacy rest`, () => { + const skuStarterMotorDefaultWarehousePreset = InventoryEntryDraft.presets + .skuStarterMotorDefaultWarehouse() + .buildRest(); + expect(skuStarterMotorDefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuStarterMotorDefaultWarehouse preset when built for legacy graphql`, () => { + const skuStarterMotorDefaultWarehousePreset = InventoryEntryDraft.presets + .skuStarterMotorDefaultWarehouse() + .buildGraphql(); + expect(skuStarterMotorDefaultWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-starter-motor-default-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-starter-motor-default-warehouse.ts new file mode 100644 index 000000000..497b5632c --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-starter-motor-default-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .defaultWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .starterMotor01() + .build(); + +const skuStarterMotorDefaultWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('starter-motor-default-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuStarterMotorDefaultWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-starter-motor-default.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-starter-motor-default.spec.ts deleted file mode 100644 index c89e8d826..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-starter-motor-default.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuStarterMotorDefault from './sku-starter-motor-default'; - -describe(`with skuStarterMotorDefault preset and default-warehouse channel`, () => { - it(`should return a skuStarterMotorDefault preset`, () => { - const skuStarterMotorDefaultPreset = - skuStarterMotorDefault().build(); - expect(skuStarterMotorDefaultPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "starter-motor-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "starter-motor", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuStarterMotorDefault preset when built for graphql`, () => { - const skuStarterMotorDefaultPresetGraphql = - skuStarterMotorDefault().buildGraphql(); - expect(skuStarterMotorDefaultPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "starter-motor-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "starter-motor", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-starter-motor-default.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-starter-motor-default.ts deleted file mode 100644 index d492b290c..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-starter-motor-default.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const defaultWarehouse = ChannelDraft.presets.sampleDataB2B - .defaultWarehouse() - .build(); - -const starterMotor01 = ProductVariantDraft.presets.sampleDataB2B - .starterMotor01() - .build(); - -const skuStarterMotorDefault = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${starterMotor01.sku}-${defaultWarehouse.key}`) - .sku(starterMotor01.sku!) - .quantityOnStock(1000) - .supplyChannel( - KeyReferenceDraft.presets.channel().key(defaultWarehouse.key) - ); - -export default skuStarterMotorDefault; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-starter-motor-eu-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-starter-motor-eu-warehouse.spec.ts new file mode 100644 index 000000000..27ec56c38 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-starter-motor-eu-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuStarterMotorEuWarehouse preset`, () => { + it(`should return a skuStarterMotorEuWarehouse preset when built for rest`, () => { + const skuStarterMotorEuWarehousePreset = InventoryEntryDraftRest.presets + .skuStarterMotorEuWarehouse() + .build(); + expect(skuStarterMotorEuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuStarterMotorEuWarehouse preset when built for graphql`, () => { + const skuStarterMotorEuWarehousePreset = InventoryEntryDraftGraphql.presets + .skuStarterMotorEuWarehouse() + .build(); + expect(skuStarterMotorEuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuStarterMotorEuWarehouse preset when built for legacy rest`, () => { + const skuStarterMotorEuWarehousePreset = InventoryEntryDraft.presets + .skuStarterMotorEuWarehouse() + .buildRest(); + expect(skuStarterMotorEuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuStarterMotorEuWarehouse preset when built for legacy graphql`, () => { + const skuStarterMotorEuWarehousePreset = InventoryEntryDraft.presets + .skuStarterMotorEuWarehouse() + .buildGraphql(); + expect(skuStarterMotorEuWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-starter-motor-eu-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-starter-motor-eu-warehouse.ts new file mode 100644 index 000000000..98b13774f --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-starter-motor-eu-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .euWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .starterMotor01() + .build(); + +const skuStarterMotorEuWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('starter-motor-eu-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuStarterMotorEuWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-starter-motor-eu.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-starter-motor-eu.spec.ts deleted file mode 100644 index 74d79966a..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-starter-motor-eu.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuStarterMotorEu from './sku-starter-motor-eu'; - -describe(`with skuStarterMotorEu preset and eu-warehouse channel`, () => { - it(`should return a skuStarterMotorEu preset`, () => { - const skuStarterMotorEuPreset = - skuStarterMotorEu().build(); - expect(skuStarterMotorEuPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "starter-motor-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "starter-motor", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuStarterMotorEu preset when built for graphql`, () => { - const skuStarterMotorEuPresetGraphql = - skuStarterMotorEu().buildGraphql(); - expect(skuStarterMotorEuPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "starter-motor-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "starter-motor", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-starter-motor-eu.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-starter-motor-eu.ts deleted file mode 100644 index bca4c09f3..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-starter-motor-eu.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const euWarehouse = ChannelDraft.presets.sampleDataB2B - .euWarehouse() - .build(); - -const starterMotor01 = ProductVariantDraft.presets.sampleDataB2B - .starterMotor01() - .build(); - -const skuStarterMotorEu = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${starterMotor01.sku}-${euWarehouse.key}`) - .sku(starterMotor01.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(euWarehouse.key)); - -export default skuStarterMotorEu; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-starter-motor-us-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-starter-motor-us-warehouse.spec.ts new file mode 100644 index 000000000..b153b1c56 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-starter-motor-us-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuStarterMotorUsWarehouse preset`, () => { + it(`should return a skuStarterMotorUsWarehouse preset when built for rest`, () => { + const skuStarterMotorUsWarehousePreset = InventoryEntryDraftRest.presets + .skuStarterMotorUsWarehouse() + .build(); + expect(skuStarterMotorUsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuStarterMotorUsWarehouse preset when built for graphql`, () => { + const skuStarterMotorUsWarehousePreset = InventoryEntryDraftGraphql.presets + .skuStarterMotorUsWarehouse() + .build(); + expect(skuStarterMotorUsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuStarterMotorUsWarehouse preset when built for legacy rest`, () => { + const skuStarterMotorUsWarehousePreset = InventoryEntryDraft.presets + .skuStarterMotorUsWarehouse() + .buildRest(); + expect(skuStarterMotorUsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuStarterMotorUsWarehouse preset when built for legacy graphql`, () => { + const skuStarterMotorUsWarehousePreset = InventoryEntryDraft.presets + .skuStarterMotorUsWarehouse() + .buildGraphql(); + expect(skuStarterMotorUsWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-starter-motor-us-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-starter-motor-us-warehouse.ts new file mode 100644 index 000000000..a92787a64 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-starter-motor-us-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .usWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .starterMotor01() + .build(); + +const skuStarterMotorUsWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('starter-motor-us-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuStarterMotorUsWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-starter-motor-us.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-starter-motor-us.spec.ts deleted file mode 100644 index 89b0ef6d1..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-starter-motor-us.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuStarterMotorUs from './sku-starter-motor-us'; - -describe(`with skuStarterMotorUs preset and us-warehouse channel`, () => { - it(`should return a skuStarterMotorUs preset`, () => { - const skuStarterMotorUsPreset = - skuStarterMotorUs().build(); - expect(skuStarterMotorUsPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "starter-motor-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "starter-motor", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuStarterMotorUs preset when built for graphql`, () => { - const skuStarterMotorUsPresetGraphql = - skuStarterMotorUs().buildGraphql(); - expect(skuStarterMotorUsPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "starter-motor-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "starter-motor", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-starter-motor-us.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-starter-motor-us.ts deleted file mode 100644 index c5965aab6..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-starter-motor-us.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const usWarehouse = ChannelDraft.presets.sampleDataB2B - .usWarehouse() - .build(); - -const starterMotor01 = ProductVariantDraft.presets.sampleDataB2B - .starterMotor01() - .build(); - -const skuStarterMotorUs = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${starterMotor01.sku}-${usWarehouse.key}`) - .sku(starterMotor01.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(usWarehouse.key)); - -export default skuStarterMotorUs; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-tapered-roller-bearing-default-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-tapered-roller-bearing-default-warehouse.spec.ts new file mode 100644 index 000000000..73d0b9681 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-tapered-roller-bearing-default-warehouse.spec.ts @@ -0,0 +1,51 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuTaperedRollerBearingDefaultWarehouse preset`, () => { + it(`should return a skuTaperedRollerBearingDefaultWarehouse preset when built for rest`, () => { + const skuTaperedRollerBearingDefaultWarehousePreset = + InventoryEntryDraftRest.presets + .skuTaperedRollerBearingDefaultWarehouse() + .build(); + expect( + skuTaperedRollerBearingDefaultWarehousePreset + ).toMatchInlineSnapshot(); + }); + + it(`should return a skuTaperedRollerBearingDefaultWarehouse preset when built for graphql`, () => { + const skuTaperedRollerBearingDefaultWarehousePreset = + InventoryEntryDraftGraphql.presets + .skuTaperedRollerBearingDefaultWarehouse() + .build(); + expect( + skuTaperedRollerBearingDefaultWarehousePreset + ).toMatchInlineSnapshot(); + }); + + it(`should return a skuTaperedRollerBearingDefaultWarehouse preset when built for legacy rest`, () => { + const skuTaperedRollerBearingDefaultWarehousePreset = + InventoryEntryDraft.presets + .skuTaperedRollerBearingDefaultWarehouse() + .buildRest(); + expect( + skuTaperedRollerBearingDefaultWarehousePreset + ).toMatchInlineSnapshot(); + }); + + it(`should return a skuTaperedRollerBearingDefaultWarehouse preset when built for legacy graphql`, () => { + const skuTaperedRollerBearingDefaultWarehousePreset = + InventoryEntryDraft.presets + .skuTaperedRollerBearingDefaultWarehouse() + .buildGraphql(); + expect( + skuTaperedRollerBearingDefaultWarehousePreset + ).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-tapered-roller-bearing-default-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-tapered-roller-bearing-default-warehouse.ts new file mode 100644 index 000000000..6fe82d7ad --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-tapered-roller-bearing-default-warehouse.ts @@ -0,0 +1,31 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .defaultWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .taperedRollerBearing01() + .build(); + +const skuTaperedRollerBearingDefaultWarehouse = + (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('tapered-roller-bearing-default-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel( + KeyReferenceDraft.presets.channel().key(supplyChannel.key!) + ); +export default skuTaperedRollerBearingDefaultWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-tapered-roller-bearing-default.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-tapered-roller-bearing-default.spec.ts deleted file mode 100644 index 3fe59f3e8..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-tapered-roller-bearing-default.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuTaperedRollerBearingDefault from './sku-tapered-roller-bearing-default'; - -describe(`with skuTaperedRollerBearingDefault preset and default-warehouse channel`, () => { - it(`should return a skuTaperedRollerBearingDefault preset`, () => { - const skuTaperedRollerBearingDefaultPreset = - skuTaperedRollerBearingDefault().build(); - expect(skuTaperedRollerBearingDefaultPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "tapered-roller-bearing-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "tapered-roller-bearing", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuTaperedRollerBearingDefault preset when built for graphql`, () => { - const skuTaperedRollerBearingDefaultPresetGraphql = - skuTaperedRollerBearingDefault().buildGraphql(); - expect(skuTaperedRollerBearingDefaultPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "tapered-roller-bearing-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "tapered-roller-bearing", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-tapered-roller-bearing-default.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-tapered-roller-bearing-default.ts deleted file mode 100644 index 5c70628b1..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-tapered-roller-bearing-default.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const defaultWarehouse = ChannelDraft.presets.sampleDataB2B - .defaultWarehouse() - .build(); - -const taperedRollerBearing01 = ProductVariantDraft.presets.sampleDataB2B - .taperedRollerBearing01() - .build(); - -const skuTaperedRollerBearingDefault = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${taperedRollerBearing01.sku}-${defaultWarehouse.key}`) - .sku(taperedRollerBearing01.sku!) - .quantityOnStock(1000) - .supplyChannel( - KeyReferenceDraft.presets.channel().key(defaultWarehouse.key) - ); - -export default skuTaperedRollerBearingDefault; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-tapered-roller-bearing-eu-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-tapered-roller-bearing-eu-warehouse.spec.ts new file mode 100644 index 000000000..2ffd5919e --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-tapered-roller-bearing-eu-warehouse.spec.ts @@ -0,0 +1,41 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuTaperedRollerBearingEuWarehouse preset`, () => { + it(`should return a skuTaperedRollerBearingEuWarehouse preset when built for rest`, () => { + const skuTaperedRollerBearingEuWarehousePreset = + InventoryEntryDraftRest.presets + .skuTaperedRollerBearingEuWarehouse() + .build(); + expect(skuTaperedRollerBearingEuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuTaperedRollerBearingEuWarehouse preset when built for graphql`, () => { + const skuTaperedRollerBearingEuWarehousePreset = + InventoryEntryDraftGraphql.presets + .skuTaperedRollerBearingEuWarehouse() + .build(); + expect(skuTaperedRollerBearingEuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuTaperedRollerBearingEuWarehouse preset when built for legacy rest`, () => { + const skuTaperedRollerBearingEuWarehousePreset = InventoryEntryDraft.presets + .skuTaperedRollerBearingEuWarehouse() + .buildRest(); + expect(skuTaperedRollerBearingEuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuTaperedRollerBearingEuWarehouse preset when built for legacy graphql`, () => { + const skuTaperedRollerBearingEuWarehousePreset = InventoryEntryDraft.presets + .skuTaperedRollerBearingEuWarehouse() + .buildGraphql(); + expect(skuTaperedRollerBearingEuWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-tapered-roller-bearing-eu-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-tapered-roller-bearing-eu-warehouse.ts new file mode 100644 index 000000000..2331b3beb --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-tapered-roller-bearing-eu-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .euWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .taperedRollerBearing01() + .build(); + +const skuTaperedRollerBearingEuWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('tapered-roller-bearing-eu-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuTaperedRollerBearingEuWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-tapered-roller-bearing-eu.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-tapered-roller-bearing-eu.spec.ts deleted file mode 100644 index 5a60ea298..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-tapered-roller-bearing-eu.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuTaperedRollerBearingEu from './sku-tapered-roller-bearing-eu'; - -describe(`with skuTaperedRollerBearingEu preset and eu-warehouse channel`, () => { - it(`should return a skuTaperedRollerBearingEu preset`, () => { - const skuTaperedRollerBearingEuPreset = - skuTaperedRollerBearingEu().build(); - expect(skuTaperedRollerBearingEuPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "tapered-roller-bearing-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "tapered-roller-bearing", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuTaperedRollerBearingEu preset when built for graphql`, () => { - const skuTaperedRollerBearingEuPresetGraphql = - skuTaperedRollerBearingEu().buildGraphql(); - expect(skuTaperedRollerBearingEuPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "tapered-roller-bearing-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "tapered-roller-bearing", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-tapered-roller-bearing-eu.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-tapered-roller-bearing-eu.ts deleted file mode 100644 index 85ebc66a2..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-tapered-roller-bearing-eu.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const euWarehouse = ChannelDraft.presets.sampleDataB2B - .euWarehouse() - .build(); - -const taperedRollerBearing01 = ProductVariantDraft.presets.sampleDataB2B - .taperedRollerBearing01() - .build(); - -const skuTaperedRollerBearingEu = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${taperedRollerBearing01.sku}-${euWarehouse.key}`) - .sku(taperedRollerBearing01.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(euWarehouse.key)); - -export default skuTaperedRollerBearingEu; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-tapered-roller-bearing-us-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-tapered-roller-bearing-us-warehouse.spec.ts new file mode 100644 index 000000000..acf830579 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-tapered-roller-bearing-us-warehouse.spec.ts @@ -0,0 +1,41 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuTaperedRollerBearingUsWarehouse preset`, () => { + it(`should return a skuTaperedRollerBearingUsWarehouse preset when built for rest`, () => { + const skuTaperedRollerBearingUsWarehousePreset = + InventoryEntryDraftRest.presets + .skuTaperedRollerBearingUsWarehouse() + .build(); + expect(skuTaperedRollerBearingUsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuTaperedRollerBearingUsWarehouse preset when built for graphql`, () => { + const skuTaperedRollerBearingUsWarehousePreset = + InventoryEntryDraftGraphql.presets + .skuTaperedRollerBearingUsWarehouse() + .build(); + expect(skuTaperedRollerBearingUsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuTaperedRollerBearingUsWarehouse preset when built for legacy rest`, () => { + const skuTaperedRollerBearingUsWarehousePreset = InventoryEntryDraft.presets + .skuTaperedRollerBearingUsWarehouse() + .buildRest(); + expect(skuTaperedRollerBearingUsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuTaperedRollerBearingUsWarehouse preset when built for legacy graphql`, () => { + const skuTaperedRollerBearingUsWarehousePreset = InventoryEntryDraft.presets + .skuTaperedRollerBearingUsWarehouse() + .buildGraphql(); + expect(skuTaperedRollerBearingUsWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-tapered-roller-bearing-us-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-tapered-roller-bearing-us-warehouse.ts new file mode 100644 index 000000000..9eb5244e0 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-tapered-roller-bearing-us-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .usWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .taperedRollerBearing01() + .build(); + +const skuTaperedRollerBearingUsWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('tapered-roller-bearing-us-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuTaperedRollerBearingUsWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-tapered-roller-bearing-us.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-tapered-roller-bearing-us.spec.ts deleted file mode 100644 index 1467e93e4..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-tapered-roller-bearing-us.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuTaperedRollerBearingUs from './sku-tapered-roller-bearing-us'; - -describe(`with skuTaperedRollerBearingUs preset and us-warehouse channel`, () => { - it(`should return a skuTaperedRollerBearingUs preset`, () => { - const skuTaperedRollerBearingUsPreset = - skuTaperedRollerBearingUs().build(); - expect(skuTaperedRollerBearingUsPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "tapered-roller-bearing-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "tapered-roller-bearing", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuTaperedRollerBearingUs preset when built for graphql`, () => { - const skuTaperedRollerBearingUsPresetGraphql = - skuTaperedRollerBearingUs().buildGraphql(); - expect(skuTaperedRollerBearingUsPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "tapered-roller-bearing-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "tapered-roller-bearing", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-tapered-roller-bearing-us.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-tapered-roller-bearing-us.ts deleted file mode 100644 index 77f2fda04..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-tapered-roller-bearing-us.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const usWarehouse = ChannelDraft.presets.sampleDataB2B - .usWarehouse() - .build(); - -const taperedRollerBearing01 = ProductVariantDraft.presets.sampleDataB2B - .taperedRollerBearing01() - .build(); - -const skuTaperedRollerBearingUs = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${taperedRollerBearing01.sku}-${usWarehouse.key}`) - .sku(taperedRollerBearing01.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(usWarehouse.key)); - -export default skuTaperedRollerBearingUs; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-tt-456-st-blue-default-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-tt-456-st-blue-default-warehouse.spec.ts new file mode 100644 index 000000000..ceaf1eff0 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-tt-456-st-blue-default-warehouse.spec.ts @@ -0,0 +1,40 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuTt456StBlueDefaultWarehouse preset`, () => { + it(`should return a skuTt456StBlueDefaultWarehouse preset when built for rest`, () => { + const skuTt456StBlueDefaultWarehousePreset = InventoryEntryDraftRest.presets + .skuTt456StBlueDefaultWarehouse() + .build(); + expect(skuTt456StBlueDefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuTt456StBlueDefaultWarehouse preset when built for graphql`, () => { + const skuTt456StBlueDefaultWarehousePreset = + InventoryEntryDraftGraphql.presets + .skuTt456StBlueDefaultWarehouse() + .build(); + expect(skuTt456StBlueDefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuTt456StBlueDefaultWarehouse preset when built for legacy rest`, () => { + const skuTt456StBlueDefaultWarehousePreset = InventoryEntryDraft.presets + .skuTt456StBlueDefaultWarehouse() + .buildRest(); + expect(skuTt456StBlueDefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuTt456StBlueDefaultWarehouse preset when built for legacy graphql`, () => { + const skuTt456StBlueDefaultWarehousePreset = InventoryEntryDraft.presets + .skuTt456StBlueDefaultWarehouse() + .buildGraphql(); + expect(skuTt456StBlueDefaultWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-tt-456-st-blue-default-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-tt-456-st-blue-default-warehouse.ts new file mode 100644 index 000000000..0f1928186 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-tt-456-st-blue-default-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .defaultWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .tt456St02() + .build(); + +const skuTt456StBlueDefaultWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('tt456-st-blue-default-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuTt456StBlueDefaultWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-tt-456-st-blue-eu-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-tt-456-st-blue-eu-warehouse.spec.ts new file mode 100644 index 000000000..a83699498 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-tt-456-st-blue-eu-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuTt456StBlueEuWarehouse preset`, () => { + it(`should return a skuTt456StBlueEuWarehouse preset when built for rest`, () => { + const skuTt456StBlueEuWarehousePreset = InventoryEntryDraftRest.presets + .skuTt456StBlueEuWarehouse() + .build(); + expect(skuTt456StBlueEuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuTt456StBlueEuWarehouse preset when built for graphql`, () => { + const skuTt456StBlueEuWarehousePreset = InventoryEntryDraftGraphql.presets + .skuTt456StBlueEuWarehouse() + .build(); + expect(skuTt456StBlueEuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuTt456StBlueEuWarehouse preset when built for legacy rest`, () => { + const skuTt456StBlueEuWarehousePreset = InventoryEntryDraft.presets + .skuTt456StBlueEuWarehouse() + .buildRest(); + expect(skuTt456StBlueEuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuTt456StBlueEuWarehouse preset when built for legacy graphql`, () => { + const skuTt456StBlueEuWarehousePreset = InventoryEntryDraft.presets + .skuTt456StBlueEuWarehouse() + .buildGraphql(); + expect(skuTt456StBlueEuWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-tt-456-st-blue-eu-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-tt-456-st-blue-eu-warehouse.ts new file mode 100644 index 000000000..9fab5cdda --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-tt-456-st-blue-eu-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .euWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .tt456St02() + .build(); + +const skuTt456StBlueEuWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('tt456-st-blue-eu-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuTt456StBlueEuWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-tt-456-st-blue-us-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-tt-456-st-blue-us-warehouse.spec.ts new file mode 100644 index 000000000..fa509c030 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-tt-456-st-blue-us-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuTt456StBlueUsWarehouse preset`, () => { + it(`should return a skuTt456StBlueUsWarehouse preset when built for rest`, () => { + const skuTt456StBlueUsWarehousePreset = InventoryEntryDraftRest.presets + .skuTt456StBlueUsWarehouse() + .build(); + expect(skuTt456StBlueUsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuTt456StBlueUsWarehouse preset when built for graphql`, () => { + const skuTt456StBlueUsWarehousePreset = InventoryEntryDraftGraphql.presets + .skuTt456StBlueUsWarehouse() + .build(); + expect(skuTt456StBlueUsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuTt456StBlueUsWarehouse preset when built for legacy rest`, () => { + const skuTt456StBlueUsWarehousePreset = InventoryEntryDraft.presets + .skuTt456StBlueUsWarehouse() + .buildRest(); + expect(skuTt456StBlueUsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuTt456StBlueUsWarehouse preset when built for legacy graphql`, () => { + const skuTt456StBlueUsWarehousePreset = InventoryEntryDraft.presets + .skuTt456StBlueUsWarehouse() + .buildGraphql(); + expect(skuTt456StBlueUsWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-tt-456-st-blue-us-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-tt-456-st-blue-us-warehouse.ts new file mode 100644 index 000000000..3703c268c --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-tt-456-st-blue-us-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .usWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .tt456St02() + .build(); + +const skuTt456StBlueUsWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('tt456-st-blue-us-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuTt456StBlueUsWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-tt-456-st-green-default-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-tt-456-st-green-default-warehouse.spec.ts new file mode 100644 index 000000000..eb773f451 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-tt-456-st-green-default-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuTt456StGreenDefaultWarehouse preset`, () => { + it(`should return a skuTt456StGreenDefaultWarehouse preset when built for rest`, () => { + const skuTt456StGreenDefaultWarehousePreset = + InventoryEntryDraftRest.presets.skuTt456StGreenDefaultWarehouse().build(); + expect(skuTt456StGreenDefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuTt456StGreenDefaultWarehouse preset when built for graphql`, () => { + const skuTt456StGreenDefaultWarehousePreset = + InventoryEntryDraftGraphql.presets + .skuTt456StGreenDefaultWarehouse() + .build(); + expect(skuTt456StGreenDefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuTt456StGreenDefaultWarehouse preset when built for legacy rest`, () => { + const skuTt456StGreenDefaultWarehousePreset = InventoryEntryDraft.presets + .skuTt456StGreenDefaultWarehouse() + .buildRest(); + expect(skuTt456StGreenDefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuTt456StGreenDefaultWarehouse preset when built for legacy graphql`, () => { + const skuTt456StGreenDefaultWarehousePreset = InventoryEntryDraft.presets + .skuTt456StGreenDefaultWarehouse() + .buildGraphql(); + expect(skuTt456StGreenDefaultWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-tt-456-st-green-default-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-tt-456-st-green-default-warehouse.ts new file mode 100644 index 000000000..60dacc47c --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-tt-456-st-green-default-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .defaultWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .tt456St03() + .build(); + +const skuTt456StGreenDefaultWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('tt456-st-green-default-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuTt456StGreenDefaultWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-tt-456-st-green-eu-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-tt-456-st-green-eu-warehouse.spec.ts new file mode 100644 index 000000000..352fc9c04 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-tt-456-st-green-eu-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuTt456StGreenEuWarehouse preset`, () => { + it(`should return a skuTt456StGreenEuWarehouse preset when built for rest`, () => { + const skuTt456StGreenEuWarehousePreset = InventoryEntryDraftRest.presets + .skuTt456StGreenEuWarehouse() + .build(); + expect(skuTt456StGreenEuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuTt456StGreenEuWarehouse preset when built for graphql`, () => { + const skuTt456StGreenEuWarehousePreset = InventoryEntryDraftGraphql.presets + .skuTt456StGreenEuWarehouse() + .build(); + expect(skuTt456StGreenEuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuTt456StGreenEuWarehouse preset when built for legacy rest`, () => { + const skuTt456StGreenEuWarehousePreset = InventoryEntryDraft.presets + .skuTt456StGreenEuWarehouse() + .buildRest(); + expect(skuTt456StGreenEuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuTt456StGreenEuWarehouse preset when built for legacy graphql`, () => { + const skuTt456StGreenEuWarehousePreset = InventoryEntryDraft.presets + .skuTt456StGreenEuWarehouse() + .buildGraphql(); + expect(skuTt456StGreenEuWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-tt-456-st-green-eu-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-tt-456-st-green-eu-warehouse.ts new file mode 100644 index 000000000..f9908e99d --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-tt-456-st-green-eu-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .euWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .tt456St03() + .build(); + +const skuTt456StGreenEuWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('tt456-st-green-eu-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuTt456StGreenEuWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-tt-456-st-green-us-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-tt-456-st-green-us-warehouse.spec.ts new file mode 100644 index 000000000..049bcba33 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-tt-456-st-green-us-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuTt456StGreenUsWarehouse preset`, () => { + it(`should return a skuTt456StGreenUsWarehouse preset when built for rest`, () => { + const skuTt456StGreenUsWarehousePreset = InventoryEntryDraftRest.presets + .skuTt456StGreenUsWarehouse() + .build(); + expect(skuTt456StGreenUsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuTt456StGreenUsWarehouse preset when built for graphql`, () => { + const skuTt456StGreenUsWarehousePreset = InventoryEntryDraftGraphql.presets + .skuTt456StGreenUsWarehouse() + .build(); + expect(skuTt456StGreenUsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuTt456StGreenUsWarehouse preset when built for legacy rest`, () => { + const skuTt456StGreenUsWarehousePreset = InventoryEntryDraft.presets + .skuTt456StGreenUsWarehouse() + .buildRest(); + expect(skuTt456StGreenUsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuTt456StGreenUsWarehouse preset when built for legacy graphql`, () => { + const skuTt456StGreenUsWarehousePreset = InventoryEntryDraft.presets + .skuTt456StGreenUsWarehouse() + .buildGraphql(); + expect(skuTt456StGreenUsWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-tt-456-st-green-us-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-tt-456-st-green-us-warehouse.ts new file mode 100644 index 000000000..482bb2a3f --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-tt-456-st-green-us-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .usWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .tt456St03() + .build(); + +const skuTt456StGreenUsWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('tt456-st-green-us-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuTt456StGreenUsWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-tt-456-st-red-default-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-tt-456-st-red-default-warehouse.spec.ts new file mode 100644 index 000000000..992b04876 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-tt-456-st-red-default-warehouse.spec.ts @@ -0,0 +1,40 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuTt456StRedDefaultWarehouse preset`, () => { + it(`should return a skuTt456StRedDefaultWarehouse preset when built for rest`, () => { + const skuTt456StRedDefaultWarehousePreset = InventoryEntryDraftRest.presets + .skuTt456StRedDefaultWarehouse() + .build(); + expect(skuTt456StRedDefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuTt456StRedDefaultWarehouse preset when built for graphql`, () => { + const skuTt456StRedDefaultWarehousePreset = + InventoryEntryDraftGraphql.presets + .skuTt456StRedDefaultWarehouse() + .build(); + expect(skuTt456StRedDefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuTt456StRedDefaultWarehouse preset when built for legacy rest`, () => { + const skuTt456StRedDefaultWarehousePreset = InventoryEntryDraft.presets + .skuTt456StRedDefaultWarehouse() + .buildRest(); + expect(skuTt456StRedDefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuTt456StRedDefaultWarehouse preset when built for legacy graphql`, () => { + const skuTt456StRedDefaultWarehousePreset = InventoryEntryDraft.presets + .skuTt456StRedDefaultWarehouse() + .buildGraphql(); + expect(skuTt456StRedDefaultWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-tt-456-st-red-default-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-tt-456-st-red-default-warehouse.ts new file mode 100644 index 000000000..d4fbb6880 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-tt-456-st-red-default-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .defaultWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .tt456St01() + .build(); + +const skuTt456StRedDefaultWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('tt456-st-red-default-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuTt456StRedDefaultWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-tt-456-st-red-eu-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-tt-456-st-red-eu-warehouse.spec.ts new file mode 100644 index 000000000..9ab90b90e --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-tt-456-st-red-eu-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuTt456StRedEuWarehouse preset`, () => { + it(`should return a skuTt456StRedEuWarehouse preset when built for rest`, () => { + const skuTt456StRedEuWarehousePreset = InventoryEntryDraftRest.presets + .skuTt456StRedEuWarehouse() + .build(); + expect(skuTt456StRedEuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuTt456StRedEuWarehouse preset when built for graphql`, () => { + const skuTt456StRedEuWarehousePreset = InventoryEntryDraftGraphql.presets + .skuTt456StRedEuWarehouse() + .build(); + expect(skuTt456StRedEuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuTt456StRedEuWarehouse preset when built for legacy rest`, () => { + const skuTt456StRedEuWarehousePreset = InventoryEntryDraft.presets + .skuTt456StRedEuWarehouse() + .buildRest(); + expect(skuTt456StRedEuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuTt456StRedEuWarehouse preset when built for legacy graphql`, () => { + const skuTt456StRedEuWarehousePreset = InventoryEntryDraft.presets + .skuTt456StRedEuWarehouse() + .buildGraphql(); + expect(skuTt456StRedEuWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-tt-456-st-red-eu-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-tt-456-st-red-eu-warehouse.ts new file mode 100644 index 000000000..26f296f7e --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-tt-456-st-red-eu-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .euWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .tt456St01() + .build(); + +const skuTt456StRedEuWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('tt456-st-red-eu-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuTt456StRedEuWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-tt-456-st-red-us-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-tt-456-st-red-us-warehouse.spec.ts new file mode 100644 index 000000000..35d11ab19 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-tt-456-st-red-us-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuTt456StRedUsWarehouse preset`, () => { + it(`should return a skuTt456StRedUsWarehouse preset when built for rest`, () => { + const skuTt456StRedUsWarehousePreset = InventoryEntryDraftRest.presets + .skuTt456StRedUsWarehouse() + .build(); + expect(skuTt456StRedUsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuTt456StRedUsWarehouse preset when built for graphql`, () => { + const skuTt456StRedUsWarehousePreset = InventoryEntryDraftGraphql.presets + .skuTt456StRedUsWarehouse() + .build(); + expect(skuTt456StRedUsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuTt456StRedUsWarehouse preset when built for legacy rest`, () => { + const skuTt456StRedUsWarehousePreset = InventoryEntryDraft.presets + .skuTt456StRedUsWarehouse() + .buildRest(); + expect(skuTt456StRedUsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuTt456StRedUsWarehouse preset when built for legacy graphql`, () => { + const skuTt456StRedUsWarehousePreset = InventoryEntryDraft.presets + .skuTt456StRedUsWarehouse() + .buildGraphql(); + expect(skuTt456StRedUsWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-tt-456-st-red-us-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-tt-456-st-red-us-warehouse.ts new file mode 100644 index 000000000..fc01a2b1b --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-tt-456-st-red-us-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .usWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .tt456St01() + .build(); + +const skuTt456StRedUsWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('tt456-st-red-us-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuTt456StRedUsWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-tt456-st-blue-default.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-tt456-st-blue-default.spec.ts deleted file mode 100644 index 7c3ebb19a..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-tt456-st-blue-default.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuTt456StBlueDefault from './sku-tt456-st-blue-default'; - -describe(`with skuTt456StBlueDefault preset and default-warehouse channel`, () => { - it(`should return a skuTt456StBlueDefault preset`, () => { - const skuTt456StBlueDefaultPreset = - skuTt456StBlueDefault().build(); - expect(skuTt456StBlueDefaultPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "tt456-st-blue-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "tt456-st-blue", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuTt456StBlueDefault preset when built for graphql`, () => { - const skuTt456StBlueDefaultPresetGraphql = - skuTt456StBlueDefault().buildGraphql(); - expect(skuTt456StBlueDefaultPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "tt456-st-blue-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "tt456-st-blue", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-tt456-st-blue-default.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-tt456-st-blue-default.ts deleted file mode 100644 index 2f173da34..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-tt456-st-blue-default.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const defaultWarehouse = ChannelDraft.presets.sampleDataB2B - .defaultWarehouse() - .build(); - -const tt456St02 = ProductVariantDraft.presets.sampleDataB2B - .tt456St02() - .build(); - -const skuTt456StBlueDefault = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${tt456St02.sku}-${defaultWarehouse.key}`) - .sku(tt456St02.sku!) - .quantityOnStock(1000) - .supplyChannel( - KeyReferenceDraft.presets.channel().key(defaultWarehouse.key) - ); - -export default skuTt456StBlueDefault; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-tt456-st-blue-eu.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-tt456-st-blue-eu.spec.ts deleted file mode 100644 index d8c7320e8..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-tt456-st-blue-eu.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuTt456StBlueEu from './sku-tt456-st-blue-eu'; - -describe(`with skuTt456StBlueEu preset and eu-warehouse channel`, () => { - it(`should return a skuTt456StBlueEu preset`, () => { - const skuTt456StBlueEuPreset = - skuTt456StBlueEu().build(); - expect(skuTt456StBlueEuPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "tt456-st-blue-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "tt456-st-blue", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuTt456StBlueEu preset when built for graphql`, () => { - const skuTt456StBlueEuPresetGraphql = - skuTt456StBlueEu().buildGraphql(); - expect(skuTt456StBlueEuPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "tt456-st-blue-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "tt456-st-blue", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-tt456-st-blue-eu.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-tt456-st-blue-eu.ts deleted file mode 100644 index 19b17aeb8..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-tt456-st-blue-eu.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const euWarehouse = ChannelDraft.presets.sampleDataB2B - .euWarehouse() - .build(); - -const tt456St02 = ProductVariantDraft.presets.sampleDataB2B - .tt456St02() - .build(); - -const skuTt456StBlueEu = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${tt456St02.sku}-${euWarehouse.key}`) - .sku(tt456St02.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(euWarehouse.key)); - -export default skuTt456StBlueEu; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-tt456-st-blue-us.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-tt456-st-blue-us.spec.ts deleted file mode 100644 index a4ff7e0bc..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-tt456-st-blue-us.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuTt456StBlueUs from './sku-tt456-st-blue-us'; - -describe(`with skuTt456StBlueUs preset and us-warehouse channel`, () => { - it(`should return a skuTt456StBlueUs preset`, () => { - const skuTt456StBlueUsPreset = - skuTt456StBlueUs().build(); - expect(skuTt456StBlueUsPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "tt456-st-blue-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "tt456-st-blue", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuTt456StBlueUs preset when built for graphql`, () => { - const skuTt456StBlueUsPresetGraphql = - skuTt456StBlueUs().buildGraphql(); - expect(skuTt456StBlueUsPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "tt456-st-blue-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "tt456-st-blue", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-tt456-st-blue-us.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-tt456-st-blue-us.ts deleted file mode 100644 index 6274d02a2..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-tt456-st-blue-us.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const usWarehouse = ChannelDraft.presets.sampleDataB2B - .usWarehouse() - .build(); - -const tt456St02 = ProductVariantDraft.presets.sampleDataB2B - .tt456St02() - .build(); - -const skuTt456StBlueUs = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${tt456St02.sku}-${usWarehouse.key}`) - .sku(tt456St02.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(usWarehouse.key)); - -export default skuTt456StBlueUs; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-tt456-st-green-default.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-tt456-st-green-default.spec.ts deleted file mode 100644 index cff696ad7..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-tt456-st-green-default.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuTt456StGreenDefault from './sku-tt456-st-green-default'; - -describe(`with skuTt456StGreenDefault preset and default-warehouse channel`, () => { - it(`should return a skuTt456StGreenDefault preset`, () => { - const skuTt456StGreenDefaultPreset = - skuTt456StGreenDefault().build(); - expect(skuTt456StGreenDefaultPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "tt456-st-green-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "tt456-st-green", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuTt456StGreenDefault preset when built for graphql`, () => { - const skuTt456StGreenDefaultPresetGraphql = - skuTt456StGreenDefault().buildGraphql(); - expect(skuTt456StGreenDefaultPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "tt456-st-green-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "tt456-st-green", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-tt456-st-green-default.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-tt456-st-green-default.ts deleted file mode 100644 index 7baf23807..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-tt456-st-green-default.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const defaultWarehouse = ChannelDraft.presets.sampleDataB2B - .defaultWarehouse() - .build(); - -const tt456St03 = ProductVariantDraft.presets.sampleDataB2B - .tt456St03() - .build(); - -const skuTt456StGreenDefault = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${tt456St03.sku}-${defaultWarehouse.key}`) - .sku(tt456St03.sku!) - .quantityOnStock(1000) - .supplyChannel( - KeyReferenceDraft.presets.channel().key(defaultWarehouse.key) - ); - -export default skuTt456StGreenDefault; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-tt456-st-green-eu.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-tt456-st-green-eu.spec.ts deleted file mode 100644 index 3d8c37d2d..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-tt456-st-green-eu.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuTt456StGreenEu from './sku-tt456-st-green-eu'; - -describe(`with skuTt456StGreenEu preset and eu-warehouse channel`, () => { - it(`should return a skuTt456StGreenEu preset`, () => { - const skuTt456StGreenEuPreset = - skuTt456StGreenEu().build(); - expect(skuTt456StGreenEuPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "tt456-st-green-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "tt456-st-green", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuTt456StGreenEu preset when built for graphql`, () => { - const skuTt456StGreenEuPresetGraphql = - skuTt456StGreenEu().buildGraphql(); - expect(skuTt456StGreenEuPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "tt456-st-green-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "tt456-st-green", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-tt456-st-green-eu.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-tt456-st-green-eu.ts deleted file mode 100644 index a53de0a7e..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-tt456-st-green-eu.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const euWarehouse = ChannelDraft.presets.sampleDataB2B - .euWarehouse() - .build(); - -const tt456St03 = ProductVariantDraft.presets.sampleDataB2B - .tt456St03() - .build(); - -const skuTt456StGreenEu = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${tt456St03.sku}-${euWarehouse.key}`) - .sku(tt456St03.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(euWarehouse.key)); - -export default skuTt456StGreenEu; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-tt456-st-green-us.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-tt456-st-green-us.spec.ts deleted file mode 100644 index 29fb85742..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-tt456-st-green-us.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuTt456StGreenUs from './sku-tt456-st-green-us'; - -describe(`with skuTt456StGreenUs preset and us-warehouse channel`, () => { - it(`should return a skuTt456StGreenUs preset`, () => { - const skuTt456StGreenUsPreset = - skuTt456StGreenUs().build(); - expect(skuTt456StGreenUsPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "tt456-st-green-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "tt456-st-green", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuTt456StGreenUs preset when built for graphql`, () => { - const skuTt456StGreenUsPresetGraphql = - skuTt456StGreenUs().buildGraphql(); - expect(skuTt456StGreenUsPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "tt456-st-green-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "tt456-st-green", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-tt456-st-green-us.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-tt456-st-green-us.ts deleted file mode 100644 index 4bb9fbec2..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-tt456-st-green-us.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const usWarehouse = ChannelDraft.presets.sampleDataB2B - .usWarehouse() - .build(); - -const tt456St03 = ProductVariantDraft.presets.sampleDataB2B - .tt456St03() - .build(); - -const skuTt456StGreenUs = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${tt456St03.sku}-${usWarehouse.key}`) - .sku(tt456St03.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(usWarehouse.key)); - -export default skuTt456StGreenUs; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-tt456-st-red-default.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-tt456-st-red-default.spec.ts deleted file mode 100644 index 78d9efe5f..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-tt456-st-red-default.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuTt456StRedDefault from './sku-tt456-st-red-default'; - -describe(`with skuTt456StRedDefault preset and default-warehouse channel`, () => { - it(`should return a skuTt456StRedDefault preset`, () => { - const skuTt456StRedDefaultPreset = - skuTt456StRedDefault().build(); - expect(skuTt456StRedDefaultPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "tt456-st-red-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "tt456-st-red", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuTt456StRedDefault preset when built for graphql`, () => { - const skuTt456StRedDefaultPresetGraphql = - skuTt456StRedDefault().buildGraphql(); - expect(skuTt456StRedDefaultPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "tt456-st-red-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "tt456-st-red", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-tt456-st-red-default.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-tt456-st-red-default.ts deleted file mode 100644 index 66ceb542a..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-tt456-st-red-default.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const defaultWarehouse = ChannelDraft.presets.sampleDataB2B - .defaultWarehouse() - .build(); - -const tt456St01 = ProductVariantDraft.presets.sampleDataB2B - .tt456St01() - .build(); - -const skuTt456StRedDefault = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${tt456St01.sku}-${defaultWarehouse.key}`) - .sku(tt456St01.sku!) - .quantityOnStock(1000) - .supplyChannel( - KeyReferenceDraft.presets.channel().key(defaultWarehouse.key) - ); - -export default skuTt456StRedDefault; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-tt456-st-red-eu.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-tt456-st-red-eu.spec.ts deleted file mode 100644 index d49b6ee12..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-tt456-st-red-eu.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuTt456StRedEu from './sku-tt456-st-red-eu'; - -describe(`with skuTt456StRedEu preset and eu-warehouse channel`, () => { - it(`should return a skuTt456StRedEu preset`, () => { - const skuTt456StRedEuPreset = - skuTt456StRedEu().build(); - expect(skuTt456StRedEuPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "tt456-st-red-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "tt456-st-red", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuTt456StRedEu preset when built for graphql`, () => { - const skuTt456StRedEuPresetGraphql = - skuTt456StRedEu().buildGraphql(); - expect(skuTt456StRedEuPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "tt456-st-red-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "tt456-st-red", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-tt456-st-red-eu.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-tt456-st-red-eu.ts deleted file mode 100644 index 289ffaeb5..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-tt456-st-red-eu.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const euWarehouse = ChannelDraft.presets.sampleDataB2B - .euWarehouse() - .build(); - -const tt456St01 = ProductVariantDraft.presets.sampleDataB2B - .tt456St01() - .build(); - -const skuTt456StRedEu = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${tt456St01.sku}-${euWarehouse.key}`) - .sku(tt456St01.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(euWarehouse.key)); - -export default skuTt456StRedEu; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-tt456-st-red-us.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-tt456-st-red-us.spec.ts deleted file mode 100644 index 1ae1f333e..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-tt456-st-red-us.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuTt456StRedUs from './sku-tt456-st-red-us'; - -describe(`with skuTt456StRedUs preset and us-warehouse channel`, () => { - it(`should return a skuTt456StRedUs preset`, () => { - const skuTt456StRedUsPreset = - skuTt456StRedUs().build(); - expect(skuTt456StRedUsPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "tt456-st-red-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "tt456-st-red", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuTt456StRedUs preset when built for graphql`, () => { - const skuTt456StRedUsPresetGraphql = - skuTt456StRedUs().buildGraphql(); - expect(skuTt456StRedUsPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "tt456-st-red-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "tt456-st-red", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-tt456-st-red-us.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-tt456-st-red-us.ts deleted file mode 100644 index e7992b43c..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-tt456-st-red-us.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const usWarehouse = ChannelDraft.presets.sampleDataB2B - .usWarehouse() - .build(); - -const tt456St01 = ProductVariantDraft.presets.sampleDataB2B - .tt456St01() - .build(); - -const skuTt456StRedUs = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${tt456St01.sku}-${usWarehouse.key}`) - .sku(tt456St01.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(usWarehouse.key)); - -export default skuTt456StRedUs; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-u-123-qr-2015-default-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-u-123-qr-2015-default-warehouse.spec.ts new file mode 100644 index 000000000..a72dde704 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-u-123-qr-2015-default-warehouse.spec.ts @@ -0,0 +1,40 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuU123Qr2015DefaultWarehouse preset`, () => { + it(`should return a skuU123Qr2015DefaultWarehouse preset when built for rest`, () => { + const skuU123Qr2015DefaultWarehousePreset = InventoryEntryDraftRest.presets + .skuU123Qr2015DefaultWarehouse() + .build(); + expect(skuU123Qr2015DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuU123Qr2015DefaultWarehouse preset when built for graphql`, () => { + const skuU123Qr2015DefaultWarehousePreset = + InventoryEntryDraftGraphql.presets + .skuU123Qr2015DefaultWarehouse() + .build(); + expect(skuU123Qr2015DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuU123Qr2015DefaultWarehouse preset when built for legacy rest`, () => { + const skuU123Qr2015DefaultWarehousePreset = InventoryEntryDraft.presets + .skuU123Qr2015DefaultWarehouse() + .buildRest(); + expect(skuU123Qr2015DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuU123Qr2015DefaultWarehouse preset when built for legacy graphql`, () => { + const skuU123Qr2015DefaultWarehousePreset = InventoryEntryDraft.presets + .skuU123Qr2015DefaultWarehouse() + .buildGraphql(); + expect(skuU123Qr2015DefaultWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-u-123-qr-2015-default-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-u-123-qr-2015-default-warehouse.ts new file mode 100644 index 000000000..1dda3ecf1 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-u-123-qr-2015-default-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .defaultWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .u123Qr01() + .build(); + +const skuU123Qr2015DefaultWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('u123-qr-2015-default-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuU123Qr2015DefaultWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-u-123-qr-2015-eu-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-u-123-qr-2015-eu-warehouse.spec.ts new file mode 100644 index 000000000..998d54d0e --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-u-123-qr-2015-eu-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuU123Qr2015EuWarehouse preset`, () => { + it(`should return a skuU123Qr2015EuWarehouse preset when built for rest`, () => { + const skuU123Qr2015EuWarehousePreset = InventoryEntryDraftRest.presets + .skuU123Qr2015EuWarehouse() + .build(); + expect(skuU123Qr2015EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuU123Qr2015EuWarehouse preset when built for graphql`, () => { + const skuU123Qr2015EuWarehousePreset = InventoryEntryDraftGraphql.presets + .skuU123Qr2015EuWarehouse() + .build(); + expect(skuU123Qr2015EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuU123Qr2015EuWarehouse preset when built for legacy rest`, () => { + const skuU123Qr2015EuWarehousePreset = InventoryEntryDraft.presets + .skuU123Qr2015EuWarehouse() + .buildRest(); + expect(skuU123Qr2015EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuU123Qr2015EuWarehouse preset when built for legacy graphql`, () => { + const skuU123Qr2015EuWarehousePreset = InventoryEntryDraft.presets + .skuU123Qr2015EuWarehouse() + .buildGraphql(); + expect(skuU123Qr2015EuWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-u-123-qr-2015-eu-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-u-123-qr-2015-eu-warehouse.ts new file mode 100644 index 000000000..dc30206ec --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-u-123-qr-2015-eu-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .euWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .u123Qr01() + .build(); + +const skuU123Qr2015EuWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('u123-qr-2015-eu-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuU123Qr2015EuWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-u-123-qr-2015-us-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-u-123-qr-2015-us-warehouse.spec.ts new file mode 100644 index 000000000..954489a54 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-u-123-qr-2015-us-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuU123Qr2015UsWarehouse preset`, () => { + it(`should return a skuU123Qr2015UsWarehouse preset when built for rest`, () => { + const skuU123Qr2015UsWarehousePreset = InventoryEntryDraftRest.presets + .skuU123Qr2015UsWarehouse() + .build(); + expect(skuU123Qr2015UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuU123Qr2015UsWarehouse preset when built for graphql`, () => { + const skuU123Qr2015UsWarehousePreset = InventoryEntryDraftGraphql.presets + .skuU123Qr2015UsWarehouse() + .build(); + expect(skuU123Qr2015UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuU123Qr2015UsWarehouse preset when built for legacy rest`, () => { + const skuU123Qr2015UsWarehousePreset = InventoryEntryDraft.presets + .skuU123Qr2015UsWarehouse() + .buildRest(); + expect(skuU123Qr2015UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuU123Qr2015UsWarehouse preset when built for legacy graphql`, () => { + const skuU123Qr2015UsWarehousePreset = InventoryEntryDraft.presets + .skuU123Qr2015UsWarehouse() + .buildGraphql(); + expect(skuU123Qr2015UsWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-u-123-qr-2015-us-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-u-123-qr-2015-us-warehouse.ts new file mode 100644 index 000000000..1668847b5 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-u-123-qr-2015-us-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .usWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .u123Qr01() + .build(); + +const skuU123Qr2015UsWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('u123-qr-2015-us-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuU123Qr2015UsWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-u-123-qr-2019-default-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-u-123-qr-2019-default-warehouse.spec.ts new file mode 100644 index 000000000..b3ce357fb --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-u-123-qr-2019-default-warehouse.spec.ts @@ -0,0 +1,40 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuU123Qr2019DefaultWarehouse preset`, () => { + it(`should return a skuU123Qr2019DefaultWarehouse preset when built for rest`, () => { + const skuU123Qr2019DefaultWarehousePreset = InventoryEntryDraftRest.presets + .skuU123Qr2019DefaultWarehouse() + .build(); + expect(skuU123Qr2019DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuU123Qr2019DefaultWarehouse preset when built for graphql`, () => { + const skuU123Qr2019DefaultWarehousePreset = + InventoryEntryDraftGraphql.presets + .skuU123Qr2019DefaultWarehouse() + .build(); + expect(skuU123Qr2019DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuU123Qr2019DefaultWarehouse preset when built for legacy rest`, () => { + const skuU123Qr2019DefaultWarehousePreset = InventoryEntryDraft.presets + .skuU123Qr2019DefaultWarehouse() + .buildRest(); + expect(skuU123Qr2019DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuU123Qr2019DefaultWarehouse preset when built for legacy graphql`, () => { + const skuU123Qr2019DefaultWarehousePreset = InventoryEntryDraft.presets + .skuU123Qr2019DefaultWarehouse() + .buildGraphql(); + expect(skuU123Qr2019DefaultWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-u-123-qr-2019-default-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-u-123-qr-2019-default-warehouse.ts new file mode 100644 index 000000000..a4305484b --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-u-123-qr-2019-default-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .defaultWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .u123Qr02() + .build(); + +const skuU123Qr2019DefaultWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('u123-qr-2019-default-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuU123Qr2019DefaultWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-u-123-qr-2019-eu-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-u-123-qr-2019-eu-warehouse.spec.ts new file mode 100644 index 000000000..08c147174 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-u-123-qr-2019-eu-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuU123Qr2019EuWarehouse preset`, () => { + it(`should return a skuU123Qr2019EuWarehouse preset when built for rest`, () => { + const skuU123Qr2019EuWarehousePreset = InventoryEntryDraftRest.presets + .skuU123Qr2019EuWarehouse() + .build(); + expect(skuU123Qr2019EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuU123Qr2019EuWarehouse preset when built for graphql`, () => { + const skuU123Qr2019EuWarehousePreset = InventoryEntryDraftGraphql.presets + .skuU123Qr2019EuWarehouse() + .build(); + expect(skuU123Qr2019EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuU123Qr2019EuWarehouse preset when built for legacy rest`, () => { + const skuU123Qr2019EuWarehousePreset = InventoryEntryDraft.presets + .skuU123Qr2019EuWarehouse() + .buildRest(); + expect(skuU123Qr2019EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuU123Qr2019EuWarehouse preset when built for legacy graphql`, () => { + const skuU123Qr2019EuWarehousePreset = InventoryEntryDraft.presets + .skuU123Qr2019EuWarehouse() + .buildGraphql(); + expect(skuU123Qr2019EuWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-u-123-qr-2019-eu-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-u-123-qr-2019-eu-warehouse.ts new file mode 100644 index 000000000..3734aa866 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-u-123-qr-2019-eu-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .euWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .u123Qr02() + .build(); + +const skuU123Qr2019EuWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('u123-qr-2019-eu-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuU123Qr2019EuWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-u-123-qr-2019-us-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-u-123-qr-2019-us-warehouse.spec.ts new file mode 100644 index 000000000..6db62d2fb --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-u-123-qr-2019-us-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuU123Qr2019UsWarehouse preset`, () => { + it(`should return a skuU123Qr2019UsWarehouse preset when built for rest`, () => { + const skuU123Qr2019UsWarehousePreset = InventoryEntryDraftRest.presets + .skuU123Qr2019UsWarehouse() + .build(); + expect(skuU123Qr2019UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuU123Qr2019UsWarehouse preset when built for graphql`, () => { + const skuU123Qr2019UsWarehousePreset = InventoryEntryDraftGraphql.presets + .skuU123Qr2019UsWarehouse() + .build(); + expect(skuU123Qr2019UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuU123Qr2019UsWarehouse preset when built for legacy rest`, () => { + const skuU123Qr2019UsWarehousePreset = InventoryEntryDraft.presets + .skuU123Qr2019UsWarehouse() + .buildRest(); + expect(skuU123Qr2019UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuU123Qr2019UsWarehouse preset when built for legacy graphql`, () => { + const skuU123Qr2019UsWarehousePreset = InventoryEntryDraft.presets + .skuU123Qr2019UsWarehouse() + .buildGraphql(); + expect(skuU123Qr2019UsWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-u-123-qr-2019-us-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-u-123-qr-2019-us-warehouse.ts new file mode 100644 index 000000000..4a0261484 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-u-123-qr-2019-us-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .usWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .u123Qr02() + .build(); + +const skuU123Qr2019UsWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('u123-qr-2019-us-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuU123Qr2019UsWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-u-123-qr-2023-default-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-u-123-qr-2023-default-warehouse.spec.ts new file mode 100644 index 000000000..bd7f6f9d7 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-u-123-qr-2023-default-warehouse.spec.ts @@ -0,0 +1,40 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuU123Qr2023DefaultWarehouse preset`, () => { + it(`should return a skuU123Qr2023DefaultWarehouse preset when built for rest`, () => { + const skuU123Qr2023DefaultWarehousePreset = InventoryEntryDraftRest.presets + .skuU123Qr2023DefaultWarehouse() + .build(); + expect(skuU123Qr2023DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuU123Qr2023DefaultWarehouse preset when built for graphql`, () => { + const skuU123Qr2023DefaultWarehousePreset = + InventoryEntryDraftGraphql.presets + .skuU123Qr2023DefaultWarehouse() + .build(); + expect(skuU123Qr2023DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuU123Qr2023DefaultWarehouse preset when built for legacy rest`, () => { + const skuU123Qr2023DefaultWarehousePreset = InventoryEntryDraft.presets + .skuU123Qr2023DefaultWarehouse() + .buildRest(); + expect(skuU123Qr2023DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuU123Qr2023DefaultWarehouse preset when built for legacy graphql`, () => { + const skuU123Qr2023DefaultWarehousePreset = InventoryEntryDraft.presets + .skuU123Qr2023DefaultWarehouse() + .buildGraphql(); + expect(skuU123Qr2023DefaultWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-u-123-qr-2023-default-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-u-123-qr-2023-default-warehouse.ts new file mode 100644 index 000000000..286259fde --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-u-123-qr-2023-default-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .defaultWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .u123Qr03() + .build(); + +const skuU123Qr2023DefaultWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('u123-qr-2023-default-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuU123Qr2023DefaultWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-u-123-qr-2023-eu-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-u-123-qr-2023-eu-warehouse.spec.ts new file mode 100644 index 000000000..7da57bbf8 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-u-123-qr-2023-eu-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuU123Qr2023EuWarehouse preset`, () => { + it(`should return a skuU123Qr2023EuWarehouse preset when built for rest`, () => { + const skuU123Qr2023EuWarehousePreset = InventoryEntryDraftRest.presets + .skuU123Qr2023EuWarehouse() + .build(); + expect(skuU123Qr2023EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuU123Qr2023EuWarehouse preset when built for graphql`, () => { + const skuU123Qr2023EuWarehousePreset = InventoryEntryDraftGraphql.presets + .skuU123Qr2023EuWarehouse() + .build(); + expect(skuU123Qr2023EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuU123Qr2023EuWarehouse preset when built for legacy rest`, () => { + const skuU123Qr2023EuWarehousePreset = InventoryEntryDraft.presets + .skuU123Qr2023EuWarehouse() + .buildRest(); + expect(skuU123Qr2023EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuU123Qr2023EuWarehouse preset when built for legacy graphql`, () => { + const skuU123Qr2023EuWarehousePreset = InventoryEntryDraft.presets + .skuU123Qr2023EuWarehouse() + .buildGraphql(); + expect(skuU123Qr2023EuWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-u-123-qr-2023-eu-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-u-123-qr-2023-eu-warehouse.ts new file mode 100644 index 000000000..fd1760801 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-u-123-qr-2023-eu-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .euWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .u123Qr03() + .build(); + +const skuU123Qr2023EuWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('u123-qr-2023-eu-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuU123Qr2023EuWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-u-123-qr-2023-us-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-u-123-qr-2023-us-warehouse.spec.ts new file mode 100644 index 000000000..8e2a396ce --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-u-123-qr-2023-us-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuU123Qr2023UsWarehouse preset`, () => { + it(`should return a skuU123Qr2023UsWarehouse preset when built for rest`, () => { + const skuU123Qr2023UsWarehousePreset = InventoryEntryDraftRest.presets + .skuU123Qr2023UsWarehouse() + .build(); + expect(skuU123Qr2023UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuU123Qr2023UsWarehouse preset when built for graphql`, () => { + const skuU123Qr2023UsWarehousePreset = InventoryEntryDraftGraphql.presets + .skuU123Qr2023UsWarehouse() + .build(); + expect(skuU123Qr2023UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuU123Qr2023UsWarehouse preset when built for legacy rest`, () => { + const skuU123Qr2023UsWarehousePreset = InventoryEntryDraft.presets + .skuU123Qr2023UsWarehouse() + .buildRest(); + expect(skuU123Qr2023UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuU123Qr2023UsWarehouse preset when built for legacy graphql`, () => { + const skuU123Qr2023UsWarehousePreset = InventoryEntryDraft.presets + .skuU123Qr2023UsWarehouse() + .buildGraphql(); + expect(skuU123Qr2023UsWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-u-123-qr-2023-us-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-u-123-qr-2023-us-warehouse.ts new file mode 100644 index 000000000..c640a67ce --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-u-123-qr-2023-us-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .usWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .u123Qr03() + .build(); + +const skuU123Qr2023UsWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('u123-qr-2023-us-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuU123Qr2023UsWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-u123-qr-2015-default.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-u123-qr-2015-default.spec.ts deleted file mode 100644 index d6589bc8e..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-u123-qr-2015-default.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuU123Qr2015Default from './sku-u123-qr-2015-default'; - -describe(`with skuU123Qr2015Default preset and default-warehouse channel`, () => { - it(`should return a skuU123Qr2015Default preset`, () => { - const skuU123Qr2015DefaultPreset = - skuU123Qr2015Default().build(); - expect(skuU123Qr2015DefaultPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "u123-qr-2015-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "u123-qr-2015", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuU123Qr2015Default preset when built for graphql`, () => { - const skuU123Qr2015DefaultPresetGraphql = - skuU123Qr2015Default().buildGraphql(); - expect(skuU123Qr2015DefaultPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "u123-qr-2015-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "u123-qr-2015", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-u123-qr-2015-default.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-u123-qr-2015-default.ts deleted file mode 100644 index 6b3dda95b..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-u123-qr-2015-default.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const defaultWarehouse = ChannelDraft.presets.sampleDataB2B - .defaultWarehouse() - .build(); - -const u123Qr01 = ProductVariantDraft.presets.sampleDataB2B - .u123Qr01() - .build(); - -const skuU123Qr2015Default = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${u123Qr01.sku}-${defaultWarehouse.key}`) - .sku(u123Qr01.sku!) - .quantityOnStock(1000) - .supplyChannel( - KeyReferenceDraft.presets.channel().key(defaultWarehouse.key) - ); - -export default skuU123Qr2015Default; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-u123-qr-2015-eu.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-u123-qr-2015-eu.spec.ts deleted file mode 100644 index 308072af2..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-u123-qr-2015-eu.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuU123Qr2015Eu from './sku-u123-qr-2015-eu'; - -describe(`with skuU123Qr2015Eu preset and eu-warehouse channel`, () => { - it(`should return a skuU123Qr2015Eu preset`, () => { - const skuU123Qr2015EuPreset = - skuU123Qr2015Eu().build(); - expect(skuU123Qr2015EuPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "u123-qr-2015-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "u123-qr-2015", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuU123Qr2015Eu preset when built for graphql`, () => { - const skuU123Qr2015EuPresetGraphql = - skuU123Qr2015Eu().buildGraphql(); - expect(skuU123Qr2015EuPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "u123-qr-2015-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "u123-qr-2015", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-u123-qr-2015-eu.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-u123-qr-2015-eu.ts deleted file mode 100644 index a2af74fe2..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-u123-qr-2015-eu.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const euWarehouse = ChannelDraft.presets.sampleDataB2B - .euWarehouse() - .build(); - -const u123Qr01 = ProductVariantDraft.presets.sampleDataB2B - .u123Qr01() - .build(); - -const skuU123Qr2015Eu = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${u123Qr01.sku}-${euWarehouse.key}`) - .sku(u123Qr01.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(euWarehouse.key)); - -export default skuU123Qr2015Eu; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-u123-qr-2015-us.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-u123-qr-2015-us.spec.ts deleted file mode 100644 index 7f4fbd7f4..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-u123-qr-2015-us.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuU123Qr2015Us from './sku-u123-qr-2015-us'; - -describe(`with skuU123Qr2015Us preset and us-warehouse channel`, () => { - it(`should return a skuU123Qr2015Us preset`, () => { - const skuU123Qr2015UsPreset = - skuU123Qr2015Us().build(); - expect(skuU123Qr2015UsPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "u123-qr-2015-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "u123-qr-2015", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuU123Qr2015Us preset when built for graphql`, () => { - const skuU123Qr2015UsPresetGraphql = - skuU123Qr2015Us().buildGraphql(); - expect(skuU123Qr2015UsPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "u123-qr-2015-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "u123-qr-2015", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-u123-qr-2015-us.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-u123-qr-2015-us.ts deleted file mode 100644 index 7c0d11242..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-u123-qr-2015-us.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const usWarehouse = ChannelDraft.presets.sampleDataB2B - .usWarehouse() - .build(); - -const u123Qr01 = ProductVariantDraft.presets.sampleDataB2B - .u123Qr01() - .build(); - -const skuU123Qr2015Us = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${u123Qr01.sku}-${usWarehouse.key}`) - .sku(u123Qr01.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(usWarehouse.key)); - -export default skuU123Qr2015Us; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-u123-qr-2019-default.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-u123-qr-2019-default.spec.ts deleted file mode 100644 index 714ac86e2..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-u123-qr-2019-default.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuU123Qr2019Default from './sku-u123-qr-2019-default'; - -describe(`with skuU123Qr2019Default preset and default-warehouse channel`, () => { - it(`should return a skuU123Qr2019Default preset`, () => { - const skuU123Qr2019DefaultPreset = - skuU123Qr2019Default().build(); - expect(skuU123Qr2019DefaultPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "u123-qr-2019-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "u123-qr-2019", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuU123Qr2019Default preset when built for graphql`, () => { - const skuU123Qr2019DefaultPresetGraphql = - skuU123Qr2019Default().buildGraphql(); - expect(skuU123Qr2019DefaultPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "u123-qr-2019-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "u123-qr-2019", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-u123-qr-2019-default.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-u123-qr-2019-default.ts deleted file mode 100644 index d8b8090b4..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-u123-qr-2019-default.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const defaultWarehouse = ChannelDraft.presets.sampleDataB2B - .defaultWarehouse() - .build(); - -const u123Qr02 = ProductVariantDraft.presets.sampleDataB2B - .u123Qr02() - .build(); - -const skuU123Qr2019Default = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${u123Qr02.sku}-${defaultWarehouse.key}`) - .sku(u123Qr02.sku!) - .quantityOnStock(1000) - .supplyChannel( - KeyReferenceDraft.presets.channel().key(defaultWarehouse.key) - ); - -export default skuU123Qr2019Default; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-u123-qr-2019-eu.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-u123-qr-2019-eu.spec.ts deleted file mode 100644 index 9508283e1..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-u123-qr-2019-eu.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuU123Qr2019Eu from './sku-u123-qr-2019-eu'; - -describe(`with skuU123Qr2019Eu preset and eu-warehouse channel`, () => { - it(`should return a skuU123Qr2019Eu preset`, () => { - const skuU123Qr2019EuPreset = - skuU123Qr2019Eu().build(); - expect(skuU123Qr2019EuPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "u123-qr-2019-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "u123-qr-2019", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuU123Qr2019Eu preset when built for graphql`, () => { - const skuU123Qr2019EuPresetGraphql = - skuU123Qr2019Eu().buildGraphql(); - expect(skuU123Qr2019EuPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "u123-qr-2019-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "u123-qr-2019", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-u123-qr-2019-eu.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-u123-qr-2019-eu.ts deleted file mode 100644 index ea5281dc0..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-u123-qr-2019-eu.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const euWarehouse = ChannelDraft.presets.sampleDataB2B - .euWarehouse() - .build(); - -const u123Qr02 = ProductVariantDraft.presets.sampleDataB2B - .u123Qr02() - .build(); - -const skuU123Qr2019Eu = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${u123Qr02.sku}-${euWarehouse.key}`) - .sku(u123Qr02.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(euWarehouse.key)); - -export default skuU123Qr2019Eu; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-u123-qr-2019-us.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-u123-qr-2019-us.spec.ts deleted file mode 100644 index b66fb497a..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-u123-qr-2019-us.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuU123Qr2019Us from './sku-u123-qr-2019-us'; - -describe(`with skuU123Qr2019Us preset and us-warehouse channel`, () => { - it(`should return a skuU123Qr2019Us preset`, () => { - const skuU123Qr2019UsPreset = - skuU123Qr2019Us().build(); - expect(skuU123Qr2019UsPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "u123-qr-2019-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "u123-qr-2019", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuU123Qr2019Us preset when built for graphql`, () => { - const skuU123Qr2019UsPresetGraphql = - skuU123Qr2019Us().buildGraphql(); - expect(skuU123Qr2019UsPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "u123-qr-2019-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "u123-qr-2019", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-u123-qr-2019-us.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-u123-qr-2019-us.ts deleted file mode 100644 index 14d6e5613..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-u123-qr-2019-us.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const usWarehouse = ChannelDraft.presets.sampleDataB2B - .usWarehouse() - .build(); - -const u123Qr02 = ProductVariantDraft.presets.sampleDataB2B - .u123Qr02() - .build(); - -const skuU123Qr2019Us = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${u123Qr02.sku}-${usWarehouse.key}`) - .sku(u123Qr02.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(usWarehouse.key)); - -export default skuU123Qr2019Us; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-u123-qr-2023-default.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-u123-qr-2023-default.spec.ts deleted file mode 100644 index 9ff1f3d4c..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-u123-qr-2023-default.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuU123Qr2023Default from './sku-u123-qr-2023-default'; - -describe(`with skuU123Qr2023Default preset and default-warehouse channel`, () => { - it(`should return a skuU123Qr2023Default preset`, () => { - const skuU123Qr2023DefaultPreset = - skuU123Qr2023Default().build(); - expect(skuU123Qr2023DefaultPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "u123-qr-2023-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "u123-qr-2023", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuU123Qr2023Default preset when built for graphql`, () => { - const skuU123Qr2023DefaultPresetGraphql = - skuU123Qr2023Default().buildGraphql(); - expect(skuU123Qr2023DefaultPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "u123-qr-2023-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "u123-qr-2023", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-u123-qr-2023-default.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-u123-qr-2023-default.ts deleted file mode 100644 index 04b6c4a8f..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-u123-qr-2023-default.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const defaultWarehouse = ChannelDraft.presets.sampleDataB2B - .defaultWarehouse() - .build(); - -const u123Qr03 = ProductVariantDraft.presets.sampleDataB2B - .u123Qr03() - .build(); - -const skuU123Qr2023Default = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${u123Qr03.sku}-${defaultWarehouse.key}`) - .sku(u123Qr03.sku!) - .quantityOnStock(1000) - .supplyChannel( - KeyReferenceDraft.presets.channel().key(defaultWarehouse.key) - ); - -export default skuU123Qr2023Default; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-u123-qr-2023-eu.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-u123-qr-2023-eu.spec.ts deleted file mode 100644 index 175d7a287..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-u123-qr-2023-eu.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuU123Qr2023Eu from './sku-u123-qr-2023-eu'; - -describe(`with skuU123Qr2023Eu preset and eu-warehouse channel`, () => { - it(`should return a skuU123Qr2023Eu preset`, () => { - const skuU123Qr2023EuPreset = - skuU123Qr2023Eu().build(); - expect(skuU123Qr2023EuPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "u123-qr-2023-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "u123-qr-2023", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuU123Qr2023Eu preset when built for graphql`, () => { - const skuU123Qr2023EuPresetGraphql = - skuU123Qr2023Eu().buildGraphql(); - expect(skuU123Qr2023EuPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "u123-qr-2023-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "u123-qr-2023", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-u123-qr-2023-eu.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-u123-qr-2023-eu.ts deleted file mode 100644 index c735f97ff..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-u123-qr-2023-eu.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const euWarehouse = ChannelDraft.presets.sampleDataB2B - .euWarehouse() - .build(); - -const u123Qr03 = ProductVariantDraft.presets.sampleDataB2B - .u123Qr03() - .build(); - -const skuU123Qr2023Eu = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${u123Qr03.sku}-${euWarehouse.key}`) - .sku(u123Qr03.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(euWarehouse.key)); - -export default skuU123Qr2023Eu; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-u123-qr-2023-us.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-u123-qr-2023-us.spec.ts deleted file mode 100644 index ab769aa99..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-u123-qr-2023-us.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuU123Qr2023Us from './sku-u123-qr-2023-us'; - -describe(`with skuU123Qr2023Us preset and us-warehouse channel`, () => { - it(`should return a skuU123Qr2023Us preset`, () => { - const skuU123Qr2023UsPreset = - skuU123Qr2023Us().build(); - expect(skuU123Qr2023UsPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "u123-qr-2023-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "u123-qr-2023", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuU123Qr2023Us preset when built for graphql`, () => { - const skuU123Qr2023UsPresetGraphql = - skuU123Qr2023Us().buildGraphql(); - expect(skuU123Qr2023UsPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "u123-qr-2023-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "u123-qr-2023", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-u123-qr-2023-us.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-u123-qr-2023-us.ts deleted file mode 100644 index 4d741fceb..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-u123-qr-2023-us.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const usWarehouse = ChannelDraft.presets.sampleDataB2B - .usWarehouse() - .build(); - -const u123Qr03 = ProductVariantDraft.presets.sampleDataB2B - .u123Qr03() - .build(); - -const skuU123Qr2023Us = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${u123Qr03.sku}-${usWarehouse.key}`) - .sku(u123Qr03.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(usWarehouse.key)); - -export default skuU123Qr2023Us; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-uu-789-uv-blue-default-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-uu-789-uv-blue-default-warehouse.spec.ts new file mode 100644 index 000000000..2bacb2c77 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-uu-789-uv-blue-default-warehouse.spec.ts @@ -0,0 +1,40 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuUu789UvBlueDefaultWarehouse preset`, () => { + it(`should return a skuUu789UvBlueDefaultWarehouse preset when built for rest`, () => { + const skuUu789UvBlueDefaultWarehousePreset = InventoryEntryDraftRest.presets + .skuUu789UvBlueDefaultWarehouse() + .build(); + expect(skuUu789UvBlueDefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuUu789UvBlueDefaultWarehouse preset when built for graphql`, () => { + const skuUu789UvBlueDefaultWarehousePreset = + InventoryEntryDraftGraphql.presets + .skuUu789UvBlueDefaultWarehouse() + .build(); + expect(skuUu789UvBlueDefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuUu789UvBlueDefaultWarehouse preset when built for legacy rest`, () => { + const skuUu789UvBlueDefaultWarehousePreset = InventoryEntryDraft.presets + .skuUu789UvBlueDefaultWarehouse() + .buildRest(); + expect(skuUu789UvBlueDefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuUu789UvBlueDefaultWarehouse preset when built for legacy graphql`, () => { + const skuUu789UvBlueDefaultWarehousePreset = InventoryEntryDraft.presets + .skuUu789UvBlueDefaultWarehouse() + .buildGraphql(); + expect(skuUu789UvBlueDefaultWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-uu-789-uv-blue-default-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-uu-789-uv-blue-default-warehouse.ts new file mode 100644 index 000000000..834bb26b7 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-uu-789-uv-blue-default-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .defaultWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .uu789Uv02() + .build(); + +const skuUu789UvBlueDefaultWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('uu789-uv-blue-default-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuUu789UvBlueDefaultWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-uu-789-uv-blue-eu-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-uu-789-uv-blue-eu-warehouse.spec.ts new file mode 100644 index 000000000..ec824c3bf --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-uu-789-uv-blue-eu-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuUu789UvBlueEuWarehouse preset`, () => { + it(`should return a skuUu789UvBlueEuWarehouse preset when built for rest`, () => { + const skuUu789UvBlueEuWarehousePreset = InventoryEntryDraftRest.presets + .skuUu789UvBlueEuWarehouse() + .build(); + expect(skuUu789UvBlueEuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuUu789UvBlueEuWarehouse preset when built for graphql`, () => { + const skuUu789UvBlueEuWarehousePreset = InventoryEntryDraftGraphql.presets + .skuUu789UvBlueEuWarehouse() + .build(); + expect(skuUu789UvBlueEuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuUu789UvBlueEuWarehouse preset when built for legacy rest`, () => { + const skuUu789UvBlueEuWarehousePreset = InventoryEntryDraft.presets + .skuUu789UvBlueEuWarehouse() + .buildRest(); + expect(skuUu789UvBlueEuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuUu789UvBlueEuWarehouse preset when built for legacy graphql`, () => { + const skuUu789UvBlueEuWarehousePreset = InventoryEntryDraft.presets + .skuUu789UvBlueEuWarehouse() + .buildGraphql(); + expect(skuUu789UvBlueEuWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-uu-789-uv-blue-eu-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-uu-789-uv-blue-eu-warehouse.ts new file mode 100644 index 000000000..3126068e8 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-uu-789-uv-blue-eu-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .euWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .uu789Uv02() + .build(); + +const skuUu789UvBlueEuWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('uu789-uv-blue-eu-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuUu789UvBlueEuWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-uu-789-uv-blue-us-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-uu-789-uv-blue-us-warehouse.spec.ts new file mode 100644 index 000000000..b75519139 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-uu-789-uv-blue-us-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuUu789UvBlueUsWarehouse preset`, () => { + it(`should return a skuUu789UvBlueUsWarehouse preset when built for rest`, () => { + const skuUu789UvBlueUsWarehousePreset = InventoryEntryDraftRest.presets + .skuUu789UvBlueUsWarehouse() + .build(); + expect(skuUu789UvBlueUsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuUu789UvBlueUsWarehouse preset when built for graphql`, () => { + const skuUu789UvBlueUsWarehousePreset = InventoryEntryDraftGraphql.presets + .skuUu789UvBlueUsWarehouse() + .build(); + expect(skuUu789UvBlueUsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuUu789UvBlueUsWarehouse preset when built for legacy rest`, () => { + const skuUu789UvBlueUsWarehousePreset = InventoryEntryDraft.presets + .skuUu789UvBlueUsWarehouse() + .buildRest(); + expect(skuUu789UvBlueUsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuUu789UvBlueUsWarehouse preset when built for legacy graphql`, () => { + const skuUu789UvBlueUsWarehousePreset = InventoryEntryDraft.presets + .skuUu789UvBlueUsWarehouse() + .buildGraphql(); + expect(skuUu789UvBlueUsWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-uu-789-uv-blue-us-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-uu-789-uv-blue-us-warehouse.ts new file mode 100644 index 000000000..6f9bc42e8 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-uu-789-uv-blue-us-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .usWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .uu789Uv02() + .build(); + +const skuUu789UvBlueUsWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('uu789-uv-blue-us-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuUu789UvBlueUsWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-uu-789-uv-green-default-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-uu-789-uv-green-default-warehouse.spec.ts new file mode 100644 index 000000000..6086a11a5 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-uu-789-uv-green-default-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuUu789UvGreenDefaultWarehouse preset`, () => { + it(`should return a skuUu789UvGreenDefaultWarehouse preset when built for rest`, () => { + const skuUu789UvGreenDefaultWarehousePreset = + InventoryEntryDraftRest.presets.skuUu789UvGreenDefaultWarehouse().build(); + expect(skuUu789UvGreenDefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuUu789UvGreenDefaultWarehouse preset when built for graphql`, () => { + const skuUu789UvGreenDefaultWarehousePreset = + InventoryEntryDraftGraphql.presets + .skuUu789UvGreenDefaultWarehouse() + .build(); + expect(skuUu789UvGreenDefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuUu789UvGreenDefaultWarehouse preset when built for legacy rest`, () => { + const skuUu789UvGreenDefaultWarehousePreset = InventoryEntryDraft.presets + .skuUu789UvGreenDefaultWarehouse() + .buildRest(); + expect(skuUu789UvGreenDefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuUu789UvGreenDefaultWarehouse preset when built for legacy graphql`, () => { + const skuUu789UvGreenDefaultWarehousePreset = InventoryEntryDraft.presets + .skuUu789UvGreenDefaultWarehouse() + .buildGraphql(); + expect(skuUu789UvGreenDefaultWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-uu-789-uv-green-default-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-uu-789-uv-green-default-warehouse.ts new file mode 100644 index 000000000..2c8408406 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-uu-789-uv-green-default-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .defaultWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .uu789Uv03() + .build(); + +const skuUu789UvGreenDefaultWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('uu789-uv-green-default-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuUu789UvGreenDefaultWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-uu-789-uv-green-eu-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-uu-789-uv-green-eu-warehouse.spec.ts new file mode 100644 index 000000000..e33515f16 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-uu-789-uv-green-eu-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuUu789UvGreenEuWarehouse preset`, () => { + it(`should return a skuUu789UvGreenEuWarehouse preset when built for rest`, () => { + const skuUu789UvGreenEuWarehousePreset = InventoryEntryDraftRest.presets + .skuUu789UvGreenEuWarehouse() + .build(); + expect(skuUu789UvGreenEuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuUu789UvGreenEuWarehouse preset when built for graphql`, () => { + const skuUu789UvGreenEuWarehousePreset = InventoryEntryDraftGraphql.presets + .skuUu789UvGreenEuWarehouse() + .build(); + expect(skuUu789UvGreenEuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuUu789UvGreenEuWarehouse preset when built for legacy rest`, () => { + const skuUu789UvGreenEuWarehousePreset = InventoryEntryDraft.presets + .skuUu789UvGreenEuWarehouse() + .buildRest(); + expect(skuUu789UvGreenEuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuUu789UvGreenEuWarehouse preset when built for legacy graphql`, () => { + const skuUu789UvGreenEuWarehousePreset = InventoryEntryDraft.presets + .skuUu789UvGreenEuWarehouse() + .buildGraphql(); + expect(skuUu789UvGreenEuWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-uu-789-uv-green-eu-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-uu-789-uv-green-eu-warehouse.ts new file mode 100644 index 000000000..8670f4a19 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-uu-789-uv-green-eu-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .euWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .uu789Uv03() + .build(); + +const skuUu789UvGreenEuWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('uu789-uv-green-eu-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuUu789UvGreenEuWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-uu-789-uv-green-us-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-uu-789-uv-green-us-warehouse.spec.ts new file mode 100644 index 000000000..c4a418e6e --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-uu-789-uv-green-us-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuUu789UvGreenUsWarehouse preset`, () => { + it(`should return a skuUu789UvGreenUsWarehouse preset when built for rest`, () => { + const skuUu789UvGreenUsWarehousePreset = InventoryEntryDraftRest.presets + .skuUu789UvGreenUsWarehouse() + .build(); + expect(skuUu789UvGreenUsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuUu789UvGreenUsWarehouse preset when built for graphql`, () => { + const skuUu789UvGreenUsWarehousePreset = InventoryEntryDraftGraphql.presets + .skuUu789UvGreenUsWarehouse() + .build(); + expect(skuUu789UvGreenUsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuUu789UvGreenUsWarehouse preset when built for legacy rest`, () => { + const skuUu789UvGreenUsWarehousePreset = InventoryEntryDraft.presets + .skuUu789UvGreenUsWarehouse() + .buildRest(); + expect(skuUu789UvGreenUsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuUu789UvGreenUsWarehouse preset when built for legacy graphql`, () => { + const skuUu789UvGreenUsWarehousePreset = InventoryEntryDraft.presets + .skuUu789UvGreenUsWarehouse() + .buildGraphql(); + expect(skuUu789UvGreenUsWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-uu-789-uv-green-us-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-uu-789-uv-green-us-warehouse.ts new file mode 100644 index 000000000..1d1cfb246 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-uu-789-uv-green-us-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .usWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .uu789Uv03() + .build(); + +const skuUu789UvGreenUsWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('uu789-uv-green-us-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuUu789UvGreenUsWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-uu-789-uv-red-default-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-uu-789-uv-red-default-warehouse.spec.ts new file mode 100644 index 000000000..1dd553ba0 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-uu-789-uv-red-default-warehouse.spec.ts @@ -0,0 +1,40 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuUu789UvRedDefaultWarehouse preset`, () => { + it(`should return a skuUu789UvRedDefaultWarehouse preset when built for rest`, () => { + const skuUu789UvRedDefaultWarehousePreset = InventoryEntryDraftRest.presets + .skuUu789UvRedDefaultWarehouse() + .build(); + expect(skuUu789UvRedDefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuUu789UvRedDefaultWarehouse preset when built for graphql`, () => { + const skuUu789UvRedDefaultWarehousePreset = + InventoryEntryDraftGraphql.presets + .skuUu789UvRedDefaultWarehouse() + .build(); + expect(skuUu789UvRedDefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuUu789UvRedDefaultWarehouse preset when built for legacy rest`, () => { + const skuUu789UvRedDefaultWarehousePreset = InventoryEntryDraft.presets + .skuUu789UvRedDefaultWarehouse() + .buildRest(); + expect(skuUu789UvRedDefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuUu789UvRedDefaultWarehouse preset when built for legacy graphql`, () => { + const skuUu789UvRedDefaultWarehousePreset = InventoryEntryDraft.presets + .skuUu789UvRedDefaultWarehouse() + .buildGraphql(); + expect(skuUu789UvRedDefaultWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-uu-789-uv-red-default-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-uu-789-uv-red-default-warehouse.ts new file mode 100644 index 000000000..9b431cbd8 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-uu-789-uv-red-default-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .defaultWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .uu789Uv01() + .build(); + +const skuUu789UvRedDefaultWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('uu789-uv-red-default-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuUu789UvRedDefaultWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-uu-789-uv-red-eu-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-uu-789-uv-red-eu-warehouse.spec.ts new file mode 100644 index 000000000..29f7ffe23 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-uu-789-uv-red-eu-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuUu789UvRedEuWarehouse preset`, () => { + it(`should return a skuUu789UvRedEuWarehouse preset when built for rest`, () => { + const skuUu789UvRedEuWarehousePreset = InventoryEntryDraftRest.presets + .skuUu789UvRedEuWarehouse() + .build(); + expect(skuUu789UvRedEuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuUu789UvRedEuWarehouse preset when built for graphql`, () => { + const skuUu789UvRedEuWarehousePreset = InventoryEntryDraftGraphql.presets + .skuUu789UvRedEuWarehouse() + .build(); + expect(skuUu789UvRedEuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuUu789UvRedEuWarehouse preset when built for legacy rest`, () => { + const skuUu789UvRedEuWarehousePreset = InventoryEntryDraft.presets + .skuUu789UvRedEuWarehouse() + .buildRest(); + expect(skuUu789UvRedEuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuUu789UvRedEuWarehouse preset when built for legacy graphql`, () => { + const skuUu789UvRedEuWarehousePreset = InventoryEntryDraft.presets + .skuUu789UvRedEuWarehouse() + .buildGraphql(); + expect(skuUu789UvRedEuWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-uu-789-uv-red-eu-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-uu-789-uv-red-eu-warehouse.ts new file mode 100644 index 000000000..bbac58f73 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-uu-789-uv-red-eu-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .euWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .uu789Uv01() + .build(); + +const skuUu789UvRedEuWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('uu789-uv-red-eu-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuUu789UvRedEuWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-uu-789-uv-red-us-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-uu-789-uv-red-us-warehouse.spec.ts new file mode 100644 index 000000000..fffe529e4 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-uu-789-uv-red-us-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuUu789UvRedUsWarehouse preset`, () => { + it(`should return a skuUu789UvRedUsWarehouse preset when built for rest`, () => { + const skuUu789UvRedUsWarehousePreset = InventoryEntryDraftRest.presets + .skuUu789UvRedUsWarehouse() + .build(); + expect(skuUu789UvRedUsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuUu789UvRedUsWarehouse preset when built for graphql`, () => { + const skuUu789UvRedUsWarehousePreset = InventoryEntryDraftGraphql.presets + .skuUu789UvRedUsWarehouse() + .build(); + expect(skuUu789UvRedUsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuUu789UvRedUsWarehouse preset when built for legacy rest`, () => { + const skuUu789UvRedUsWarehousePreset = InventoryEntryDraft.presets + .skuUu789UvRedUsWarehouse() + .buildRest(); + expect(skuUu789UvRedUsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuUu789UvRedUsWarehouse preset when built for legacy graphql`, () => { + const skuUu789UvRedUsWarehousePreset = InventoryEntryDraft.presets + .skuUu789UvRedUsWarehouse() + .buildGraphql(); + expect(skuUu789UvRedUsWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-uu-789-uv-red-us-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-uu-789-uv-red-us-warehouse.ts new file mode 100644 index 000000000..d5e2fc2c1 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-uu-789-uv-red-us-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .usWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .uu789Uv01() + .build(); + +const skuUu789UvRedUsWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('uu789-uv-red-us-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuUu789UvRedUsWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-uu789-uv-blue-default.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-uu789-uv-blue-default.spec.ts deleted file mode 100644 index de65992cf..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-uu789-uv-blue-default.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuUu789UvBlueDefault from './sku-uu789-uv-blue-default'; - -describe(`with skuUu789UvBlueDefault preset and default-warehouse channel`, () => { - it(`should return a skuUu789UvBlueDefault preset`, () => { - const skuUu789UvBlueDefaultPreset = - skuUu789UvBlueDefault().build(); - expect(skuUu789UvBlueDefaultPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "uu789-uv-blue-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "uu789-uv-blue", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuUu789UvBlueDefault preset when built for graphql`, () => { - const skuUu789UvBlueDefaultPresetGraphql = - skuUu789UvBlueDefault().buildGraphql(); - expect(skuUu789UvBlueDefaultPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "uu789-uv-blue-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "uu789-uv-blue", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-uu789-uv-blue-default.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-uu789-uv-blue-default.ts deleted file mode 100644 index 4729d8a54..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-uu789-uv-blue-default.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const defaultWarehouse = ChannelDraft.presets.sampleDataB2B - .defaultWarehouse() - .build(); - -const uu789Uv02 = ProductVariantDraft.presets.sampleDataB2B - .uu789Uv02() - .build(); - -const skuUu789UvBlueDefault = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${uu789Uv02.sku}-${defaultWarehouse.key}`) - .sku(uu789Uv02.sku!) - .quantityOnStock(1000) - .supplyChannel( - KeyReferenceDraft.presets.channel().key(defaultWarehouse.key) - ); - -export default skuUu789UvBlueDefault; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-uu789-uv-blue-eu.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-uu789-uv-blue-eu.spec.ts deleted file mode 100644 index 5d28b2f87..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-uu789-uv-blue-eu.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuUu789UvBlueEu from './sku-uu789-uv-blue-eu'; - -describe(`with skuUu789UvBlueEu preset and eu-warehouse channel`, () => { - it(`should return a skuUu789UvBlueEu preset`, () => { - const skuUu789UvBlueEuPreset = - skuUu789UvBlueEu().build(); - expect(skuUu789UvBlueEuPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "uu789-uv-blue-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "uu789-uv-blue", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuUu789UvBlueEu preset when built for graphql`, () => { - const skuUu789UvBlueEuPresetGraphql = - skuUu789UvBlueEu().buildGraphql(); - expect(skuUu789UvBlueEuPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "uu789-uv-blue-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "uu789-uv-blue", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-uu789-uv-blue-eu.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-uu789-uv-blue-eu.ts deleted file mode 100644 index 145e5d2d5..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-uu789-uv-blue-eu.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const euWarehouse = ChannelDraft.presets.sampleDataB2B - .euWarehouse() - .build(); - -const uu789Uv02 = ProductVariantDraft.presets.sampleDataB2B - .uu789Uv02() - .build(); - -const skuUu789UvBlueEu = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${uu789Uv02.sku}-${euWarehouse.key}`) - .sku(uu789Uv02.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(euWarehouse.key)); - -export default skuUu789UvBlueEu; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-uu789-uv-blue-us.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-uu789-uv-blue-us.spec.ts deleted file mode 100644 index bdcf284e5..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-uu789-uv-blue-us.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuUu789UvBlueUs from './sku-uu789-uv-blue-us'; - -describe(`with skuUu789UvBlueUs preset and us-warehouse channel`, () => { - it(`should return a skuUu789UvBlueUs preset`, () => { - const skuUu789UvBlueUsPreset = - skuUu789UvBlueUs().build(); - expect(skuUu789UvBlueUsPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "uu789-uv-blue-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "uu789-uv-blue", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuUu789UvBlueUs preset when built for graphql`, () => { - const skuUu789UvBlueUsPresetGraphql = - skuUu789UvBlueUs().buildGraphql(); - expect(skuUu789UvBlueUsPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "uu789-uv-blue-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "uu789-uv-blue", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-uu789-uv-blue-us.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-uu789-uv-blue-us.ts deleted file mode 100644 index 2c40e287d..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-uu789-uv-blue-us.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const usWarehouse = ChannelDraft.presets.sampleDataB2B - .usWarehouse() - .build(); - -const uu789Uv02 = ProductVariantDraft.presets.sampleDataB2B - .uu789Uv02() - .build(); - -const skuUu789UvBlueUs = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${uu789Uv02.sku}-${usWarehouse.key}`) - .sku(uu789Uv02.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(usWarehouse.key)); - -export default skuUu789UvBlueUs; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-uu789-uv-green-default.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-uu789-uv-green-default.spec.ts deleted file mode 100644 index 81b13218d..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-uu789-uv-green-default.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuUu789UvGreenDefault from './sku-uu789-uv-green-default'; - -describe(`with skuUu789UvGreenDefault preset and default-warehouse channel`, () => { - it(`should return a skuUu789UvGreenDefault preset`, () => { - const skuUu789UvGreenDefaultPreset = - skuUu789UvGreenDefault().build(); - expect(skuUu789UvGreenDefaultPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "uu789-uv-green-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "uu789-uv-green", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuUu789UvGreenDefault preset when built for graphql`, () => { - const skuUu789UvGreenDefaultPresetGraphql = - skuUu789UvGreenDefault().buildGraphql(); - expect(skuUu789UvGreenDefaultPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "uu789-uv-green-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "uu789-uv-green", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-uu789-uv-green-default.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-uu789-uv-green-default.ts deleted file mode 100644 index 129d7c80e..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-uu789-uv-green-default.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const defaultWarehouse = ChannelDraft.presets.sampleDataB2B - .defaultWarehouse() - .build(); - -const uu789Uv03 = ProductVariantDraft.presets.sampleDataB2B - .uu789Uv03() - .build(); - -const skuUu789UvGreenDefault = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${uu789Uv03.sku}-${defaultWarehouse.key}`) - .sku(uu789Uv03.sku!) - .quantityOnStock(1000) - .supplyChannel( - KeyReferenceDraft.presets.channel().key(defaultWarehouse.key) - ); - -export default skuUu789UvGreenDefault; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-uu789-uv-green-eu.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-uu789-uv-green-eu.spec.ts deleted file mode 100644 index 64cf5ff88..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-uu789-uv-green-eu.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuUu789UvGreenEu from './sku-uu789-uv-green-eu'; - -describe(`with skuUu789UvGreenEu preset and eu-warehouse channel`, () => { - it(`should return a skuUu789UvGreenEu preset`, () => { - const skuUu789UvGreenEuPreset = - skuUu789UvGreenEu().build(); - expect(skuUu789UvGreenEuPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "uu789-uv-green-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "uu789-uv-green", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuUu789UvGreenEu preset when built for graphql`, () => { - const skuUu789UvGreenEuPresetGraphql = - skuUu789UvGreenEu().buildGraphql(); - expect(skuUu789UvGreenEuPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "uu789-uv-green-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "uu789-uv-green", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-uu789-uv-green-eu.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-uu789-uv-green-eu.ts deleted file mode 100644 index 0f9fb9638..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-uu789-uv-green-eu.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const euWarehouse = ChannelDraft.presets.sampleDataB2B - .euWarehouse() - .build(); - -const uu789Uv03 = ProductVariantDraft.presets.sampleDataB2B - .uu789Uv03() - .build(); - -const skuUu789UvGreenEu = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${uu789Uv03.sku}-${euWarehouse.key}`) - .sku(uu789Uv03.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(euWarehouse.key)); - -export default skuUu789UvGreenEu; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-uu789-uv-green-us.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-uu789-uv-green-us.spec.ts deleted file mode 100644 index dcf06939d..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-uu789-uv-green-us.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuUu789UvGreenUs from './sku-uu789-uv-green-us'; - -describe(`with skuUu789UvGreenUs preset and us-warehouse channel`, () => { - it(`should return a skuUu789UvGreenUs preset`, () => { - const skuUu789UvGreenUsPreset = - skuUu789UvGreenUs().build(); - expect(skuUu789UvGreenUsPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "uu789-uv-green-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "uu789-uv-green", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuUu789UvGreenUs preset when built for graphql`, () => { - const skuUu789UvGreenUsPresetGraphql = - skuUu789UvGreenUs().buildGraphql(); - expect(skuUu789UvGreenUsPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "uu789-uv-green-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "uu789-uv-green", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-uu789-uv-green-us.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-uu789-uv-green-us.ts deleted file mode 100644 index 56777105d..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-uu789-uv-green-us.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const usWarehouse = ChannelDraft.presets.sampleDataB2B - .usWarehouse() - .build(); - -const uu789Uv03 = ProductVariantDraft.presets.sampleDataB2B - .uu789Uv03() - .build(); - -const skuUu789UvGreenUs = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${uu789Uv03.sku}-${usWarehouse.key}`) - .sku(uu789Uv03.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(usWarehouse.key)); - -export default skuUu789UvGreenUs; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-uu789-uv-red-default.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-uu789-uv-red-default.spec.ts deleted file mode 100644 index 9c3580b38..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-uu789-uv-red-default.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuUu789UvRedDefault from './sku-uu789-uv-red-default'; - -describe(`with skuUu789UvRedDefault preset and default-warehouse channel`, () => { - it(`should return a skuUu789UvRedDefault preset`, () => { - const skuUu789UvRedDefaultPreset = - skuUu789UvRedDefault().build(); - expect(skuUu789UvRedDefaultPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "uu789-uv-red-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "uu789-uv-red", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuUu789UvRedDefault preset when built for graphql`, () => { - const skuUu789UvRedDefaultPresetGraphql = - skuUu789UvRedDefault().buildGraphql(); - expect(skuUu789UvRedDefaultPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "uu789-uv-red-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "uu789-uv-red", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-uu789-uv-red-default.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-uu789-uv-red-default.ts deleted file mode 100644 index dc27f8f2d..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-uu789-uv-red-default.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const defaultWarehouse = ChannelDraft.presets.sampleDataB2B - .defaultWarehouse() - .build(); - -const uu789Uv01 = ProductVariantDraft.presets.sampleDataB2B - .uu789Uv01() - .build(); - -const skuUu789UvRedDefault = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${uu789Uv01.sku}-${defaultWarehouse.key}`) - .sku(uu789Uv01.sku!) - .quantityOnStock(1000) - .supplyChannel( - KeyReferenceDraft.presets.channel().key(defaultWarehouse.key) - ); - -export default skuUu789UvRedDefault; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-uu789-uv-red-eu.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-uu789-uv-red-eu.spec.ts deleted file mode 100644 index 0875a9efc..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-uu789-uv-red-eu.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuUu789UvRedEu from './sku-uu789-uv-red-eu'; - -describe(`with skuUu789UvRedEu preset and eu-warehouse channel`, () => { - it(`should return a skuUu789UvRedEu preset`, () => { - const skuUu789UvRedEuPreset = - skuUu789UvRedEu().build(); - expect(skuUu789UvRedEuPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "uu789-uv-red-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "uu789-uv-red", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuUu789UvRedEu preset when built for graphql`, () => { - const skuUu789UvRedEuPresetGraphql = - skuUu789UvRedEu().buildGraphql(); - expect(skuUu789UvRedEuPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "uu789-uv-red-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "uu789-uv-red", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-uu789-uv-red-eu.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-uu789-uv-red-eu.ts deleted file mode 100644 index b7ee64e1e..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-uu789-uv-red-eu.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const euWarehouse = ChannelDraft.presets.sampleDataB2B - .euWarehouse() - .build(); - -const uu789Uv01 = ProductVariantDraft.presets.sampleDataB2B - .uu789Uv01() - .build(); - -const skuUu789UvRedEu = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${uu789Uv01.sku}-${euWarehouse.key}`) - .sku(uu789Uv01.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(euWarehouse.key)); - -export default skuUu789UvRedEu; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-uu789-uv-red-us.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-uu789-uv-red-us.spec.ts deleted file mode 100644 index e2a246f00..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-uu789-uv-red-us.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuUu789UvRedUs from './sku-uu789-uv-red-us'; - -describe(`with skuUu789UvRedUs preset and us-warehouse channel`, () => { - it(`should return a skuUu789UvRedUs preset`, () => { - const skuUu789UvRedUsPreset = - skuUu789UvRedUs().build(); - expect(skuUu789UvRedUsPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "uu789-uv-red-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "uu789-uv-red", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuUu789UvRedUs preset when built for graphql`, () => { - const skuUu789UvRedUsPresetGraphql = - skuUu789UvRedUs().buildGraphql(); - expect(skuUu789UvRedUsPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "uu789-uv-red-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "uu789-uv-red", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-uu789-uv-red-us.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-uu789-uv-red-us.ts deleted file mode 100644 index c6a9e90ab..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-uu789-uv-red-us.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const usWarehouse = ChannelDraft.presets.sampleDataB2B - .usWarehouse() - .build(); - -const uu789Uv01 = ProductVariantDraft.presets.sampleDataB2B - .uu789Uv01() - .build(); - -const skuUu789UvRedUs = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${uu789Uv01.sku}-${usWarehouse.key}`) - .sku(uu789Uv01.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(usWarehouse.key)); - -export default skuUu789UvRedUs; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-v-456-st-2015-default-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-v-456-st-2015-default-warehouse.spec.ts new file mode 100644 index 000000000..b37472696 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-v-456-st-2015-default-warehouse.spec.ts @@ -0,0 +1,40 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuV456St2015DefaultWarehouse preset`, () => { + it(`should return a skuV456St2015DefaultWarehouse preset when built for rest`, () => { + const skuV456St2015DefaultWarehousePreset = InventoryEntryDraftRest.presets + .skuV456St2015DefaultWarehouse() + .build(); + expect(skuV456St2015DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuV456St2015DefaultWarehouse preset when built for graphql`, () => { + const skuV456St2015DefaultWarehousePreset = + InventoryEntryDraftGraphql.presets + .skuV456St2015DefaultWarehouse() + .build(); + expect(skuV456St2015DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuV456St2015DefaultWarehouse preset when built for legacy rest`, () => { + const skuV456St2015DefaultWarehousePreset = InventoryEntryDraft.presets + .skuV456St2015DefaultWarehouse() + .buildRest(); + expect(skuV456St2015DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuV456St2015DefaultWarehouse preset when built for legacy graphql`, () => { + const skuV456St2015DefaultWarehousePreset = InventoryEntryDraft.presets + .skuV456St2015DefaultWarehouse() + .buildGraphql(); + expect(skuV456St2015DefaultWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-v-456-st-2015-default-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-v-456-st-2015-default-warehouse.ts new file mode 100644 index 000000000..c27356a6e --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-v-456-st-2015-default-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .defaultWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .v456St01() + .build(); + +const skuV456St2015DefaultWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('v456-st-2015-default-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuV456St2015DefaultWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-v-456-st-2015-eu-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-v-456-st-2015-eu-warehouse.spec.ts new file mode 100644 index 000000000..7f613a867 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-v-456-st-2015-eu-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuV456St2015EuWarehouse preset`, () => { + it(`should return a skuV456St2015EuWarehouse preset when built for rest`, () => { + const skuV456St2015EuWarehousePreset = InventoryEntryDraftRest.presets + .skuV456St2015EuWarehouse() + .build(); + expect(skuV456St2015EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuV456St2015EuWarehouse preset when built for graphql`, () => { + const skuV456St2015EuWarehousePreset = InventoryEntryDraftGraphql.presets + .skuV456St2015EuWarehouse() + .build(); + expect(skuV456St2015EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuV456St2015EuWarehouse preset when built for legacy rest`, () => { + const skuV456St2015EuWarehousePreset = InventoryEntryDraft.presets + .skuV456St2015EuWarehouse() + .buildRest(); + expect(skuV456St2015EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuV456St2015EuWarehouse preset when built for legacy graphql`, () => { + const skuV456St2015EuWarehousePreset = InventoryEntryDraft.presets + .skuV456St2015EuWarehouse() + .buildGraphql(); + expect(skuV456St2015EuWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-v-456-st-2015-eu-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-v-456-st-2015-eu-warehouse.ts new file mode 100644 index 000000000..289bf4cc5 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-v-456-st-2015-eu-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .euWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .v456St01() + .build(); + +const skuV456St2015EuWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('v456-st-2015-eu-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuV456St2015EuWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-v-456-st-2015-us-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-v-456-st-2015-us-warehouse.spec.ts new file mode 100644 index 000000000..64b7f1f4b --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-v-456-st-2015-us-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuV456St2015UsWarehouse preset`, () => { + it(`should return a skuV456St2015UsWarehouse preset when built for rest`, () => { + const skuV456St2015UsWarehousePreset = InventoryEntryDraftRest.presets + .skuV456St2015UsWarehouse() + .build(); + expect(skuV456St2015UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuV456St2015UsWarehouse preset when built for graphql`, () => { + const skuV456St2015UsWarehousePreset = InventoryEntryDraftGraphql.presets + .skuV456St2015UsWarehouse() + .build(); + expect(skuV456St2015UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuV456St2015UsWarehouse preset when built for legacy rest`, () => { + const skuV456St2015UsWarehousePreset = InventoryEntryDraft.presets + .skuV456St2015UsWarehouse() + .buildRest(); + expect(skuV456St2015UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuV456St2015UsWarehouse preset when built for legacy graphql`, () => { + const skuV456St2015UsWarehousePreset = InventoryEntryDraft.presets + .skuV456St2015UsWarehouse() + .buildGraphql(); + expect(skuV456St2015UsWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-v-456-st-2015-us-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-v-456-st-2015-us-warehouse.ts new file mode 100644 index 000000000..d8f82b735 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-v-456-st-2015-us-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .usWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .v456St01() + .build(); + +const skuV456St2015UsWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('v456-st-2015-us-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuV456St2015UsWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-v-456-st-2019-default-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-v-456-st-2019-default-warehouse.spec.ts new file mode 100644 index 000000000..069301f62 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-v-456-st-2019-default-warehouse.spec.ts @@ -0,0 +1,40 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuV456St2019DefaultWarehouse preset`, () => { + it(`should return a skuV456St2019DefaultWarehouse preset when built for rest`, () => { + const skuV456St2019DefaultWarehousePreset = InventoryEntryDraftRest.presets + .skuV456St2019DefaultWarehouse() + .build(); + expect(skuV456St2019DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuV456St2019DefaultWarehouse preset when built for graphql`, () => { + const skuV456St2019DefaultWarehousePreset = + InventoryEntryDraftGraphql.presets + .skuV456St2019DefaultWarehouse() + .build(); + expect(skuV456St2019DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuV456St2019DefaultWarehouse preset when built for legacy rest`, () => { + const skuV456St2019DefaultWarehousePreset = InventoryEntryDraft.presets + .skuV456St2019DefaultWarehouse() + .buildRest(); + expect(skuV456St2019DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuV456St2019DefaultWarehouse preset when built for legacy graphql`, () => { + const skuV456St2019DefaultWarehousePreset = InventoryEntryDraft.presets + .skuV456St2019DefaultWarehouse() + .buildGraphql(); + expect(skuV456St2019DefaultWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-v-456-st-2019-default-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-v-456-st-2019-default-warehouse.ts new file mode 100644 index 000000000..07726b222 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-v-456-st-2019-default-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .defaultWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .v456St02() + .build(); + +const skuV456St2019DefaultWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('v456-st-2019-default-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuV456St2019DefaultWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-v-456-st-2019-eu-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-v-456-st-2019-eu-warehouse.spec.ts new file mode 100644 index 000000000..9b53c9536 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-v-456-st-2019-eu-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuV456St2019EuWarehouse preset`, () => { + it(`should return a skuV456St2019EuWarehouse preset when built for rest`, () => { + const skuV456St2019EuWarehousePreset = InventoryEntryDraftRest.presets + .skuV456St2019EuWarehouse() + .build(); + expect(skuV456St2019EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuV456St2019EuWarehouse preset when built for graphql`, () => { + const skuV456St2019EuWarehousePreset = InventoryEntryDraftGraphql.presets + .skuV456St2019EuWarehouse() + .build(); + expect(skuV456St2019EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuV456St2019EuWarehouse preset when built for legacy rest`, () => { + const skuV456St2019EuWarehousePreset = InventoryEntryDraft.presets + .skuV456St2019EuWarehouse() + .buildRest(); + expect(skuV456St2019EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuV456St2019EuWarehouse preset when built for legacy graphql`, () => { + const skuV456St2019EuWarehousePreset = InventoryEntryDraft.presets + .skuV456St2019EuWarehouse() + .buildGraphql(); + expect(skuV456St2019EuWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-v-456-st-2019-eu-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-v-456-st-2019-eu-warehouse.ts new file mode 100644 index 000000000..ef66d07c1 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-v-456-st-2019-eu-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .euWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .v456St02() + .build(); + +const skuV456St2019EuWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('v456-st-2019-eu-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuV456St2019EuWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-v-456-st-2019-us-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-v-456-st-2019-us-warehouse.spec.ts new file mode 100644 index 000000000..2028e17f6 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-v-456-st-2019-us-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuV456St2019UsWarehouse preset`, () => { + it(`should return a skuV456St2019UsWarehouse preset when built for rest`, () => { + const skuV456St2019UsWarehousePreset = InventoryEntryDraftRest.presets + .skuV456St2019UsWarehouse() + .build(); + expect(skuV456St2019UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuV456St2019UsWarehouse preset when built for graphql`, () => { + const skuV456St2019UsWarehousePreset = InventoryEntryDraftGraphql.presets + .skuV456St2019UsWarehouse() + .build(); + expect(skuV456St2019UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuV456St2019UsWarehouse preset when built for legacy rest`, () => { + const skuV456St2019UsWarehousePreset = InventoryEntryDraft.presets + .skuV456St2019UsWarehouse() + .buildRest(); + expect(skuV456St2019UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuV456St2019UsWarehouse preset when built for legacy graphql`, () => { + const skuV456St2019UsWarehousePreset = InventoryEntryDraft.presets + .skuV456St2019UsWarehouse() + .buildGraphql(); + expect(skuV456St2019UsWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-v-456-st-2019-us-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-v-456-st-2019-us-warehouse.ts new file mode 100644 index 000000000..4a9a9dac2 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-v-456-st-2019-us-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .usWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .v456St02() + .build(); + +const skuV456St2019UsWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('v456-st-2019-us-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuV456St2019UsWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-v-456-st-2023-default-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-v-456-st-2023-default-warehouse.spec.ts new file mode 100644 index 000000000..02ec15e2f --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-v-456-st-2023-default-warehouse.spec.ts @@ -0,0 +1,40 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuV456St2023DefaultWarehouse preset`, () => { + it(`should return a skuV456St2023DefaultWarehouse preset when built for rest`, () => { + const skuV456St2023DefaultWarehousePreset = InventoryEntryDraftRest.presets + .skuV456St2023DefaultWarehouse() + .build(); + expect(skuV456St2023DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuV456St2023DefaultWarehouse preset when built for graphql`, () => { + const skuV456St2023DefaultWarehousePreset = + InventoryEntryDraftGraphql.presets + .skuV456St2023DefaultWarehouse() + .build(); + expect(skuV456St2023DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuV456St2023DefaultWarehouse preset when built for legacy rest`, () => { + const skuV456St2023DefaultWarehousePreset = InventoryEntryDraft.presets + .skuV456St2023DefaultWarehouse() + .buildRest(); + expect(skuV456St2023DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuV456St2023DefaultWarehouse preset when built for legacy graphql`, () => { + const skuV456St2023DefaultWarehousePreset = InventoryEntryDraft.presets + .skuV456St2023DefaultWarehouse() + .buildGraphql(); + expect(skuV456St2023DefaultWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-v-456-st-2023-default-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-v-456-st-2023-default-warehouse.ts new file mode 100644 index 000000000..73c990a6b --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-v-456-st-2023-default-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .defaultWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .v456St03() + .build(); + +const skuV456St2023DefaultWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('v456-st-2023-default-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuV456St2023DefaultWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-v-456-st-2023-eu-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-v-456-st-2023-eu-warehouse.spec.ts new file mode 100644 index 000000000..fa9410e6a --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-v-456-st-2023-eu-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuV456St2023EuWarehouse preset`, () => { + it(`should return a skuV456St2023EuWarehouse preset when built for rest`, () => { + const skuV456St2023EuWarehousePreset = InventoryEntryDraftRest.presets + .skuV456St2023EuWarehouse() + .build(); + expect(skuV456St2023EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuV456St2023EuWarehouse preset when built for graphql`, () => { + const skuV456St2023EuWarehousePreset = InventoryEntryDraftGraphql.presets + .skuV456St2023EuWarehouse() + .build(); + expect(skuV456St2023EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuV456St2023EuWarehouse preset when built for legacy rest`, () => { + const skuV456St2023EuWarehousePreset = InventoryEntryDraft.presets + .skuV456St2023EuWarehouse() + .buildRest(); + expect(skuV456St2023EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuV456St2023EuWarehouse preset when built for legacy graphql`, () => { + const skuV456St2023EuWarehousePreset = InventoryEntryDraft.presets + .skuV456St2023EuWarehouse() + .buildGraphql(); + expect(skuV456St2023EuWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-v-456-st-2023-eu-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-v-456-st-2023-eu-warehouse.ts new file mode 100644 index 000000000..27bd52215 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-v-456-st-2023-eu-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .euWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .v456St03() + .build(); + +const skuV456St2023EuWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('v456-st-2023-eu-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuV456St2023EuWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-v-456-st-2023-us-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-v-456-st-2023-us-warehouse.spec.ts new file mode 100644 index 000000000..ee99af5ef --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-v-456-st-2023-us-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuV456St2023UsWarehouse preset`, () => { + it(`should return a skuV456St2023UsWarehouse preset when built for rest`, () => { + const skuV456St2023UsWarehousePreset = InventoryEntryDraftRest.presets + .skuV456St2023UsWarehouse() + .build(); + expect(skuV456St2023UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuV456St2023UsWarehouse preset when built for graphql`, () => { + const skuV456St2023UsWarehousePreset = InventoryEntryDraftGraphql.presets + .skuV456St2023UsWarehouse() + .build(); + expect(skuV456St2023UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuV456St2023UsWarehouse preset when built for legacy rest`, () => { + const skuV456St2023UsWarehousePreset = InventoryEntryDraft.presets + .skuV456St2023UsWarehouse() + .buildRest(); + expect(skuV456St2023UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuV456St2023UsWarehouse preset when built for legacy graphql`, () => { + const skuV456St2023UsWarehousePreset = InventoryEntryDraft.presets + .skuV456St2023UsWarehouse() + .buildGraphql(); + expect(skuV456St2023UsWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-v-456-st-2023-us-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-v-456-st-2023-us-warehouse.ts new file mode 100644 index 000000000..4eef7791e --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-v-456-st-2023-us-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .usWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .v456St03() + .build(); + +const skuV456St2023UsWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('v456-st-2023-us-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuV456St2023UsWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-v456-st-2015-default.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-v456-st-2015-default.spec.ts deleted file mode 100644 index 73019a505..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-v456-st-2015-default.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuV456St2015Default from './sku-v456-st-2015-default'; - -describe(`with skuV456St2015Default preset and default-warehouse channel`, () => { - it(`should return a skuV456St2015Default preset`, () => { - const skuV456St2015DefaultPreset = - skuV456St2015Default().build(); - expect(skuV456St2015DefaultPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "v456-st-2015-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "v456-st-2015", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuV456St2015Default preset when built for graphql`, () => { - const skuV456St2015DefaultPresetGraphql = - skuV456St2015Default().buildGraphql(); - expect(skuV456St2015DefaultPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "v456-st-2015-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "v456-st-2015", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-v456-st-2015-default.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-v456-st-2015-default.ts deleted file mode 100644 index 50499e7a1..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-v456-st-2015-default.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const defaultWarehouse = ChannelDraft.presets.sampleDataB2B - .defaultWarehouse() - .build(); - -const v456St01 = ProductVariantDraft.presets.sampleDataB2B - .v456St01() - .build(); - -const skuV456St2015Default = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${v456St01.sku}-${defaultWarehouse.key}`) - .sku(v456St01.sku!) - .quantityOnStock(1000) - .supplyChannel( - KeyReferenceDraft.presets.channel().key(defaultWarehouse.key) - ); - -export default skuV456St2015Default; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-v456-st-2015-eu.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-v456-st-2015-eu.spec.ts deleted file mode 100644 index a7e671fa8..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-v456-st-2015-eu.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuV456St2015Eu from './sku-v456-st-2015-eu'; - -describe(`with skuV456St2015Eu preset and eu-warehouse channel`, () => { - it(`should return a skuV456St2015Eu preset`, () => { - const skuV456St2015EuPreset = - skuV456St2015Eu().build(); - expect(skuV456St2015EuPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "v456-st-2015-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "v456-st-2015", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuV456St2015Eu preset when built for graphql`, () => { - const skuV456St2015EuPresetGraphql = - skuV456St2015Eu().buildGraphql(); - expect(skuV456St2015EuPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "v456-st-2015-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "v456-st-2015", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-v456-st-2015-eu.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-v456-st-2015-eu.ts deleted file mode 100644 index e8a1f11a2..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-v456-st-2015-eu.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const euWarehouse = ChannelDraft.presets.sampleDataB2B - .euWarehouse() - .build(); - -const v456St01 = ProductVariantDraft.presets.sampleDataB2B - .v456St01() - .build(); - -const skuV456St2015Eu = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${v456St01.sku}-${euWarehouse.key}`) - .sku(v456St01.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(euWarehouse.key)); - -export default skuV456St2015Eu; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-v456-st-2015-us.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-v456-st-2015-us.spec.ts deleted file mode 100644 index bfc2ed2d3..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-v456-st-2015-us.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuV456St2015Us from './sku-v456-st-2015-us'; - -describe(`with skuV456St2015Us preset and us-warehouse channel`, () => { - it(`should return a skuV456St2015Us preset`, () => { - const skuV456St2015UsPreset = - skuV456St2015Us().build(); - expect(skuV456St2015UsPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "v456-st-2015-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "v456-st-2015", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuV456St2015Us preset when built for graphql`, () => { - const skuV456St2015UsPresetGraphql = - skuV456St2015Us().buildGraphql(); - expect(skuV456St2015UsPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "v456-st-2015-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "v456-st-2015", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-v456-st-2015-us.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-v456-st-2015-us.ts deleted file mode 100644 index 9c469b23e..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-v456-st-2015-us.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const usWarehouse = ChannelDraft.presets.sampleDataB2B - .usWarehouse() - .build(); - -const v456St01 = ProductVariantDraft.presets.sampleDataB2B - .v456St01() - .build(); - -const skuV456St2015Us = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${v456St01.sku}-${usWarehouse.key}`) - .sku(v456St01.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(usWarehouse.key)); - -export default skuV456St2015Us; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-v456-st-2019-default.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-v456-st-2019-default.spec.ts deleted file mode 100644 index 4dc922de6..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-v456-st-2019-default.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuV456St2019Default from './sku-v456-st-2019-default'; - -describe(`with skuV456St2019Default preset and default-warehouse channel`, () => { - it(`should return a skuV456St2019Default preset`, () => { - const skuV456St2019DefaultPreset = - skuV456St2019Default().build(); - expect(skuV456St2019DefaultPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "v456-st-2019-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "v456-st-2019", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuV456St2019Default preset when built for graphql`, () => { - const skuV456St2019DefaultPresetGraphql = - skuV456St2019Default().buildGraphql(); - expect(skuV456St2019DefaultPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "v456-st-2019-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "v456-st-2019", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-v456-st-2019-default.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-v456-st-2019-default.ts deleted file mode 100644 index 159484712..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-v456-st-2019-default.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const defaultWarehouse = ChannelDraft.presets.sampleDataB2B - .defaultWarehouse() - .build(); - -const v456St02 = ProductVariantDraft.presets.sampleDataB2B - .v456St02() - .build(); - -const skuV456St2019Default = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${v456St02.sku}-${defaultWarehouse.key}`) - .sku(v456St02.sku!) - .quantityOnStock(1000) - .supplyChannel( - KeyReferenceDraft.presets.channel().key(defaultWarehouse.key) - ); - -export default skuV456St2019Default; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-v456-st-2019-eu.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-v456-st-2019-eu.spec.ts deleted file mode 100644 index af1051388..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-v456-st-2019-eu.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuV456St2019Eu from './sku-v456-st-2019-eu'; - -describe(`with skuV456St2019Eu preset and eu-warehouse channel`, () => { - it(`should return a skuV456St2019Eu preset`, () => { - const skuV456St2019EuPreset = - skuV456St2019Eu().build(); - expect(skuV456St2019EuPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "v456-st-2019-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "v456-st-2019", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuV456St2019Eu preset when built for graphql`, () => { - const skuV456St2019EuPresetGraphql = - skuV456St2019Eu().buildGraphql(); - expect(skuV456St2019EuPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "v456-st-2019-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "v456-st-2019", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-v456-st-2019-eu.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-v456-st-2019-eu.ts deleted file mode 100644 index 97f9529e5..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-v456-st-2019-eu.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const euWarehouse = ChannelDraft.presets.sampleDataB2B - .euWarehouse() - .build(); - -const v456St02 = ProductVariantDraft.presets.sampleDataB2B - .v456St02() - .build(); - -const skuV456St2019Eu = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${v456St02.sku}-${euWarehouse.key}`) - .sku(v456St02.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(euWarehouse.key)); - -export default skuV456St2019Eu; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-v456-st-2019-us.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-v456-st-2019-us.spec.ts deleted file mode 100644 index 135baafc4..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-v456-st-2019-us.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuV456St2019Us from './sku-v456-st-2019-us'; - -describe(`with skuV456St2019Us preset and us-warehouse channel`, () => { - it(`should return a skuV456St2019Us preset`, () => { - const skuV456St2019UsPreset = - skuV456St2019Us().build(); - expect(skuV456St2019UsPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "v456-st-2019-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "v456-st-2019", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuV456St2019Us preset when built for graphql`, () => { - const skuV456St2019UsPresetGraphql = - skuV456St2019Us().buildGraphql(); - expect(skuV456St2019UsPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "v456-st-2019-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "v456-st-2019", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-v456-st-2019-us.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-v456-st-2019-us.ts deleted file mode 100644 index 0530cc866..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-v456-st-2019-us.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const usWarehouse = ChannelDraft.presets.sampleDataB2B - .usWarehouse() - .build(); - -const v456St02 = ProductVariantDraft.presets.sampleDataB2B - .v456St02() - .build(); - -const skuV456St2019Us = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${v456St02.sku}-${usWarehouse.key}`) - .sku(v456St02.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(usWarehouse.key)); - -export default skuV456St2019Us; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-v456-st-2023-default.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-v456-st-2023-default.spec.ts deleted file mode 100644 index b85faccd5..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-v456-st-2023-default.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuV456St2023Default from './sku-v456-st-2023-default'; - -describe(`with skuV456St2023Default preset and default-warehouse channel`, () => { - it(`should return a skuV456St2023Default preset`, () => { - const skuV456St2023DefaultPreset = - skuV456St2023Default().build(); - expect(skuV456St2023DefaultPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "v456-st-2023-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "v456-st-2023", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuV456St2023Default preset when built for graphql`, () => { - const skuV456St2023DefaultPresetGraphql = - skuV456St2023Default().buildGraphql(); - expect(skuV456St2023DefaultPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "v456-st-2023-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "v456-st-2023", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-v456-st-2023-default.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-v456-st-2023-default.ts deleted file mode 100644 index 71ca81c0b..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-v456-st-2023-default.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const defaultWarehouse = ChannelDraft.presets.sampleDataB2B - .defaultWarehouse() - .build(); - -const v456St03 = ProductVariantDraft.presets.sampleDataB2B - .v456St03() - .build(); - -const skuV456St2023Default = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${v456St03.sku}-${defaultWarehouse.key}`) - .sku(v456St03.sku!) - .quantityOnStock(1000) - .supplyChannel( - KeyReferenceDraft.presets.channel().key(defaultWarehouse.key) - ); - -export default skuV456St2023Default; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-v456-st-2023-eu.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-v456-st-2023-eu.spec.ts deleted file mode 100644 index 155112c64..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-v456-st-2023-eu.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuV456St2023Eu from './sku-v456-st-2023-eu'; - -describe(`with skuV456St2023Eu preset and eu-warehouse channel`, () => { - it(`should return a skuV456St2023Eu preset`, () => { - const skuV456St2023EuPreset = - skuV456St2023Eu().build(); - expect(skuV456St2023EuPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "v456-st-2023-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "v456-st-2023", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuV456St2023Eu preset when built for graphql`, () => { - const skuV456St2023EuPresetGraphql = - skuV456St2023Eu().buildGraphql(); - expect(skuV456St2023EuPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "v456-st-2023-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "v456-st-2023", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-v456-st-2023-eu.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-v456-st-2023-eu.ts deleted file mode 100644 index 8602cf00e..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-v456-st-2023-eu.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const euWarehouse = ChannelDraft.presets.sampleDataB2B - .euWarehouse() - .build(); - -const v456St03 = ProductVariantDraft.presets.sampleDataB2B - .v456St03() - .build(); - -const skuV456St2023Eu = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${v456St03.sku}-${euWarehouse.key}`) - .sku(v456St03.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(euWarehouse.key)); - -export default skuV456St2023Eu; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-v456-st-2023-us.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-v456-st-2023-us.spec.ts deleted file mode 100644 index 6a24192d3..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-v456-st-2023-us.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuV456St2023Us from './sku-v456-st-2023-us'; - -describe(`with skuV456St2023Us preset and us-warehouse channel`, () => { - it(`should return a skuV456St2023Us preset`, () => { - const skuV456St2023UsPreset = - skuV456St2023Us().build(); - expect(skuV456St2023UsPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "v456-st-2023-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "v456-st-2023", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuV456St2023Us preset when built for graphql`, () => { - const skuV456St2023UsPresetGraphql = - skuV456St2023Us().buildGraphql(); - expect(skuV456St2023UsPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "v456-st-2023-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "v456-st-2023", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-v456-st-2023-us.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-v456-st-2023-us.ts deleted file mode 100644 index 1c008c459..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-v456-st-2023-us.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const usWarehouse = ChannelDraft.presets.sampleDataB2B - .usWarehouse() - .build(); - -const v456St03 = ProductVariantDraft.presets.sampleDataB2B - .v456St03() - .build(); - -const skuV456St2023Us = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${v456St03.sku}-${usWarehouse.key}`) - .sku(v456St03.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(usWarehouse.key)); - -export default skuV456St2023Us; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-vv-234-wx-blue-default-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-vv-234-wx-blue-default-warehouse.spec.ts new file mode 100644 index 000000000..dbac9b94b --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-vv-234-wx-blue-default-warehouse.spec.ts @@ -0,0 +1,40 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuVv234WxBlueDefaultWarehouse preset`, () => { + it(`should return a skuVv234WxBlueDefaultWarehouse preset when built for rest`, () => { + const skuVv234WxBlueDefaultWarehousePreset = InventoryEntryDraftRest.presets + .skuVv234WxBlueDefaultWarehouse() + .build(); + expect(skuVv234WxBlueDefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuVv234WxBlueDefaultWarehouse preset when built for graphql`, () => { + const skuVv234WxBlueDefaultWarehousePreset = + InventoryEntryDraftGraphql.presets + .skuVv234WxBlueDefaultWarehouse() + .build(); + expect(skuVv234WxBlueDefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuVv234WxBlueDefaultWarehouse preset when built for legacy rest`, () => { + const skuVv234WxBlueDefaultWarehousePreset = InventoryEntryDraft.presets + .skuVv234WxBlueDefaultWarehouse() + .buildRest(); + expect(skuVv234WxBlueDefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuVv234WxBlueDefaultWarehouse preset when built for legacy graphql`, () => { + const skuVv234WxBlueDefaultWarehousePreset = InventoryEntryDraft.presets + .skuVv234WxBlueDefaultWarehouse() + .buildGraphql(); + expect(skuVv234WxBlueDefaultWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-vv-234-wx-blue-default-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-vv-234-wx-blue-default-warehouse.ts new file mode 100644 index 000000000..7acef0cde --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-vv-234-wx-blue-default-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .defaultWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .vv234Wx02() + .build(); + +const skuVv234WxBlueDefaultWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('vv234-wx-blue-default-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuVv234WxBlueDefaultWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-vv-234-wx-blue-eu-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-vv-234-wx-blue-eu-warehouse.spec.ts new file mode 100644 index 000000000..83764e707 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-vv-234-wx-blue-eu-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuVv234WxBlueEuWarehouse preset`, () => { + it(`should return a skuVv234WxBlueEuWarehouse preset when built for rest`, () => { + const skuVv234WxBlueEuWarehousePreset = InventoryEntryDraftRest.presets + .skuVv234WxBlueEuWarehouse() + .build(); + expect(skuVv234WxBlueEuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuVv234WxBlueEuWarehouse preset when built for graphql`, () => { + const skuVv234WxBlueEuWarehousePreset = InventoryEntryDraftGraphql.presets + .skuVv234WxBlueEuWarehouse() + .build(); + expect(skuVv234WxBlueEuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuVv234WxBlueEuWarehouse preset when built for legacy rest`, () => { + const skuVv234WxBlueEuWarehousePreset = InventoryEntryDraft.presets + .skuVv234WxBlueEuWarehouse() + .buildRest(); + expect(skuVv234WxBlueEuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuVv234WxBlueEuWarehouse preset when built for legacy graphql`, () => { + const skuVv234WxBlueEuWarehousePreset = InventoryEntryDraft.presets + .skuVv234WxBlueEuWarehouse() + .buildGraphql(); + expect(skuVv234WxBlueEuWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-vv-234-wx-blue-eu-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-vv-234-wx-blue-eu-warehouse.ts new file mode 100644 index 000000000..edde42792 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-vv-234-wx-blue-eu-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .euWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .vv234Wx02() + .build(); + +const skuVv234WxBlueEuWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('vv234-wx-blue-eu-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuVv234WxBlueEuWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-vv-234-wx-blue-us-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-vv-234-wx-blue-us-warehouse.spec.ts new file mode 100644 index 000000000..704e2180b --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-vv-234-wx-blue-us-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuVv234WxBlueUsWarehouse preset`, () => { + it(`should return a skuVv234WxBlueUsWarehouse preset when built for rest`, () => { + const skuVv234WxBlueUsWarehousePreset = InventoryEntryDraftRest.presets + .skuVv234WxBlueUsWarehouse() + .build(); + expect(skuVv234WxBlueUsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuVv234WxBlueUsWarehouse preset when built for graphql`, () => { + const skuVv234WxBlueUsWarehousePreset = InventoryEntryDraftGraphql.presets + .skuVv234WxBlueUsWarehouse() + .build(); + expect(skuVv234WxBlueUsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuVv234WxBlueUsWarehouse preset when built for legacy rest`, () => { + const skuVv234WxBlueUsWarehousePreset = InventoryEntryDraft.presets + .skuVv234WxBlueUsWarehouse() + .buildRest(); + expect(skuVv234WxBlueUsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuVv234WxBlueUsWarehouse preset when built for legacy graphql`, () => { + const skuVv234WxBlueUsWarehousePreset = InventoryEntryDraft.presets + .skuVv234WxBlueUsWarehouse() + .buildGraphql(); + expect(skuVv234WxBlueUsWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-vv-234-wx-blue-us-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-vv-234-wx-blue-us-warehouse.ts new file mode 100644 index 000000000..7b4e3593d --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-vv-234-wx-blue-us-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .usWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .vv234Wx02() + .build(); + +const skuVv234WxBlueUsWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('vv234-wx-blue-us-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuVv234WxBlueUsWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-vv-234-wx-green-default-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-vv-234-wx-green-default-warehouse.spec.ts new file mode 100644 index 000000000..90c8673fc --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-vv-234-wx-green-default-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuVv234WxGreenDefaultWarehouse preset`, () => { + it(`should return a skuVv234WxGreenDefaultWarehouse preset when built for rest`, () => { + const skuVv234WxGreenDefaultWarehousePreset = + InventoryEntryDraftRest.presets.skuVv234WxGreenDefaultWarehouse().build(); + expect(skuVv234WxGreenDefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuVv234WxGreenDefaultWarehouse preset when built for graphql`, () => { + const skuVv234WxGreenDefaultWarehousePreset = + InventoryEntryDraftGraphql.presets + .skuVv234WxGreenDefaultWarehouse() + .build(); + expect(skuVv234WxGreenDefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuVv234WxGreenDefaultWarehouse preset when built for legacy rest`, () => { + const skuVv234WxGreenDefaultWarehousePreset = InventoryEntryDraft.presets + .skuVv234WxGreenDefaultWarehouse() + .buildRest(); + expect(skuVv234WxGreenDefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuVv234WxGreenDefaultWarehouse preset when built for legacy graphql`, () => { + const skuVv234WxGreenDefaultWarehousePreset = InventoryEntryDraft.presets + .skuVv234WxGreenDefaultWarehouse() + .buildGraphql(); + expect(skuVv234WxGreenDefaultWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-vv-234-wx-green-default-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-vv-234-wx-green-default-warehouse.ts new file mode 100644 index 000000000..25a390912 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-vv-234-wx-green-default-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .defaultWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .vv234Wx03() + .build(); + +const skuVv234WxGreenDefaultWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('vv234-wx-green-default-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuVv234WxGreenDefaultWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-vv-234-wx-green-eu-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-vv-234-wx-green-eu-warehouse.spec.ts new file mode 100644 index 000000000..81f9fea10 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-vv-234-wx-green-eu-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuVv234WxGreenEuWarehouse preset`, () => { + it(`should return a skuVv234WxGreenEuWarehouse preset when built for rest`, () => { + const skuVv234WxGreenEuWarehousePreset = InventoryEntryDraftRest.presets + .skuVv234WxGreenEuWarehouse() + .build(); + expect(skuVv234WxGreenEuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuVv234WxGreenEuWarehouse preset when built for graphql`, () => { + const skuVv234WxGreenEuWarehousePreset = InventoryEntryDraftGraphql.presets + .skuVv234WxGreenEuWarehouse() + .build(); + expect(skuVv234WxGreenEuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuVv234WxGreenEuWarehouse preset when built for legacy rest`, () => { + const skuVv234WxGreenEuWarehousePreset = InventoryEntryDraft.presets + .skuVv234WxGreenEuWarehouse() + .buildRest(); + expect(skuVv234WxGreenEuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuVv234WxGreenEuWarehouse preset when built for legacy graphql`, () => { + const skuVv234WxGreenEuWarehousePreset = InventoryEntryDraft.presets + .skuVv234WxGreenEuWarehouse() + .buildGraphql(); + expect(skuVv234WxGreenEuWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-vv-234-wx-green-eu-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-vv-234-wx-green-eu-warehouse.ts new file mode 100644 index 000000000..c03e2da75 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-vv-234-wx-green-eu-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .euWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .vv234Wx03() + .build(); + +const skuVv234WxGreenEuWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('vv234-wx-green-eu-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuVv234WxGreenEuWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-vv-234-wx-green-us-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-vv-234-wx-green-us-warehouse.spec.ts new file mode 100644 index 000000000..b877a447a --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-vv-234-wx-green-us-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuVv234WxGreenUsWarehouse preset`, () => { + it(`should return a skuVv234WxGreenUsWarehouse preset when built for rest`, () => { + const skuVv234WxGreenUsWarehousePreset = InventoryEntryDraftRest.presets + .skuVv234WxGreenUsWarehouse() + .build(); + expect(skuVv234WxGreenUsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuVv234WxGreenUsWarehouse preset when built for graphql`, () => { + const skuVv234WxGreenUsWarehousePreset = InventoryEntryDraftGraphql.presets + .skuVv234WxGreenUsWarehouse() + .build(); + expect(skuVv234WxGreenUsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuVv234WxGreenUsWarehouse preset when built for legacy rest`, () => { + const skuVv234WxGreenUsWarehousePreset = InventoryEntryDraft.presets + .skuVv234WxGreenUsWarehouse() + .buildRest(); + expect(skuVv234WxGreenUsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuVv234WxGreenUsWarehouse preset when built for legacy graphql`, () => { + const skuVv234WxGreenUsWarehousePreset = InventoryEntryDraft.presets + .skuVv234WxGreenUsWarehouse() + .buildGraphql(); + expect(skuVv234WxGreenUsWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-vv-234-wx-green-us-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-vv-234-wx-green-us-warehouse.ts new file mode 100644 index 000000000..0da793523 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-vv-234-wx-green-us-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .usWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .vv234Wx03() + .build(); + +const skuVv234WxGreenUsWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('vv234-wx-green-us-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuVv234WxGreenUsWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-vv-234-wx-red-default-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-vv-234-wx-red-default-warehouse.spec.ts new file mode 100644 index 000000000..b278a2927 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-vv-234-wx-red-default-warehouse.spec.ts @@ -0,0 +1,40 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuVv234WxRedDefaultWarehouse preset`, () => { + it(`should return a skuVv234WxRedDefaultWarehouse preset when built for rest`, () => { + const skuVv234WxRedDefaultWarehousePreset = InventoryEntryDraftRest.presets + .skuVv234WxRedDefaultWarehouse() + .build(); + expect(skuVv234WxRedDefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuVv234WxRedDefaultWarehouse preset when built for graphql`, () => { + const skuVv234WxRedDefaultWarehousePreset = + InventoryEntryDraftGraphql.presets + .skuVv234WxRedDefaultWarehouse() + .build(); + expect(skuVv234WxRedDefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuVv234WxRedDefaultWarehouse preset when built for legacy rest`, () => { + const skuVv234WxRedDefaultWarehousePreset = InventoryEntryDraft.presets + .skuVv234WxRedDefaultWarehouse() + .buildRest(); + expect(skuVv234WxRedDefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuVv234WxRedDefaultWarehouse preset when built for legacy graphql`, () => { + const skuVv234WxRedDefaultWarehousePreset = InventoryEntryDraft.presets + .skuVv234WxRedDefaultWarehouse() + .buildGraphql(); + expect(skuVv234WxRedDefaultWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-vv-234-wx-red-default-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-vv-234-wx-red-default-warehouse.ts new file mode 100644 index 000000000..162a7fee7 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-vv-234-wx-red-default-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .defaultWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .vv234Wx01() + .build(); + +const skuVv234WxRedDefaultWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('vv234-wx-red-default-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuVv234WxRedDefaultWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-vv-234-wx-red-eu-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-vv-234-wx-red-eu-warehouse.spec.ts new file mode 100644 index 000000000..da3ebdb97 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-vv-234-wx-red-eu-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuVv234WxRedEuWarehouse preset`, () => { + it(`should return a skuVv234WxRedEuWarehouse preset when built for rest`, () => { + const skuVv234WxRedEuWarehousePreset = InventoryEntryDraftRest.presets + .skuVv234WxRedEuWarehouse() + .build(); + expect(skuVv234WxRedEuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuVv234WxRedEuWarehouse preset when built for graphql`, () => { + const skuVv234WxRedEuWarehousePreset = InventoryEntryDraftGraphql.presets + .skuVv234WxRedEuWarehouse() + .build(); + expect(skuVv234WxRedEuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuVv234WxRedEuWarehouse preset when built for legacy rest`, () => { + const skuVv234WxRedEuWarehousePreset = InventoryEntryDraft.presets + .skuVv234WxRedEuWarehouse() + .buildRest(); + expect(skuVv234WxRedEuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuVv234WxRedEuWarehouse preset when built for legacy graphql`, () => { + const skuVv234WxRedEuWarehousePreset = InventoryEntryDraft.presets + .skuVv234WxRedEuWarehouse() + .buildGraphql(); + expect(skuVv234WxRedEuWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-vv-234-wx-red-eu-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-vv-234-wx-red-eu-warehouse.ts new file mode 100644 index 000000000..8d34370ba --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-vv-234-wx-red-eu-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .euWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .vv234Wx01() + .build(); + +const skuVv234WxRedEuWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('vv234-wx-red-eu-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuVv234WxRedEuWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-vv-234-wx-red-us-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-vv-234-wx-red-us-warehouse.spec.ts new file mode 100644 index 000000000..5d1572bc7 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-vv-234-wx-red-us-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuVv234WxRedUsWarehouse preset`, () => { + it(`should return a skuVv234WxRedUsWarehouse preset when built for rest`, () => { + const skuVv234WxRedUsWarehousePreset = InventoryEntryDraftRest.presets + .skuVv234WxRedUsWarehouse() + .build(); + expect(skuVv234WxRedUsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuVv234WxRedUsWarehouse preset when built for graphql`, () => { + const skuVv234WxRedUsWarehousePreset = InventoryEntryDraftGraphql.presets + .skuVv234WxRedUsWarehouse() + .build(); + expect(skuVv234WxRedUsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuVv234WxRedUsWarehouse preset when built for legacy rest`, () => { + const skuVv234WxRedUsWarehousePreset = InventoryEntryDraft.presets + .skuVv234WxRedUsWarehouse() + .buildRest(); + expect(skuVv234WxRedUsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuVv234WxRedUsWarehouse preset when built for legacy graphql`, () => { + const skuVv234WxRedUsWarehousePreset = InventoryEntryDraft.presets + .skuVv234WxRedUsWarehouse() + .buildGraphql(); + expect(skuVv234WxRedUsWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-vv-234-wx-red-us-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-vv-234-wx-red-us-warehouse.ts new file mode 100644 index 000000000..570dd48b7 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-vv-234-wx-red-us-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .usWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .vv234Wx01() + .build(); + +const skuVv234WxRedUsWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('vv234-wx-red-us-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuVv234WxRedUsWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-vv234-wx-blue-default.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-vv234-wx-blue-default.spec.ts deleted file mode 100644 index 7c8b2213d..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-vv234-wx-blue-default.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuVv234WxBlueDefault from './sku-vv234-wx-blue-default'; - -describe(`with skuVv234WxBlueDefault preset and default-warehouse channel`, () => { - it(`should return a skuVv234WxBlueDefault preset`, () => { - const skuVv234WxBlueDefaultPreset = - skuVv234WxBlueDefault().build(); - expect(skuVv234WxBlueDefaultPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "vv234-wx-blue-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "vv234-wx-blue", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuVv234WxBlueDefault preset when built for graphql`, () => { - const skuVv234WxBlueDefaultPresetGraphql = - skuVv234WxBlueDefault().buildGraphql(); - expect(skuVv234WxBlueDefaultPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "vv234-wx-blue-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "vv234-wx-blue", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-vv234-wx-blue-default.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-vv234-wx-blue-default.ts deleted file mode 100644 index 827641c23..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-vv234-wx-blue-default.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const defaultWarehouse = ChannelDraft.presets.sampleDataB2B - .defaultWarehouse() - .build(); - -const vv234Wx02 = ProductVariantDraft.presets.sampleDataB2B - .vv234Wx02() - .build(); - -const skuVv234WxBlueDefault = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${vv234Wx02.sku}-${defaultWarehouse.key}`) - .sku(vv234Wx02.sku!) - .quantityOnStock(1000) - .supplyChannel( - KeyReferenceDraft.presets.channel().key(defaultWarehouse.key) - ); - -export default skuVv234WxBlueDefault; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-vv234-wx-blue-eu.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-vv234-wx-blue-eu.spec.ts deleted file mode 100644 index b21df0d46..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-vv234-wx-blue-eu.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuVv234WxBlueEu from './sku-vv234-wx-blue-eu'; - -describe(`with skuVv234WxBlueEu preset and eu-warehouse channel`, () => { - it(`should return a skuVv234WxBlueEu preset`, () => { - const skuVv234WxBlueEuPreset = - skuVv234WxBlueEu().build(); - expect(skuVv234WxBlueEuPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "vv234-wx-blue-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "vv234-wx-blue", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuVv234WxBlueEu preset when built for graphql`, () => { - const skuVv234WxBlueEuPresetGraphql = - skuVv234WxBlueEu().buildGraphql(); - expect(skuVv234WxBlueEuPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "vv234-wx-blue-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "vv234-wx-blue", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-vv234-wx-blue-eu.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-vv234-wx-blue-eu.ts deleted file mode 100644 index dccd6a77f..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-vv234-wx-blue-eu.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const euWarehouse = ChannelDraft.presets.sampleDataB2B - .euWarehouse() - .build(); - -const vv234Wx02 = ProductVariantDraft.presets.sampleDataB2B - .vv234Wx02() - .build(); - -const skuVv234WxBlueEu = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${vv234Wx02.sku}-${euWarehouse.key}`) - .sku(vv234Wx02.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(euWarehouse.key)); - -export default skuVv234WxBlueEu; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-vv234-wx-blue-us.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-vv234-wx-blue-us.spec.ts deleted file mode 100644 index 7ab5a87b7..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-vv234-wx-blue-us.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuVv234WxBlueUs from './sku-vv234-wx-blue-us'; - -describe(`with skuVv234WxBlueUs preset and us-warehouse channel`, () => { - it(`should return a skuVv234WxBlueUs preset`, () => { - const skuVv234WxBlueUsPreset = - skuVv234WxBlueUs().build(); - expect(skuVv234WxBlueUsPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "vv234-wx-blue-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "vv234-wx-blue", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuVv234WxBlueUs preset when built for graphql`, () => { - const skuVv234WxBlueUsPresetGraphql = - skuVv234WxBlueUs().buildGraphql(); - expect(skuVv234WxBlueUsPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "vv234-wx-blue-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "vv234-wx-blue", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-vv234-wx-blue-us.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-vv234-wx-blue-us.ts deleted file mode 100644 index 5f20936e1..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-vv234-wx-blue-us.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const usWarehouse = ChannelDraft.presets.sampleDataB2B - .usWarehouse() - .build(); - -const vv234Wx02 = ProductVariantDraft.presets.sampleDataB2B - .vv234Wx02() - .build(); - -const skuVv234WxBlueUs = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${vv234Wx02.sku}-${usWarehouse.key}`) - .sku(vv234Wx02.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(usWarehouse.key)); - -export default skuVv234WxBlueUs; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-vv234-wx-green-default.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-vv234-wx-green-default.spec.ts deleted file mode 100644 index 560021797..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-vv234-wx-green-default.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuVv234WxGreenDefault from './sku-vv234-wx-green-default'; - -describe(`with skuVv234WxGreenDefault preset and default-warehouse channel`, () => { - it(`should return a skuVv234WxGreenDefault preset`, () => { - const skuVv234WxGreenDefaultPreset = - skuVv234WxGreenDefault().build(); - expect(skuVv234WxGreenDefaultPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "vv234-wx-green-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "vv234-wx-green", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuVv234WxGreenDefault preset when built for graphql`, () => { - const skuVv234WxGreenDefaultPresetGraphql = - skuVv234WxGreenDefault().buildGraphql(); - expect(skuVv234WxGreenDefaultPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "vv234-wx-green-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "vv234-wx-green", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-vv234-wx-green-default.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-vv234-wx-green-default.ts deleted file mode 100644 index 4e0830385..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-vv234-wx-green-default.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const defaultWarehouse = ChannelDraft.presets.sampleDataB2B - .defaultWarehouse() - .build(); - -const vv234Wx03 = ProductVariantDraft.presets.sampleDataB2B - .vv234Wx03() - .build(); - -const skuVv234WxGreenDefault = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${vv234Wx03.sku}-${defaultWarehouse.key}`) - .sku(vv234Wx03.sku!) - .quantityOnStock(1000) - .supplyChannel( - KeyReferenceDraft.presets.channel().key(defaultWarehouse.key) - ); - -export default skuVv234WxGreenDefault; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-vv234-wx-green-eu.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-vv234-wx-green-eu.spec.ts deleted file mode 100644 index 2180b3a4e..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-vv234-wx-green-eu.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuVv234WxGreenEu from './sku-vv234-wx-green-eu'; - -describe(`with skuVv234WxGreenEu preset and eu-warehouse channel`, () => { - it(`should return a skuVv234WxGreenEu preset`, () => { - const skuVv234WxGreenEuPreset = - skuVv234WxGreenEu().build(); - expect(skuVv234WxGreenEuPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "vv234-wx-green-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "vv234-wx-green", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuVv234WxGreenEu preset when built for graphql`, () => { - const skuVv234WxGreenEuPresetGraphql = - skuVv234WxGreenEu().buildGraphql(); - expect(skuVv234WxGreenEuPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "vv234-wx-green-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "vv234-wx-green", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-vv234-wx-green-eu.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-vv234-wx-green-eu.ts deleted file mode 100644 index f13922459..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-vv234-wx-green-eu.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const euWarehouse = ChannelDraft.presets.sampleDataB2B - .euWarehouse() - .build(); - -const vv234Wx03 = ProductVariantDraft.presets.sampleDataB2B - .vv234Wx03() - .build(); - -const skuVv234WxGreenEu = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${vv234Wx03.sku}-${euWarehouse.key}`) - .sku(vv234Wx03.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(euWarehouse.key)); - -export default skuVv234WxGreenEu; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-vv234-wx-green-us.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-vv234-wx-green-us.spec.ts deleted file mode 100644 index a6703dcd9..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-vv234-wx-green-us.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuVv234WxGreenUs from './sku-vv234-wx-green-us'; - -describe(`with skuVv234WxGreenUs preset and us-warehouse channel`, () => { - it(`should return a skuVv234WxGreenUs preset`, () => { - const skuVv234WxGreenUsPreset = - skuVv234WxGreenUs().build(); - expect(skuVv234WxGreenUsPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "vv234-wx-green-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "vv234-wx-green", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuVv234WxGreenUs preset when built for graphql`, () => { - const skuVv234WxGreenUsPresetGraphql = - skuVv234WxGreenUs().buildGraphql(); - expect(skuVv234WxGreenUsPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "vv234-wx-green-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "vv234-wx-green", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-vv234-wx-green-us.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-vv234-wx-green-us.ts deleted file mode 100644 index 3ab4d9acc..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-vv234-wx-green-us.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const usWarehouse = ChannelDraft.presets.sampleDataB2B - .usWarehouse() - .build(); - -const vv234Wx03 = ProductVariantDraft.presets.sampleDataB2B - .vv234Wx03() - .build(); - -const skuVv234WxGreenUs = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${vv234Wx03.sku}-${usWarehouse.key}`) - .sku(vv234Wx03.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(usWarehouse.key)); - -export default skuVv234WxGreenUs; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-vv234-wx-red-default.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-vv234-wx-red-default.spec.ts deleted file mode 100644 index 59e0cf2bb..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-vv234-wx-red-default.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuVv234WxRedDefault from './sku-vv234-wx-red-default'; - -describe(`with skuVv234WxRedDefault preset and default-warehouse channel`, () => { - it(`should return a skuVv234WxRedDefault preset`, () => { - const skuVv234WxRedDefaultPreset = - skuVv234WxRedDefault().build(); - expect(skuVv234WxRedDefaultPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "vv234-wx-red-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "vv234-wx-red", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuVv234WxRedDefault preset when built for graphql`, () => { - const skuVv234WxRedDefaultPresetGraphql = - skuVv234WxRedDefault().buildGraphql(); - expect(skuVv234WxRedDefaultPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "vv234-wx-red-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "vv234-wx-red", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-vv234-wx-red-default.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-vv234-wx-red-default.ts deleted file mode 100644 index 6ec0ca220..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-vv234-wx-red-default.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const defaultWarehouse = ChannelDraft.presets.sampleDataB2B - .defaultWarehouse() - .build(); - -const vv234Wx01 = ProductVariantDraft.presets.sampleDataB2B - .vv234Wx01() - .build(); - -const skuVv234WxRedDefault = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${vv234Wx01.sku}-${defaultWarehouse.key}`) - .sku(vv234Wx01.sku!) - .quantityOnStock(1000) - .supplyChannel( - KeyReferenceDraft.presets.channel().key(defaultWarehouse.key) - ); - -export default skuVv234WxRedDefault; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-vv234-wx-red-eu.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-vv234-wx-red-eu.spec.ts deleted file mode 100644 index dd616ee4a..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-vv234-wx-red-eu.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuVv234WxRedEu from './sku-vv234-wx-red-eu'; - -describe(`with skuVv234WxRedEu preset and eu-warehouse channel`, () => { - it(`should return a skuVv234WxRedEu preset`, () => { - const skuVv234WxRedEuPreset = - skuVv234WxRedEu().build(); - expect(skuVv234WxRedEuPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "vv234-wx-red-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "vv234-wx-red", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuVv234WxRedEu preset when built for graphql`, () => { - const skuVv234WxRedEuPresetGraphql = - skuVv234WxRedEu().buildGraphql(); - expect(skuVv234WxRedEuPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "vv234-wx-red-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "vv234-wx-red", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-vv234-wx-red-eu.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-vv234-wx-red-eu.ts deleted file mode 100644 index 337830e5d..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-vv234-wx-red-eu.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const euWarehouse = ChannelDraft.presets.sampleDataB2B - .euWarehouse() - .build(); - -const vv234Wx01 = ProductVariantDraft.presets.sampleDataB2B - .vv234Wx01() - .build(); - -const skuVv234WxRedEu = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${vv234Wx01.sku}-${euWarehouse.key}`) - .sku(vv234Wx01.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(euWarehouse.key)); - -export default skuVv234WxRedEu; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-vv234-wx-red-us.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-vv234-wx-red-us.spec.ts deleted file mode 100644 index 1736d409a..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-vv234-wx-red-us.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuVv234WxRedUs from './sku-vv234-wx-red-us'; - -describe(`with skuVv234WxRedUs preset and us-warehouse channel`, () => { - it(`should return a skuVv234WxRedUs preset`, () => { - const skuVv234WxRedUsPreset = - skuVv234WxRedUs().build(); - expect(skuVv234WxRedUsPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "vv234-wx-red-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "vv234-wx-red", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuVv234WxRedUs preset when built for graphql`, () => { - const skuVv234WxRedUsPresetGraphql = - skuVv234WxRedUs().buildGraphql(); - expect(skuVv234WxRedUsPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "vv234-wx-red-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "vv234-wx-red", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-vv234-wx-red-us.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-vv234-wx-red-us.ts deleted file mode 100644 index 791e30373..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-vv234-wx-red-us.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const usWarehouse = ChannelDraft.presets.sampleDataB2B - .usWarehouse() - .build(); - -const vv234Wx01 = ProductVariantDraft.presets.sampleDataB2B - .vv234Wx01() - .build(); - -const skuVv234WxRedUs = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${vv234Wx01.sku}-${usWarehouse.key}`) - .sku(vv234Wx01.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(usWarehouse.key)); - -export default skuVv234WxRedUs; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-w-789-uv-2015-default-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-w-789-uv-2015-default-warehouse.spec.ts new file mode 100644 index 000000000..19be79b2c --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-w-789-uv-2015-default-warehouse.spec.ts @@ -0,0 +1,40 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuW789Uv2015DefaultWarehouse preset`, () => { + it(`should return a skuW789Uv2015DefaultWarehouse preset when built for rest`, () => { + const skuW789Uv2015DefaultWarehousePreset = InventoryEntryDraftRest.presets + .skuW789Uv2015DefaultWarehouse() + .build(); + expect(skuW789Uv2015DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuW789Uv2015DefaultWarehouse preset when built for graphql`, () => { + const skuW789Uv2015DefaultWarehousePreset = + InventoryEntryDraftGraphql.presets + .skuW789Uv2015DefaultWarehouse() + .build(); + expect(skuW789Uv2015DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuW789Uv2015DefaultWarehouse preset when built for legacy rest`, () => { + const skuW789Uv2015DefaultWarehousePreset = InventoryEntryDraft.presets + .skuW789Uv2015DefaultWarehouse() + .buildRest(); + expect(skuW789Uv2015DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuW789Uv2015DefaultWarehouse preset when built for legacy graphql`, () => { + const skuW789Uv2015DefaultWarehousePreset = InventoryEntryDraft.presets + .skuW789Uv2015DefaultWarehouse() + .buildGraphql(); + expect(skuW789Uv2015DefaultWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-w-789-uv-2015-default-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-w-789-uv-2015-default-warehouse.ts new file mode 100644 index 000000000..3d5470904 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-w-789-uv-2015-default-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .defaultWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .w789Uv01() + .build(); + +const skuW789Uv2015DefaultWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('w789-uv-2015-default-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuW789Uv2015DefaultWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-w-789-uv-2015-eu-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-w-789-uv-2015-eu-warehouse.spec.ts new file mode 100644 index 000000000..4bab91aae --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-w-789-uv-2015-eu-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuW789Uv2015EuWarehouse preset`, () => { + it(`should return a skuW789Uv2015EuWarehouse preset when built for rest`, () => { + const skuW789Uv2015EuWarehousePreset = InventoryEntryDraftRest.presets + .skuW789Uv2015EuWarehouse() + .build(); + expect(skuW789Uv2015EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuW789Uv2015EuWarehouse preset when built for graphql`, () => { + const skuW789Uv2015EuWarehousePreset = InventoryEntryDraftGraphql.presets + .skuW789Uv2015EuWarehouse() + .build(); + expect(skuW789Uv2015EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuW789Uv2015EuWarehouse preset when built for legacy rest`, () => { + const skuW789Uv2015EuWarehousePreset = InventoryEntryDraft.presets + .skuW789Uv2015EuWarehouse() + .buildRest(); + expect(skuW789Uv2015EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuW789Uv2015EuWarehouse preset when built for legacy graphql`, () => { + const skuW789Uv2015EuWarehousePreset = InventoryEntryDraft.presets + .skuW789Uv2015EuWarehouse() + .buildGraphql(); + expect(skuW789Uv2015EuWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-w-789-uv-2015-eu-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-w-789-uv-2015-eu-warehouse.ts new file mode 100644 index 000000000..996c92c1f --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-w-789-uv-2015-eu-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .euWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .w789Uv01() + .build(); + +const skuW789Uv2015EuWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('w789-uv-2015-eu-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuW789Uv2015EuWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-w-789-uv-2015-us-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-w-789-uv-2015-us-warehouse.spec.ts new file mode 100644 index 000000000..84d144ce3 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-w-789-uv-2015-us-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuW789Uv2015UsWarehouse preset`, () => { + it(`should return a skuW789Uv2015UsWarehouse preset when built for rest`, () => { + const skuW789Uv2015UsWarehousePreset = InventoryEntryDraftRest.presets + .skuW789Uv2015UsWarehouse() + .build(); + expect(skuW789Uv2015UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuW789Uv2015UsWarehouse preset when built for graphql`, () => { + const skuW789Uv2015UsWarehousePreset = InventoryEntryDraftGraphql.presets + .skuW789Uv2015UsWarehouse() + .build(); + expect(skuW789Uv2015UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuW789Uv2015UsWarehouse preset when built for legacy rest`, () => { + const skuW789Uv2015UsWarehousePreset = InventoryEntryDraft.presets + .skuW789Uv2015UsWarehouse() + .buildRest(); + expect(skuW789Uv2015UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuW789Uv2015UsWarehouse preset when built for legacy graphql`, () => { + const skuW789Uv2015UsWarehousePreset = InventoryEntryDraft.presets + .skuW789Uv2015UsWarehouse() + .buildGraphql(); + expect(skuW789Uv2015UsWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-w-789-uv-2015-us-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-w-789-uv-2015-us-warehouse.ts new file mode 100644 index 000000000..97cbfebde --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-w-789-uv-2015-us-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .usWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .w789Uv01() + .build(); + +const skuW789Uv2015UsWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('w789-uv-2015-us-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuW789Uv2015UsWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-w-789-uv-2019-default-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-w-789-uv-2019-default-warehouse.spec.ts new file mode 100644 index 000000000..fd5d4893d --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-w-789-uv-2019-default-warehouse.spec.ts @@ -0,0 +1,40 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuW789Uv2019DefaultWarehouse preset`, () => { + it(`should return a skuW789Uv2019DefaultWarehouse preset when built for rest`, () => { + const skuW789Uv2019DefaultWarehousePreset = InventoryEntryDraftRest.presets + .skuW789Uv2019DefaultWarehouse() + .build(); + expect(skuW789Uv2019DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuW789Uv2019DefaultWarehouse preset when built for graphql`, () => { + const skuW789Uv2019DefaultWarehousePreset = + InventoryEntryDraftGraphql.presets + .skuW789Uv2019DefaultWarehouse() + .build(); + expect(skuW789Uv2019DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuW789Uv2019DefaultWarehouse preset when built for legacy rest`, () => { + const skuW789Uv2019DefaultWarehousePreset = InventoryEntryDraft.presets + .skuW789Uv2019DefaultWarehouse() + .buildRest(); + expect(skuW789Uv2019DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuW789Uv2019DefaultWarehouse preset when built for legacy graphql`, () => { + const skuW789Uv2019DefaultWarehousePreset = InventoryEntryDraft.presets + .skuW789Uv2019DefaultWarehouse() + .buildGraphql(); + expect(skuW789Uv2019DefaultWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-w-789-uv-2019-default-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-w-789-uv-2019-default-warehouse.ts new file mode 100644 index 000000000..9f8c34324 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-w-789-uv-2019-default-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .defaultWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .w789Uv02() + .build(); + +const skuW789Uv2019DefaultWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('w789-uv-2019-default-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuW789Uv2019DefaultWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-w-789-uv-2019-eu-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-w-789-uv-2019-eu-warehouse.spec.ts new file mode 100644 index 000000000..1312dbf18 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-w-789-uv-2019-eu-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuW789Uv2019EuWarehouse preset`, () => { + it(`should return a skuW789Uv2019EuWarehouse preset when built for rest`, () => { + const skuW789Uv2019EuWarehousePreset = InventoryEntryDraftRest.presets + .skuW789Uv2019EuWarehouse() + .build(); + expect(skuW789Uv2019EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuW789Uv2019EuWarehouse preset when built for graphql`, () => { + const skuW789Uv2019EuWarehousePreset = InventoryEntryDraftGraphql.presets + .skuW789Uv2019EuWarehouse() + .build(); + expect(skuW789Uv2019EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuW789Uv2019EuWarehouse preset when built for legacy rest`, () => { + const skuW789Uv2019EuWarehousePreset = InventoryEntryDraft.presets + .skuW789Uv2019EuWarehouse() + .buildRest(); + expect(skuW789Uv2019EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuW789Uv2019EuWarehouse preset when built for legacy graphql`, () => { + const skuW789Uv2019EuWarehousePreset = InventoryEntryDraft.presets + .skuW789Uv2019EuWarehouse() + .buildGraphql(); + expect(skuW789Uv2019EuWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-w-789-uv-2019-eu-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-w-789-uv-2019-eu-warehouse.ts new file mode 100644 index 000000000..2ee7b914e --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-w-789-uv-2019-eu-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .euWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .w789Uv02() + .build(); + +const skuW789Uv2019EuWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('w789-uv-2019-eu-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuW789Uv2019EuWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-w-789-uv-2019-us-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-w-789-uv-2019-us-warehouse.spec.ts new file mode 100644 index 000000000..b09c53f7b --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-w-789-uv-2019-us-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuW789Uv2019UsWarehouse preset`, () => { + it(`should return a skuW789Uv2019UsWarehouse preset when built for rest`, () => { + const skuW789Uv2019UsWarehousePreset = InventoryEntryDraftRest.presets + .skuW789Uv2019UsWarehouse() + .build(); + expect(skuW789Uv2019UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuW789Uv2019UsWarehouse preset when built for graphql`, () => { + const skuW789Uv2019UsWarehousePreset = InventoryEntryDraftGraphql.presets + .skuW789Uv2019UsWarehouse() + .build(); + expect(skuW789Uv2019UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuW789Uv2019UsWarehouse preset when built for legacy rest`, () => { + const skuW789Uv2019UsWarehousePreset = InventoryEntryDraft.presets + .skuW789Uv2019UsWarehouse() + .buildRest(); + expect(skuW789Uv2019UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuW789Uv2019UsWarehouse preset when built for legacy graphql`, () => { + const skuW789Uv2019UsWarehousePreset = InventoryEntryDraft.presets + .skuW789Uv2019UsWarehouse() + .buildGraphql(); + expect(skuW789Uv2019UsWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-w-789-uv-2019-us-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-w-789-uv-2019-us-warehouse.ts new file mode 100644 index 000000000..d542ff988 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-w-789-uv-2019-us-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .usWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .w789Uv02() + .build(); + +const skuW789Uv2019UsWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('w789-uv-2019-us-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuW789Uv2019UsWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-w-789-uv-2023-default-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-w-789-uv-2023-default-warehouse.spec.ts new file mode 100644 index 000000000..fb19ed022 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-w-789-uv-2023-default-warehouse.spec.ts @@ -0,0 +1,40 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuW789Uv2023DefaultWarehouse preset`, () => { + it(`should return a skuW789Uv2023DefaultWarehouse preset when built for rest`, () => { + const skuW789Uv2023DefaultWarehousePreset = InventoryEntryDraftRest.presets + .skuW789Uv2023DefaultWarehouse() + .build(); + expect(skuW789Uv2023DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuW789Uv2023DefaultWarehouse preset when built for graphql`, () => { + const skuW789Uv2023DefaultWarehousePreset = + InventoryEntryDraftGraphql.presets + .skuW789Uv2023DefaultWarehouse() + .build(); + expect(skuW789Uv2023DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuW789Uv2023DefaultWarehouse preset when built for legacy rest`, () => { + const skuW789Uv2023DefaultWarehousePreset = InventoryEntryDraft.presets + .skuW789Uv2023DefaultWarehouse() + .buildRest(); + expect(skuW789Uv2023DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuW789Uv2023DefaultWarehouse preset when built for legacy graphql`, () => { + const skuW789Uv2023DefaultWarehousePreset = InventoryEntryDraft.presets + .skuW789Uv2023DefaultWarehouse() + .buildGraphql(); + expect(skuW789Uv2023DefaultWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-w-789-uv-2023-default-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-w-789-uv-2023-default-warehouse.ts new file mode 100644 index 000000000..9e2caf59f --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-w-789-uv-2023-default-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .defaultWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .w789Uv03() + .build(); + +const skuW789Uv2023DefaultWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('w789-uv-2023-default-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuW789Uv2023DefaultWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-w-789-uv-2023-eu-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-w-789-uv-2023-eu-warehouse.spec.ts new file mode 100644 index 000000000..7ad4967ea --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-w-789-uv-2023-eu-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuW789Uv2023EuWarehouse preset`, () => { + it(`should return a skuW789Uv2023EuWarehouse preset when built for rest`, () => { + const skuW789Uv2023EuWarehousePreset = InventoryEntryDraftRest.presets + .skuW789Uv2023EuWarehouse() + .build(); + expect(skuW789Uv2023EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuW789Uv2023EuWarehouse preset when built for graphql`, () => { + const skuW789Uv2023EuWarehousePreset = InventoryEntryDraftGraphql.presets + .skuW789Uv2023EuWarehouse() + .build(); + expect(skuW789Uv2023EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuW789Uv2023EuWarehouse preset when built for legacy rest`, () => { + const skuW789Uv2023EuWarehousePreset = InventoryEntryDraft.presets + .skuW789Uv2023EuWarehouse() + .buildRest(); + expect(skuW789Uv2023EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuW789Uv2023EuWarehouse preset when built for legacy graphql`, () => { + const skuW789Uv2023EuWarehousePreset = InventoryEntryDraft.presets + .skuW789Uv2023EuWarehouse() + .buildGraphql(); + expect(skuW789Uv2023EuWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-w-789-uv-2023-eu-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-w-789-uv-2023-eu-warehouse.ts new file mode 100644 index 000000000..3b50addd3 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-w-789-uv-2023-eu-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .euWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .w789Uv03() + .build(); + +const skuW789Uv2023EuWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('w789-uv-2023-eu-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuW789Uv2023EuWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-w-789-uv-2023-us-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-w-789-uv-2023-us-warehouse.spec.ts new file mode 100644 index 000000000..222e51fc3 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-w-789-uv-2023-us-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuW789Uv2023UsWarehouse preset`, () => { + it(`should return a skuW789Uv2023UsWarehouse preset when built for rest`, () => { + const skuW789Uv2023UsWarehousePreset = InventoryEntryDraftRest.presets + .skuW789Uv2023UsWarehouse() + .build(); + expect(skuW789Uv2023UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuW789Uv2023UsWarehouse preset when built for graphql`, () => { + const skuW789Uv2023UsWarehousePreset = InventoryEntryDraftGraphql.presets + .skuW789Uv2023UsWarehouse() + .build(); + expect(skuW789Uv2023UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuW789Uv2023UsWarehouse preset when built for legacy rest`, () => { + const skuW789Uv2023UsWarehousePreset = InventoryEntryDraft.presets + .skuW789Uv2023UsWarehouse() + .buildRest(); + expect(skuW789Uv2023UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuW789Uv2023UsWarehouse preset when built for legacy graphql`, () => { + const skuW789Uv2023UsWarehousePreset = InventoryEntryDraft.presets + .skuW789Uv2023UsWarehouse() + .buildGraphql(); + expect(skuW789Uv2023UsWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-w-789-uv-2023-us-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-w-789-uv-2023-us-warehouse.ts new file mode 100644 index 000000000..41354661f --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-w-789-uv-2023-us-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .usWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .w789Uv03() + .build(); + +const skuW789Uv2023UsWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('w789-uv-2023-us-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuW789Uv2023UsWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-w789-uv-2015-default.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-w789-uv-2015-default.spec.ts deleted file mode 100644 index 8da5981a3..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-w789-uv-2015-default.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuW789Uv2015Default from './sku-w789-uv-2015-default'; - -describe(`with skuW789Uv2015Default preset and default-warehouse channel`, () => { - it(`should return a skuW789Uv2015Default preset`, () => { - const skuW789Uv2015DefaultPreset = - skuW789Uv2015Default().build(); - expect(skuW789Uv2015DefaultPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "w789-uv-2015-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "w789-uv-2015", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuW789Uv2015Default preset when built for graphql`, () => { - const skuW789Uv2015DefaultPresetGraphql = - skuW789Uv2015Default().buildGraphql(); - expect(skuW789Uv2015DefaultPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "w789-uv-2015-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "w789-uv-2015", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-w789-uv-2015-default.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-w789-uv-2015-default.ts deleted file mode 100644 index ad03e9d7d..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-w789-uv-2015-default.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const defaultWarehouse = ChannelDraft.presets.sampleDataB2B - .defaultWarehouse() - .build(); - -const w789Uv01 = ProductVariantDraft.presets.sampleDataB2B - .w789Uv01() - .build(); - -const skuW789Uv2015Default = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${w789Uv01.sku}-${defaultWarehouse.key}`) - .sku(w789Uv01.sku!) - .quantityOnStock(1000) - .supplyChannel( - KeyReferenceDraft.presets.channel().key(defaultWarehouse.key) - ); - -export default skuW789Uv2015Default; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-w789-uv-2015-eu.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-w789-uv-2015-eu.spec.ts deleted file mode 100644 index a6d4cead7..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-w789-uv-2015-eu.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuW789Uv2015Eu from './sku-w789-uv-2015-eu'; - -describe(`with skuW789Uv2015Eu preset and eu-warehouse channel`, () => { - it(`should return a skuW789Uv2015Eu preset`, () => { - const skuW789Uv2015EuPreset = - skuW789Uv2015Eu().build(); - expect(skuW789Uv2015EuPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "w789-uv-2015-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "w789-uv-2015", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuW789Uv2015Eu preset when built for graphql`, () => { - const skuW789Uv2015EuPresetGraphql = - skuW789Uv2015Eu().buildGraphql(); - expect(skuW789Uv2015EuPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "w789-uv-2015-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "w789-uv-2015", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-w789-uv-2015-eu.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-w789-uv-2015-eu.ts deleted file mode 100644 index 43fe03b53..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-w789-uv-2015-eu.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const euWarehouse = ChannelDraft.presets.sampleDataB2B - .euWarehouse() - .build(); - -const w789Uv01 = ProductVariantDraft.presets.sampleDataB2B - .w789Uv01() - .build(); - -const skuW789Uv2015Eu = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${w789Uv01.sku}-${euWarehouse.key}`) - .sku(w789Uv01.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(euWarehouse.key)); - -export default skuW789Uv2015Eu; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-w789-uv-2015-us.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-w789-uv-2015-us.spec.ts deleted file mode 100644 index a89c2fa0d..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-w789-uv-2015-us.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuW789Uv2015Us from './sku-w789-uv-2015-us'; - -describe(`with skuW789Uv2015Us preset and us-warehouse channel`, () => { - it(`should return a skuW789Uv2015Us preset`, () => { - const skuW789Uv2015UsPreset = - skuW789Uv2015Us().build(); - expect(skuW789Uv2015UsPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "w789-uv-2015-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "w789-uv-2015", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuW789Uv2015Us preset when built for graphql`, () => { - const skuW789Uv2015UsPresetGraphql = - skuW789Uv2015Us().buildGraphql(); - expect(skuW789Uv2015UsPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "w789-uv-2015-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "w789-uv-2015", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-w789-uv-2015-us.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-w789-uv-2015-us.ts deleted file mode 100644 index cffae6d14..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-w789-uv-2015-us.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const usWarehouse = ChannelDraft.presets.sampleDataB2B - .usWarehouse() - .build(); - -const w789Uv01 = ProductVariantDraft.presets.sampleDataB2B - .w789Uv01() - .build(); - -const skuW789Uv2015Us = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${w789Uv01.sku}-${usWarehouse.key}`) - .sku(w789Uv01.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(usWarehouse.key)); - -export default skuW789Uv2015Us; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-w789-uv-2019-default.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-w789-uv-2019-default.spec.ts deleted file mode 100644 index a56a1bec4..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-w789-uv-2019-default.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuW789Uv2019Default from './sku-w789-uv-2019-default'; - -describe(`with skuW789Uv2019Default preset and default-warehouse channel`, () => { - it(`should return a skuW789Uv2019Default preset`, () => { - const skuW789Uv2019DefaultPreset = - skuW789Uv2019Default().build(); - expect(skuW789Uv2019DefaultPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "w789-uv-2019-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "w789-uv-2019", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuW789Uv2019Default preset when built for graphql`, () => { - const skuW789Uv2019DefaultPresetGraphql = - skuW789Uv2019Default().buildGraphql(); - expect(skuW789Uv2019DefaultPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "w789-uv-2019-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "w789-uv-2019", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-w789-uv-2019-default.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-w789-uv-2019-default.ts deleted file mode 100644 index 9cce40a97..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-w789-uv-2019-default.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const defaultWarehouse = ChannelDraft.presets.sampleDataB2B - .defaultWarehouse() - .build(); - -const w789Uv02 = ProductVariantDraft.presets.sampleDataB2B - .w789Uv02() - .build(); - -const skuW789Uv2019Default = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${w789Uv02.sku}-${defaultWarehouse.key}`) - .sku(w789Uv02.sku!) - .quantityOnStock(1000) - .supplyChannel( - KeyReferenceDraft.presets.channel().key(defaultWarehouse.key) - ); - -export default skuW789Uv2019Default; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-w789-uv-2019-eu.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-w789-uv-2019-eu.spec.ts deleted file mode 100644 index 543fea1cc..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-w789-uv-2019-eu.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuW789Uv2019Eu from './sku-w789-uv-2019-eu'; - -describe(`with skuW789Uv2019Eu preset and eu-warehouse channel`, () => { - it(`should return a skuW789Uv2019Eu preset`, () => { - const skuW789Uv2019EuPreset = - skuW789Uv2019Eu().build(); - expect(skuW789Uv2019EuPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "w789-uv-2019-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "w789-uv-2019", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuW789Uv2019Eu preset when built for graphql`, () => { - const skuW789Uv2019EuPresetGraphql = - skuW789Uv2019Eu().buildGraphql(); - expect(skuW789Uv2019EuPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "w789-uv-2019-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "w789-uv-2019", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-w789-uv-2019-eu.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-w789-uv-2019-eu.ts deleted file mode 100644 index 0bbe5fbd1..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-w789-uv-2019-eu.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const euWarehouse = ChannelDraft.presets.sampleDataB2B - .euWarehouse() - .build(); - -const w789Uv02 = ProductVariantDraft.presets.sampleDataB2B - .w789Uv02() - .build(); - -const skuW789Uv2019Eu = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${w789Uv02.sku}-${euWarehouse.key}`) - .sku(w789Uv02.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(euWarehouse.key)); - -export default skuW789Uv2019Eu; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-w789-uv-2019-us.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-w789-uv-2019-us.spec.ts deleted file mode 100644 index f3c44e360..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-w789-uv-2019-us.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuW789Uv2019Us from './sku-w789-uv-2019-us'; - -describe(`with skuW789Uv2019Us preset and us-warehouse channel`, () => { - it(`should return a skuW789Uv2019Us preset`, () => { - const skuW789Uv2019UsPreset = - skuW789Uv2019Us().build(); - expect(skuW789Uv2019UsPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "w789-uv-2019-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "w789-uv-2019", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuW789Uv2019Us preset when built for graphql`, () => { - const skuW789Uv2019UsPresetGraphql = - skuW789Uv2019Us().buildGraphql(); - expect(skuW789Uv2019UsPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "w789-uv-2019-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "w789-uv-2019", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-w789-uv-2019-us.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-w789-uv-2019-us.ts deleted file mode 100644 index fcfa2d217..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-w789-uv-2019-us.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const usWarehouse = ChannelDraft.presets.sampleDataB2B - .usWarehouse() - .build(); - -const w789Uv02 = ProductVariantDraft.presets.sampleDataB2B - .w789Uv02() - .build(); - -const skuW789Uv2019Us = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${w789Uv02.sku}-${usWarehouse.key}`) - .sku(w789Uv02.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(usWarehouse.key)); - -export default skuW789Uv2019Us; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-w789-uv-2023-default.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-w789-uv-2023-default.spec.ts deleted file mode 100644 index 75b687688..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-w789-uv-2023-default.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuW789Uv2023Default from './sku-w789-uv-2023-default'; - -describe(`with skuW789Uv2023Default preset and default-warehouse channel`, () => { - it(`should return a skuW789Uv2023Default preset`, () => { - const skuW789Uv2023DefaultPreset = - skuW789Uv2023Default().build(); - expect(skuW789Uv2023DefaultPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "w789-uv-2023-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "w789-uv-2023", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuW789Uv2023Default preset when built for graphql`, () => { - const skuW789Uv2023DefaultPresetGraphql = - skuW789Uv2023Default().buildGraphql(); - expect(skuW789Uv2023DefaultPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "w789-uv-2023-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "w789-uv-2023", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-w789-uv-2023-default.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-w789-uv-2023-default.ts deleted file mode 100644 index a9191bc6c..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-w789-uv-2023-default.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const defaultWarehouse = ChannelDraft.presets.sampleDataB2B - .defaultWarehouse() - .build(); - -const w789Uv03 = ProductVariantDraft.presets.sampleDataB2B - .w789Uv03() - .build(); - -const skuW789Uv2023Default = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${w789Uv03.sku}-${defaultWarehouse.key}`) - .sku(w789Uv03.sku!) - .quantityOnStock(1000) - .supplyChannel( - KeyReferenceDraft.presets.channel().key(defaultWarehouse.key) - ); - -export default skuW789Uv2023Default; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-w789-uv-2023-eu.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-w789-uv-2023-eu.spec.ts deleted file mode 100644 index 7992d700a..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-w789-uv-2023-eu.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuW789Uv2023Eu from './sku-w789-uv-2023-eu'; - -describe(`with skuW789Uv2023Eu preset and eu-warehouse channel`, () => { - it(`should return a skuW789Uv2023Eu preset`, () => { - const skuW789Uv2023EuPreset = - skuW789Uv2023Eu().build(); - expect(skuW789Uv2023EuPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "w789-uv-2023-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "w789-uv-2023", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuW789Uv2023Eu preset when built for graphql`, () => { - const skuW789Uv2023EuPresetGraphql = - skuW789Uv2023Eu().buildGraphql(); - expect(skuW789Uv2023EuPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "w789-uv-2023-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "w789-uv-2023", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-w789-uv-2023-eu.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-w789-uv-2023-eu.ts deleted file mode 100644 index 0fa84c683..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-w789-uv-2023-eu.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const euWarehouse = ChannelDraft.presets.sampleDataB2B - .euWarehouse() - .build(); - -const w789Uv03 = ProductVariantDraft.presets.sampleDataB2B - .w789Uv03() - .build(); - -const skuW789Uv2023Eu = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${w789Uv03.sku}-${euWarehouse.key}`) - .sku(w789Uv03.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(euWarehouse.key)); - -export default skuW789Uv2023Eu; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-w789-uv-2023-us.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-w789-uv-2023-us.spec.ts deleted file mode 100644 index b5319278f..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-w789-uv-2023-us.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuW789Uv2023Us from './sku-w789-uv-2023-us'; - -describe(`with skuW789Uv2023Us preset and us-warehouse channel`, () => { - it(`should return a skuW789Uv2023Us preset`, () => { - const skuW789Uv2023UsPreset = - skuW789Uv2023Us().build(); - expect(skuW789Uv2023UsPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "w789-uv-2023-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "w789-uv-2023", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuW789Uv2023Us preset when built for graphql`, () => { - const skuW789Uv2023UsPresetGraphql = - skuW789Uv2023Us().buildGraphql(); - expect(skuW789Uv2023UsPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "w789-uv-2023-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "w789-uv-2023", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-w789-uv-2023-us.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-w789-uv-2023-us.ts deleted file mode 100644 index c71881cb1..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-w789-uv-2023-us.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const usWarehouse = ChannelDraft.presets.sampleDataB2B - .usWarehouse() - .build(); - -const w789Uv03 = ProductVariantDraft.presets.sampleDataB2B - .w789Uv03() - .build(); - -const skuW789Uv2023Us = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${w789Uv03.sku}-${usWarehouse.key}`) - .sku(w789Uv03.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(usWarehouse.key)); - -export default skuW789Uv2023Us; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ww-567-yz-blue-default-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ww-567-yz-blue-default-warehouse.spec.ts new file mode 100644 index 000000000..c96d4f5bf --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ww-567-yz-blue-default-warehouse.spec.ts @@ -0,0 +1,40 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuWw567YzBlueDefaultWarehouse preset`, () => { + it(`should return a skuWw567YzBlueDefaultWarehouse preset when built for rest`, () => { + const skuWw567YzBlueDefaultWarehousePreset = InventoryEntryDraftRest.presets + .skuWw567YzBlueDefaultWarehouse() + .build(); + expect(skuWw567YzBlueDefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuWw567YzBlueDefaultWarehouse preset when built for graphql`, () => { + const skuWw567YzBlueDefaultWarehousePreset = + InventoryEntryDraftGraphql.presets + .skuWw567YzBlueDefaultWarehouse() + .build(); + expect(skuWw567YzBlueDefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuWw567YzBlueDefaultWarehouse preset when built for legacy rest`, () => { + const skuWw567YzBlueDefaultWarehousePreset = InventoryEntryDraft.presets + .skuWw567YzBlueDefaultWarehouse() + .buildRest(); + expect(skuWw567YzBlueDefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuWw567YzBlueDefaultWarehouse preset when built for legacy graphql`, () => { + const skuWw567YzBlueDefaultWarehousePreset = InventoryEntryDraft.presets + .skuWw567YzBlueDefaultWarehouse() + .buildGraphql(); + expect(skuWw567YzBlueDefaultWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ww-567-yz-blue-default-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ww-567-yz-blue-default-warehouse.ts new file mode 100644 index 000000000..2ebae6013 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ww-567-yz-blue-default-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .defaultWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .ww567Yz02() + .build(); + +const skuWw567YzBlueDefaultWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('ww567-yz-blue-default-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuWw567YzBlueDefaultWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ww-567-yz-blue-eu-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ww-567-yz-blue-eu-warehouse.spec.ts new file mode 100644 index 000000000..94b8598f0 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ww-567-yz-blue-eu-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuWw567YzBlueEuWarehouse preset`, () => { + it(`should return a skuWw567YzBlueEuWarehouse preset when built for rest`, () => { + const skuWw567YzBlueEuWarehousePreset = InventoryEntryDraftRest.presets + .skuWw567YzBlueEuWarehouse() + .build(); + expect(skuWw567YzBlueEuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuWw567YzBlueEuWarehouse preset when built for graphql`, () => { + const skuWw567YzBlueEuWarehousePreset = InventoryEntryDraftGraphql.presets + .skuWw567YzBlueEuWarehouse() + .build(); + expect(skuWw567YzBlueEuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuWw567YzBlueEuWarehouse preset when built for legacy rest`, () => { + const skuWw567YzBlueEuWarehousePreset = InventoryEntryDraft.presets + .skuWw567YzBlueEuWarehouse() + .buildRest(); + expect(skuWw567YzBlueEuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuWw567YzBlueEuWarehouse preset when built for legacy graphql`, () => { + const skuWw567YzBlueEuWarehousePreset = InventoryEntryDraft.presets + .skuWw567YzBlueEuWarehouse() + .buildGraphql(); + expect(skuWw567YzBlueEuWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ww-567-yz-blue-eu-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ww-567-yz-blue-eu-warehouse.ts new file mode 100644 index 000000000..a80c844cf --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ww-567-yz-blue-eu-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .euWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .ww567Yz02() + .build(); + +const skuWw567YzBlueEuWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('ww567-yz-blue-eu-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuWw567YzBlueEuWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ww-567-yz-blue-us-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ww-567-yz-blue-us-warehouse.spec.ts new file mode 100644 index 000000000..36094d1e9 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ww-567-yz-blue-us-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuWw567YzBlueUsWarehouse preset`, () => { + it(`should return a skuWw567YzBlueUsWarehouse preset when built for rest`, () => { + const skuWw567YzBlueUsWarehousePreset = InventoryEntryDraftRest.presets + .skuWw567YzBlueUsWarehouse() + .build(); + expect(skuWw567YzBlueUsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuWw567YzBlueUsWarehouse preset when built for graphql`, () => { + const skuWw567YzBlueUsWarehousePreset = InventoryEntryDraftGraphql.presets + .skuWw567YzBlueUsWarehouse() + .build(); + expect(skuWw567YzBlueUsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuWw567YzBlueUsWarehouse preset when built for legacy rest`, () => { + const skuWw567YzBlueUsWarehousePreset = InventoryEntryDraft.presets + .skuWw567YzBlueUsWarehouse() + .buildRest(); + expect(skuWw567YzBlueUsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuWw567YzBlueUsWarehouse preset when built for legacy graphql`, () => { + const skuWw567YzBlueUsWarehousePreset = InventoryEntryDraft.presets + .skuWw567YzBlueUsWarehouse() + .buildGraphql(); + expect(skuWw567YzBlueUsWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ww-567-yz-blue-us-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ww-567-yz-blue-us-warehouse.ts new file mode 100644 index 000000000..496c6adb4 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ww-567-yz-blue-us-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .usWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .ww567Yz02() + .build(); + +const skuWw567YzBlueUsWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('ww567-yz-blue-us-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuWw567YzBlueUsWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ww-567-yz-green-default-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ww-567-yz-green-default-warehouse.spec.ts new file mode 100644 index 000000000..358e92b64 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ww-567-yz-green-default-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuWw567YzGreenDefaultWarehouse preset`, () => { + it(`should return a skuWw567YzGreenDefaultWarehouse preset when built for rest`, () => { + const skuWw567YzGreenDefaultWarehousePreset = + InventoryEntryDraftRest.presets.skuWw567YzGreenDefaultWarehouse().build(); + expect(skuWw567YzGreenDefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuWw567YzGreenDefaultWarehouse preset when built for graphql`, () => { + const skuWw567YzGreenDefaultWarehousePreset = + InventoryEntryDraftGraphql.presets + .skuWw567YzGreenDefaultWarehouse() + .build(); + expect(skuWw567YzGreenDefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuWw567YzGreenDefaultWarehouse preset when built for legacy rest`, () => { + const skuWw567YzGreenDefaultWarehousePreset = InventoryEntryDraft.presets + .skuWw567YzGreenDefaultWarehouse() + .buildRest(); + expect(skuWw567YzGreenDefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuWw567YzGreenDefaultWarehouse preset when built for legacy graphql`, () => { + const skuWw567YzGreenDefaultWarehousePreset = InventoryEntryDraft.presets + .skuWw567YzGreenDefaultWarehouse() + .buildGraphql(); + expect(skuWw567YzGreenDefaultWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ww-567-yz-green-default-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ww-567-yz-green-default-warehouse.ts new file mode 100644 index 000000000..26cfaa292 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ww-567-yz-green-default-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .defaultWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .ww567Yz03() + .build(); + +const skuWw567YzGreenDefaultWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('ww567-yz-green-default-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuWw567YzGreenDefaultWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ww-567-yz-green-eu-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ww-567-yz-green-eu-warehouse.spec.ts new file mode 100644 index 000000000..9fb2394ee --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ww-567-yz-green-eu-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuWw567YzGreenEuWarehouse preset`, () => { + it(`should return a skuWw567YzGreenEuWarehouse preset when built for rest`, () => { + const skuWw567YzGreenEuWarehousePreset = InventoryEntryDraftRest.presets + .skuWw567YzGreenEuWarehouse() + .build(); + expect(skuWw567YzGreenEuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuWw567YzGreenEuWarehouse preset when built for graphql`, () => { + const skuWw567YzGreenEuWarehousePreset = InventoryEntryDraftGraphql.presets + .skuWw567YzGreenEuWarehouse() + .build(); + expect(skuWw567YzGreenEuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuWw567YzGreenEuWarehouse preset when built for legacy rest`, () => { + const skuWw567YzGreenEuWarehousePreset = InventoryEntryDraft.presets + .skuWw567YzGreenEuWarehouse() + .buildRest(); + expect(skuWw567YzGreenEuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuWw567YzGreenEuWarehouse preset when built for legacy graphql`, () => { + const skuWw567YzGreenEuWarehousePreset = InventoryEntryDraft.presets + .skuWw567YzGreenEuWarehouse() + .buildGraphql(); + expect(skuWw567YzGreenEuWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ww-567-yz-green-eu-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ww-567-yz-green-eu-warehouse.ts new file mode 100644 index 000000000..16cf43004 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ww-567-yz-green-eu-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .euWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .ww567Yz03() + .build(); + +const skuWw567YzGreenEuWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('ww567-yz-green-eu-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuWw567YzGreenEuWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ww-567-yz-green-us-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ww-567-yz-green-us-warehouse.spec.ts new file mode 100644 index 000000000..d37b4d6fa --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ww-567-yz-green-us-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuWw567YzGreenUsWarehouse preset`, () => { + it(`should return a skuWw567YzGreenUsWarehouse preset when built for rest`, () => { + const skuWw567YzGreenUsWarehousePreset = InventoryEntryDraftRest.presets + .skuWw567YzGreenUsWarehouse() + .build(); + expect(skuWw567YzGreenUsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuWw567YzGreenUsWarehouse preset when built for graphql`, () => { + const skuWw567YzGreenUsWarehousePreset = InventoryEntryDraftGraphql.presets + .skuWw567YzGreenUsWarehouse() + .build(); + expect(skuWw567YzGreenUsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuWw567YzGreenUsWarehouse preset when built for legacy rest`, () => { + const skuWw567YzGreenUsWarehousePreset = InventoryEntryDraft.presets + .skuWw567YzGreenUsWarehouse() + .buildRest(); + expect(skuWw567YzGreenUsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuWw567YzGreenUsWarehouse preset when built for legacy graphql`, () => { + const skuWw567YzGreenUsWarehousePreset = InventoryEntryDraft.presets + .skuWw567YzGreenUsWarehouse() + .buildGraphql(); + expect(skuWw567YzGreenUsWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ww-567-yz-green-us-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ww-567-yz-green-us-warehouse.ts new file mode 100644 index 000000000..b89a18702 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ww-567-yz-green-us-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .usWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .ww567Yz03() + .build(); + +const skuWw567YzGreenUsWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('ww567-yz-green-us-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuWw567YzGreenUsWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ww-567-yz-red-default-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ww-567-yz-red-default-warehouse.spec.ts new file mode 100644 index 000000000..d8ddb5244 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ww-567-yz-red-default-warehouse.spec.ts @@ -0,0 +1,40 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuWw567YzRedDefaultWarehouse preset`, () => { + it(`should return a skuWw567YzRedDefaultWarehouse preset when built for rest`, () => { + const skuWw567YzRedDefaultWarehousePreset = InventoryEntryDraftRest.presets + .skuWw567YzRedDefaultWarehouse() + .build(); + expect(skuWw567YzRedDefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuWw567YzRedDefaultWarehouse preset when built for graphql`, () => { + const skuWw567YzRedDefaultWarehousePreset = + InventoryEntryDraftGraphql.presets + .skuWw567YzRedDefaultWarehouse() + .build(); + expect(skuWw567YzRedDefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuWw567YzRedDefaultWarehouse preset when built for legacy rest`, () => { + const skuWw567YzRedDefaultWarehousePreset = InventoryEntryDraft.presets + .skuWw567YzRedDefaultWarehouse() + .buildRest(); + expect(skuWw567YzRedDefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuWw567YzRedDefaultWarehouse preset when built for legacy graphql`, () => { + const skuWw567YzRedDefaultWarehousePreset = InventoryEntryDraft.presets + .skuWw567YzRedDefaultWarehouse() + .buildGraphql(); + expect(skuWw567YzRedDefaultWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ww-567-yz-red-default-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ww-567-yz-red-default-warehouse.ts new file mode 100644 index 000000000..73e02bd43 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ww-567-yz-red-default-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .defaultWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .ww567Yz01() + .build(); + +const skuWw567YzRedDefaultWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('ww567-yz-red-default-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuWw567YzRedDefaultWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ww-567-yz-red-eu-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ww-567-yz-red-eu-warehouse.spec.ts new file mode 100644 index 000000000..f29fda801 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ww-567-yz-red-eu-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuWw567YzRedEuWarehouse preset`, () => { + it(`should return a skuWw567YzRedEuWarehouse preset when built for rest`, () => { + const skuWw567YzRedEuWarehousePreset = InventoryEntryDraftRest.presets + .skuWw567YzRedEuWarehouse() + .build(); + expect(skuWw567YzRedEuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuWw567YzRedEuWarehouse preset when built for graphql`, () => { + const skuWw567YzRedEuWarehousePreset = InventoryEntryDraftGraphql.presets + .skuWw567YzRedEuWarehouse() + .build(); + expect(skuWw567YzRedEuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuWw567YzRedEuWarehouse preset when built for legacy rest`, () => { + const skuWw567YzRedEuWarehousePreset = InventoryEntryDraft.presets + .skuWw567YzRedEuWarehouse() + .buildRest(); + expect(skuWw567YzRedEuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuWw567YzRedEuWarehouse preset when built for legacy graphql`, () => { + const skuWw567YzRedEuWarehousePreset = InventoryEntryDraft.presets + .skuWw567YzRedEuWarehouse() + .buildGraphql(); + expect(skuWw567YzRedEuWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ww-567-yz-red-eu-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ww-567-yz-red-eu-warehouse.ts new file mode 100644 index 000000000..87a32b044 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ww-567-yz-red-eu-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .euWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .ww567Yz01() + .build(); + +const skuWw567YzRedEuWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('ww567-yz-red-eu-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuWw567YzRedEuWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ww-567-yz-red-us-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ww-567-yz-red-us-warehouse.spec.ts new file mode 100644 index 000000000..b58b2168b --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ww-567-yz-red-us-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuWw567YzRedUsWarehouse preset`, () => { + it(`should return a skuWw567YzRedUsWarehouse preset when built for rest`, () => { + const skuWw567YzRedUsWarehousePreset = InventoryEntryDraftRest.presets + .skuWw567YzRedUsWarehouse() + .build(); + expect(skuWw567YzRedUsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuWw567YzRedUsWarehouse preset when built for graphql`, () => { + const skuWw567YzRedUsWarehousePreset = InventoryEntryDraftGraphql.presets + .skuWw567YzRedUsWarehouse() + .build(); + expect(skuWw567YzRedUsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuWw567YzRedUsWarehouse preset when built for legacy rest`, () => { + const skuWw567YzRedUsWarehousePreset = InventoryEntryDraft.presets + .skuWw567YzRedUsWarehouse() + .buildRest(); + expect(skuWw567YzRedUsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuWw567YzRedUsWarehouse preset when built for legacy graphql`, () => { + const skuWw567YzRedUsWarehousePreset = InventoryEntryDraft.presets + .skuWw567YzRedUsWarehouse() + .buildGraphql(); + expect(skuWw567YzRedUsWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ww-567-yz-red-us-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ww-567-yz-red-us-warehouse.ts new file mode 100644 index 000000000..8139653a3 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ww-567-yz-red-us-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .usWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .ww567Yz01() + .build(); + +const skuWw567YzRedUsWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('ww567-yz-red-us-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuWw567YzRedUsWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ww567-yz-blue-default.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ww567-yz-blue-default.spec.ts deleted file mode 100644 index 5ee60b400..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ww567-yz-blue-default.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuWw567YzBlueDefault from './sku-ww567-yz-blue-default'; - -describe(`with skuWw567YzBlueDefault preset and default-warehouse channel`, () => { - it(`should return a skuWw567YzBlueDefault preset`, () => { - const skuWw567YzBlueDefaultPreset = - skuWw567YzBlueDefault().build(); - expect(skuWw567YzBlueDefaultPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "ww567-yz-blue-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "ww567-yz-blue", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuWw567YzBlueDefault preset when built for graphql`, () => { - const skuWw567YzBlueDefaultPresetGraphql = - skuWw567YzBlueDefault().buildGraphql(); - expect(skuWw567YzBlueDefaultPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "ww567-yz-blue-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "ww567-yz-blue", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ww567-yz-blue-default.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ww567-yz-blue-default.ts deleted file mode 100644 index c7e8c61e4..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ww567-yz-blue-default.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const defaultWarehouse = ChannelDraft.presets.sampleDataB2B - .defaultWarehouse() - .build(); - -const ww567Yz02 = ProductVariantDraft.presets.sampleDataB2B - .ww567Yz02() - .build(); - -const skuWw567YzBlueDefault = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${ww567Yz02.sku}-${defaultWarehouse.key}`) - .sku(ww567Yz02.sku!) - .quantityOnStock(1000) - .supplyChannel( - KeyReferenceDraft.presets.channel().key(defaultWarehouse.key) - ); - -export default skuWw567YzBlueDefault; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ww567-yz-blue-eu.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ww567-yz-blue-eu.spec.ts deleted file mode 100644 index 2836bed1a..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ww567-yz-blue-eu.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuWw567YzBlueEu from './sku-ww567-yz-blue-eu'; - -describe(`with skuWw567YzBlueEu preset and eu-warehouse channel`, () => { - it(`should return a skuWw567YzBlueEu preset`, () => { - const skuWw567YzBlueEuPreset = - skuWw567YzBlueEu().build(); - expect(skuWw567YzBlueEuPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "ww567-yz-blue-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "ww567-yz-blue", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuWw567YzBlueEu preset when built for graphql`, () => { - const skuWw567YzBlueEuPresetGraphql = - skuWw567YzBlueEu().buildGraphql(); - expect(skuWw567YzBlueEuPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "ww567-yz-blue-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "ww567-yz-blue", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ww567-yz-blue-eu.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ww567-yz-blue-eu.ts deleted file mode 100644 index 2d77d1dc2..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ww567-yz-blue-eu.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const euWarehouse = ChannelDraft.presets.sampleDataB2B - .euWarehouse() - .build(); - -const ww567Yz02 = ProductVariantDraft.presets.sampleDataB2B - .ww567Yz02() - .build(); - -const skuWw567YzBlueEu = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${ww567Yz02.sku}-${euWarehouse.key}`) - .sku(ww567Yz02.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(euWarehouse.key)); - -export default skuWw567YzBlueEu; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ww567-yz-blue-us.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ww567-yz-blue-us.spec.ts deleted file mode 100644 index 3f7feb293..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ww567-yz-blue-us.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuWw567YzBlueUs from './sku-ww567-yz-blue-us'; - -describe(`with skuWw567YzBlueUs preset and us-warehouse channel`, () => { - it(`should return a skuWw567YzBlueUs preset`, () => { - const skuWw567YzBlueUsPreset = - skuWw567YzBlueUs().build(); - expect(skuWw567YzBlueUsPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "ww567-yz-blue-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "ww567-yz-blue", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuWw567YzBlueUs preset when built for graphql`, () => { - const skuWw567YzBlueUsPresetGraphql = - skuWw567YzBlueUs().buildGraphql(); - expect(skuWw567YzBlueUsPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "ww567-yz-blue-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "ww567-yz-blue", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ww567-yz-blue-us.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ww567-yz-blue-us.ts deleted file mode 100644 index 8d468bc7a..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ww567-yz-blue-us.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const usWarehouse = ChannelDraft.presets.sampleDataB2B - .usWarehouse() - .build(); - -const ww567Yz02 = ProductVariantDraft.presets.sampleDataB2B - .ww567Yz02() - .build(); - -const skuWw567YzBlueUs = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${ww567Yz02.sku}-${usWarehouse.key}`) - .sku(ww567Yz02.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(usWarehouse.key)); - -export default skuWw567YzBlueUs; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ww567-yz-green-default.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ww567-yz-green-default.spec.ts deleted file mode 100644 index 71e88a658..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ww567-yz-green-default.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuWw567YzGreenDefault from './sku-ww567-yz-green-default'; - -describe(`with skuWw567YzGreenDefault preset and default-warehouse channel`, () => { - it(`should return a skuWw567YzGreenDefault preset`, () => { - const skuWw567YzGreenDefaultPreset = - skuWw567YzGreenDefault().build(); - expect(skuWw567YzGreenDefaultPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "ww567-yz-green-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "ww567-yz-green", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuWw567YzGreenDefault preset when built for graphql`, () => { - const skuWw567YzGreenDefaultPresetGraphql = - skuWw567YzGreenDefault().buildGraphql(); - expect(skuWw567YzGreenDefaultPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "ww567-yz-green-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "ww567-yz-green", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ww567-yz-green-default.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ww567-yz-green-default.ts deleted file mode 100644 index dd099396f..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ww567-yz-green-default.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const defaultWarehouse = ChannelDraft.presets.sampleDataB2B - .defaultWarehouse() - .build(); - -const ww567Yz03 = ProductVariantDraft.presets.sampleDataB2B - .ww567Yz03() - .build(); - -const skuWw567YzGreenDefault = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${ww567Yz03.sku}-${defaultWarehouse.key}`) - .sku(ww567Yz03.sku!) - .quantityOnStock(1000) - .supplyChannel( - KeyReferenceDraft.presets.channel().key(defaultWarehouse.key) - ); - -export default skuWw567YzGreenDefault; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ww567-yz-green-eu.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ww567-yz-green-eu.spec.ts deleted file mode 100644 index 29e611830..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ww567-yz-green-eu.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuWw567YzGreenEu from './sku-ww567-yz-green-eu'; - -describe(`with skuWw567YzGreenEu preset and eu-warehouse channel`, () => { - it(`should return a skuWw567YzGreenEu preset`, () => { - const skuWw567YzGreenEuPreset = - skuWw567YzGreenEu().build(); - expect(skuWw567YzGreenEuPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "ww567-yz-green-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "ww567-yz-green", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuWw567YzGreenEu preset when built for graphql`, () => { - const skuWw567YzGreenEuPresetGraphql = - skuWw567YzGreenEu().buildGraphql(); - expect(skuWw567YzGreenEuPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "ww567-yz-green-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "ww567-yz-green", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ww567-yz-green-eu.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ww567-yz-green-eu.ts deleted file mode 100644 index 3e605cd30..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ww567-yz-green-eu.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const euWarehouse = ChannelDraft.presets.sampleDataB2B - .euWarehouse() - .build(); - -const ww567Yz03 = ProductVariantDraft.presets.sampleDataB2B - .ww567Yz03() - .build(); - -const skuWw567YzGreenEu = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${ww567Yz03.sku}-${euWarehouse.key}`) - .sku(ww567Yz03.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(euWarehouse.key)); - -export default skuWw567YzGreenEu; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ww567-yz-green-us.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ww567-yz-green-us.spec.ts deleted file mode 100644 index 0209d4618..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ww567-yz-green-us.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuWw567YzGreenUs from './sku-ww567-yz-green-us'; - -describe(`with skuWw567YzGreenUs preset and us-warehouse channel`, () => { - it(`should return a skuWw567YzGreenUs preset`, () => { - const skuWw567YzGreenUsPreset = - skuWw567YzGreenUs().build(); - expect(skuWw567YzGreenUsPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "ww567-yz-green-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "ww567-yz-green", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuWw567YzGreenUs preset when built for graphql`, () => { - const skuWw567YzGreenUsPresetGraphql = - skuWw567YzGreenUs().buildGraphql(); - expect(skuWw567YzGreenUsPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "ww567-yz-green-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "ww567-yz-green", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ww567-yz-green-us.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ww567-yz-green-us.ts deleted file mode 100644 index 69d09aa1f..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ww567-yz-green-us.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const usWarehouse = ChannelDraft.presets.sampleDataB2B - .usWarehouse() - .build(); - -const ww567Yz03 = ProductVariantDraft.presets.sampleDataB2B - .ww567Yz03() - .build(); - -const skuWw567YzGreenUs = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${ww567Yz03.sku}-${usWarehouse.key}`) - .sku(ww567Yz03.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(usWarehouse.key)); - -export default skuWw567YzGreenUs; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ww567-yz-red-default.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ww567-yz-red-default.spec.ts deleted file mode 100644 index fc93f157e..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ww567-yz-red-default.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuWw567YzRedDefault from './sku-ww567-yz-red-default'; - -describe(`with skuWw567YzRedDefault preset and default-warehouse channel`, () => { - it(`should return a skuWw567YzRedDefault preset`, () => { - const skuWw567YzRedDefaultPreset = - skuWw567YzRedDefault().build(); - expect(skuWw567YzRedDefaultPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "ww567-yz-red-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "ww567-yz-red", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuWw567YzRedDefault preset when built for graphql`, () => { - const skuWw567YzRedDefaultPresetGraphql = - skuWw567YzRedDefault().buildGraphql(); - expect(skuWw567YzRedDefaultPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "ww567-yz-red-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "ww567-yz-red", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ww567-yz-red-default.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ww567-yz-red-default.ts deleted file mode 100644 index c8aa38c3a..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ww567-yz-red-default.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const defaultWarehouse = ChannelDraft.presets.sampleDataB2B - .defaultWarehouse() - .build(); - -const ww567Yz01 = ProductVariantDraft.presets.sampleDataB2B - .ww567Yz01() - .build(); - -const skuWw567YzRedDefault = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${ww567Yz01.sku}-${defaultWarehouse.key}`) - .sku(ww567Yz01.sku!) - .quantityOnStock(1000) - .supplyChannel( - KeyReferenceDraft.presets.channel().key(defaultWarehouse.key) - ); - -export default skuWw567YzRedDefault; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ww567-yz-red-eu.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ww567-yz-red-eu.spec.ts deleted file mode 100644 index 75f0da2c5..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ww567-yz-red-eu.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuWw567YzRedEu from './sku-ww567-yz-red-eu'; - -describe(`with skuWw567YzRedEu preset and eu-warehouse channel`, () => { - it(`should return a skuWw567YzRedEu preset`, () => { - const skuWw567YzRedEuPreset = - skuWw567YzRedEu().build(); - expect(skuWw567YzRedEuPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "ww567-yz-red-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "ww567-yz-red", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuWw567YzRedEu preset when built for graphql`, () => { - const skuWw567YzRedEuPresetGraphql = - skuWw567YzRedEu().buildGraphql(); - expect(skuWw567YzRedEuPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "ww567-yz-red-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "ww567-yz-red", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ww567-yz-red-eu.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ww567-yz-red-eu.ts deleted file mode 100644 index 172b4acba..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ww567-yz-red-eu.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const euWarehouse = ChannelDraft.presets.sampleDataB2B - .euWarehouse() - .build(); - -const ww567Yz01 = ProductVariantDraft.presets.sampleDataB2B - .ww567Yz01() - .build(); - -const skuWw567YzRedEu = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${ww567Yz01.sku}-${euWarehouse.key}`) - .sku(ww567Yz01.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(euWarehouse.key)); - -export default skuWw567YzRedEu; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ww567-yz-red-us.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ww567-yz-red-us.spec.ts deleted file mode 100644 index 680826890..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ww567-yz-red-us.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuWw567YzRedUs from './sku-ww567-yz-red-us'; - -describe(`with skuWw567YzRedUs preset and us-warehouse channel`, () => { - it(`should return a skuWw567YzRedUs preset`, () => { - const skuWw567YzRedUsPreset = - skuWw567YzRedUs().build(); - expect(skuWw567YzRedUsPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "ww567-yz-red-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "ww567-yz-red", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuWw567YzRedUs preset when built for graphql`, () => { - const skuWw567YzRedUsPresetGraphql = - skuWw567YzRedUs().buildGraphql(); - expect(skuWw567YzRedUsPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "ww567-yz-red-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "ww567-yz-red", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ww567-yz-red-us.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ww567-yz-red-us.ts deleted file mode 100644 index dc7de74f7..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-ww567-yz-red-us.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const usWarehouse = ChannelDraft.presets.sampleDataB2B - .usWarehouse() - .build(); - -const ww567Yz01 = ProductVariantDraft.presets.sampleDataB2B - .ww567Yz01() - .build(); - -const skuWw567YzRedUs = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${ww567Yz01.sku}-${usWarehouse.key}`) - .sku(ww567Yz01.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(usWarehouse.key)); - -export default skuWw567YzRedUs; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x-234-wx-2015-default-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x-234-wx-2015-default-warehouse.spec.ts new file mode 100644 index 000000000..1e699d711 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x-234-wx-2015-default-warehouse.spec.ts @@ -0,0 +1,40 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuX234Wx2015DefaultWarehouse preset`, () => { + it(`should return a skuX234Wx2015DefaultWarehouse preset when built for rest`, () => { + const skuX234Wx2015DefaultWarehousePreset = InventoryEntryDraftRest.presets + .skuX234Wx2015DefaultWarehouse() + .build(); + expect(skuX234Wx2015DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuX234Wx2015DefaultWarehouse preset when built for graphql`, () => { + const skuX234Wx2015DefaultWarehousePreset = + InventoryEntryDraftGraphql.presets + .skuX234Wx2015DefaultWarehouse() + .build(); + expect(skuX234Wx2015DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuX234Wx2015DefaultWarehouse preset when built for legacy rest`, () => { + const skuX234Wx2015DefaultWarehousePreset = InventoryEntryDraft.presets + .skuX234Wx2015DefaultWarehouse() + .buildRest(); + expect(skuX234Wx2015DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuX234Wx2015DefaultWarehouse preset when built for legacy graphql`, () => { + const skuX234Wx2015DefaultWarehousePreset = InventoryEntryDraft.presets + .skuX234Wx2015DefaultWarehouse() + .buildGraphql(); + expect(skuX234Wx2015DefaultWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x-234-wx-2015-default-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x-234-wx-2015-default-warehouse.ts new file mode 100644 index 000000000..81112cddc --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x-234-wx-2015-default-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .defaultWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .x234Wx01() + .build(); + +const skuX234Wx2015DefaultWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('x234-wx-2015-default-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuX234Wx2015DefaultWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x-234-wx-2015-eu-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x-234-wx-2015-eu-warehouse.spec.ts new file mode 100644 index 000000000..39f9f555d --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x-234-wx-2015-eu-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuX234Wx2015EuWarehouse preset`, () => { + it(`should return a skuX234Wx2015EuWarehouse preset when built for rest`, () => { + const skuX234Wx2015EuWarehousePreset = InventoryEntryDraftRest.presets + .skuX234Wx2015EuWarehouse() + .build(); + expect(skuX234Wx2015EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuX234Wx2015EuWarehouse preset when built for graphql`, () => { + const skuX234Wx2015EuWarehousePreset = InventoryEntryDraftGraphql.presets + .skuX234Wx2015EuWarehouse() + .build(); + expect(skuX234Wx2015EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuX234Wx2015EuWarehouse preset when built for legacy rest`, () => { + const skuX234Wx2015EuWarehousePreset = InventoryEntryDraft.presets + .skuX234Wx2015EuWarehouse() + .buildRest(); + expect(skuX234Wx2015EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuX234Wx2015EuWarehouse preset when built for legacy graphql`, () => { + const skuX234Wx2015EuWarehousePreset = InventoryEntryDraft.presets + .skuX234Wx2015EuWarehouse() + .buildGraphql(); + expect(skuX234Wx2015EuWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x-234-wx-2015-eu-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x-234-wx-2015-eu-warehouse.ts new file mode 100644 index 000000000..3c733ff6f --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x-234-wx-2015-eu-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .euWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .x234Wx01() + .build(); + +const skuX234Wx2015EuWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('x234-wx-2015-eu-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuX234Wx2015EuWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x-234-wx-2015-us-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x-234-wx-2015-us-warehouse.spec.ts new file mode 100644 index 000000000..59c61800c --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x-234-wx-2015-us-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuX234Wx2015UsWarehouse preset`, () => { + it(`should return a skuX234Wx2015UsWarehouse preset when built for rest`, () => { + const skuX234Wx2015UsWarehousePreset = InventoryEntryDraftRest.presets + .skuX234Wx2015UsWarehouse() + .build(); + expect(skuX234Wx2015UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuX234Wx2015UsWarehouse preset when built for graphql`, () => { + const skuX234Wx2015UsWarehousePreset = InventoryEntryDraftGraphql.presets + .skuX234Wx2015UsWarehouse() + .build(); + expect(skuX234Wx2015UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuX234Wx2015UsWarehouse preset when built for legacy rest`, () => { + const skuX234Wx2015UsWarehousePreset = InventoryEntryDraft.presets + .skuX234Wx2015UsWarehouse() + .buildRest(); + expect(skuX234Wx2015UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuX234Wx2015UsWarehouse preset when built for legacy graphql`, () => { + const skuX234Wx2015UsWarehousePreset = InventoryEntryDraft.presets + .skuX234Wx2015UsWarehouse() + .buildGraphql(); + expect(skuX234Wx2015UsWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x-234-wx-2015-us-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x-234-wx-2015-us-warehouse.ts new file mode 100644 index 000000000..cbdad793d --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x-234-wx-2015-us-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .usWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .x234Wx01() + .build(); + +const skuX234Wx2015UsWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('x234-wx-2015-us-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuX234Wx2015UsWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x-234-wx-2019-default-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x-234-wx-2019-default-warehouse.spec.ts new file mode 100644 index 000000000..4845c00c2 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x-234-wx-2019-default-warehouse.spec.ts @@ -0,0 +1,40 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuX234Wx2019DefaultWarehouse preset`, () => { + it(`should return a skuX234Wx2019DefaultWarehouse preset when built for rest`, () => { + const skuX234Wx2019DefaultWarehousePreset = InventoryEntryDraftRest.presets + .skuX234Wx2019DefaultWarehouse() + .build(); + expect(skuX234Wx2019DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuX234Wx2019DefaultWarehouse preset when built for graphql`, () => { + const skuX234Wx2019DefaultWarehousePreset = + InventoryEntryDraftGraphql.presets + .skuX234Wx2019DefaultWarehouse() + .build(); + expect(skuX234Wx2019DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuX234Wx2019DefaultWarehouse preset when built for legacy rest`, () => { + const skuX234Wx2019DefaultWarehousePreset = InventoryEntryDraft.presets + .skuX234Wx2019DefaultWarehouse() + .buildRest(); + expect(skuX234Wx2019DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuX234Wx2019DefaultWarehouse preset when built for legacy graphql`, () => { + const skuX234Wx2019DefaultWarehousePreset = InventoryEntryDraft.presets + .skuX234Wx2019DefaultWarehouse() + .buildGraphql(); + expect(skuX234Wx2019DefaultWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x-234-wx-2019-default-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x-234-wx-2019-default-warehouse.ts new file mode 100644 index 000000000..835b59bef --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x-234-wx-2019-default-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .defaultWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .x234Wx02() + .build(); + +const skuX234Wx2019DefaultWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('x234-wx-2019-default-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuX234Wx2019DefaultWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x-234-wx-2019-eu-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x-234-wx-2019-eu-warehouse.spec.ts new file mode 100644 index 000000000..f4089010e --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x-234-wx-2019-eu-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuX234Wx2019EuWarehouse preset`, () => { + it(`should return a skuX234Wx2019EuWarehouse preset when built for rest`, () => { + const skuX234Wx2019EuWarehousePreset = InventoryEntryDraftRest.presets + .skuX234Wx2019EuWarehouse() + .build(); + expect(skuX234Wx2019EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuX234Wx2019EuWarehouse preset when built for graphql`, () => { + const skuX234Wx2019EuWarehousePreset = InventoryEntryDraftGraphql.presets + .skuX234Wx2019EuWarehouse() + .build(); + expect(skuX234Wx2019EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuX234Wx2019EuWarehouse preset when built for legacy rest`, () => { + const skuX234Wx2019EuWarehousePreset = InventoryEntryDraft.presets + .skuX234Wx2019EuWarehouse() + .buildRest(); + expect(skuX234Wx2019EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuX234Wx2019EuWarehouse preset when built for legacy graphql`, () => { + const skuX234Wx2019EuWarehousePreset = InventoryEntryDraft.presets + .skuX234Wx2019EuWarehouse() + .buildGraphql(); + expect(skuX234Wx2019EuWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x-234-wx-2019-eu-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x-234-wx-2019-eu-warehouse.ts new file mode 100644 index 000000000..a551e2465 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x-234-wx-2019-eu-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .euWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .x234Wx02() + .build(); + +const skuX234Wx2019EuWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('x234-wx-2019-eu-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuX234Wx2019EuWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x-234-wx-2019-us-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x-234-wx-2019-us-warehouse.spec.ts new file mode 100644 index 000000000..4c4c72ffc --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x-234-wx-2019-us-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuX234Wx2019UsWarehouse preset`, () => { + it(`should return a skuX234Wx2019UsWarehouse preset when built for rest`, () => { + const skuX234Wx2019UsWarehousePreset = InventoryEntryDraftRest.presets + .skuX234Wx2019UsWarehouse() + .build(); + expect(skuX234Wx2019UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuX234Wx2019UsWarehouse preset when built for graphql`, () => { + const skuX234Wx2019UsWarehousePreset = InventoryEntryDraftGraphql.presets + .skuX234Wx2019UsWarehouse() + .build(); + expect(skuX234Wx2019UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuX234Wx2019UsWarehouse preset when built for legacy rest`, () => { + const skuX234Wx2019UsWarehousePreset = InventoryEntryDraft.presets + .skuX234Wx2019UsWarehouse() + .buildRest(); + expect(skuX234Wx2019UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuX234Wx2019UsWarehouse preset when built for legacy graphql`, () => { + const skuX234Wx2019UsWarehousePreset = InventoryEntryDraft.presets + .skuX234Wx2019UsWarehouse() + .buildGraphql(); + expect(skuX234Wx2019UsWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x-234-wx-2019-us-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x-234-wx-2019-us-warehouse.ts new file mode 100644 index 000000000..cbd6881c4 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x-234-wx-2019-us-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .usWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .x234Wx02() + .build(); + +const skuX234Wx2019UsWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('x234-wx-2019-us-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuX234Wx2019UsWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x-234-wx-2023-default-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x-234-wx-2023-default-warehouse.spec.ts new file mode 100644 index 000000000..c668abfed --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x-234-wx-2023-default-warehouse.spec.ts @@ -0,0 +1,40 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuX234Wx2023DefaultWarehouse preset`, () => { + it(`should return a skuX234Wx2023DefaultWarehouse preset when built for rest`, () => { + const skuX234Wx2023DefaultWarehousePreset = InventoryEntryDraftRest.presets + .skuX234Wx2023DefaultWarehouse() + .build(); + expect(skuX234Wx2023DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuX234Wx2023DefaultWarehouse preset when built for graphql`, () => { + const skuX234Wx2023DefaultWarehousePreset = + InventoryEntryDraftGraphql.presets + .skuX234Wx2023DefaultWarehouse() + .build(); + expect(skuX234Wx2023DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuX234Wx2023DefaultWarehouse preset when built for legacy rest`, () => { + const skuX234Wx2023DefaultWarehousePreset = InventoryEntryDraft.presets + .skuX234Wx2023DefaultWarehouse() + .buildRest(); + expect(skuX234Wx2023DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuX234Wx2023DefaultWarehouse preset when built for legacy graphql`, () => { + const skuX234Wx2023DefaultWarehousePreset = InventoryEntryDraft.presets + .skuX234Wx2023DefaultWarehouse() + .buildGraphql(); + expect(skuX234Wx2023DefaultWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x-234-wx-2023-default-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x-234-wx-2023-default-warehouse.ts new file mode 100644 index 000000000..be9151f1e --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x-234-wx-2023-default-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .defaultWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .x234Wx03() + .build(); + +const skuX234Wx2023DefaultWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('x234-wx-2023-default-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuX234Wx2023DefaultWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x-234-wx-2023-eu-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x-234-wx-2023-eu-warehouse.spec.ts new file mode 100644 index 000000000..18a30b9d1 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x-234-wx-2023-eu-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuX234Wx2023EuWarehouse preset`, () => { + it(`should return a skuX234Wx2023EuWarehouse preset when built for rest`, () => { + const skuX234Wx2023EuWarehousePreset = InventoryEntryDraftRest.presets + .skuX234Wx2023EuWarehouse() + .build(); + expect(skuX234Wx2023EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuX234Wx2023EuWarehouse preset when built for graphql`, () => { + const skuX234Wx2023EuWarehousePreset = InventoryEntryDraftGraphql.presets + .skuX234Wx2023EuWarehouse() + .build(); + expect(skuX234Wx2023EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuX234Wx2023EuWarehouse preset when built for legacy rest`, () => { + const skuX234Wx2023EuWarehousePreset = InventoryEntryDraft.presets + .skuX234Wx2023EuWarehouse() + .buildRest(); + expect(skuX234Wx2023EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuX234Wx2023EuWarehouse preset when built for legacy graphql`, () => { + const skuX234Wx2023EuWarehousePreset = InventoryEntryDraft.presets + .skuX234Wx2023EuWarehouse() + .buildGraphql(); + expect(skuX234Wx2023EuWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x-234-wx-2023-eu-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x-234-wx-2023-eu-warehouse.ts new file mode 100644 index 000000000..6974a7277 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x-234-wx-2023-eu-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .euWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .x234Wx03() + .build(); + +const skuX234Wx2023EuWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('x234-wx-2023-eu-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuX234Wx2023EuWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x-234-wx-2023-us-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x-234-wx-2023-us-warehouse.spec.ts new file mode 100644 index 000000000..becb551e8 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x-234-wx-2023-us-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuX234Wx2023UsWarehouse preset`, () => { + it(`should return a skuX234Wx2023UsWarehouse preset when built for rest`, () => { + const skuX234Wx2023UsWarehousePreset = InventoryEntryDraftRest.presets + .skuX234Wx2023UsWarehouse() + .build(); + expect(skuX234Wx2023UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuX234Wx2023UsWarehouse preset when built for graphql`, () => { + const skuX234Wx2023UsWarehousePreset = InventoryEntryDraftGraphql.presets + .skuX234Wx2023UsWarehouse() + .build(); + expect(skuX234Wx2023UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuX234Wx2023UsWarehouse preset when built for legacy rest`, () => { + const skuX234Wx2023UsWarehousePreset = InventoryEntryDraft.presets + .skuX234Wx2023UsWarehouse() + .buildRest(); + expect(skuX234Wx2023UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuX234Wx2023UsWarehouse preset when built for legacy graphql`, () => { + const skuX234Wx2023UsWarehousePreset = InventoryEntryDraft.presets + .skuX234Wx2023UsWarehouse() + .buildGraphql(); + expect(skuX234Wx2023UsWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x-234-wx-2023-us-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x-234-wx-2023-us-warehouse.ts new file mode 100644 index 000000000..480c5df70 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x-234-wx-2023-us-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .usWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .x234Wx03() + .build(); + +const skuX234Wx2023UsWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('x234-wx-2023-us-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuX234Wx2023UsWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x-456-yz-2015-default-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x-456-yz-2015-default-warehouse.spec.ts new file mode 100644 index 000000000..ac1fdb392 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x-456-yz-2015-default-warehouse.spec.ts @@ -0,0 +1,40 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuX456Yz2015DefaultWarehouse preset`, () => { + it(`should return a skuX456Yz2015DefaultWarehouse preset when built for rest`, () => { + const skuX456Yz2015DefaultWarehousePreset = InventoryEntryDraftRest.presets + .skuX456Yz2015DefaultWarehouse() + .build(); + expect(skuX456Yz2015DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuX456Yz2015DefaultWarehouse preset when built for graphql`, () => { + const skuX456Yz2015DefaultWarehousePreset = + InventoryEntryDraftGraphql.presets + .skuX456Yz2015DefaultWarehouse() + .build(); + expect(skuX456Yz2015DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuX456Yz2015DefaultWarehouse preset when built for legacy rest`, () => { + const skuX456Yz2015DefaultWarehousePreset = InventoryEntryDraft.presets + .skuX456Yz2015DefaultWarehouse() + .buildRest(); + expect(skuX456Yz2015DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuX456Yz2015DefaultWarehouse preset when built for legacy graphql`, () => { + const skuX456Yz2015DefaultWarehousePreset = InventoryEntryDraft.presets + .skuX456Yz2015DefaultWarehouse() + .buildGraphql(); + expect(skuX456Yz2015DefaultWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x-456-yz-2015-default-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x-456-yz-2015-default-warehouse.ts new file mode 100644 index 000000000..363b794aa --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x-456-yz-2015-default-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .defaultWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .x456Yz01() + .build(); + +const skuX456Yz2015DefaultWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('x456-yz-2015-default-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuX456Yz2015DefaultWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x-456-yz-2015-eu-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x-456-yz-2015-eu-warehouse.spec.ts new file mode 100644 index 000000000..89dfef59c --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x-456-yz-2015-eu-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuX456Yz2015EuWarehouse preset`, () => { + it(`should return a skuX456Yz2015EuWarehouse preset when built for rest`, () => { + const skuX456Yz2015EuWarehousePreset = InventoryEntryDraftRest.presets + .skuX456Yz2015EuWarehouse() + .build(); + expect(skuX456Yz2015EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuX456Yz2015EuWarehouse preset when built for graphql`, () => { + const skuX456Yz2015EuWarehousePreset = InventoryEntryDraftGraphql.presets + .skuX456Yz2015EuWarehouse() + .build(); + expect(skuX456Yz2015EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuX456Yz2015EuWarehouse preset when built for legacy rest`, () => { + const skuX456Yz2015EuWarehousePreset = InventoryEntryDraft.presets + .skuX456Yz2015EuWarehouse() + .buildRest(); + expect(skuX456Yz2015EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuX456Yz2015EuWarehouse preset when built for legacy graphql`, () => { + const skuX456Yz2015EuWarehousePreset = InventoryEntryDraft.presets + .skuX456Yz2015EuWarehouse() + .buildGraphql(); + expect(skuX456Yz2015EuWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x-456-yz-2015-eu-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x-456-yz-2015-eu-warehouse.ts new file mode 100644 index 000000000..caedfd598 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x-456-yz-2015-eu-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .euWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .x456Yz01() + .build(); + +const skuX456Yz2015EuWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('x456-yz-2015-eu-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuX456Yz2015EuWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x-456-yz-2015-us-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x-456-yz-2015-us-warehouse.spec.ts new file mode 100644 index 000000000..444959a5c --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x-456-yz-2015-us-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuX456Yz2015UsWarehouse preset`, () => { + it(`should return a skuX456Yz2015UsWarehouse preset when built for rest`, () => { + const skuX456Yz2015UsWarehousePreset = InventoryEntryDraftRest.presets + .skuX456Yz2015UsWarehouse() + .build(); + expect(skuX456Yz2015UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuX456Yz2015UsWarehouse preset when built for graphql`, () => { + const skuX456Yz2015UsWarehousePreset = InventoryEntryDraftGraphql.presets + .skuX456Yz2015UsWarehouse() + .build(); + expect(skuX456Yz2015UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuX456Yz2015UsWarehouse preset when built for legacy rest`, () => { + const skuX456Yz2015UsWarehousePreset = InventoryEntryDraft.presets + .skuX456Yz2015UsWarehouse() + .buildRest(); + expect(skuX456Yz2015UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuX456Yz2015UsWarehouse preset when built for legacy graphql`, () => { + const skuX456Yz2015UsWarehousePreset = InventoryEntryDraft.presets + .skuX456Yz2015UsWarehouse() + .buildGraphql(); + expect(skuX456Yz2015UsWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x-456-yz-2015-us-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x-456-yz-2015-us-warehouse.ts new file mode 100644 index 000000000..1cbb200ae --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x-456-yz-2015-us-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .usWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .x456Yz01() + .build(); + +const skuX456Yz2015UsWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('x456-yz-2015-us-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuX456Yz2015UsWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x-456-yz-2019-default-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x-456-yz-2019-default-warehouse.spec.ts new file mode 100644 index 000000000..550860d26 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x-456-yz-2019-default-warehouse.spec.ts @@ -0,0 +1,40 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuX456Yz2019DefaultWarehouse preset`, () => { + it(`should return a skuX456Yz2019DefaultWarehouse preset when built for rest`, () => { + const skuX456Yz2019DefaultWarehousePreset = InventoryEntryDraftRest.presets + .skuX456Yz2019DefaultWarehouse() + .build(); + expect(skuX456Yz2019DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuX456Yz2019DefaultWarehouse preset when built for graphql`, () => { + const skuX456Yz2019DefaultWarehousePreset = + InventoryEntryDraftGraphql.presets + .skuX456Yz2019DefaultWarehouse() + .build(); + expect(skuX456Yz2019DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuX456Yz2019DefaultWarehouse preset when built for legacy rest`, () => { + const skuX456Yz2019DefaultWarehousePreset = InventoryEntryDraft.presets + .skuX456Yz2019DefaultWarehouse() + .buildRest(); + expect(skuX456Yz2019DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuX456Yz2019DefaultWarehouse preset when built for legacy graphql`, () => { + const skuX456Yz2019DefaultWarehousePreset = InventoryEntryDraft.presets + .skuX456Yz2019DefaultWarehouse() + .buildGraphql(); + expect(skuX456Yz2019DefaultWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x-456-yz-2019-default-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x-456-yz-2019-default-warehouse.ts new file mode 100644 index 000000000..3c3067321 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x-456-yz-2019-default-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .defaultWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .x456Yz02() + .build(); + +const skuX456Yz2019DefaultWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('x456-yz-2019-default-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuX456Yz2019DefaultWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x-456-yz-2019-eu-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x-456-yz-2019-eu-warehouse.spec.ts new file mode 100644 index 000000000..afbefab1d --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x-456-yz-2019-eu-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuX456Yz2019EuWarehouse preset`, () => { + it(`should return a skuX456Yz2019EuWarehouse preset when built for rest`, () => { + const skuX456Yz2019EuWarehousePreset = InventoryEntryDraftRest.presets + .skuX456Yz2019EuWarehouse() + .build(); + expect(skuX456Yz2019EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuX456Yz2019EuWarehouse preset when built for graphql`, () => { + const skuX456Yz2019EuWarehousePreset = InventoryEntryDraftGraphql.presets + .skuX456Yz2019EuWarehouse() + .build(); + expect(skuX456Yz2019EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuX456Yz2019EuWarehouse preset when built for legacy rest`, () => { + const skuX456Yz2019EuWarehousePreset = InventoryEntryDraft.presets + .skuX456Yz2019EuWarehouse() + .buildRest(); + expect(skuX456Yz2019EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuX456Yz2019EuWarehouse preset when built for legacy graphql`, () => { + const skuX456Yz2019EuWarehousePreset = InventoryEntryDraft.presets + .skuX456Yz2019EuWarehouse() + .buildGraphql(); + expect(skuX456Yz2019EuWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x-456-yz-2019-eu-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x-456-yz-2019-eu-warehouse.ts new file mode 100644 index 000000000..41c7906c7 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x-456-yz-2019-eu-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .euWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .x456Yz02() + .build(); + +const skuX456Yz2019EuWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('x456-yz-2019-eu-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuX456Yz2019EuWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x-456-yz-2019-us-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x-456-yz-2019-us-warehouse.spec.ts new file mode 100644 index 000000000..29612b9cc --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x-456-yz-2019-us-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuX456Yz2019UsWarehouse preset`, () => { + it(`should return a skuX456Yz2019UsWarehouse preset when built for rest`, () => { + const skuX456Yz2019UsWarehousePreset = InventoryEntryDraftRest.presets + .skuX456Yz2019UsWarehouse() + .build(); + expect(skuX456Yz2019UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuX456Yz2019UsWarehouse preset when built for graphql`, () => { + const skuX456Yz2019UsWarehousePreset = InventoryEntryDraftGraphql.presets + .skuX456Yz2019UsWarehouse() + .build(); + expect(skuX456Yz2019UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuX456Yz2019UsWarehouse preset when built for legacy rest`, () => { + const skuX456Yz2019UsWarehousePreset = InventoryEntryDraft.presets + .skuX456Yz2019UsWarehouse() + .buildRest(); + expect(skuX456Yz2019UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuX456Yz2019UsWarehouse preset when built for legacy graphql`, () => { + const skuX456Yz2019UsWarehousePreset = InventoryEntryDraft.presets + .skuX456Yz2019UsWarehouse() + .buildGraphql(); + expect(skuX456Yz2019UsWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x-456-yz-2019-us-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x-456-yz-2019-us-warehouse.ts new file mode 100644 index 000000000..b567d3d04 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x-456-yz-2019-us-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .usWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .x456Yz02() + .build(); + +const skuX456Yz2019UsWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('x456-yz-2019-us-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuX456Yz2019UsWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x-456-yz-2023-default-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x-456-yz-2023-default-warehouse.spec.ts new file mode 100644 index 000000000..0d6c3ff3f --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x-456-yz-2023-default-warehouse.spec.ts @@ -0,0 +1,40 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuX456Yz2023DefaultWarehouse preset`, () => { + it(`should return a skuX456Yz2023DefaultWarehouse preset when built for rest`, () => { + const skuX456Yz2023DefaultWarehousePreset = InventoryEntryDraftRest.presets + .skuX456Yz2023DefaultWarehouse() + .build(); + expect(skuX456Yz2023DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuX456Yz2023DefaultWarehouse preset when built for graphql`, () => { + const skuX456Yz2023DefaultWarehousePreset = + InventoryEntryDraftGraphql.presets + .skuX456Yz2023DefaultWarehouse() + .build(); + expect(skuX456Yz2023DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuX456Yz2023DefaultWarehouse preset when built for legacy rest`, () => { + const skuX456Yz2023DefaultWarehousePreset = InventoryEntryDraft.presets + .skuX456Yz2023DefaultWarehouse() + .buildRest(); + expect(skuX456Yz2023DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuX456Yz2023DefaultWarehouse preset when built for legacy graphql`, () => { + const skuX456Yz2023DefaultWarehousePreset = InventoryEntryDraft.presets + .skuX456Yz2023DefaultWarehouse() + .buildGraphql(); + expect(skuX456Yz2023DefaultWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x-456-yz-2023-default-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x-456-yz-2023-default-warehouse.ts new file mode 100644 index 000000000..18e2e8a18 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x-456-yz-2023-default-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .defaultWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .x456Yz03() + .build(); + +const skuX456Yz2023DefaultWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('x456-yz-2023-default-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuX456Yz2023DefaultWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x-456-yz-2023-eu-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x-456-yz-2023-eu-warehouse.spec.ts new file mode 100644 index 000000000..365094b3e --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x-456-yz-2023-eu-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuX456Yz2023EuWarehouse preset`, () => { + it(`should return a skuX456Yz2023EuWarehouse preset when built for rest`, () => { + const skuX456Yz2023EuWarehousePreset = InventoryEntryDraftRest.presets + .skuX456Yz2023EuWarehouse() + .build(); + expect(skuX456Yz2023EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuX456Yz2023EuWarehouse preset when built for graphql`, () => { + const skuX456Yz2023EuWarehousePreset = InventoryEntryDraftGraphql.presets + .skuX456Yz2023EuWarehouse() + .build(); + expect(skuX456Yz2023EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuX456Yz2023EuWarehouse preset when built for legacy rest`, () => { + const skuX456Yz2023EuWarehousePreset = InventoryEntryDraft.presets + .skuX456Yz2023EuWarehouse() + .buildRest(); + expect(skuX456Yz2023EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuX456Yz2023EuWarehouse preset when built for legacy graphql`, () => { + const skuX456Yz2023EuWarehousePreset = InventoryEntryDraft.presets + .skuX456Yz2023EuWarehouse() + .buildGraphql(); + expect(skuX456Yz2023EuWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x-456-yz-2023-eu-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x-456-yz-2023-eu-warehouse.ts new file mode 100644 index 000000000..870305b92 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x-456-yz-2023-eu-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .euWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .x456Yz03() + .build(); + +const skuX456Yz2023EuWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('x456-yz-2023-eu-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuX456Yz2023EuWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x-456-yz-2023-us-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x-456-yz-2023-us-warehouse.spec.ts new file mode 100644 index 000000000..53fe8e25e --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x-456-yz-2023-us-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuX456Yz2023UsWarehouse preset`, () => { + it(`should return a skuX456Yz2023UsWarehouse preset when built for rest`, () => { + const skuX456Yz2023UsWarehousePreset = InventoryEntryDraftRest.presets + .skuX456Yz2023UsWarehouse() + .build(); + expect(skuX456Yz2023UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuX456Yz2023UsWarehouse preset when built for graphql`, () => { + const skuX456Yz2023UsWarehousePreset = InventoryEntryDraftGraphql.presets + .skuX456Yz2023UsWarehouse() + .build(); + expect(skuX456Yz2023UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuX456Yz2023UsWarehouse preset when built for legacy rest`, () => { + const skuX456Yz2023UsWarehousePreset = InventoryEntryDraft.presets + .skuX456Yz2023UsWarehouse() + .buildRest(); + expect(skuX456Yz2023UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuX456Yz2023UsWarehouse preset when built for legacy graphql`, () => { + const skuX456Yz2023UsWarehousePreset = InventoryEntryDraft.presets + .skuX456Yz2023UsWarehouse() + .buildGraphql(); + expect(skuX456Yz2023UsWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x-456-yz-2023-us-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x-456-yz-2023-us-warehouse.ts new file mode 100644 index 000000000..a158849ba --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x-456-yz-2023-us-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .usWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .x456Yz03() + .build(); + +const skuX456Yz2023UsWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('x456-yz-2023-us-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuX456Yz2023UsWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x234-wx-2015-default.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x234-wx-2015-default.spec.ts deleted file mode 100644 index 0bb8886f4..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x234-wx-2015-default.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuX234Wx2015Default from './sku-x234-wx-2015-default'; - -describe(`with skuX234Wx2015Default preset and default-warehouse channel`, () => { - it(`should return a skuX234Wx2015Default preset`, () => { - const skuX234Wx2015DefaultPreset = - skuX234Wx2015Default().build(); - expect(skuX234Wx2015DefaultPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "x234-wx-2015-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "x234-wx-2015", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuX234Wx2015Default preset when built for graphql`, () => { - const skuX234Wx2015DefaultPresetGraphql = - skuX234Wx2015Default().buildGraphql(); - expect(skuX234Wx2015DefaultPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "x234-wx-2015-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "x234-wx-2015", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x234-wx-2015-default.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x234-wx-2015-default.ts deleted file mode 100644 index 9b512bcd8..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x234-wx-2015-default.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const defaultWarehouse = ChannelDraft.presets.sampleDataB2B - .defaultWarehouse() - .build(); - -const x234Wx01 = ProductVariantDraft.presets.sampleDataB2B - .x234Wx01() - .build(); - -const skuX234Wx2015Default = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${x234Wx01.sku}-${defaultWarehouse.key}`) - .sku(x234Wx01.sku!) - .quantityOnStock(1000) - .supplyChannel( - KeyReferenceDraft.presets.channel().key(defaultWarehouse.key) - ); - -export default skuX234Wx2015Default; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x234-wx-2015-eu.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x234-wx-2015-eu.spec.ts deleted file mode 100644 index c4e14b971..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x234-wx-2015-eu.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuX234Wx2015Eu from './sku-x234-wx-2015-eu'; - -describe(`with skuX234Wx2015Eu preset and eu-warehouse channel`, () => { - it(`should return a skuX234Wx2015Eu preset`, () => { - const skuX234Wx2015EuPreset = - skuX234Wx2015Eu().build(); - expect(skuX234Wx2015EuPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "x234-wx-2015-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "x234-wx-2015", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuX234Wx2015Eu preset when built for graphql`, () => { - const skuX234Wx2015EuPresetGraphql = - skuX234Wx2015Eu().buildGraphql(); - expect(skuX234Wx2015EuPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "x234-wx-2015-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "x234-wx-2015", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x234-wx-2015-eu.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x234-wx-2015-eu.ts deleted file mode 100644 index 8e4f52bf9..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x234-wx-2015-eu.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const euWarehouse = ChannelDraft.presets.sampleDataB2B - .euWarehouse() - .build(); - -const x234Wx01 = ProductVariantDraft.presets.sampleDataB2B - .x234Wx01() - .build(); - -const skuX234Wx2015Eu = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${x234Wx01.sku}-${euWarehouse.key}`) - .sku(x234Wx01.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(euWarehouse.key)); - -export default skuX234Wx2015Eu; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x234-wx-2015-us.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x234-wx-2015-us.spec.ts deleted file mode 100644 index 365cb3232..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x234-wx-2015-us.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuX234Wx2015Us from './sku-x234-wx-2015-us'; - -describe(`with skuX234Wx2015Us preset and us-warehouse channel`, () => { - it(`should return a skuX234Wx2015Us preset`, () => { - const skuX234Wx2015UsPreset = - skuX234Wx2015Us().build(); - expect(skuX234Wx2015UsPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "x234-wx-2015-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "x234-wx-2015", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuX234Wx2015Us preset when built for graphql`, () => { - const skuX234Wx2015UsPresetGraphql = - skuX234Wx2015Us().buildGraphql(); - expect(skuX234Wx2015UsPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "x234-wx-2015-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "x234-wx-2015", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x234-wx-2015-us.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x234-wx-2015-us.ts deleted file mode 100644 index f5e613d50..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x234-wx-2015-us.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const usWarehouse = ChannelDraft.presets.sampleDataB2B - .usWarehouse() - .build(); - -const x234Wx01 = ProductVariantDraft.presets.sampleDataB2B - .x234Wx01() - .build(); - -const skuX234Wx2015Us = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${x234Wx01.sku}-${usWarehouse.key}`) - .sku(x234Wx01.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(usWarehouse.key)); - -export default skuX234Wx2015Us; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x234-wx-2019-default.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x234-wx-2019-default.spec.ts deleted file mode 100644 index de864e90c..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x234-wx-2019-default.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuX234Wx2019Default from './sku-x234-wx-2019-default'; - -describe(`with skuX234Wx2019Default preset and default-warehouse channel`, () => { - it(`should return a skuX234Wx2019Default preset`, () => { - const skuX234Wx2019DefaultPreset = - skuX234Wx2019Default().build(); - expect(skuX234Wx2019DefaultPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "x234-wx-2019-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "x234-wx-2019", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuX234Wx2019Default preset when built for graphql`, () => { - const skuX234Wx2019DefaultPresetGraphql = - skuX234Wx2019Default().buildGraphql(); - expect(skuX234Wx2019DefaultPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "x234-wx-2019-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "x234-wx-2019", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x234-wx-2019-default.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x234-wx-2019-default.ts deleted file mode 100644 index 98502914a..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x234-wx-2019-default.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const defaultWarehouse = ChannelDraft.presets.sampleDataB2B - .defaultWarehouse() - .build(); - -const x234Wx02 = ProductVariantDraft.presets.sampleDataB2B - .x234Wx02() - .build(); - -const skuX234Wx2019Default = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${x234Wx02.sku}-${defaultWarehouse.key}`) - .sku(x234Wx02.sku!) - .quantityOnStock(1000) - .supplyChannel( - KeyReferenceDraft.presets.channel().key(defaultWarehouse.key) - ); - -export default skuX234Wx2019Default; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x234-wx-2019-eu.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x234-wx-2019-eu.spec.ts deleted file mode 100644 index 1cec9b693..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x234-wx-2019-eu.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuX234Wx2019Eu from './sku-x234-wx-2019-eu'; - -describe(`with skuX234Wx2019Eu preset and eu-warehouse channel`, () => { - it(`should return a skuX234Wx2019Eu preset`, () => { - const skuX234Wx2019EuPreset = - skuX234Wx2019Eu().build(); - expect(skuX234Wx2019EuPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "x234-wx-2019-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "x234-wx-2019", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuX234Wx2019Eu preset when built for graphql`, () => { - const skuX234Wx2019EuPresetGraphql = - skuX234Wx2019Eu().buildGraphql(); - expect(skuX234Wx2019EuPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "x234-wx-2019-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "x234-wx-2019", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x234-wx-2019-eu.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x234-wx-2019-eu.ts deleted file mode 100644 index fa49da05d..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x234-wx-2019-eu.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const euWarehouse = ChannelDraft.presets.sampleDataB2B - .euWarehouse() - .build(); - -const x234Wx02 = ProductVariantDraft.presets.sampleDataB2B - .x234Wx02() - .build(); - -const skuX234Wx2019Eu = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${x234Wx02.sku}-${euWarehouse.key}`) - .sku(x234Wx02.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(euWarehouse.key)); - -export default skuX234Wx2019Eu; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x234-wx-2019-us.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x234-wx-2019-us.spec.ts deleted file mode 100644 index eb9dc293c..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x234-wx-2019-us.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuX234Wx2019Us from './sku-x234-wx-2019-us'; - -describe(`with skuX234Wx2019Us preset and us-warehouse channel`, () => { - it(`should return a skuX234Wx2019Us preset`, () => { - const skuX234Wx2019UsPreset = - skuX234Wx2019Us().build(); - expect(skuX234Wx2019UsPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "x234-wx-2019-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "x234-wx-2019", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuX234Wx2019Us preset when built for graphql`, () => { - const skuX234Wx2019UsPresetGraphql = - skuX234Wx2019Us().buildGraphql(); - expect(skuX234Wx2019UsPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "x234-wx-2019-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "x234-wx-2019", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x234-wx-2019-us.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x234-wx-2019-us.ts deleted file mode 100644 index 59a7454e8..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x234-wx-2019-us.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const usWarehouse = ChannelDraft.presets.sampleDataB2B - .usWarehouse() - .build(); - -const x234Wx02 = ProductVariantDraft.presets.sampleDataB2B - .x234Wx02() - .build(); - -const skuX234Wx2019Us = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${x234Wx02.sku}-${usWarehouse.key}`) - .sku(x234Wx02.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(usWarehouse.key)); - -export default skuX234Wx2019Us; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x234-wx-2023-default.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x234-wx-2023-default.spec.ts deleted file mode 100644 index ec5143dc2..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x234-wx-2023-default.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuX234Wx2023Default from './sku-x234-wx-2023-default'; - -describe(`with skuX234Wx2023Default preset and default-warehouse channel`, () => { - it(`should return a skuX234Wx2023Default preset`, () => { - const skuX234Wx2023DefaultPreset = - skuX234Wx2023Default().build(); - expect(skuX234Wx2023DefaultPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "x234-wx-2023-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "x234-wx-2023", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuX234Wx2023Default preset when built for graphql`, () => { - const skuX234Wx2023DefaultPresetGraphql = - skuX234Wx2023Default().buildGraphql(); - expect(skuX234Wx2023DefaultPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "x234-wx-2023-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "x234-wx-2023", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x234-wx-2023-default.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x234-wx-2023-default.ts deleted file mode 100644 index 2012adf4e..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x234-wx-2023-default.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const defaultWarehouse = ChannelDraft.presets.sampleDataB2B - .defaultWarehouse() - .build(); - -const x234Wx03 = ProductVariantDraft.presets.sampleDataB2B - .x234Wx03() - .build(); - -const skuX234Wx2023Default = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${x234Wx03.sku}-${defaultWarehouse.key}`) - .sku(x234Wx03.sku!) - .quantityOnStock(1000) - .supplyChannel( - KeyReferenceDraft.presets.channel().key(defaultWarehouse.key) - ); - -export default skuX234Wx2023Default; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x234-wx-2023-eu.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x234-wx-2023-eu.spec.ts deleted file mode 100644 index 0fce84b4e..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x234-wx-2023-eu.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuX234Wx2023Eu from './sku-x234-wx-2023-eu'; - -describe(`with skuX234Wx2023Eu preset and eu-warehouse channel`, () => { - it(`should return a skuX234Wx2023Eu preset`, () => { - const skuX234Wx2023EuPreset = - skuX234Wx2023Eu().build(); - expect(skuX234Wx2023EuPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "x234-wx-2023-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "x234-wx-2023", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuX234Wx2023Eu preset when built for graphql`, () => { - const skuX234Wx2023EuPresetGraphql = - skuX234Wx2023Eu().buildGraphql(); - expect(skuX234Wx2023EuPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "x234-wx-2023-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "x234-wx-2023", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x234-wx-2023-eu.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x234-wx-2023-eu.ts deleted file mode 100644 index 4e463fe22..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x234-wx-2023-eu.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const euWarehouse = ChannelDraft.presets.sampleDataB2B - .euWarehouse() - .build(); - -const x234Wx03 = ProductVariantDraft.presets.sampleDataB2B - .x234Wx03() - .build(); - -const skuX234Wx2023Eu = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${x234Wx03.sku}-${euWarehouse.key}`) - .sku(x234Wx03.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(euWarehouse.key)); - -export default skuX234Wx2023Eu; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x234-wx-2023-us.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x234-wx-2023-us.spec.ts deleted file mode 100644 index e451b07fd..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x234-wx-2023-us.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuX234Wx2023Us from './sku-x234-wx-2023-us'; - -describe(`with skuX234Wx2023Us preset and us-warehouse channel`, () => { - it(`should return a skuX234Wx2023Us preset`, () => { - const skuX234Wx2023UsPreset = - skuX234Wx2023Us().build(); - expect(skuX234Wx2023UsPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "x234-wx-2023-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "x234-wx-2023", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuX234Wx2023Us preset when built for graphql`, () => { - const skuX234Wx2023UsPresetGraphql = - skuX234Wx2023Us().buildGraphql(); - expect(skuX234Wx2023UsPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "x234-wx-2023-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "x234-wx-2023", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x234-wx-2023-us.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x234-wx-2023-us.ts deleted file mode 100644 index 0c4810ccb..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x234-wx-2023-us.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const usWarehouse = ChannelDraft.presets.sampleDataB2B - .usWarehouse() - .build(); - -const x234Wx03 = ProductVariantDraft.presets.sampleDataB2B - .x234Wx03() - .build(); - -const skuX234Wx2023Us = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${x234Wx03.sku}-${usWarehouse.key}`) - .sku(x234Wx03.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(usWarehouse.key)); - -export default skuX234Wx2023Us; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x456-yz-2015-default.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x456-yz-2015-default.spec.ts deleted file mode 100644 index b1f110f9b..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x456-yz-2015-default.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuX456Yz2015Default from './sku-x456-yz-2015-default'; - -describe(`with skuX456Yz2015Default preset and default-warehouse channel`, () => { - it(`should return a skuX456Yz2015Default preset`, () => { - const skuX456Yz2015DefaultPreset = - skuX456Yz2015Default().build(); - expect(skuX456Yz2015DefaultPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "x456-yz-2015-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "x456-yz-2015", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuX456Yz2015Default preset when built for graphql`, () => { - const skuX456Yz2015DefaultPresetGraphql = - skuX456Yz2015Default().buildGraphql(); - expect(skuX456Yz2015DefaultPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "x456-yz-2015-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "x456-yz-2015", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x456-yz-2015-default.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x456-yz-2015-default.ts deleted file mode 100644 index 320f5c036..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x456-yz-2015-default.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const defaultWarehouse = ChannelDraft.presets.sampleDataB2B - .defaultWarehouse() - .build(); - -const x456Yz01 = ProductVariantDraft.presets.sampleDataB2B - .x456Yz01() - .build(); - -const skuX456Yz2015Default = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${x456Yz01.sku}-${defaultWarehouse.key}`) - .sku(x456Yz01.sku!) - .quantityOnStock(1000) - .supplyChannel( - KeyReferenceDraft.presets.channel().key(defaultWarehouse.key) - ); - -export default skuX456Yz2015Default; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x456-yz-2015-eu.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x456-yz-2015-eu.spec.ts deleted file mode 100644 index c47c0d123..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x456-yz-2015-eu.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuX456Yz2015Eu from './sku-x456-yz-2015-eu'; - -describe(`with skuX456Yz2015Eu preset and eu-warehouse channel`, () => { - it(`should return a skuX456Yz2015Eu preset`, () => { - const skuX456Yz2015EuPreset = - skuX456Yz2015Eu().build(); - expect(skuX456Yz2015EuPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "x456-yz-2015-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "x456-yz-2015", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuX456Yz2015Eu preset when built for graphql`, () => { - const skuX456Yz2015EuPresetGraphql = - skuX456Yz2015Eu().buildGraphql(); - expect(skuX456Yz2015EuPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "x456-yz-2015-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "x456-yz-2015", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x456-yz-2015-eu.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x456-yz-2015-eu.ts deleted file mode 100644 index 0de5569b1..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x456-yz-2015-eu.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const euWarehouse = ChannelDraft.presets.sampleDataB2B - .euWarehouse() - .build(); - -const x456Yz01 = ProductVariantDraft.presets.sampleDataB2B - .x456Yz01() - .build(); - -const skuX456Yz2015Eu = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${x456Yz01.sku}-${euWarehouse.key}`) - .sku(x456Yz01.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(euWarehouse.key)); - -export default skuX456Yz2015Eu; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x456-yz-2015-us.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x456-yz-2015-us.spec.ts deleted file mode 100644 index 3fe2f28b4..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x456-yz-2015-us.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuX456Yz2015Us from './sku-x456-yz-2015-us'; - -describe(`with skuX456Yz2015Us preset and us-warehouse channel`, () => { - it(`should return a skuX456Yz2015Us preset`, () => { - const skuX456Yz2015UsPreset = - skuX456Yz2015Us().build(); - expect(skuX456Yz2015UsPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "x456-yz-2015-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "x456-yz-2015", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuX456Yz2015Us preset when built for graphql`, () => { - const skuX456Yz2015UsPresetGraphql = - skuX456Yz2015Us().buildGraphql(); - expect(skuX456Yz2015UsPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "x456-yz-2015-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "x456-yz-2015", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x456-yz-2015-us.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x456-yz-2015-us.ts deleted file mode 100644 index 2c16604ba..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x456-yz-2015-us.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const usWarehouse = ChannelDraft.presets.sampleDataB2B - .usWarehouse() - .build(); - -const x456Yz01 = ProductVariantDraft.presets.sampleDataB2B - .x456Yz01() - .build(); - -const skuX456Yz2015Us = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${x456Yz01.sku}-${usWarehouse.key}`) - .sku(x456Yz01.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(usWarehouse.key)); - -export default skuX456Yz2015Us; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x456-yz-2019-default.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x456-yz-2019-default.spec.ts deleted file mode 100644 index 4830cce1b..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x456-yz-2019-default.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuX456Yz2019Default from './sku-x456-yz-2019-default'; - -describe(`with skuX456Yz2019Default preset and default-warehouse channel`, () => { - it(`should return a skuX456Yz2019Default preset`, () => { - const skuX456Yz2019DefaultPreset = - skuX456Yz2019Default().build(); - expect(skuX456Yz2019DefaultPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "x456-yz-2019-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "x456-yz-2019", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuX456Yz2019Default preset when built for graphql`, () => { - const skuX456Yz2019DefaultPresetGraphql = - skuX456Yz2019Default().buildGraphql(); - expect(skuX456Yz2019DefaultPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "x456-yz-2019-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "x456-yz-2019", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x456-yz-2019-default.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x456-yz-2019-default.ts deleted file mode 100644 index b41dd8aca..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x456-yz-2019-default.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const defaultWarehouse = ChannelDraft.presets.sampleDataB2B - .defaultWarehouse() - .build(); - -const x456Yz02 = ProductVariantDraft.presets.sampleDataB2B - .x456Yz02() - .build(); - -const skuX456Yz2019Default = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${x456Yz02.sku}-${defaultWarehouse.key}`) - .sku(x456Yz02.sku!) - .quantityOnStock(1000) - .supplyChannel( - KeyReferenceDraft.presets.channel().key(defaultWarehouse.key) - ); - -export default skuX456Yz2019Default; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x456-yz-2019-eu.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x456-yz-2019-eu.spec.ts deleted file mode 100644 index 3f1de8770..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x456-yz-2019-eu.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuX456Yz2019Eu from './sku-x456-yz-2019-eu'; - -describe(`with skuX456Yz2019Eu preset and eu-warehouse channel`, () => { - it(`should return a skuX456Yz2019Eu preset`, () => { - const skuX456Yz2019EuPreset = - skuX456Yz2019Eu().build(); - expect(skuX456Yz2019EuPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "x456-yz-2019-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "x456-yz-2019", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuX456Yz2019Eu preset when built for graphql`, () => { - const skuX456Yz2019EuPresetGraphql = - skuX456Yz2019Eu().buildGraphql(); - expect(skuX456Yz2019EuPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "x456-yz-2019-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "x456-yz-2019", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x456-yz-2019-eu.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x456-yz-2019-eu.ts deleted file mode 100644 index c1bf2c434..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x456-yz-2019-eu.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const euWarehouse = ChannelDraft.presets.sampleDataB2B - .euWarehouse() - .build(); - -const x456Yz02 = ProductVariantDraft.presets.sampleDataB2B - .x456Yz02() - .build(); - -const skuX456Yz2019Eu = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${x456Yz02.sku}-${euWarehouse.key}`) - .sku(x456Yz02.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(euWarehouse.key)); - -export default skuX456Yz2019Eu; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x456-yz-2019-us.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x456-yz-2019-us.spec.ts deleted file mode 100644 index 3502fec12..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x456-yz-2019-us.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuX456Yz2019Us from './sku-x456-yz-2019-us'; - -describe(`with skuX456Yz2019Us preset and us-warehouse channel`, () => { - it(`should return a skuX456Yz2019Us preset`, () => { - const skuX456Yz2019UsPreset = - skuX456Yz2019Us().build(); - expect(skuX456Yz2019UsPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "x456-yz-2019-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "x456-yz-2019", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuX456Yz2019Us preset when built for graphql`, () => { - const skuX456Yz2019UsPresetGraphql = - skuX456Yz2019Us().buildGraphql(); - expect(skuX456Yz2019UsPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "x456-yz-2019-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "x456-yz-2019", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x456-yz-2019-us.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x456-yz-2019-us.ts deleted file mode 100644 index 61146cc82..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x456-yz-2019-us.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const usWarehouse = ChannelDraft.presets.sampleDataB2B - .usWarehouse() - .build(); - -const x456Yz02 = ProductVariantDraft.presets.sampleDataB2B - .x456Yz02() - .build(); - -const skuX456Yz2019Us = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${x456Yz02.sku}-${usWarehouse.key}`) - .sku(x456Yz02.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(usWarehouse.key)); - -export default skuX456Yz2019Us; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x456-yz-2023-default.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x456-yz-2023-default.spec.ts deleted file mode 100644 index f016997bb..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x456-yz-2023-default.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuX456Yz2023Default from './sku-x456-yz-2023-default'; - -describe(`with skuX456Yz2023Default preset and default-warehouse channel`, () => { - it(`should return a skuX456Yz2023Default preset`, () => { - const skuX456Yz2023DefaultPreset = - skuX456Yz2023Default().build(); - expect(skuX456Yz2023DefaultPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "x456-yz-2023-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "x456-yz-2023", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuX456Yz2023Default preset when built for graphql`, () => { - const skuX456Yz2023DefaultPresetGraphql = - skuX456Yz2023Default().buildGraphql(); - expect(skuX456Yz2023DefaultPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "x456-yz-2023-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "x456-yz-2023", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x456-yz-2023-default.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x456-yz-2023-default.ts deleted file mode 100644 index 306a61da1..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x456-yz-2023-default.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const defaultWarehouse = ChannelDraft.presets.sampleDataB2B - .defaultWarehouse() - .build(); - -const x456Yz03 = ProductVariantDraft.presets.sampleDataB2B - .x456Yz03() - .build(); - -const skuX456Yz2023Default = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${x456Yz03.sku}-${defaultWarehouse.key}`) - .sku(x456Yz03.sku!) - .quantityOnStock(1000) - .supplyChannel( - KeyReferenceDraft.presets.channel().key(defaultWarehouse.key) - ); - -export default skuX456Yz2023Default; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x456-yz-2023-eu.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x456-yz-2023-eu.spec.ts deleted file mode 100644 index 602d9de82..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x456-yz-2023-eu.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuX456Yz2023Eu from './sku-x456-yz-2023-eu'; - -describe(`with skuX456Yz2023Eu preset and eu-warehouse channel`, () => { - it(`should return a skuX456Yz2023Eu preset`, () => { - const skuX456Yz2023EuPreset = - skuX456Yz2023Eu().build(); - expect(skuX456Yz2023EuPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "x456-yz-2023-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "x456-yz-2023", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuX456Yz2023Eu preset when built for graphql`, () => { - const skuX456Yz2023EuPresetGraphql = - skuX456Yz2023Eu().buildGraphql(); - expect(skuX456Yz2023EuPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "x456-yz-2023-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "x456-yz-2023", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x456-yz-2023-eu.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x456-yz-2023-eu.ts deleted file mode 100644 index 4602f0fa5..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x456-yz-2023-eu.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const euWarehouse = ChannelDraft.presets.sampleDataB2B - .euWarehouse() - .build(); - -const x456Yz03 = ProductVariantDraft.presets.sampleDataB2B - .x456Yz03() - .build(); - -const skuX456Yz2023Eu = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${x456Yz03.sku}-${euWarehouse.key}`) - .sku(x456Yz03.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(euWarehouse.key)); - -export default skuX456Yz2023Eu; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x456-yz-2023-us.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x456-yz-2023-us.spec.ts deleted file mode 100644 index 05f923ccd..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x456-yz-2023-us.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuX456Yz2023Us from './sku-x456-yz-2023-us'; - -describe(`with skuX456Yz2023Us preset and us-warehouse channel`, () => { - it(`should return a skuX456Yz2023Us preset`, () => { - const skuX456Yz2023UsPreset = - skuX456Yz2023Us().build(); - expect(skuX456Yz2023UsPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "x456-yz-2023-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "x456-yz-2023", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuX456Yz2023Us preset when built for graphql`, () => { - const skuX456Yz2023UsPresetGraphql = - skuX456Yz2023Us().buildGraphql(); - expect(skuX456Yz2023UsPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "x456-yz-2023-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "x456-yz-2023", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x456-yz-2023-us.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x456-yz-2023-us.ts deleted file mode 100644 index 4639780a6..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-x456-yz-2023-us.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const usWarehouse = ChannelDraft.presets.sampleDataB2B - .usWarehouse() - .build(); - -const x456Yz03 = ProductVariantDraft.presets.sampleDataB2B - .x456Yz03() - .build(); - -const skuX456Yz2023Us = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${x456Yz03.sku}-${usWarehouse.key}`) - .sku(x456Yz03.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(usWarehouse.key)); - -export default skuX456Yz2023Us; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-xx-890-op-blue-default-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-xx-890-op-blue-default-warehouse.spec.ts new file mode 100644 index 000000000..354e0b870 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-xx-890-op-blue-default-warehouse.spec.ts @@ -0,0 +1,40 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuXx890OpBlueDefaultWarehouse preset`, () => { + it(`should return a skuXx890OpBlueDefaultWarehouse preset when built for rest`, () => { + const skuXx890OpBlueDefaultWarehousePreset = InventoryEntryDraftRest.presets + .skuXx890OpBlueDefaultWarehouse() + .build(); + expect(skuXx890OpBlueDefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuXx890OpBlueDefaultWarehouse preset when built for graphql`, () => { + const skuXx890OpBlueDefaultWarehousePreset = + InventoryEntryDraftGraphql.presets + .skuXx890OpBlueDefaultWarehouse() + .build(); + expect(skuXx890OpBlueDefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuXx890OpBlueDefaultWarehouse preset when built for legacy rest`, () => { + const skuXx890OpBlueDefaultWarehousePreset = InventoryEntryDraft.presets + .skuXx890OpBlueDefaultWarehouse() + .buildRest(); + expect(skuXx890OpBlueDefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuXx890OpBlueDefaultWarehouse preset when built for legacy graphql`, () => { + const skuXx890OpBlueDefaultWarehousePreset = InventoryEntryDraft.presets + .skuXx890OpBlueDefaultWarehouse() + .buildGraphql(); + expect(skuXx890OpBlueDefaultWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-xx-890-op-blue-default-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-xx-890-op-blue-default-warehouse.ts new file mode 100644 index 000000000..08968c550 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-xx-890-op-blue-default-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .defaultWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .xx890Op02() + .build(); + +const skuXx890OpBlueDefaultWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('xx890-op-blue-default-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuXx890OpBlueDefaultWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-xx-890-op-blue-eu-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-xx-890-op-blue-eu-warehouse.spec.ts new file mode 100644 index 000000000..cbfbbc14b --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-xx-890-op-blue-eu-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuXx890OpBlueEuWarehouse preset`, () => { + it(`should return a skuXx890OpBlueEuWarehouse preset when built for rest`, () => { + const skuXx890OpBlueEuWarehousePreset = InventoryEntryDraftRest.presets + .skuXx890OpBlueEuWarehouse() + .build(); + expect(skuXx890OpBlueEuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuXx890OpBlueEuWarehouse preset when built for graphql`, () => { + const skuXx890OpBlueEuWarehousePreset = InventoryEntryDraftGraphql.presets + .skuXx890OpBlueEuWarehouse() + .build(); + expect(skuXx890OpBlueEuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuXx890OpBlueEuWarehouse preset when built for legacy rest`, () => { + const skuXx890OpBlueEuWarehousePreset = InventoryEntryDraft.presets + .skuXx890OpBlueEuWarehouse() + .buildRest(); + expect(skuXx890OpBlueEuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuXx890OpBlueEuWarehouse preset when built for legacy graphql`, () => { + const skuXx890OpBlueEuWarehousePreset = InventoryEntryDraft.presets + .skuXx890OpBlueEuWarehouse() + .buildGraphql(); + expect(skuXx890OpBlueEuWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-xx-890-op-blue-eu-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-xx-890-op-blue-eu-warehouse.ts new file mode 100644 index 000000000..1483d57a9 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-xx-890-op-blue-eu-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .euWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .xx890Op02() + .build(); + +const skuXx890OpBlueEuWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('xx890-op-blue-eu-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuXx890OpBlueEuWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-xx-890-op-blue-us-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-xx-890-op-blue-us-warehouse.spec.ts new file mode 100644 index 000000000..a6c49126b --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-xx-890-op-blue-us-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuXx890OpBlueUsWarehouse preset`, () => { + it(`should return a skuXx890OpBlueUsWarehouse preset when built for rest`, () => { + const skuXx890OpBlueUsWarehousePreset = InventoryEntryDraftRest.presets + .skuXx890OpBlueUsWarehouse() + .build(); + expect(skuXx890OpBlueUsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuXx890OpBlueUsWarehouse preset when built for graphql`, () => { + const skuXx890OpBlueUsWarehousePreset = InventoryEntryDraftGraphql.presets + .skuXx890OpBlueUsWarehouse() + .build(); + expect(skuXx890OpBlueUsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuXx890OpBlueUsWarehouse preset when built for legacy rest`, () => { + const skuXx890OpBlueUsWarehousePreset = InventoryEntryDraft.presets + .skuXx890OpBlueUsWarehouse() + .buildRest(); + expect(skuXx890OpBlueUsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuXx890OpBlueUsWarehouse preset when built for legacy graphql`, () => { + const skuXx890OpBlueUsWarehousePreset = InventoryEntryDraft.presets + .skuXx890OpBlueUsWarehouse() + .buildGraphql(); + expect(skuXx890OpBlueUsWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-xx-890-op-blue-us-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-xx-890-op-blue-us-warehouse.ts new file mode 100644 index 000000000..2e096395a --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-xx-890-op-blue-us-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .usWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .xx890Op02() + .build(); + +const skuXx890OpBlueUsWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('xx890-op-blue-us-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuXx890OpBlueUsWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-xx-890-op-green-default-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-xx-890-op-green-default-warehouse.spec.ts new file mode 100644 index 000000000..9d52f9cce --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-xx-890-op-green-default-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuXx890OpGreenDefaultWarehouse preset`, () => { + it(`should return a skuXx890OpGreenDefaultWarehouse preset when built for rest`, () => { + const skuXx890OpGreenDefaultWarehousePreset = + InventoryEntryDraftRest.presets.skuXx890OpGreenDefaultWarehouse().build(); + expect(skuXx890OpGreenDefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuXx890OpGreenDefaultWarehouse preset when built for graphql`, () => { + const skuXx890OpGreenDefaultWarehousePreset = + InventoryEntryDraftGraphql.presets + .skuXx890OpGreenDefaultWarehouse() + .build(); + expect(skuXx890OpGreenDefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuXx890OpGreenDefaultWarehouse preset when built for legacy rest`, () => { + const skuXx890OpGreenDefaultWarehousePreset = InventoryEntryDraft.presets + .skuXx890OpGreenDefaultWarehouse() + .buildRest(); + expect(skuXx890OpGreenDefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuXx890OpGreenDefaultWarehouse preset when built for legacy graphql`, () => { + const skuXx890OpGreenDefaultWarehousePreset = InventoryEntryDraft.presets + .skuXx890OpGreenDefaultWarehouse() + .buildGraphql(); + expect(skuXx890OpGreenDefaultWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-xx-890-op-green-default-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-xx-890-op-green-default-warehouse.ts new file mode 100644 index 000000000..844be5f37 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-xx-890-op-green-default-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .defaultWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .xx890Op03() + .build(); + +const skuXx890OpGreenDefaultWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('xx890-op-green-default-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuXx890OpGreenDefaultWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-xx-890-op-green-eu-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-xx-890-op-green-eu-warehouse.spec.ts new file mode 100644 index 000000000..e4fb3d7b5 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-xx-890-op-green-eu-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuXx890OpGreenEuWarehouse preset`, () => { + it(`should return a skuXx890OpGreenEuWarehouse preset when built for rest`, () => { + const skuXx890OpGreenEuWarehousePreset = InventoryEntryDraftRest.presets + .skuXx890OpGreenEuWarehouse() + .build(); + expect(skuXx890OpGreenEuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuXx890OpGreenEuWarehouse preset when built for graphql`, () => { + const skuXx890OpGreenEuWarehousePreset = InventoryEntryDraftGraphql.presets + .skuXx890OpGreenEuWarehouse() + .build(); + expect(skuXx890OpGreenEuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuXx890OpGreenEuWarehouse preset when built for legacy rest`, () => { + const skuXx890OpGreenEuWarehousePreset = InventoryEntryDraft.presets + .skuXx890OpGreenEuWarehouse() + .buildRest(); + expect(skuXx890OpGreenEuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuXx890OpGreenEuWarehouse preset when built for legacy graphql`, () => { + const skuXx890OpGreenEuWarehousePreset = InventoryEntryDraft.presets + .skuXx890OpGreenEuWarehouse() + .buildGraphql(); + expect(skuXx890OpGreenEuWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-xx-890-op-green-eu-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-xx-890-op-green-eu-warehouse.ts new file mode 100644 index 000000000..db2f5d720 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-xx-890-op-green-eu-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .euWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .xx890Op03() + .build(); + +const skuXx890OpGreenEuWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('xx890-op-green-eu-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuXx890OpGreenEuWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-xx-890-op-green-us-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-xx-890-op-green-us-warehouse.spec.ts new file mode 100644 index 000000000..01456468e --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-xx-890-op-green-us-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuXx890OpGreenUsWarehouse preset`, () => { + it(`should return a skuXx890OpGreenUsWarehouse preset when built for rest`, () => { + const skuXx890OpGreenUsWarehousePreset = InventoryEntryDraftRest.presets + .skuXx890OpGreenUsWarehouse() + .build(); + expect(skuXx890OpGreenUsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuXx890OpGreenUsWarehouse preset when built for graphql`, () => { + const skuXx890OpGreenUsWarehousePreset = InventoryEntryDraftGraphql.presets + .skuXx890OpGreenUsWarehouse() + .build(); + expect(skuXx890OpGreenUsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuXx890OpGreenUsWarehouse preset when built for legacy rest`, () => { + const skuXx890OpGreenUsWarehousePreset = InventoryEntryDraft.presets + .skuXx890OpGreenUsWarehouse() + .buildRest(); + expect(skuXx890OpGreenUsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuXx890OpGreenUsWarehouse preset when built for legacy graphql`, () => { + const skuXx890OpGreenUsWarehousePreset = InventoryEntryDraft.presets + .skuXx890OpGreenUsWarehouse() + .buildGraphql(); + expect(skuXx890OpGreenUsWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-xx-890-op-green-us-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-xx-890-op-green-us-warehouse.ts new file mode 100644 index 000000000..df920461f --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-xx-890-op-green-us-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .usWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .xx890Op03() + .build(); + +const skuXx890OpGreenUsWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('xx890-op-green-us-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuXx890OpGreenUsWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-xx-890-op-red-default-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-xx-890-op-red-default-warehouse.spec.ts new file mode 100644 index 000000000..ca0e02b9f --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-xx-890-op-red-default-warehouse.spec.ts @@ -0,0 +1,40 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuXx890OpRedDefaultWarehouse preset`, () => { + it(`should return a skuXx890OpRedDefaultWarehouse preset when built for rest`, () => { + const skuXx890OpRedDefaultWarehousePreset = InventoryEntryDraftRest.presets + .skuXx890OpRedDefaultWarehouse() + .build(); + expect(skuXx890OpRedDefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuXx890OpRedDefaultWarehouse preset when built for graphql`, () => { + const skuXx890OpRedDefaultWarehousePreset = + InventoryEntryDraftGraphql.presets + .skuXx890OpRedDefaultWarehouse() + .build(); + expect(skuXx890OpRedDefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuXx890OpRedDefaultWarehouse preset when built for legacy rest`, () => { + const skuXx890OpRedDefaultWarehousePreset = InventoryEntryDraft.presets + .skuXx890OpRedDefaultWarehouse() + .buildRest(); + expect(skuXx890OpRedDefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuXx890OpRedDefaultWarehouse preset when built for legacy graphql`, () => { + const skuXx890OpRedDefaultWarehousePreset = InventoryEntryDraft.presets + .skuXx890OpRedDefaultWarehouse() + .buildGraphql(); + expect(skuXx890OpRedDefaultWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-xx-890-op-red-default-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-xx-890-op-red-default-warehouse.ts new file mode 100644 index 000000000..cacfaa086 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-xx-890-op-red-default-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .defaultWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .xx890Op01() + .build(); + +const skuXx890OpRedDefaultWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('xx890-op-red-default-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuXx890OpRedDefaultWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-xx-890-op-red-eu-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-xx-890-op-red-eu-warehouse.spec.ts new file mode 100644 index 000000000..315fdbfad --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-xx-890-op-red-eu-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuXx890OpRedEuWarehouse preset`, () => { + it(`should return a skuXx890OpRedEuWarehouse preset when built for rest`, () => { + const skuXx890OpRedEuWarehousePreset = InventoryEntryDraftRest.presets + .skuXx890OpRedEuWarehouse() + .build(); + expect(skuXx890OpRedEuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuXx890OpRedEuWarehouse preset when built for graphql`, () => { + const skuXx890OpRedEuWarehousePreset = InventoryEntryDraftGraphql.presets + .skuXx890OpRedEuWarehouse() + .build(); + expect(skuXx890OpRedEuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuXx890OpRedEuWarehouse preset when built for legacy rest`, () => { + const skuXx890OpRedEuWarehousePreset = InventoryEntryDraft.presets + .skuXx890OpRedEuWarehouse() + .buildRest(); + expect(skuXx890OpRedEuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuXx890OpRedEuWarehouse preset when built for legacy graphql`, () => { + const skuXx890OpRedEuWarehousePreset = InventoryEntryDraft.presets + .skuXx890OpRedEuWarehouse() + .buildGraphql(); + expect(skuXx890OpRedEuWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-xx-890-op-red-eu-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-xx-890-op-red-eu-warehouse.ts new file mode 100644 index 000000000..6970e9966 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-xx-890-op-red-eu-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .euWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .xx890Op01() + .build(); + +const skuXx890OpRedEuWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('xx890-op-red-eu-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuXx890OpRedEuWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-xx-890-op-red-us-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-xx-890-op-red-us-warehouse.spec.ts new file mode 100644 index 000000000..db65f1186 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-xx-890-op-red-us-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuXx890OpRedUsWarehouse preset`, () => { + it(`should return a skuXx890OpRedUsWarehouse preset when built for rest`, () => { + const skuXx890OpRedUsWarehousePreset = InventoryEntryDraftRest.presets + .skuXx890OpRedUsWarehouse() + .build(); + expect(skuXx890OpRedUsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuXx890OpRedUsWarehouse preset when built for graphql`, () => { + const skuXx890OpRedUsWarehousePreset = InventoryEntryDraftGraphql.presets + .skuXx890OpRedUsWarehouse() + .build(); + expect(skuXx890OpRedUsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuXx890OpRedUsWarehouse preset when built for legacy rest`, () => { + const skuXx890OpRedUsWarehousePreset = InventoryEntryDraft.presets + .skuXx890OpRedUsWarehouse() + .buildRest(); + expect(skuXx890OpRedUsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuXx890OpRedUsWarehouse preset when built for legacy graphql`, () => { + const skuXx890OpRedUsWarehousePreset = InventoryEntryDraft.presets + .skuXx890OpRedUsWarehouse() + .buildGraphql(); + expect(skuXx890OpRedUsWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-xx-890-op-red-us-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-xx-890-op-red-us-warehouse.ts new file mode 100644 index 000000000..4902fc362 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-xx-890-op-red-us-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .usWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .xx890Op01() + .build(); + +const skuXx890OpRedUsWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('xx890-op-red-us-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuXx890OpRedUsWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-xx890-op-blue-default.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-xx890-op-blue-default.spec.ts deleted file mode 100644 index dd893a8a3..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-xx890-op-blue-default.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuXx890OpBlueDefault from './sku-xx890-op-blue-default'; - -describe(`with skuXx890OpBlueDefault preset and default-warehouse channel`, () => { - it(`should return a skuXx890OpBlueDefault preset`, () => { - const skuXx890OpBlueDefaultPreset = - skuXx890OpBlueDefault().build(); - expect(skuXx890OpBlueDefaultPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "xx890-op-blue-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "xx890-op-blue", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuXx890OpBlueDefault preset when built for graphql`, () => { - const skuXx890OpBlueDefaultPresetGraphql = - skuXx890OpBlueDefault().buildGraphql(); - expect(skuXx890OpBlueDefaultPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "xx890-op-blue-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "xx890-op-blue", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-xx890-op-blue-default.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-xx890-op-blue-default.ts deleted file mode 100644 index fb4148f01..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-xx890-op-blue-default.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const defaultWarehouse = ChannelDraft.presets.sampleDataB2B - .defaultWarehouse() - .build(); - -const xx890Op02 = ProductVariantDraft.presets.sampleDataB2B - .xx890Op02() - .build(); - -const skuXx890OpBlueDefault = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${xx890Op02.sku}-${defaultWarehouse.key}`) - .sku(xx890Op02.sku!) - .quantityOnStock(1000) - .supplyChannel( - KeyReferenceDraft.presets.channel().key(defaultWarehouse.key) - ); - -export default skuXx890OpBlueDefault; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-xx890-op-blue-eu.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-xx890-op-blue-eu.spec.ts deleted file mode 100644 index a039dda87..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-xx890-op-blue-eu.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuXx890OpBlueEu from './sku-xx890-op-blue-eu'; - -describe(`with skuXx890OpBlueEu preset and eu-warehouse channel`, () => { - it(`should return a skuXx890OpBlueEu preset`, () => { - const skuXx890OpBlueEuPreset = - skuXx890OpBlueEu().build(); - expect(skuXx890OpBlueEuPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "xx890-op-blue-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "xx890-op-blue", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuXx890OpBlueEu preset when built for graphql`, () => { - const skuXx890OpBlueEuPresetGraphql = - skuXx890OpBlueEu().buildGraphql(); - expect(skuXx890OpBlueEuPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "xx890-op-blue-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "xx890-op-blue", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-xx890-op-blue-eu.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-xx890-op-blue-eu.ts deleted file mode 100644 index 208376471..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-xx890-op-blue-eu.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const euWarehouse = ChannelDraft.presets.sampleDataB2B - .euWarehouse() - .build(); - -const xx890Op02 = ProductVariantDraft.presets.sampleDataB2B - .xx890Op02() - .build(); - -const skuXx890OpBlueEu = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${xx890Op02.sku}-${euWarehouse.key}`) - .sku(xx890Op02.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(euWarehouse.key)); - -export default skuXx890OpBlueEu; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-xx890-op-blue-us.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-xx890-op-blue-us.spec.ts deleted file mode 100644 index 1734b3ae4..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-xx890-op-blue-us.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuXx890OpBlueUs from './sku-xx890-op-blue-us'; - -describe(`with skuXx890OpBlueUs preset and us-warehouse channel`, () => { - it(`should return a skuXx890OpBlueUs preset`, () => { - const skuXx890OpBlueUsPreset = - skuXx890OpBlueUs().build(); - expect(skuXx890OpBlueUsPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "xx890-op-blue-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "xx890-op-blue", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuXx890OpBlueUs preset when built for graphql`, () => { - const skuXx890OpBlueUsPresetGraphql = - skuXx890OpBlueUs().buildGraphql(); - expect(skuXx890OpBlueUsPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "xx890-op-blue-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "xx890-op-blue", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-xx890-op-blue-us.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-xx890-op-blue-us.ts deleted file mode 100644 index 57e96202b..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-xx890-op-blue-us.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const usWarehouse = ChannelDraft.presets.sampleDataB2B - .usWarehouse() - .build(); - -const xx890Op02 = ProductVariantDraft.presets.sampleDataB2B - .xx890Op02() - .build(); - -const skuXx890OpBlueUs = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${xx890Op02.sku}-${usWarehouse.key}`) - .sku(xx890Op02.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(usWarehouse.key)); - -export default skuXx890OpBlueUs; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-xx890-op-green-default.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-xx890-op-green-default.spec.ts deleted file mode 100644 index 794362cc6..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-xx890-op-green-default.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuXx890OpGreenDefault from './sku-xx890-op-green-default'; - -describe(`with skuXx890OpGreenDefault preset and default-warehouse channel`, () => { - it(`should return a skuXx890OpGreenDefault preset`, () => { - const skuXx890OpGreenDefaultPreset = - skuXx890OpGreenDefault().build(); - expect(skuXx890OpGreenDefaultPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "xx890-op-green-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "xx890-op-green", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuXx890OpGreenDefault preset when built for graphql`, () => { - const skuXx890OpGreenDefaultPresetGraphql = - skuXx890OpGreenDefault().buildGraphql(); - expect(skuXx890OpGreenDefaultPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "xx890-op-green-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "xx890-op-green", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-xx890-op-green-default.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-xx890-op-green-default.ts deleted file mode 100644 index 5cec22306..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-xx890-op-green-default.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const defaultWarehouse = ChannelDraft.presets.sampleDataB2B - .defaultWarehouse() - .build(); - -const xx890Op03 = ProductVariantDraft.presets.sampleDataB2B - .xx890Op03() - .build(); - -const skuXx890OpGreenDefault = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${xx890Op03.sku}-${defaultWarehouse.key}`) - .sku(xx890Op03.sku!) - .quantityOnStock(1000) - .supplyChannel( - KeyReferenceDraft.presets.channel().key(defaultWarehouse.key) - ); - -export default skuXx890OpGreenDefault; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-xx890-op-green-eu.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-xx890-op-green-eu.spec.ts deleted file mode 100644 index 82c2cb692..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-xx890-op-green-eu.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuXx890OpGreenEu from './sku-xx890-op-green-eu'; - -describe(`with skuXx890OpGreenEu preset and eu-warehouse channel`, () => { - it(`should return a skuXx890OpGreenEu preset`, () => { - const skuXx890OpGreenEuPreset = - skuXx890OpGreenEu().build(); - expect(skuXx890OpGreenEuPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "xx890-op-green-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "xx890-op-green", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuXx890OpGreenEu preset when built for graphql`, () => { - const skuXx890OpGreenEuPresetGraphql = - skuXx890OpGreenEu().buildGraphql(); - expect(skuXx890OpGreenEuPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "xx890-op-green-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "xx890-op-green", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-xx890-op-green-eu.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-xx890-op-green-eu.ts deleted file mode 100644 index 62c8fb700..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-xx890-op-green-eu.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const euWarehouse = ChannelDraft.presets.sampleDataB2B - .euWarehouse() - .build(); - -const xx890Op03 = ProductVariantDraft.presets.sampleDataB2B - .xx890Op03() - .build(); - -const skuXx890OpGreenEu = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${xx890Op03.sku}-${euWarehouse.key}`) - .sku(xx890Op03.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(euWarehouse.key)); - -export default skuXx890OpGreenEu; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-xx890-op-green-us.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-xx890-op-green-us.spec.ts deleted file mode 100644 index 133de4d68..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-xx890-op-green-us.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuXx890OpGreenUs from './sku-xx890-op-green-us'; - -describe(`with skuXx890OpGreenUs preset and us-warehouse channel`, () => { - it(`should return a skuXx890OpGreenUs preset`, () => { - const skuXx890OpGreenUsPreset = - skuXx890OpGreenUs().build(); - expect(skuXx890OpGreenUsPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "xx890-op-green-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "xx890-op-green", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuXx890OpGreenUs preset when built for graphql`, () => { - const skuXx890OpGreenUsPresetGraphql = - skuXx890OpGreenUs().buildGraphql(); - expect(skuXx890OpGreenUsPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "xx890-op-green-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "xx890-op-green", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-xx890-op-green-us.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-xx890-op-green-us.ts deleted file mode 100644 index 1e720c11c..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-xx890-op-green-us.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const usWarehouse = ChannelDraft.presets.sampleDataB2B - .usWarehouse() - .build(); - -const xx890Op03 = ProductVariantDraft.presets.sampleDataB2B - .xx890Op03() - .build(); - -const skuXx890OpGreenUs = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${xx890Op03.sku}-${usWarehouse.key}`) - .sku(xx890Op03.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(usWarehouse.key)); - -export default skuXx890OpGreenUs; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-xx890-op-red-default.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-xx890-op-red-default.spec.ts deleted file mode 100644 index e1f771539..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-xx890-op-red-default.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuXx890OpRedDefault from './sku-xx890-op-red-default'; - -describe(`with skuXx890OpRedDefault preset and default-warehouse channel`, () => { - it(`should return a skuXx890OpRedDefault preset`, () => { - const skuXx890OpRedDefaultPreset = - skuXx890OpRedDefault().build(); - expect(skuXx890OpRedDefaultPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "xx890-op-red-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "xx890-op-red", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuXx890OpRedDefault preset when built for graphql`, () => { - const skuXx890OpRedDefaultPresetGraphql = - skuXx890OpRedDefault().buildGraphql(); - expect(skuXx890OpRedDefaultPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "xx890-op-red-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "xx890-op-red", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-xx890-op-red-default.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-xx890-op-red-default.ts deleted file mode 100644 index 3077e36a4..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-xx890-op-red-default.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const defaultWarehouse = ChannelDraft.presets.sampleDataB2B - .defaultWarehouse() - .build(); - -const xx890Op01 = ProductVariantDraft.presets.sampleDataB2B - .xx890Op01() - .build(); - -const skuXx890OpRedDefault = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${xx890Op01.sku}-${defaultWarehouse.key}`) - .sku(xx890Op01.sku!) - .quantityOnStock(1000) - .supplyChannel( - KeyReferenceDraft.presets.channel().key(defaultWarehouse.key) - ); - -export default skuXx890OpRedDefault; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-xx890-op-red-eu.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-xx890-op-red-eu.spec.ts deleted file mode 100644 index 7b75bc85b..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-xx890-op-red-eu.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuXx890OpRedEu from './sku-xx890-op-red-eu'; - -describe(`with skuXx890OpRedEu preset and eu-warehouse channel`, () => { - it(`should return a skuXx890OpRedEu preset`, () => { - const skuXx890OpRedEuPreset = - skuXx890OpRedEu().build(); - expect(skuXx890OpRedEuPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "xx890-op-red-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "xx890-op-red", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuXx890OpRedEu preset when built for graphql`, () => { - const skuXx890OpRedEuPresetGraphql = - skuXx890OpRedEu().buildGraphql(); - expect(skuXx890OpRedEuPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "xx890-op-red-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "xx890-op-red", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-xx890-op-red-eu.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-xx890-op-red-eu.ts deleted file mode 100644 index 7cc4886ba..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-xx890-op-red-eu.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const euWarehouse = ChannelDraft.presets.sampleDataB2B - .euWarehouse() - .build(); - -const xx890Op01 = ProductVariantDraft.presets.sampleDataB2B - .xx890Op01() - .build(); - -const skuXx890OpRedEu = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${xx890Op01.sku}-${euWarehouse.key}`) - .sku(xx890Op01.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(euWarehouse.key)); - -export default skuXx890OpRedEu; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-xx890-op-red-us.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-xx890-op-red-us.spec.ts deleted file mode 100644 index 16b657d75..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-xx890-op-red-us.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuXx890OpRedUs from './sku-xx890-op-red-us'; - -describe(`with skuXx890OpRedUs preset and us-warehouse channel`, () => { - it(`should return a skuXx890OpRedUs preset`, () => { - const skuXx890OpRedUsPreset = - skuXx890OpRedUs().build(); - expect(skuXx890OpRedUsPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "xx890-op-red-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "xx890-op-red", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuXx890OpRedUs preset when built for graphql`, () => { - const skuXx890OpRedUsPresetGraphql = - skuXx890OpRedUs().buildGraphql(); - expect(skuXx890OpRedUsPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "xx890-op-red-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "xx890-op-red", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-xx890-op-red-us.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-xx890-op-red-us.ts deleted file mode 100644 index f837b9242..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-xx890-op-red-us.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const usWarehouse = ChannelDraft.presets.sampleDataB2B - .usWarehouse() - .build(); - -const xx890Op01 = ProductVariantDraft.presets.sampleDataB2B - .xx890Op01() - .build(); - -const skuXx890OpRedUs = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${xx890Op01.sku}-${usWarehouse.key}`) - .sku(xx890Op01.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(usWarehouse.key)); - -export default skuXx890OpRedUs; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-y-567-yz-2015-default-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-y-567-yz-2015-default-warehouse.spec.ts new file mode 100644 index 000000000..1e0afeb80 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-y-567-yz-2015-default-warehouse.spec.ts @@ -0,0 +1,40 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuY567Yz2015DefaultWarehouse preset`, () => { + it(`should return a skuY567Yz2015DefaultWarehouse preset when built for rest`, () => { + const skuY567Yz2015DefaultWarehousePreset = InventoryEntryDraftRest.presets + .skuY567Yz2015DefaultWarehouse() + .build(); + expect(skuY567Yz2015DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuY567Yz2015DefaultWarehouse preset when built for graphql`, () => { + const skuY567Yz2015DefaultWarehousePreset = + InventoryEntryDraftGraphql.presets + .skuY567Yz2015DefaultWarehouse() + .build(); + expect(skuY567Yz2015DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuY567Yz2015DefaultWarehouse preset when built for legacy rest`, () => { + const skuY567Yz2015DefaultWarehousePreset = InventoryEntryDraft.presets + .skuY567Yz2015DefaultWarehouse() + .buildRest(); + expect(skuY567Yz2015DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuY567Yz2015DefaultWarehouse preset when built for legacy graphql`, () => { + const skuY567Yz2015DefaultWarehousePreset = InventoryEntryDraft.presets + .skuY567Yz2015DefaultWarehouse() + .buildGraphql(); + expect(skuY567Yz2015DefaultWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-y-567-yz-2015-default-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-y-567-yz-2015-default-warehouse.ts new file mode 100644 index 000000000..6c2fc2c32 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-y-567-yz-2015-default-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .defaultWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .y567Yz01() + .build(); + +const skuY567Yz2015DefaultWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('y567-yz-2015-default-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuY567Yz2015DefaultWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-y-567-yz-2015-eu-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-y-567-yz-2015-eu-warehouse.spec.ts new file mode 100644 index 000000000..c36e9f6a6 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-y-567-yz-2015-eu-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuY567Yz2015EuWarehouse preset`, () => { + it(`should return a skuY567Yz2015EuWarehouse preset when built for rest`, () => { + const skuY567Yz2015EuWarehousePreset = InventoryEntryDraftRest.presets + .skuY567Yz2015EuWarehouse() + .build(); + expect(skuY567Yz2015EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuY567Yz2015EuWarehouse preset when built for graphql`, () => { + const skuY567Yz2015EuWarehousePreset = InventoryEntryDraftGraphql.presets + .skuY567Yz2015EuWarehouse() + .build(); + expect(skuY567Yz2015EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuY567Yz2015EuWarehouse preset when built for legacy rest`, () => { + const skuY567Yz2015EuWarehousePreset = InventoryEntryDraft.presets + .skuY567Yz2015EuWarehouse() + .buildRest(); + expect(skuY567Yz2015EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuY567Yz2015EuWarehouse preset when built for legacy graphql`, () => { + const skuY567Yz2015EuWarehousePreset = InventoryEntryDraft.presets + .skuY567Yz2015EuWarehouse() + .buildGraphql(); + expect(skuY567Yz2015EuWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-y-567-yz-2015-eu-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-y-567-yz-2015-eu-warehouse.ts new file mode 100644 index 000000000..5b7acbc68 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-y-567-yz-2015-eu-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .euWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .y567Yz01() + .build(); + +const skuY567Yz2015EuWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('y567-yz-2015-eu-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuY567Yz2015EuWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-y-567-yz-2015-us-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-y-567-yz-2015-us-warehouse.spec.ts new file mode 100644 index 000000000..9e5a2b840 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-y-567-yz-2015-us-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuY567Yz2015UsWarehouse preset`, () => { + it(`should return a skuY567Yz2015UsWarehouse preset when built for rest`, () => { + const skuY567Yz2015UsWarehousePreset = InventoryEntryDraftRest.presets + .skuY567Yz2015UsWarehouse() + .build(); + expect(skuY567Yz2015UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuY567Yz2015UsWarehouse preset when built for graphql`, () => { + const skuY567Yz2015UsWarehousePreset = InventoryEntryDraftGraphql.presets + .skuY567Yz2015UsWarehouse() + .build(); + expect(skuY567Yz2015UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuY567Yz2015UsWarehouse preset when built for legacy rest`, () => { + const skuY567Yz2015UsWarehousePreset = InventoryEntryDraft.presets + .skuY567Yz2015UsWarehouse() + .buildRest(); + expect(skuY567Yz2015UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuY567Yz2015UsWarehouse preset when built for legacy graphql`, () => { + const skuY567Yz2015UsWarehousePreset = InventoryEntryDraft.presets + .skuY567Yz2015UsWarehouse() + .buildGraphql(); + expect(skuY567Yz2015UsWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-y-567-yz-2015-us-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-y-567-yz-2015-us-warehouse.ts new file mode 100644 index 000000000..b32212b6e --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-y-567-yz-2015-us-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .usWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .y567Yz01() + .build(); + +const skuY567Yz2015UsWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('y567-yz-2015-us-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuY567Yz2015UsWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-y-567-yz-2019-default-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-y-567-yz-2019-default-warehouse.spec.ts new file mode 100644 index 000000000..82a13832b --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-y-567-yz-2019-default-warehouse.spec.ts @@ -0,0 +1,40 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuY567Yz2019DefaultWarehouse preset`, () => { + it(`should return a skuY567Yz2019DefaultWarehouse preset when built for rest`, () => { + const skuY567Yz2019DefaultWarehousePreset = InventoryEntryDraftRest.presets + .skuY567Yz2019DefaultWarehouse() + .build(); + expect(skuY567Yz2019DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuY567Yz2019DefaultWarehouse preset when built for graphql`, () => { + const skuY567Yz2019DefaultWarehousePreset = + InventoryEntryDraftGraphql.presets + .skuY567Yz2019DefaultWarehouse() + .build(); + expect(skuY567Yz2019DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuY567Yz2019DefaultWarehouse preset when built for legacy rest`, () => { + const skuY567Yz2019DefaultWarehousePreset = InventoryEntryDraft.presets + .skuY567Yz2019DefaultWarehouse() + .buildRest(); + expect(skuY567Yz2019DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuY567Yz2019DefaultWarehouse preset when built for legacy graphql`, () => { + const skuY567Yz2019DefaultWarehousePreset = InventoryEntryDraft.presets + .skuY567Yz2019DefaultWarehouse() + .buildGraphql(); + expect(skuY567Yz2019DefaultWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-y-567-yz-2019-default-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-y-567-yz-2019-default-warehouse.ts new file mode 100644 index 000000000..ecea21002 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-y-567-yz-2019-default-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .defaultWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .y567Yz02() + .build(); + +const skuY567Yz2019DefaultWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('y567-yz-2019-default-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuY567Yz2019DefaultWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-y-567-yz-2019-eu-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-y-567-yz-2019-eu-warehouse.spec.ts new file mode 100644 index 000000000..52218946e --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-y-567-yz-2019-eu-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuY567Yz2019EuWarehouse preset`, () => { + it(`should return a skuY567Yz2019EuWarehouse preset when built for rest`, () => { + const skuY567Yz2019EuWarehousePreset = InventoryEntryDraftRest.presets + .skuY567Yz2019EuWarehouse() + .build(); + expect(skuY567Yz2019EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuY567Yz2019EuWarehouse preset when built for graphql`, () => { + const skuY567Yz2019EuWarehousePreset = InventoryEntryDraftGraphql.presets + .skuY567Yz2019EuWarehouse() + .build(); + expect(skuY567Yz2019EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuY567Yz2019EuWarehouse preset when built for legacy rest`, () => { + const skuY567Yz2019EuWarehousePreset = InventoryEntryDraft.presets + .skuY567Yz2019EuWarehouse() + .buildRest(); + expect(skuY567Yz2019EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuY567Yz2019EuWarehouse preset when built for legacy graphql`, () => { + const skuY567Yz2019EuWarehousePreset = InventoryEntryDraft.presets + .skuY567Yz2019EuWarehouse() + .buildGraphql(); + expect(skuY567Yz2019EuWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-y-567-yz-2019-eu-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-y-567-yz-2019-eu-warehouse.ts new file mode 100644 index 000000000..ab2131f72 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-y-567-yz-2019-eu-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .euWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .y567Yz02() + .build(); + +const skuY567Yz2019EuWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('y567-yz-2019-eu-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuY567Yz2019EuWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-y-567-yz-2019-us-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-y-567-yz-2019-us-warehouse.spec.ts new file mode 100644 index 000000000..0efbb9359 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-y-567-yz-2019-us-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuY567Yz2019UsWarehouse preset`, () => { + it(`should return a skuY567Yz2019UsWarehouse preset when built for rest`, () => { + const skuY567Yz2019UsWarehousePreset = InventoryEntryDraftRest.presets + .skuY567Yz2019UsWarehouse() + .build(); + expect(skuY567Yz2019UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuY567Yz2019UsWarehouse preset when built for graphql`, () => { + const skuY567Yz2019UsWarehousePreset = InventoryEntryDraftGraphql.presets + .skuY567Yz2019UsWarehouse() + .build(); + expect(skuY567Yz2019UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuY567Yz2019UsWarehouse preset when built for legacy rest`, () => { + const skuY567Yz2019UsWarehousePreset = InventoryEntryDraft.presets + .skuY567Yz2019UsWarehouse() + .buildRest(); + expect(skuY567Yz2019UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuY567Yz2019UsWarehouse preset when built for legacy graphql`, () => { + const skuY567Yz2019UsWarehousePreset = InventoryEntryDraft.presets + .skuY567Yz2019UsWarehouse() + .buildGraphql(); + expect(skuY567Yz2019UsWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-y-567-yz-2019-us-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-y-567-yz-2019-us-warehouse.ts new file mode 100644 index 000000000..d4dcf82df --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-y-567-yz-2019-us-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .usWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .y567Yz02() + .build(); + +const skuY567Yz2019UsWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('y567-yz-2019-us-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuY567Yz2019UsWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-y-567-yz-2023-default-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-y-567-yz-2023-default-warehouse.spec.ts new file mode 100644 index 000000000..4138a4ace --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-y-567-yz-2023-default-warehouse.spec.ts @@ -0,0 +1,40 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuY567Yz2023DefaultWarehouse preset`, () => { + it(`should return a skuY567Yz2023DefaultWarehouse preset when built for rest`, () => { + const skuY567Yz2023DefaultWarehousePreset = InventoryEntryDraftRest.presets + .skuY567Yz2023DefaultWarehouse() + .build(); + expect(skuY567Yz2023DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuY567Yz2023DefaultWarehouse preset when built for graphql`, () => { + const skuY567Yz2023DefaultWarehousePreset = + InventoryEntryDraftGraphql.presets + .skuY567Yz2023DefaultWarehouse() + .build(); + expect(skuY567Yz2023DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuY567Yz2023DefaultWarehouse preset when built for legacy rest`, () => { + const skuY567Yz2023DefaultWarehousePreset = InventoryEntryDraft.presets + .skuY567Yz2023DefaultWarehouse() + .buildRest(); + expect(skuY567Yz2023DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuY567Yz2023DefaultWarehouse preset when built for legacy graphql`, () => { + const skuY567Yz2023DefaultWarehousePreset = InventoryEntryDraft.presets + .skuY567Yz2023DefaultWarehouse() + .buildGraphql(); + expect(skuY567Yz2023DefaultWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-y-567-yz-2023-default-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-y-567-yz-2023-default-warehouse.ts new file mode 100644 index 000000000..352dc4502 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-y-567-yz-2023-default-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .defaultWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .y567Yz03() + .build(); + +const skuY567Yz2023DefaultWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('y567-yz-2023-default-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuY567Yz2023DefaultWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-y-567-yz-2023-eu-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-y-567-yz-2023-eu-warehouse.spec.ts new file mode 100644 index 000000000..0fb4817fb --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-y-567-yz-2023-eu-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuY567Yz2023EuWarehouse preset`, () => { + it(`should return a skuY567Yz2023EuWarehouse preset when built for rest`, () => { + const skuY567Yz2023EuWarehousePreset = InventoryEntryDraftRest.presets + .skuY567Yz2023EuWarehouse() + .build(); + expect(skuY567Yz2023EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuY567Yz2023EuWarehouse preset when built for graphql`, () => { + const skuY567Yz2023EuWarehousePreset = InventoryEntryDraftGraphql.presets + .skuY567Yz2023EuWarehouse() + .build(); + expect(skuY567Yz2023EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuY567Yz2023EuWarehouse preset when built for legacy rest`, () => { + const skuY567Yz2023EuWarehousePreset = InventoryEntryDraft.presets + .skuY567Yz2023EuWarehouse() + .buildRest(); + expect(skuY567Yz2023EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuY567Yz2023EuWarehouse preset when built for legacy graphql`, () => { + const skuY567Yz2023EuWarehousePreset = InventoryEntryDraft.presets + .skuY567Yz2023EuWarehouse() + .buildGraphql(); + expect(skuY567Yz2023EuWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-y-567-yz-2023-eu-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-y-567-yz-2023-eu-warehouse.ts new file mode 100644 index 000000000..95603b197 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-y-567-yz-2023-eu-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .euWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .y567Yz03() + .build(); + +const skuY567Yz2023EuWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('y567-yz-2023-eu-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuY567Yz2023EuWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-y-567-yz-2023-us-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-y-567-yz-2023-us-warehouse.spec.ts new file mode 100644 index 000000000..dbb19a998 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-y-567-yz-2023-us-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuY567Yz2023UsWarehouse preset`, () => { + it(`should return a skuY567Yz2023UsWarehouse preset when built for rest`, () => { + const skuY567Yz2023UsWarehousePreset = InventoryEntryDraftRest.presets + .skuY567Yz2023UsWarehouse() + .build(); + expect(skuY567Yz2023UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuY567Yz2023UsWarehouse preset when built for graphql`, () => { + const skuY567Yz2023UsWarehousePreset = InventoryEntryDraftGraphql.presets + .skuY567Yz2023UsWarehouse() + .build(); + expect(skuY567Yz2023UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuY567Yz2023UsWarehouse preset when built for legacy rest`, () => { + const skuY567Yz2023UsWarehousePreset = InventoryEntryDraft.presets + .skuY567Yz2023UsWarehouse() + .buildRest(); + expect(skuY567Yz2023UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuY567Yz2023UsWarehouse preset when built for legacy graphql`, () => { + const skuY567Yz2023UsWarehousePreset = InventoryEntryDraft.presets + .skuY567Yz2023UsWarehouse() + .buildGraphql(); + expect(skuY567Yz2023UsWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-y-567-yz-2023-us-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-y-567-yz-2023-us-warehouse.ts new file mode 100644 index 000000000..29c853889 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-y-567-yz-2023-us-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .usWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .y567Yz03() + .build(); + +const skuY567Yz2023UsWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('y567-yz-2023-us-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuY567Yz2023UsWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-y567-yz-2015-default.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-y567-yz-2015-default.spec.ts deleted file mode 100644 index 509e42b4e..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-y567-yz-2015-default.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuY567Yz2015Default from './sku-y567-yz-2015-default'; - -describe(`with skuY567Yz2015Default preset and default-warehouse channel`, () => { - it(`should return a skuY567Yz2015Default preset`, () => { - const skuY567Yz2015DefaultPreset = - skuY567Yz2015Default().build(); - expect(skuY567Yz2015DefaultPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "y567-yz-2015-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "y567-yz-2015", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuY567Yz2015Default preset when built for graphql`, () => { - const skuY567Yz2015DefaultPresetGraphql = - skuY567Yz2015Default().buildGraphql(); - expect(skuY567Yz2015DefaultPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "y567-yz-2015-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "y567-yz-2015", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-y567-yz-2015-default.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-y567-yz-2015-default.ts deleted file mode 100644 index 0af3b7d60..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-y567-yz-2015-default.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const defaultWarehouse = ChannelDraft.presets.sampleDataB2B - .defaultWarehouse() - .build(); - -const y567Yz01 = ProductVariantDraft.presets.sampleDataB2B - .y567Yz01() - .build(); - -const skuY567Yz2015Default = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${y567Yz01.sku}-${defaultWarehouse.key}`) - .sku(y567Yz01.sku!) - .quantityOnStock(1000) - .supplyChannel( - KeyReferenceDraft.presets.channel().key(defaultWarehouse.key) - ); - -export default skuY567Yz2015Default; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-y567-yz-2015-eu.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-y567-yz-2015-eu.spec.ts deleted file mode 100644 index dcc99e294..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-y567-yz-2015-eu.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuY567Yz2015Eu from './sku-y567-yz-2015-eu'; - -describe(`with skuY567Yz2015Eu preset and eu-warehouse channel`, () => { - it(`should return a skuY567Yz2015Eu preset`, () => { - const skuY567Yz2015EuPreset = - skuY567Yz2015Eu().build(); - expect(skuY567Yz2015EuPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "y567-yz-2015-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "y567-yz-2015", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuY567Yz2015Eu preset when built for graphql`, () => { - const skuY567Yz2015EuPresetGraphql = - skuY567Yz2015Eu().buildGraphql(); - expect(skuY567Yz2015EuPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "y567-yz-2015-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "y567-yz-2015", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-y567-yz-2015-eu.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-y567-yz-2015-eu.ts deleted file mode 100644 index 29c6188d2..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-y567-yz-2015-eu.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const euWarehouse = ChannelDraft.presets.sampleDataB2B - .euWarehouse() - .build(); - -const y567Yz01 = ProductVariantDraft.presets.sampleDataB2B - .y567Yz01() - .build(); - -const skuY567Yz2015Eu = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${y567Yz01.sku}-${euWarehouse.key}`) - .sku(y567Yz01.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(euWarehouse.key)); - -export default skuY567Yz2015Eu; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-y567-yz-2015-us.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-y567-yz-2015-us.spec.ts deleted file mode 100644 index e0d520d16..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-y567-yz-2015-us.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuY567Yz2015Us from './sku-y567-yz-2015-us'; - -describe(`with skuY567Yz2015Us preset and us-warehouse channel`, () => { - it(`should return a skuY567Yz2015Us preset`, () => { - const skuY567Yz2015UsPreset = - skuY567Yz2015Us().build(); - expect(skuY567Yz2015UsPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "y567-yz-2015-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "y567-yz-2015", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuY567Yz2015Us preset when built for graphql`, () => { - const skuY567Yz2015UsPresetGraphql = - skuY567Yz2015Us().buildGraphql(); - expect(skuY567Yz2015UsPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "y567-yz-2015-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "y567-yz-2015", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-y567-yz-2015-us.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-y567-yz-2015-us.ts deleted file mode 100644 index 7f13680a9..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-y567-yz-2015-us.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const usWarehouse = ChannelDraft.presets.sampleDataB2B - .usWarehouse() - .build(); - -const y567Yz01 = ProductVariantDraft.presets.sampleDataB2B - .y567Yz01() - .build(); - -const skuY567Yz2015Us = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${y567Yz01.sku}-${usWarehouse.key}`) - .sku(y567Yz01.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(usWarehouse.key)); - -export default skuY567Yz2015Us; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-y567-yz-2019-default.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-y567-yz-2019-default.spec.ts deleted file mode 100644 index 8c1549e8f..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-y567-yz-2019-default.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuY567Yz2019Default from './sku-y567-yz-2019-default'; - -describe(`with skuY567Yz2019Default preset and default-warehouse channel`, () => { - it(`should return a skuY567Yz2019Default preset`, () => { - const skuY567Yz2019DefaultPreset = - skuY567Yz2019Default().build(); - expect(skuY567Yz2019DefaultPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "y567-yz-2019-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "y567-yz-2019", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuY567Yz2019Default preset when built for graphql`, () => { - const skuY567Yz2019DefaultPresetGraphql = - skuY567Yz2019Default().buildGraphql(); - expect(skuY567Yz2019DefaultPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "y567-yz-2019-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "y567-yz-2019", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-y567-yz-2019-default.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-y567-yz-2019-default.ts deleted file mode 100644 index 919e62b96..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-y567-yz-2019-default.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const defaultWarehouse = ChannelDraft.presets.sampleDataB2B - .defaultWarehouse() - .build(); - -const y567Yz02 = ProductVariantDraft.presets.sampleDataB2B - .y567Yz02() - .build(); - -const skuY567Yz2019Default = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${y567Yz02.sku}-${defaultWarehouse.key}`) - .sku(y567Yz02.sku!) - .quantityOnStock(1000) - .supplyChannel( - KeyReferenceDraft.presets.channel().key(defaultWarehouse.key) - ); - -export default skuY567Yz2019Default; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-y567-yz-2019-eu.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-y567-yz-2019-eu.spec.ts deleted file mode 100644 index 67be74605..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-y567-yz-2019-eu.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuY567Yz2019Eu from './sku-y567-yz-2019-eu'; - -describe(`with skuY567Yz2019Eu preset and eu-warehouse channel`, () => { - it(`should return a skuY567Yz2019Eu preset`, () => { - const skuY567Yz2019EuPreset = - skuY567Yz2019Eu().build(); - expect(skuY567Yz2019EuPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "y567-yz-2019-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "y567-yz-2019", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuY567Yz2019Eu preset when built for graphql`, () => { - const skuY567Yz2019EuPresetGraphql = - skuY567Yz2019Eu().buildGraphql(); - expect(skuY567Yz2019EuPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "y567-yz-2019-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "y567-yz-2019", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-y567-yz-2019-eu.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-y567-yz-2019-eu.ts deleted file mode 100644 index e34038299..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-y567-yz-2019-eu.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const euWarehouse = ChannelDraft.presets.sampleDataB2B - .euWarehouse() - .build(); - -const y567Yz02 = ProductVariantDraft.presets.sampleDataB2B - .y567Yz02() - .build(); - -const skuY567Yz2019Eu = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${y567Yz02.sku}-${euWarehouse.key}`) - .sku(y567Yz02.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(euWarehouse.key)); - -export default skuY567Yz2019Eu; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-y567-yz-2019-us.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-y567-yz-2019-us.spec.ts deleted file mode 100644 index 0db4d6cf1..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-y567-yz-2019-us.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuY567Yz2019Us from './sku-y567-yz-2019-us'; - -describe(`with skuY567Yz2019Us preset and us-warehouse channel`, () => { - it(`should return a skuY567Yz2019Us preset`, () => { - const skuY567Yz2019UsPreset = - skuY567Yz2019Us().build(); - expect(skuY567Yz2019UsPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "y567-yz-2019-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "y567-yz-2019", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuY567Yz2019Us preset when built for graphql`, () => { - const skuY567Yz2019UsPresetGraphql = - skuY567Yz2019Us().buildGraphql(); - expect(skuY567Yz2019UsPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "y567-yz-2019-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "y567-yz-2019", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-y567-yz-2019-us.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-y567-yz-2019-us.ts deleted file mode 100644 index c63ba8109..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-y567-yz-2019-us.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const usWarehouse = ChannelDraft.presets.sampleDataB2B - .usWarehouse() - .build(); - -const y567Yz02 = ProductVariantDraft.presets.sampleDataB2B - .y567Yz02() - .build(); - -const skuY567Yz2019Us = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${y567Yz02.sku}-${usWarehouse.key}`) - .sku(y567Yz02.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(usWarehouse.key)); - -export default skuY567Yz2019Us; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-y567-yz-2023-default.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-y567-yz-2023-default.spec.ts deleted file mode 100644 index 468bbbe4c..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-y567-yz-2023-default.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuY567Yz2023Default from './sku-y567-yz-2023-default'; - -describe(`with skuY567Yz2023Default preset and default-warehouse channel`, () => { - it(`should return a skuY567Yz2023Default preset`, () => { - const skuY567Yz2023DefaultPreset = - skuY567Yz2023Default().build(); - expect(skuY567Yz2023DefaultPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "y567-yz-2023-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "y567-yz-2023", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuY567Yz2023Default preset when built for graphql`, () => { - const skuY567Yz2023DefaultPresetGraphql = - skuY567Yz2023Default().buildGraphql(); - expect(skuY567Yz2023DefaultPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "y567-yz-2023-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "y567-yz-2023", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-y567-yz-2023-default.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-y567-yz-2023-default.ts deleted file mode 100644 index 4cd06c1e2..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-y567-yz-2023-default.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const defaultWarehouse = ChannelDraft.presets.sampleDataB2B - .defaultWarehouse() - .build(); - -const y567Yz03 = ProductVariantDraft.presets.sampleDataB2B - .y567Yz03() - .build(); - -const skuY567Yz2023Default = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${y567Yz03.sku}-${defaultWarehouse.key}`) - .sku(y567Yz03.sku!) - .quantityOnStock(1000) - .supplyChannel( - KeyReferenceDraft.presets.channel().key(defaultWarehouse.key) - ); - -export default skuY567Yz2023Default; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-y567-yz-2023-eu.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-y567-yz-2023-eu.spec.ts deleted file mode 100644 index 05d689fd7..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-y567-yz-2023-eu.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuY567Yz2023Eu from './sku-y567-yz-2023-eu'; - -describe(`with skuY567Yz2023Eu preset and eu-warehouse channel`, () => { - it(`should return a skuY567Yz2023Eu preset`, () => { - const skuY567Yz2023EuPreset = - skuY567Yz2023Eu().build(); - expect(skuY567Yz2023EuPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "y567-yz-2023-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "y567-yz-2023", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuY567Yz2023Eu preset when built for graphql`, () => { - const skuY567Yz2023EuPresetGraphql = - skuY567Yz2023Eu().buildGraphql(); - expect(skuY567Yz2023EuPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "y567-yz-2023-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "y567-yz-2023", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-y567-yz-2023-eu.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-y567-yz-2023-eu.ts deleted file mode 100644 index f130c734e..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-y567-yz-2023-eu.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const euWarehouse = ChannelDraft.presets.sampleDataB2B - .euWarehouse() - .build(); - -const y567Yz03 = ProductVariantDraft.presets.sampleDataB2B - .y567Yz03() - .build(); - -const skuY567Yz2023Eu = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${y567Yz03.sku}-${euWarehouse.key}`) - .sku(y567Yz03.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(euWarehouse.key)); - -export default skuY567Yz2023Eu; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-y567-yz-2023-us.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-y567-yz-2023-us.spec.ts deleted file mode 100644 index b60babc4d..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-y567-yz-2023-us.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuY567Yz2023Us from './sku-y567-yz-2023-us'; - -describe(`with skuY567Yz2023Us preset and us-warehouse channel`, () => { - it(`should return a skuY567Yz2023Us preset`, () => { - const skuY567Yz2023UsPreset = - skuY567Yz2023Us().build(); - expect(skuY567Yz2023UsPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "y567-yz-2023-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "y567-yz-2023", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuY567Yz2023Us preset when built for graphql`, () => { - const skuY567Yz2023UsPresetGraphql = - skuY567Yz2023Us().buildGraphql(); - expect(skuY567Yz2023UsPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "y567-yz-2023-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "y567-yz-2023", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-y567-yz-2023-us.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-y567-yz-2023-us.ts deleted file mode 100644 index d663aeee5..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-y567-yz-2023-us.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const usWarehouse = ChannelDraft.presets.sampleDataB2B - .usWarehouse() - .build(); - -const y567Yz03 = ProductVariantDraft.presets.sampleDataB2B - .y567Yz03() - .build(); - -const skuY567Yz2023Us = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${y567Yz03.sku}-${usWarehouse.key}`) - .sku(y567Yz03.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(usWarehouse.key)); - -export default skuY567Yz2023Us; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-yy-123-qr-blue-default-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-yy-123-qr-blue-default-warehouse.spec.ts new file mode 100644 index 000000000..9fba4137e --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-yy-123-qr-blue-default-warehouse.spec.ts @@ -0,0 +1,40 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuYy123QrBlueDefaultWarehouse preset`, () => { + it(`should return a skuYy123QrBlueDefaultWarehouse preset when built for rest`, () => { + const skuYy123QrBlueDefaultWarehousePreset = InventoryEntryDraftRest.presets + .skuYy123QrBlueDefaultWarehouse() + .build(); + expect(skuYy123QrBlueDefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuYy123QrBlueDefaultWarehouse preset when built for graphql`, () => { + const skuYy123QrBlueDefaultWarehousePreset = + InventoryEntryDraftGraphql.presets + .skuYy123QrBlueDefaultWarehouse() + .build(); + expect(skuYy123QrBlueDefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuYy123QrBlueDefaultWarehouse preset when built for legacy rest`, () => { + const skuYy123QrBlueDefaultWarehousePreset = InventoryEntryDraft.presets + .skuYy123QrBlueDefaultWarehouse() + .buildRest(); + expect(skuYy123QrBlueDefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuYy123QrBlueDefaultWarehouse preset when built for legacy graphql`, () => { + const skuYy123QrBlueDefaultWarehousePreset = InventoryEntryDraft.presets + .skuYy123QrBlueDefaultWarehouse() + .buildGraphql(); + expect(skuYy123QrBlueDefaultWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-yy-123-qr-blue-default-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-yy-123-qr-blue-default-warehouse.ts new file mode 100644 index 000000000..7854bb307 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-yy-123-qr-blue-default-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .defaultWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .yy123Qr02() + .build(); + +const skuYy123QrBlueDefaultWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('yy123-qr-blue-default-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuYy123QrBlueDefaultWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-yy-123-qr-blue-eu-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-yy-123-qr-blue-eu-warehouse.spec.ts new file mode 100644 index 000000000..a320a6de7 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-yy-123-qr-blue-eu-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuYy123QrBlueEuWarehouse preset`, () => { + it(`should return a skuYy123QrBlueEuWarehouse preset when built for rest`, () => { + const skuYy123QrBlueEuWarehousePreset = InventoryEntryDraftRest.presets + .skuYy123QrBlueEuWarehouse() + .build(); + expect(skuYy123QrBlueEuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuYy123QrBlueEuWarehouse preset when built for graphql`, () => { + const skuYy123QrBlueEuWarehousePreset = InventoryEntryDraftGraphql.presets + .skuYy123QrBlueEuWarehouse() + .build(); + expect(skuYy123QrBlueEuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuYy123QrBlueEuWarehouse preset when built for legacy rest`, () => { + const skuYy123QrBlueEuWarehousePreset = InventoryEntryDraft.presets + .skuYy123QrBlueEuWarehouse() + .buildRest(); + expect(skuYy123QrBlueEuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuYy123QrBlueEuWarehouse preset when built for legacy graphql`, () => { + const skuYy123QrBlueEuWarehousePreset = InventoryEntryDraft.presets + .skuYy123QrBlueEuWarehouse() + .buildGraphql(); + expect(skuYy123QrBlueEuWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-yy-123-qr-blue-eu-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-yy-123-qr-blue-eu-warehouse.ts new file mode 100644 index 000000000..a40ccfb97 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-yy-123-qr-blue-eu-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .euWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .yy123Qr02() + .build(); + +const skuYy123QrBlueEuWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('yy123-qr-blue-eu-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuYy123QrBlueEuWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-yy-123-qr-blue-us-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-yy-123-qr-blue-us-warehouse.spec.ts new file mode 100644 index 000000000..0125e743f --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-yy-123-qr-blue-us-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuYy123QrBlueUsWarehouse preset`, () => { + it(`should return a skuYy123QrBlueUsWarehouse preset when built for rest`, () => { + const skuYy123QrBlueUsWarehousePreset = InventoryEntryDraftRest.presets + .skuYy123QrBlueUsWarehouse() + .build(); + expect(skuYy123QrBlueUsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuYy123QrBlueUsWarehouse preset when built for graphql`, () => { + const skuYy123QrBlueUsWarehousePreset = InventoryEntryDraftGraphql.presets + .skuYy123QrBlueUsWarehouse() + .build(); + expect(skuYy123QrBlueUsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuYy123QrBlueUsWarehouse preset when built for legacy rest`, () => { + const skuYy123QrBlueUsWarehousePreset = InventoryEntryDraft.presets + .skuYy123QrBlueUsWarehouse() + .buildRest(); + expect(skuYy123QrBlueUsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuYy123QrBlueUsWarehouse preset when built for legacy graphql`, () => { + const skuYy123QrBlueUsWarehousePreset = InventoryEntryDraft.presets + .skuYy123QrBlueUsWarehouse() + .buildGraphql(); + expect(skuYy123QrBlueUsWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-yy-123-qr-blue-us-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-yy-123-qr-blue-us-warehouse.ts new file mode 100644 index 000000000..f906749ea --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-yy-123-qr-blue-us-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .usWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .yy123Qr02() + .build(); + +const skuYy123QrBlueUsWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('yy123-qr-blue-us-warehouse') + .sku(variant.sku!) + .quantityOnStock(999) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuYy123QrBlueUsWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-yy-123-qr-green-default-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-yy-123-qr-green-default-warehouse.spec.ts new file mode 100644 index 000000000..2a0d88a39 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-yy-123-qr-green-default-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuYy123QrGreenDefaultWarehouse preset`, () => { + it(`should return a skuYy123QrGreenDefaultWarehouse preset when built for rest`, () => { + const skuYy123QrGreenDefaultWarehousePreset = + InventoryEntryDraftRest.presets.skuYy123QrGreenDefaultWarehouse().build(); + expect(skuYy123QrGreenDefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuYy123QrGreenDefaultWarehouse preset when built for graphql`, () => { + const skuYy123QrGreenDefaultWarehousePreset = + InventoryEntryDraftGraphql.presets + .skuYy123QrGreenDefaultWarehouse() + .build(); + expect(skuYy123QrGreenDefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuYy123QrGreenDefaultWarehouse preset when built for legacy rest`, () => { + const skuYy123QrGreenDefaultWarehousePreset = InventoryEntryDraft.presets + .skuYy123QrGreenDefaultWarehouse() + .buildRest(); + expect(skuYy123QrGreenDefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuYy123QrGreenDefaultWarehouse preset when built for legacy graphql`, () => { + const skuYy123QrGreenDefaultWarehousePreset = InventoryEntryDraft.presets + .skuYy123QrGreenDefaultWarehouse() + .buildGraphql(); + expect(skuYy123QrGreenDefaultWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-yy-123-qr-green-default-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-yy-123-qr-green-default-warehouse.ts new file mode 100644 index 000000000..c91026dd9 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-yy-123-qr-green-default-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .defaultWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .yy123Qr03() + .build(); + +const skuYy123QrGreenDefaultWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('yy123-qr-green-default-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuYy123QrGreenDefaultWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-yy-123-qr-green-eu-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-yy-123-qr-green-eu-warehouse.spec.ts new file mode 100644 index 000000000..811c7d5e0 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-yy-123-qr-green-eu-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuYy123QrGreenEuWarehouse preset`, () => { + it(`should return a skuYy123QrGreenEuWarehouse preset when built for rest`, () => { + const skuYy123QrGreenEuWarehousePreset = InventoryEntryDraftRest.presets + .skuYy123QrGreenEuWarehouse() + .build(); + expect(skuYy123QrGreenEuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuYy123QrGreenEuWarehouse preset when built for graphql`, () => { + const skuYy123QrGreenEuWarehousePreset = InventoryEntryDraftGraphql.presets + .skuYy123QrGreenEuWarehouse() + .build(); + expect(skuYy123QrGreenEuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuYy123QrGreenEuWarehouse preset when built for legacy rest`, () => { + const skuYy123QrGreenEuWarehousePreset = InventoryEntryDraft.presets + .skuYy123QrGreenEuWarehouse() + .buildRest(); + expect(skuYy123QrGreenEuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuYy123QrGreenEuWarehouse preset when built for legacy graphql`, () => { + const skuYy123QrGreenEuWarehousePreset = InventoryEntryDraft.presets + .skuYy123QrGreenEuWarehouse() + .buildGraphql(); + expect(skuYy123QrGreenEuWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-yy-123-qr-green-eu-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-yy-123-qr-green-eu-warehouse.ts new file mode 100644 index 000000000..f4957a52a --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-yy-123-qr-green-eu-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .euWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .yy123Qr03() + .build(); + +const skuYy123QrGreenEuWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('yy123-qr-green-eu-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuYy123QrGreenEuWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-yy-123-qr-green-us-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-yy-123-qr-green-us-warehouse.spec.ts new file mode 100644 index 000000000..34bc0d58f --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-yy-123-qr-green-us-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuYy123QrGreenUsWarehouse preset`, () => { + it(`should return a skuYy123QrGreenUsWarehouse preset when built for rest`, () => { + const skuYy123QrGreenUsWarehousePreset = InventoryEntryDraftRest.presets + .skuYy123QrGreenUsWarehouse() + .build(); + expect(skuYy123QrGreenUsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuYy123QrGreenUsWarehouse preset when built for graphql`, () => { + const skuYy123QrGreenUsWarehousePreset = InventoryEntryDraftGraphql.presets + .skuYy123QrGreenUsWarehouse() + .build(); + expect(skuYy123QrGreenUsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuYy123QrGreenUsWarehouse preset when built for legacy rest`, () => { + const skuYy123QrGreenUsWarehousePreset = InventoryEntryDraft.presets + .skuYy123QrGreenUsWarehouse() + .buildRest(); + expect(skuYy123QrGreenUsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuYy123QrGreenUsWarehouse preset when built for legacy graphql`, () => { + const skuYy123QrGreenUsWarehousePreset = InventoryEntryDraft.presets + .skuYy123QrGreenUsWarehouse() + .buildGraphql(); + expect(skuYy123QrGreenUsWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-yy-123-qr-green-us-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-yy-123-qr-green-us-warehouse.ts new file mode 100644 index 000000000..668698422 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-yy-123-qr-green-us-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .usWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .yy123Qr03() + .build(); + +const skuYy123QrGreenUsWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('yy123-qr-green-us-warehouse') + .sku(variant.sku!) + .quantityOnStock(999) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuYy123QrGreenUsWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-yy-123-qr-red-default-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-yy-123-qr-red-default-warehouse.spec.ts new file mode 100644 index 000000000..fad57d1d1 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-yy-123-qr-red-default-warehouse.spec.ts @@ -0,0 +1,40 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuYy123QrRedDefaultWarehouse preset`, () => { + it(`should return a skuYy123QrRedDefaultWarehouse preset when built for rest`, () => { + const skuYy123QrRedDefaultWarehousePreset = InventoryEntryDraftRest.presets + .skuYy123QrRedDefaultWarehouse() + .build(); + expect(skuYy123QrRedDefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuYy123QrRedDefaultWarehouse preset when built for graphql`, () => { + const skuYy123QrRedDefaultWarehousePreset = + InventoryEntryDraftGraphql.presets + .skuYy123QrRedDefaultWarehouse() + .build(); + expect(skuYy123QrRedDefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuYy123QrRedDefaultWarehouse preset when built for legacy rest`, () => { + const skuYy123QrRedDefaultWarehousePreset = InventoryEntryDraft.presets + .skuYy123QrRedDefaultWarehouse() + .buildRest(); + expect(skuYy123QrRedDefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuYy123QrRedDefaultWarehouse preset when built for legacy graphql`, () => { + const skuYy123QrRedDefaultWarehousePreset = InventoryEntryDraft.presets + .skuYy123QrRedDefaultWarehouse() + .buildGraphql(); + expect(skuYy123QrRedDefaultWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-yy-123-qr-red-default-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-yy-123-qr-red-default-warehouse.ts new file mode 100644 index 000000000..bd88adad5 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-yy-123-qr-red-default-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .defaultWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .yy123Qr01() + .build(); + +const skuYy123QrRedDefaultWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('yy123-qr-red-default-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuYy123QrRedDefaultWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-yy-123-qr-red-eu-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-yy-123-qr-red-eu-warehouse.spec.ts new file mode 100644 index 000000000..cf2c08ddf --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-yy-123-qr-red-eu-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuYy123QrRedEuWarehouse preset`, () => { + it(`should return a skuYy123QrRedEuWarehouse preset when built for rest`, () => { + const skuYy123QrRedEuWarehousePreset = InventoryEntryDraftRest.presets + .skuYy123QrRedEuWarehouse() + .build(); + expect(skuYy123QrRedEuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuYy123QrRedEuWarehouse preset when built for graphql`, () => { + const skuYy123QrRedEuWarehousePreset = InventoryEntryDraftGraphql.presets + .skuYy123QrRedEuWarehouse() + .build(); + expect(skuYy123QrRedEuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuYy123QrRedEuWarehouse preset when built for legacy rest`, () => { + const skuYy123QrRedEuWarehousePreset = InventoryEntryDraft.presets + .skuYy123QrRedEuWarehouse() + .buildRest(); + expect(skuYy123QrRedEuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuYy123QrRedEuWarehouse preset when built for legacy graphql`, () => { + const skuYy123QrRedEuWarehousePreset = InventoryEntryDraft.presets + .skuYy123QrRedEuWarehouse() + .buildGraphql(); + expect(skuYy123QrRedEuWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-yy-123-qr-red-eu-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-yy-123-qr-red-eu-warehouse.ts new file mode 100644 index 000000000..c1889331d --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-yy-123-qr-red-eu-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .euWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .yy123Qr01() + .build(); + +const skuYy123QrRedEuWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('yy123-qr-red-eu-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuYy123QrRedEuWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-yy-123-qr-red-us-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-yy-123-qr-red-us-warehouse.spec.ts new file mode 100644 index 000000000..ff0db7ead --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-yy-123-qr-red-us-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuYy123QrRedUsWarehouse preset`, () => { + it(`should return a skuYy123QrRedUsWarehouse preset when built for rest`, () => { + const skuYy123QrRedUsWarehousePreset = InventoryEntryDraftRest.presets + .skuYy123QrRedUsWarehouse() + .build(); + expect(skuYy123QrRedUsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuYy123QrRedUsWarehouse preset when built for graphql`, () => { + const skuYy123QrRedUsWarehousePreset = InventoryEntryDraftGraphql.presets + .skuYy123QrRedUsWarehouse() + .build(); + expect(skuYy123QrRedUsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuYy123QrRedUsWarehouse preset when built for legacy rest`, () => { + const skuYy123QrRedUsWarehousePreset = InventoryEntryDraft.presets + .skuYy123QrRedUsWarehouse() + .buildRest(); + expect(skuYy123QrRedUsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuYy123QrRedUsWarehouse preset when built for legacy graphql`, () => { + const skuYy123QrRedUsWarehousePreset = InventoryEntryDraft.presets + .skuYy123QrRedUsWarehouse() + .buildGraphql(); + expect(skuYy123QrRedUsWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-yy-123-qr-red-us-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-yy-123-qr-red-us-warehouse.ts new file mode 100644 index 000000000..8704178c2 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-yy-123-qr-red-us-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .usWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .yy123Qr01() + .build(); + +const skuYy123QrRedUsWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('yy123-qr-red-us-warehouse') + .sku(variant.sku!) + .quantityOnStock(999) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuYy123QrRedUsWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-yy123-qr-blue-default.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-yy123-qr-blue-default.spec.ts deleted file mode 100644 index ff905b72f..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-yy123-qr-blue-default.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuYy123QrBlueDefault from './sku-yy123-qr-blue-default'; - -describe(`with skuYy123QrBlueDefault preset and default-warehouse channel`, () => { - it(`should return a skuYy123QrBlueDefault preset`, () => { - const skuYy123QrBlueDefaultPreset = - skuYy123QrBlueDefault().build(); - expect(skuYy123QrBlueDefaultPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "yy123-qr-blue-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "yy123-qr-blue", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuYy123QrBlueDefault preset when built for graphql`, () => { - const skuYy123QrBlueDefaultPresetGraphql = - skuYy123QrBlueDefault().buildGraphql(); - expect(skuYy123QrBlueDefaultPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "yy123-qr-blue-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "yy123-qr-blue", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-yy123-qr-blue-default.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-yy123-qr-blue-default.ts deleted file mode 100644 index 61a0f397c..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-yy123-qr-blue-default.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const defaultWarehouse = ChannelDraft.presets.sampleDataB2B - .defaultWarehouse() - .build(); - -const yy123Qr02 = ProductVariantDraft.presets.sampleDataB2B - .yy123Qr02() - .build(); - -const skuYy123QrBlueDefault = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${yy123Qr02.sku}-${defaultWarehouse.key}`) - .sku(yy123Qr02.sku!) - .quantityOnStock(1000) - .supplyChannel( - KeyReferenceDraft.presets.channel().key(defaultWarehouse.key) - ); - -export default skuYy123QrBlueDefault; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-yy123-qr-blue-eu.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-yy123-qr-blue-eu.spec.ts deleted file mode 100644 index daa88f6fc..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-yy123-qr-blue-eu.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuYy123QrBlueEu from './sku-yy123-qr-blue-eu'; - -describe(`with skuYy123QrBlueEu preset and eu-warehouse channel`, () => { - it(`should return a skuYy123QrBlueEu preset`, () => { - const skuYy123QrBlueEuPreset = - skuYy123QrBlueEu().build(); - expect(skuYy123QrBlueEuPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "yy123-qr-blue-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "yy123-qr-blue", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuYy123QrBlueEu preset when built for graphql`, () => { - const skuYy123QrBlueEuPresetGraphql = - skuYy123QrBlueEu().buildGraphql(); - expect(skuYy123QrBlueEuPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "yy123-qr-blue-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "yy123-qr-blue", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-yy123-qr-blue-eu.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-yy123-qr-blue-eu.ts deleted file mode 100644 index ccca73958..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-yy123-qr-blue-eu.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const euWarehouse = ChannelDraft.presets.sampleDataB2B - .euWarehouse() - .build(); - -const yy123Qr02 = ProductVariantDraft.presets.sampleDataB2B - .yy123Qr02() - .build(); - -const skuYy123QrBlueEu = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${yy123Qr02.sku}-${euWarehouse.key}`) - .sku(yy123Qr02.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(euWarehouse.key)); - -export default skuYy123QrBlueEu; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-yy123-qr-blue-us.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-yy123-qr-blue-us.spec.ts deleted file mode 100644 index f797c745d..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-yy123-qr-blue-us.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuYy123QrBlueUs from './sku-yy123-qr-blue-us'; - -describe(`with skuYy123QrBlueUs preset and us-warehouse channel`, () => { - it(`should return a skuYy123QrBlueUs preset`, () => { - const skuYy123QrBlueUsPreset = - skuYy123QrBlueUs().build(); - expect(skuYy123QrBlueUsPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "yy123-qr-blue-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "yy123-qr-blue", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuYy123QrBlueUs preset when built for graphql`, () => { - const skuYy123QrBlueUsPresetGraphql = - skuYy123QrBlueUs().buildGraphql(); - expect(skuYy123QrBlueUsPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "yy123-qr-blue-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "yy123-qr-blue", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-yy123-qr-blue-us.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-yy123-qr-blue-us.ts deleted file mode 100644 index 23af47c1a..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-yy123-qr-blue-us.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const usWarehouse = ChannelDraft.presets.sampleDataB2B - .usWarehouse() - .build(); - -const yy123Qr02 = ProductVariantDraft.presets.sampleDataB2B - .yy123Qr02() - .build(); - -const skuYy123QrBlueUs = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${yy123Qr02.sku}-${usWarehouse.key}`) - .sku(yy123Qr02.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(usWarehouse.key)); - -export default skuYy123QrBlueUs; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-yy123-qr-green-default.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-yy123-qr-green-default.spec.ts deleted file mode 100644 index d015727df..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-yy123-qr-green-default.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuYy123QrGreenDefault from './sku-yy123-qr-green-default'; - -describe(`with skuYy123QrGreenDefault preset and default-warehouse channel`, () => { - it(`should return a skuYy123QrGreenDefault preset`, () => { - const skuYy123QrGreenDefaultPreset = - skuYy123QrGreenDefault().build(); - expect(skuYy123QrGreenDefaultPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "yy123-qr-green-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "yy123-qr-green", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuYy123QrGreenDefault preset when built for graphql`, () => { - const skuYy123QrGreenDefaultPresetGraphql = - skuYy123QrGreenDefault().buildGraphql(); - expect(skuYy123QrGreenDefaultPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "yy123-qr-green-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "yy123-qr-green", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-yy123-qr-green-default.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-yy123-qr-green-default.ts deleted file mode 100644 index ef90cdda4..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-yy123-qr-green-default.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const defaultWarehouse = ChannelDraft.presets.sampleDataB2B - .defaultWarehouse() - .build(); - -const yy123Qr03 = ProductVariantDraft.presets.sampleDataB2B - .yy123Qr03() - .build(); - -const skuYy123QrGreenDefault = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${yy123Qr03.sku}-${defaultWarehouse.key}`) - .sku(yy123Qr03.sku!) - .quantityOnStock(1000) - .supplyChannel( - KeyReferenceDraft.presets.channel().key(defaultWarehouse.key) - ); - -export default skuYy123QrGreenDefault; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-yy123-qr-green-eu.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-yy123-qr-green-eu.spec.ts deleted file mode 100644 index f49146bab..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-yy123-qr-green-eu.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuYy123QrGreenEu from './sku-yy123-qr-green-eu'; - -describe(`with skuYy123QrGreenEu preset and eu-warehouse channel`, () => { - it(`should return a skuYy123QrGreenEu preset`, () => { - const skuYy123QrGreenEuPreset = - skuYy123QrGreenEu().build(); - expect(skuYy123QrGreenEuPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "yy123-qr-green-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "yy123-qr-green", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuYy123QrGreenEu preset when built for graphql`, () => { - const skuYy123QrGreenEuPresetGraphql = - skuYy123QrGreenEu().buildGraphql(); - expect(skuYy123QrGreenEuPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "yy123-qr-green-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "yy123-qr-green", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-yy123-qr-green-eu.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-yy123-qr-green-eu.ts deleted file mode 100644 index c0ef30b55..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-yy123-qr-green-eu.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const euWarehouse = ChannelDraft.presets.sampleDataB2B - .euWarehouse() - .build(); - -const yy123Qr03 = ProductVariantDraft.presets.sampleDataB2B - .yy123Qr03() - .build(); - -const skuYy123QrGreenEu = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${yy123Qr03.sku}-${euWarehouse.key}`) - .sku(yy123Qr03.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(euWarehouse.key)); - -export default skuYy123QrGreenEu; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-yy123-qr-green-us.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-yy123-qr-green-us.spec.ts deleted file mode 100644 index f33ba8e04..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-yy123-qr-green-us.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuYy123QrGreenUs from './sku-yy123-qr-green-us'; - -describe(`with skuYy123QrGreenUs preset and us-warehouse channel`, () => { - it(`should return a skuYy123QrGreenUs preset`, () => { - const skuYy123QrGreenUsPreset = - skuYy123QrGreenUs().build(); - expect(skuYy123QrGreenUsPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "yy123-qr-green-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "yy123-qr-green", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuYy123QrGreenUs preset when built for graphql`, () => { - const skuYy123QrGreenUsPresetGraphql = - skuYy123QrGreenUs().buildGraphql(); - expect(skuYy123QrGreenUsPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "yy123-qr-green-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "yy123-qr-green", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-yy123-qr-green-us.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-yy123-qr-green-us.ts deleted file mode 100644 index c7cf89c3a..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-yy123-qr-green-us.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const usWarehouse = ChannelDraft.presets.sampleDataB2B - .usWarehouse() - .build(); - -const yy123Qr03 = ProductVariantDraft.presets.sampleDataB2B - .yy123Qr03() - .build(); - -const skuYy123QrGreenUs = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${yy123Qr03.sku}-${usWarehouse.key}`) - .sku(yy123Qr03.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(usWarehouse.key)); - -export default skuYy123QrGreenUs; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-yy123-qr-red-default.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-yy123-qr-red-default.spec.ts deleted file mode 100644 index 69f636580..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-yy123-qr-red-default.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuYy123QrRedDefault from './sku-yy123-qr-red-default'; - -describe(`with skuYy123QrRedDefault preset and default-warehouse channel`, () => { - it(`should return a skuYy123QrRedDefault preset`, () => { - const skuYy123QrRedDefaultPreset = - skuYy123QrRedDefault().build(); - expect(skuYy123QrRedDefaultPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "yy123-qr-red-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "yy123-qr-red", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuYy123QrRedDefault preset when built for graphql`, () => { - const skuYy123QrRedDefaultPresetGraphql = - skuYy123QrRedDefault().buildGraphql(); - expect(skuYy123QrRedDefaultPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "yy123-qr-red-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "yy123-qr-red", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-yy123-qr-red-default.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-yy123-qr-red-default.ts deleted file mode 100644 index 3e32d5c8a..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-yy123-qr-red-default.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const defaultWarehouse = ChannelDraft.presets.sampleDataB2B - .defaultWarehouse() - .build(); - -const yy123Qr01 = ProductVariantDraft.presets.sampleDataB2B - .yy123Qr01() - .build(); - -const skuYy123QrRedDefault = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${yy123Qr01.sku}-${defaultWarehouse.key}`) - .sku(yy123Qr01.sku!) - .quantityOnStock(1000) - .supplyChannel( - KeyReferenceDraft.presets.channel().key(defaultWarehouse.key) - ); - -export default skuYy123QrRedDefault; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-yy123-qr-red-eu.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-yy123-qr-red-eu.spec.ts deleted file mode 100644 index 949ab159a..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-yy123-qr-red-eu.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuYy123QrRedEu from './sku-yy123-qr-red-eu'; - -describe(`with skuYy123QrRedEu preset and eu-warehouse channel`, () => { - it(`should return a skuYy123QrRedEu preset`, () => { - const skuYy123QrRedEuPreset = - skuYy123QrRedEu().build(); - expect(skuYy123QrRedEuPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "yy123-qr-red-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "yy123-qr-red", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuYy123QrRedEu preset when built for graphql`, () => { - const skuYy123QrRedEuPresetGraphql = - skuYy123QrRedEu().buildGraphql(); - expect(skuYy123QrRedEuPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "yy123-qr-red-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "yy123-qr-red", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-yy123-qr-red-eu.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-yy123-qr-red-eu.ts deleted file mode 100644 index b8dc5e60c..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-yy123-qr-red-eu.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const euWarehouse = ChannelDraft.presets.sampleDataB2B - .euWarehouse() - .build(); - -const yy123Qr01 = ProductVariantDraft.presets.sampleDataB2B - .yy123Qr01() - .build(); - -const skuYy123QrRedEu = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${yy123Qr01.sku}-${euWarehouse.key}`) - .sku(yy123Qr01.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(euWarehouse.key)); - -export default skuYy123QrRedEu; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-yy123-qr-red-us.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-yy123-qr-red-us.spec.ts deleted file mode 100644 index e00b01a4e..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-yy123-qr-red-us.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuYy123QrRedUs from './sku-yy123-qr-red-us'; - -describe(`with skuYy123QrRedUs preset and us-warehouse channel`, () => { - it(`should return a skuYy123QrRedUs preset`, () => { - const skuYy123QrRedUsPreset = - skuYy123QrRedUs().build(); - expect(skuYy123QrRedUsPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "yy123-qr-red-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "yy123-qr-red", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuYy123QrRedUs preset when built for graphql`, () => { - const skuYy123QrRedUsPresetGraphql = - skuYy123QrRedUs().buildGraphql(); - expect(skuYy123QrRedUsPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "yy123-qr-red-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "yy123-qr-red", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-yy123-qr-red-us.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-yy123-qr-red-us.ts deleted file mode 100644 index 35822f692..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-yy123-qr-red-us.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const usWarehouse = ChannelDraft.presets.sampleDataB2B - .usWarehouse() - .build(); - -const yy123Qr01 = ProductVariantDraft.presets.sampleDataB2B - .yy123Qr01() - .build(); - -const skuYy123QrRedUs = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${yy123Qr01.sku}-${usWarehouse.key}`) - .sku(yy123Qr01.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(usWarehouse.key)); - -export default skuYy123QrRedUs; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-z-890-op-2015-default-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-z-890-op-2015-default-warehouse.spec.ts new file mode 100644 index 000000000..dbe8740f5 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-z-890-op-2015-default-warehouse.spec.ts @@ -0,0 +1,40 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuZ890Op2015DefaultWarehouse preset`, () => { + it(`should return a skuZ890Op2015DefaultWarehouse preset when built for rest`, () => { + const skuZ890Op2015DefaultWarehousePreset = InventoryEntryDraftRest.presets + .skuZ890Op2015DefaultWarehouse() + .build(); + expect(skuZ890Op2015DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuZ890Op2015DefaultWarehouse preset when built for graphql`, () => { + const skuZ890Op2015DefaultWarehousePreset = + InventoryEntryDraftGraphql.presets + .skuZ890Op2015DefaultWarehouse() + .build(); + expect(skuZ890Op2015DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuZ890Op2015DefaultWarehouse preset when built for legacy rest`, () => { + const skuZ890Op2015DefaultWarehousePreset = InventoryEntryDraft.presets + .skuZ890Op2015DefaultWarehouse() + .buildRest(); + expect(skuZ890Op2015DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuZ890Op2015DefaultWarehouse preset when built for legacy graphql`, () => { + const skuZ890Op2015DefaultWarehousePreset = InventoryEntryDraft.presets + .skuZ890Op2015DefaultWarehouse() + .buildGraphql(); + expect(skuZ890Op2015DefaultWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-z-890-op-2015-default-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-z-890-op-2015-default-warehouse.ts new file mode 100644 index 000000000..ca7b6889a --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-z-890-op-2015-default-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .defaultWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .z890Op01() + .build(); + +const skuZ890Op2015DefaultWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('z890-op-2015-default-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuZ890Op2015DefaultWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-z-890-op-2015-eu-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-z-890-op-2015-eu-warehouse.spec.ts new file mode 100644 index 000000000..2b9e85a63 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-z-890-op-2015-eu-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuZ890Op2015EuWarehouse preset`, () => { + it(`should return a skuZ890Op2015EuWarehouse preset when built for rest`, () => { + const skuZ890Op2015EuWarehousePreset = InventoryEntryDraftRest.presets + .skuZ890Op2015EuWarehouse() + .build(); + expect(skuZ890Op2015EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuZ890Op2015EuWarehouse preset when built for graphql`, () => { + const skuZ890Op2015EuWarehousePreset = InventoryEntryDraftGraphql.presets + .skuZ890Op2015EuWarehouse() + .build(); + expect(skuZ890Op2015EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuZ890Op2015EuWarehouse preset when built for legacy rest`, () => { + const skuZ890Op2015EuWarehousePreset = InventoryEntryDraft.presets + .skuZ890Op2015EuWarehouse() + .buildRest(); + expect(skuZ890Op2015EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuZ890Op2015EuWarehouse preset when built for legacy graphql`, () => { + const skuZ890Op2015EuWarehousePreset = InventoryEntryDraft.presets + .skuZ890Op2015EuWarehouse() + .buildGraphql(); + expect(skuZ890Op2015EuWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-z-890-op-2015-eu-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-z-890-op-2015-eu-warehouse.ts new file mode 100644 index 000000000..4b9fa9b16 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-z-890-op-2015-eu-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .euWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .z890Op01() + .build(); + +const skuZ890Op2015EuWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('z890-op-2015-eu-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuZ890Op2015EuWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-z-890-op-2015-us-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-z-890-op-2015-us-warehouse.spec.ts new file mode 100644 index 000000000..7ff19016a --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-z-890-op-2015-us-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuZ890Op2015UsWarehouse preset`, () => { + it(`should return a skuZ890Op2015UsWarehouse preset when built for rest`, () => { + const skuZ890Op2015UsWarehousePreset = InventoryEntryDraftRest.presets + .skuZ890Op2015UsWarehouse() + .build(); + expect(skuZ890Op2015UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuZ890Op2015UsWarehouse preset when built for graphql`, () => { + const skuZ890Op2015UsWarehousePreset = InventoryEntryDraftGraphql.presets + .skuZ890Op2015UsWarehouse() + .build(); + expect(skuZ890Op2015UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuZ890Op2015UsWarehouse preset when built for legacy rest`, () => { + const skuZ890Op2015UsWarehousePreset = InventoryEntryDraft.presets + .skuZ890Op2015UsWarehouse() + .buildRest(); + expect(skuZ890Op2015UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuZ890Op2015UsWarehouse preset when built for legacy graphql`, () => { + const skuZ890Op2015UsWarehousePreset = InventoryEntryDraft.presets + .skuZ890Op2015UsWarehouse() + .buildGraphql(); + expect(skuZ890Op2015UsWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-z-890-op-2015-us-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-z-890-op-2015-us-warehouse.ts new file mode 100644 index 000000000..92ab03f7e --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-z-890-op-2015-us-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .usWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .z890Op01() + .build(); + +const skuZ890Op2015UsWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('z890-op-2015-us-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuZ890Op2015UsWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-z-890-op-2019-default-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-z-890-op-2019-default-warehouse.spec.ts new file mode 100644 index 000000000..7148e0e7e --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-z-890-op-2019-default-warehouse.spec.ts @@ -0,0 +1,40 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuZ890Op2019DefaultWarehouse preset`, () => { + it(`should return a skuZ890Op2019DefaultWarehouse preset when built for rest`, () => { + const skuZ890Op2019DefaultWarehousePreset = InventoryEntryDraftRest.presets + .skuZ890Op2019DefaultWarehouse() + .build(); + expect(skuZ890Op2019DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuZ890Op2019DefaultWarehouse preset when built for graphql`, () => { + const skuZ890Op2019DefaultWarehousePreset = + InventoryEntryDraftGraphql.presets + .skuZ890Op2019DefaultWarehouse() + .build(); + expect(skuZ890Op2019DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuZ890Op2019DefaultWarehouse preset when built for legacy rest`, () => { + const skuZ890Op2019DefaultWarehousePreset = InventoryEntryDraft.presets + .skuZ890Op2019DefaultWarehouse() + .buildRest(); + expect(skuZ890Op2019DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuZ890Op2019DefaultWarehouse preset when built for legacy graphql`, () => { + const skuZ890Op2019DefaultWarehousePreset = InventoryEntryDraft.presets + .skuZ890Op2019DefaultWarehouse() + .buildGraphql(); + expect(skuZ890Op2019DefaultWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-z-890-op-2019-default-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-z-890-op-2019-default-warehouse.ts new file mode 100644 index 000000000..2bd4f047e --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-z-890-op-2019-default-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .defaultWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .z890Op02() + .build(); + +const skuZ890Op2019DefaultWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('z890-op-2019-default-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuZ890Op2019DefaultWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-z-890-op-2019-eu-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-z-890-op-2019-eu-warehouse.spec.ts new file mode 100644 index 000000000..298e056a8 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-z-890-op-2019-eu-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuZ890Op2019EuWarehouse preset`, () => { + it(`should return a skuZ890Op2019EuWarehouse preset when built for rest`, () => { + const skuZ890Op2019EuWarehousePreset = InventoryEntryDraftRest.presets + .skuZ890Op2019EuWarehouse() + .build(); + expect(skuZ890Op2019EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuZ890Op2019EuWarehouse preset when built for graphql`, () => { + const skuZ890Op2019EuWarehousePreset = InventoryEntryDraftGraphql.presets + .skuZ890Op2019EuWarehouse() + .build(); + expect(skuZ890Op2019EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuZ890Op2019EuWarehouse preset when built for legacy rest`, () => { + const skuZ890Op2019EuWarehousePreset = InventoryEntryDraft.presets + .skuZ890Op2019EuWarehouse() + .buildRest(); + expect(skuZ890Op2019EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuZ890Op2019EuWarehouse preset when built for legacy graphql`, () => { + const skuZ890Op2019EuWarehousePreset = InventoryEntryDraft.presets + .skuZ890Op2019EuWarehouse() + .buildGraphql(); + expect(skuZ890Op2019EuWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-z-890-op-2019-eu-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-z-890-op-2019-eu-warehouse.ts new file mode 100644 index 000000000..2b589160e --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-z-890-op-2019-eu-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .euWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .z890Op02() + .build(); + +const skuZ890Op2019EuWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('z890-op-2019-eu-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuZ890Op2019EuWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-z-890-op-2019-us-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-z-890-op-2019-us-warehouse.spec.ts new file mode 100644 index 000000000..7aa1f8495 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-z-890-op-2019-us-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuZ890Op2019UsWarehouse preset`, () => { + it(`should return a skuZ890Op2019UsWarehouse preset when built for rest`, () => { + const skuZ890Op2019UsWarehousePreset = InventoryEntryDraftRest.presets + .skuZ890Op2019UsWarehouse() + .build(); + expect(skuZ890Op2019UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuZ890Op2019UsWarehouse preset when built for graphql`, () => { + const skuZ890Op2019UsWarehousePreset = InventoryEntryDraftGraphql.presets + .skuZ890Op2019UsWarehouse() + .build(); + expect(skuZ890Op2019UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuZ890Op2019UsWarehouse preset when built for legacy rest`, () => { + const skuZ890Op2019UsWarehousePreset = InventoryEntryDraft.presets + .skuZ890Op2019UsWarehouse() + .buildRest(); + expect(skuZ890Op2019UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuZ890Op2019UsWarehouse preset when built for legacy graphql`, () => { + const skuZ890Op2019UsWarehousePreset = InventoryEntryDraft.presets + .skuZ890Op2019UsWarehouse() + .buildGraphql(); + expect(skuZ890Op2019UsWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-z-890-op-2019-us-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-z-890-op-2019-us-warehouse.ts new file mode 100644 index 000000000..4d26f11cf --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-z-890-op-2019-us-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .usWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .z890Op02() + .build(); + +const skuZ890Op2019UsWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('z890-op-2019-us-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuZ890Op2019UsWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-z-890-op-2023-default-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-z-890-op-2023-default-warehouse.spec.ts new file mode 100644 index 000000000..b69a83028 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-z-890-op-2023-default-warehouse.spec.ts @@ -0,0 +1,40 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuZ890Op2023DefaultWarehouse preset`, () => { + it(`should return a skuZ890Op2023DefaultWarehouse preset when built for rest`, () => { + const skuZ890Op2023DefaultWarehousePreset = InventoryEntryDraftRest.presets + .skuZ890Op2023DefaultWarehouse() + .build(); + expect(skuZ890Op2023DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuZ890Op2023DefaultWarehouse preset when built for graphql`, () => { + const skuZ890Op2023DefaultWarehousePreset = + InventoryEntryDraftGraphql.presets + .skuZ890Op2023DefaultWarehouse() + .build(); + expect(skuZ890Op2023DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuZ890Op2023DefaultWarehouse preset when built for legacy rest`, () => { + const skuZ890Op2023DefaultWarehousePreset = InventoryEntryDraft.presets + .skuZ890Op2023DefaultWarehouse() + .buildRest(); + expect(skuZ890Op2023DefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuZ890Op2023DefaultWarehouse preset when built for legacy graphql`, () => { + const skuZ890Op2023DefaultWarehousePreset = InventoryEntryDraft.presets + .skuZ890Op2023DefaultWarehouse() + .buildGraphql(); + expect(skuZ890Op2023DefaultWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-z-890-op-2023-default-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-z-890-op-2023-default-warehouse.ts new file mode 100644 index 000000000..68e60fc9a --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-z-890-op-2023-default-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .defaultWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .z890Op03() + .build(); + +const skuZ890Op2023DefaultWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('z890-op-2023-default-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuZ890Op2023DefaultWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-z-890-op-2023-eu-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-z-890-op-2023-eu-warehouse.spec.ts new file mode 100644 index 000000000..56a844a96 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-z-890-op-2023-eu-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuZ890Op2023EuWarehouse preset`, () => { + it(`should return a skuZ890Op2023EuWarehouse preset when built for rest`, () => { + const skuZ890Op2023EuWarehousePreset = InventoryEntryDraftRest.presets + .skuZ890Op2023EuWarehouse() + .build(); + expect(skuZ890Op2023EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuZ890Op2023EuWarehouse preset when built for graphql`, () => { + const skuZ890Op2023EuWarehousePreset = InventoryEntryDraftGraphql.presets + .skuZ890Op2023EuWarehouse() + .build(); + expect(skuZ890Op2023EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuZ890Op2023EuWarehouse preset when built for legacy rest`, () => { + const skuZ890Op2023EuWarehousePreset = InventoryEntryDraft.presets + .skuZ890Op2023EuWarehouse() + .buildRest(); + expect(skuZ890Op2023EuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuZ890Op2023EuWarehouse preset when built for legacy graphql`, () => { + const skuZ890Op2023EuWarehousePreset = InventoryEntryDraft.presets + .skuZ890Op2023EuWarehouse() + .buildGraphql(); + expect(skuZ890Op2023EuWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-z-890-op-2023-eu-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-z-890-op-2023-eu-warehouse.ts new file mode 100644 index 000000000..713c37bc7 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-z-890-op-2023-eu-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .euWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .z890Op03() + .build(); + +const skuZ890Op2023EuWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('z890-op-2023-eu-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuZ890Op2023EuWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-z-890-op-2023-us-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-z-890-op-2023-us-warehouse.spec.ts new file mode 100644 index 000000000..9287b8866 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-z-890-op-2023-us-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuZ890Op2023UsWarehouse preset`, () => { + it(`should return a skuZ890Op2023UsWarehouse preset when built for rest`, () => { + const skuZ890Op2023UsWarehousePreset = InventoryEntryDraftRest.presets + .skuZ890Op2023UsWarehouse() + .build(); + expect(skuZ890Op2023UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuZ890Op2023UsWarehouse preset when built for graphql`, () => { + const skuZ890Op2023UsWarehousePreset = InventoryEntryDraftGraphql.presets + .skuZ890Op2023UsWarehouse() + .build(); + expect(skuZ890Op2023UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuZ890Op2023UsWarehouse preset when built for legacy rest`, () => { + const skuZ890Op2023UsWarehousePreset = InventoryEntryDraft.presets + .skuZ890Op2023UsWarehouse() + .buildRest(); + expect(skuZ890Op2023UsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuZ890Op2023UsWarehouse preset when built for legacy graphql`, () => { + const skuZ890Op2023UsWarehousePreset = InventoryEntryDraft.presets + .skuZ890Op2023UsWarehouse() + .buildGraphql(); + expect(skuZ890Op2023UsWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-z-890-op-2023-us-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-z-890-op-2023-us-warehouse.ts new file mode 100644 index 000000000..0646a3ae9 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-z-890-op-2023-us-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .usWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .z890Op03() + .build(); + +const skuZ890Op2023UsWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('z890-op-2023-us-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuZ890Op2023UsWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-z890-op-2015-default.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-z890-op-2015-default.spec.ts deleted file mode 100644 index 706825627..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-z890-op-2015-default.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuZ890Op2015Default from './sku-z890-op-2015-default'; - -describe(`with skuZ890Op2015Default preset and default-warehouse channel`, () => { - it(`should return a skuZ890Op2015Default preset`, () => { - const skuZ890Op2015DefaultPreset = - skuZ890Op2015Default().build(); - expect(skuZ890Op2015DefaultPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "z890-op-2015-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "z890-op-2015", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuZ890Op2015Default preset when built for graphql`, () => { - const skuZ890Op2015DefaultPresetGraphql = - skuZ890Op2015Default().buildGraphql(); - expect(skuZ890Op2015DefaultPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "z890-op-2015-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "z890-op-2015", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-z890-op-2015-default.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-z890-op-2015-default.ts deleted file mode 100644 index a96e3538d..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-z890-op-2015-default.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const defaultWarehouse = ChannelDraft.presets.sampleDataB2B - .defaultWarehouse() - .build(); - -const z890Op01 = ProductVariantDraft.presets.sampleDataB2B - .z890Op01() - .build(); - -const skuZ890Op2015Default = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${z890Op01.sku}-${defaultWarehouse.key}`) - .sku(z890Op01.sku!) - .quantityOnStock(1000) - .supplyChannel( - KeyReferenceDraft.presets.channel().key(defaultWarehouse.key) - ); - -export default skuZ890Op2015Default; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-z890-op-2015-eu.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-z890-op-2015-eu.spec.ts deleted file mode 100644 index 99323479c..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-z890-op-2015-eu.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuZ890Op2015Eu from './sku-z890-op-2015-eu'; - -describe(`with skuZ890Op2015Eu preset and eu-warehouse channel`, () => { - it(`should return a skuZ890Op2015Eu preset`, () => { - const skuZ890Op2015EuPreset = - skuZ890Op2015Eu().build(); - expect(skuZ890Op2015EuPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "z890-op-2015-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "z890-op-2015", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuZ890Op2015Eu preset when built for graphql`, () => { - const skuZ890Op2015EuPresetGraphql = - skuZ890Op2015Eu().buildGraphql(); - expect(skuZ890Op2015EuPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "z890-op-2015-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "z890-op-2015", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-z890-op-2015-eu.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-z890-op-2015-eu.ts deleted file mode 100644 index 8ef076377..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-z890-op-2015-eu.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const euWarehouse = ChannelDraft.presets.sampleDataB2B - .euWarehouse() - .build(); - -const z890Op01 = ProductVariantDraft.presets.sampleDataB2B - .z890Op01() - .build(); - -const skuZ890Op2015Eu = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${z890Op01.sku}-${euWarehouse.key}`) - .sku(z890Op01.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(euWarehouse.key)); - -export default skuZ890Op2015Eu; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-z890-op-2015-us.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-z890-op-2015-us.spec.ts deleted file mode 100644 index 000442b26..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-z890-op-2015-us.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuZ890Op2015Us from './sku-z890-op-2015-us'; - -describe(`with skuZ890Op2015Us preset and us-warehouse channel`, () => { - it(`should return a skuZ890Op2015Us preset`, () => { - const skuZ890Op2015UsPreset = - skuZ890Op2015Us().build(); - expect(skuZ890Op2015UsPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "z890-op-2015-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "z890-op-2015", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuZ890Op2015Us preset when built for graphql`, () => { - const skuZ890Op2015UsPresetGraphql = - skuZ890Op2015Us().buildGraphql(); - expect(skuZ890Op2015UsPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "z890-op-2015-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "z890-op-2015", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-z890-op-2015-us.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-z890-op-2015-us.ts deleted file mode 100644 index f0cfa0664..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-z890-op-2015-us.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const usWarehouse = ChannelDraft.presets.sampleDataB2B - .usWarehouse() - .build(); - -const z890Op01 = ProductVariantDraft.presets.sampleDataB2B - .z890Op01() - .build(); - -const skuZ890Op2015Us = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${z890Op01.sku}-${usWarehouse.key}`) - .sku(z890Op01.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(usWarehouse.key)); - -export default skuZ890Op2015Us; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-z890-op-2019-default.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-z890-op-2019-default.spec.ts deleted file mode 100644 index cf4bb54d5..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-z890-op-2019-default.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuZ890Op2019Default from './sku-z890-op-2019-default'; - -describe(`with skuZ890Op2019Default preset and default-warehouse channel`, () => { - it(`should return a skuZ890Op2019Default preset`, () => { - const skuZ890Op2019DefaultPreset = - skuZ890Op2019Default().build(); - expect(skuZ890Op2019DefaultPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "z890-op-2019-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "z890-op-2019", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuZ890Op2019Default preset when built for graphql`, () => { - const skuZ890Op2019DefaultPresetGraphql = - skuZ890Op2019Default().buildGraphql(); - expect(skuZ890Op2019DefaultPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "z890-op-2019-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "z890-op-2019", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-z890-op-2019-default.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-z890-op-2019-default.ts deleted file mode 100644 index 56ffcaee9..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-z890-op-2019-default.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const defaultWarehouse = ChannelDraft.presets.sampleDataB2B - .defaultWarehouse() - .build(); - -const z890Op02 = ProductVariantDraft.presets.sampleDataB2B - .z890Op02() - .build(); - -const skuZ890Op2019Default = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${z890Op02.sku}-${defaultWarehouse.key}`) - .sku(z890Op02.sku!) - .quantityOnStock(1000) - .supplyChannel( - KeyReferenceDraft.presets.channel().key(defaultWarehouse.key) - ); - -export default skuZ890Op2019Default; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-z890-op-2019-eu.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-z890-op-2019-eu.spec.ts deleted file mode 100644 index 564b4114d..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-z890-op-2019-eu.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuZ890Op2019Eu from './sku-z890-op-2019-eu'; - -describe(`with skuZ890Op2019Eu preset and eu-warehouse channel`, () => { - it(`should return a skuZ890Op2019Eu preset`, () => { - const skuZ890Op2019EuPreset = - skuZ890Op2019Eu().build(); - expect(skuZ890Op2019EuPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "z890-op-2019-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "z890-op-2019", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuZ890Op2019Eu preset when built for graphql`, () => { - const skuZ890Op2019EuPresetGraphql = - skuZ890Op2019Eu().buildGraphql(); - expect(skuZ890Op2019EuPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "z890-op-2019-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "z890-op-2019", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-z890-op-2019-eu.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-z890-op-2019-eu.ts deleted file mode 100644 index c185586d8..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-z890-op-2019-eu.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const euWarehouse = ChannelDraft.presets.sampleDataB2B - .euWarehouse() - .build(); - -const z890Op02 = ProductVariantDraft.presets.sampleDataB2B - .z890Op02() - .build(); - -const skuZ890Op2019Eu = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${z890Op02.sku}-${euWarehouse.key}`) - .sku(z890Op02.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(euWarehouse.key)); - -export default skuZ890Op2019Eu; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-z890-op-2019-us.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-z890-op-2019-us.spec.ts deleted file mode 100644 index 3a3150821..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-z890-op-2019-us.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuZ890Op2019Us from './sku-z890-op-2019-us'; - -describe(`with skuZ890Op2019Us preset and us-warehouse channel`, () => { - it(`should return a skuZ890Op2019Us preset`, () => { - const skuZ890Op2019UsPreset = - skuZ890Op2019Us().build(); - expect(skuZ890Op2019UsPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "z890-op-2019-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "z890-op-2019", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuZ890Op2019Us preset when built for graphql`, () => { - const skuZ890Op2019UsPresetGraphql = - skuZ890Op2019Us().buildGraphql(); - expect(skuZ890Op2019UsPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "z890-op-2019-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "z890-op-2019", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-z890-op-2019-us.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-z890-op-2019-us.ts deleted file mode 100644 index cc6ea8c4e..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-z890-op-2019-us.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const usWarehouse = ChannelDraft.presets.sampleDataB2B - .usWarehouse() - .build(); - -const z890Op02 = ProductVariantDraft.presets.sampleDataB2B - .z890Op02() - .build(); - -const skuZ890Op2019Us = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${z890Op02.sku}-${usWarehouse.key}`) - .sku(z890Op02.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(usWarehouse.key)); - -export default skuZ890Op2019Us; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-z890-op-2023-default.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-z890-op-2023-default.spec.ts deleted file mode 100644 index b126a1d92..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-z890-op-2023-default.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuZ890Op2023Default from './sku-z890-op-2023-default'; - -describe(`with skuZ890Op2023Default preset and default-warehouse channel`, () => { - it(`should return a skuZ890Op2023Default preset`, () => { - const skuZ890Op2023DefaultPreset = - skuZ890Op2023Default().build(); - expect(skuZ890Op2023DefaultPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "z890-op-2023-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "z890-op-2023", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuZ890Op2023Default preset when built for graphql`, () => { - const skuZ890Op2023DefaultPresetGraphql = - skuZ890Op2023Default().buildGraphql(); - expect(skuZ890Op2023DefaultPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "z890-op-2023-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "z890-op-2023", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-z890-op-2023-default.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-z890-op-2023-default.ts deleted file mode 100644 index 108161e23..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-z890-op-2023-default.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const defaultWarehouse = ChannelDraft.presets.sampleDataB2B - .defaultWarehouse() - .build(); - -const z890Op03 = ProductVariantDraft.presets.sampleDataB2B - .z890Op03() - .build(); - -const skuZ890Op2023Default = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${z890Op03.sku}-${defaultWarehouse.key}`) - .sku(z890Op03.sku!) - .quantityOnStock(1000) - .supplyChannel( - KeyReferenceDraft.presets.channel().key(defaultWarehouse.key) - ); - -export default skuZ890Op2023Default; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-z890-op-2023-eu.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-z890-op-2023-eu.spec.ts deleted file mode 100644 index 95d7a9fe4..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-z890-op-2023-eu.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuZ890Op2023Eu from './sku-z890-op-2023-eu'; - -describe(`with skuZ890Op2023Eu preset and eu-warehouse channel`, () => { - it(`should return a skuZ890Op2023Eu preset`, () => { - const skuZ890Op2023EuPreset = - skuZ890Op2023Eu().build(); - expect(skuZ890Op2023EuPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "z890-op-2023-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "z890-op-2023", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuZ890Op2023Eu preset when built for graphql`, () => { - const skuZ890Op2023EuPresetGraphql = - skuZ890Op2023Eu().buildGraphql(); - expect(skuZ890Op2023EuPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "z890-op-2023-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "z890-op-2023", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-z890-op-2023-eu.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-z890-op-2023-eu.ts deleted file mode 100644 index bf470b69a..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-z890-op-2023-eu.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const euWarehouse = ChannelDraft.presets.sampleDataB2B - .euWarehouse() - .build(); - -const z890Op03 = ProductVariantDraft.presets.sampleDataB2B - .z890Op03() - .build(); - -const skuZ890Op2023Eu = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${z890Op03.sku}-${euWarehouse.key}`) - .sku(z890Op03.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(euWarehouse.key)); - -export default skuZ890Op2023Eu; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-z890-op-2023-us.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-z890-op-2023-us.spec.ts deleted file mode 100644 index 89720a087..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-z890-op-2023-us.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuZ890Op2023Us from './sku-z890-op-2023-us'; - -describe(`with skuZ890Op2023Us preset and us-warehouse channel`, () => { - it(`should return a skuZ890Op2023Us preset`, () => { - const skuZ890Op2023UsPreset = - skuZ890Op2023Us().build(); - expect(skuZ890Op2023UsPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "z890-op-2023-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "z890-op-2023", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuZ890Op2023Us preset when built for graphql`, () => { - const skuZ890Op2023UsPresetGraphql = - skuZ890Op2023Us().buildGraphql(); - expect(skuZ890Op2023UsPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "z890-op-2023-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "z890-op-2023", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-z890-op-2023-us.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-z890-op-2023-us.ts deleted file mode 100644 index 25ba94377..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-z890-op-2023-us.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const usWarehouse = ChannelDraft.presets.sampleDataB2B - .usWarehouse() - .build(); - -const z890Op03 = ProductVariantDraft.presets.sampleDataB2B - .z890Op03() - .build(); - -const skuZ890Op2023Us = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${z890Op03.sku}-${usWarehouse.key}`) - .sku(z890Op03.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(usWarehouse.key)); - -export default skuZ890Op2023Us; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-zz-456-st-blue-default-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-zz-456-st-blue-default-warehouse.spec.ts new file mode 100644 index 000000000..9a948f8db --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-zz-456-st-blue-default-warehouse.spec.ts @@ -0,0 +1,40 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuZz456StBlueDefaultWarehouse preset`, () => { + it(`should return a skuZz456StBlueDefaultWarehouse preset when built for rest`, () => { + const skuZz456StBlueDefaultWarehousePreset = InventoryEntryDraftRest.presets + .skuZz456StBlueDefaultWarehouse() + .build(); + expect(skuZz456StBlueDefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuZz456StBlueDefaultWarehouse preset when built for graphql`, () => { + const skuZz456StBlueDefaultWarehousePreset = + InventoryEntryDraftGraphql.presets + .skuZz456StBlueDefaultWarehouse() + .build(); + expect(skuZz456StBlueDefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuZz456StBlueDefaultWarehouse preset when built for legacy rest`, () => { + const skuZz456StBlueDefaultWarehousePreset = InventoryEntryDraft.presets + .skuZz456StBlueDefaultWarehouse() + .buildRest(); + expect(skuZz456StBlueDefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuZz456StBlueDefaultWarehouse preset when built for legacy graphql`, () => { + const skuZz456StBlueDefaultWarehousePreset = InventoryEntryDraft.presets + .skuZz456StBlueDefaultWarehouse() + .buildGraphql(); + expect(skuZz456StBlueDefaultWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-zz-456-st-blue-default-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-zz-456-st-blue-default-warehouse.ts new file mode 100644 index 000000000..35a937ecb --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-zz-456-st-blue-default-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .defaultWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .zz456St02() + .build(); + +const skuZz456StBlueDefaultWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('zz456-st-blue-default-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuZz456StBlueDefaultWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-zz-456-st-blue-eu-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-zz-456-st-blue-eu-warehouse.spec.ts new file mode 100644 index 000000000..e34a2b3dd --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-zz-456-st-blue-eu-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuZz456StBlueEuWarehouse preset`, () => { + it(`should return a skuZz456StBlueEuWarehouse preset when built for rest`, () => { + const skuZz456StBlueEuWarehousePreset = InventoryEntryDraftRest.presets + .skuZz456StBlueEuWarehouse() + .build(); + expect(skuZz456StBlueEuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuZz456StBlueEuWarehouse preset when built for graphql`, () => { + const skuZz456StBlueEuWarehousePreset = InventoryEntryDraftGraphql.presets + .skuZz456StBlueEuWarehouse() + .build(); + expect(skuZz456StBlueEuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuZz456StBlueEuWarehouse preset when built for legacy rest`, () => { + const skuZz456StBlueEuWarehousePreset = InventoryEntryDraft.presets + .skuZz456StBlueEuWarehouse() + .buildRest(); + expect(skuZz456StBlueEuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuZz456StBlueEuWarehouse preset when built for legacy graphql`, () => { + const skuZz456StBlueEuWarehousePreset = InventoryEntryDraft.presets + .skuZz456StBlueEuWarehouse() + .buildGraphql(); + expect(skuZz456StBlueEuWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-zz-456-st-blue-eu-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-zz-456-st-blue-eu-warehouse.ts new file mode 100644 index 000000000..1cf894808 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-zz-456-st-blue-eu-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .euWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .zz456St02() + .build(); + +const skuZz456StBlueEuWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('zz456-st-blue-eu-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuZz456StBlueEuWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-zz-456-st-blue-us-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-zz-456-st-blue-us-warehouse.spec.ts new file mode 100644 index 000000000..5f45b1174 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-zz-456-st-blue-us-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuZz456StBlueUsWarehouse preset`, () => { + it(`should return a skuZz456StBlueUsWarehouse preset when built for rest`, () => { + const skuZz456StBlueUsWarehousePreset = InventoryEntryDraftRest.presets + .skuZz456StBlueUsWarehouse() + .build(); + expect(skuZz456StBlueUsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuZz456StBlueUsWarehouse preset when built for graphql`, () => { + const skuZz456StBlueUsWarehousePreset = InventoryEntryDraftGraphql.presets + .skuZz456StBlueUsWarehouse() + .build(); + expect(skuZz456StBlueUsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuZz456StBlueUsWarehouse preset when built for legacy rest`, () => { + const skuZz456StBlueUsWarehousePreset = InventoryEntryDraft.presets + .skuZz456StBlueUsWarehouse() + .buildRest(); + expect(skuZz456StBlueUsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuZz456StBlueUsWarehouse preset when built for legacy graphql`, () => { + const skuZz456StBlueUsWarehousePreset = InventoryEntryDraft.presets + .skuZz456StBlueUsWarehouse() + .buildGraphql(); + expect(skuZz456StBlueUsWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-zz-456-st-blue-us-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-zz-456-st-blue-us-warehouse.ts new file mode 100644 index 000000000..8013cd4dc --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-zz-456-st-blue-us-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .usWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .zz456St02() + .build(); + +const skuZz456StBlueUsWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('zz456-st-blue-us-warehouse') + .sku(variant.sku!) + .quantityOnStock(999) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuZz456StBlueUsWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-zz-456-st-green-default-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-zz-456-st-green-default-warehouse.spec.ts new file mode 100644 index 000000000..395964026 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-zz-456-st-green-default-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuZz456StGreenDefaultWarehouse preset`, () => { + it(`should return a skuZz456StGreenDefaultWarehouse preset when built for rest`, () => { + const skuZz456StGreenDefaultWarehousePreset = + InventoryEntryDraftRest.presets.skuZz456StGreenDefaultWarehouse().build(); + expect(skuZz456StGreenDefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuZz456StGreenDefaultWarehouse preset when built for graphql`, () => { + const skuZz456StGreenDefaultWarehousePreset = + InventoryEntryDraftGraphql.presets + .skuZz456StGreenDefaultWarehouse() + .build(); + expect(skuZz456StGreenDefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuZz456StGreenDefaultWarehouse preset when built for legacy rest`, () => { + const skuZz456StGreenDefaultWarehousePreset = InventoryEntryDraft.presets + .skuZz456StGreenDefaultWarehouse() + .buildRest(); + expect(skuZz456StGreenDefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuZz456StGreenDefaultWarehouse preset when built for legacy graphql`, () => { + const skuZz456StGreenDefaultWarehousePreset = InventoryEntryDraft.presets + .skuZz456StGreenDefaultWarehouse() + .buildGraphql(); + expect(skuZz456StGreenDefaultWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-zz-456-st-green-default-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-zz-456-st-green-default-warehouse.ts new file mode 100644 index 000000000..19d084116 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-zz-456-st-green-default-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .defaultWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .zz456St03() + .build(); + +const skuZz456StGreenDefaultWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('zz456-st-green-default-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuZz456StGreenDefaultWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-zz-456-st-green-eu-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-zz-456-st-green-eu-warehouse.spec.ts new file mode 100644 index 000000000..6d1e8bf50 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-zz-456-st-green-eu-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuZz456StGreenEuWarehouse preset`, () => { + it(`should return a skuZz456StGreenEuWarehouse preset when built for rest`, () => { + const skuZz456StGreenEuWarehousePreset = InventoryEntryDraftRest.presets + .skuZz456StGreenEuWarehouse() + .build(); + expect(skuZz456StGreenEuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuZz456StGreenEuWarehouse preset when built for graphql`, () => { + const skuZz456StGreenEuWarehousePreset = InventoryEntryDraftGraphql.presets + .skuZz456StGreenEuWarehouse() + .build(); + expect(skuZz456StGreenEuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuZz456StGreenEuWarehouse preset when built for legacy rest`, () => { + const skuZz456StGreenEuWarehousePreset = InventoryEntryDraft.presets + .skuZz456StGreenEuWarehouse() + .buildRest(); + expect(skuZz456StGreenEuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuZz456StGreenEuWarehouse preset when built for legacy graphql`, () => { + const skuZz456StGreenEuWarehousePreset = InventoryEntryDraft.presets + .skuZz456StGreenEuWarehouse() + .buildGraphql(); + expect(skuZz456StGreenEuWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-zz-456-st-green-eu-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-zz-456-st-green-eu-warehouse.ts new file mode 100644 index 000000000..38e0f038b --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-zz-456-st-green-eu-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .euWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .zz456St03() + .build(); + +const skuZz456StGreenEuWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('zz456-st-green-eu-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuZz456StGreenEuWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-zz-456-st-green-us-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-zz-456-st-green-us-warehouse.spec.ts new file mode 100644 index 000000000..9c0d98d2e --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-zz-456-st-green-us-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuZz456StGreenUsWarehouse preset`, () => { + it(`should return a skuZz456StGreenUsWarehouse preset when built for rest`, () => { + const skuZz456StGreenUsWarehousePreset = InventoryEntryDraftRest.presets + .skuZz456StGreenUsWarehouse() + .build(); + expect(skuZz456StGreenUsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuZz456StGreenUsWarehouse preset when built for graphql`, () => { + const skuZz456StGreenUsWarehousePreset = InventoryEntryDraftGraphql.presets + .skuZz456StGreenUsWarehouse() + .build(); + expect(skuZz456StGreenUsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuZz456StGreenUsWarehouse preset when built for legacy rest`, () => { + const skuZz456StGreenUsWarehousePreset = InventoryEntryDraft.presets + .skuZz456StGreenUsWarehouse() + .buildRest(); + expect(skuZz456StGreenUsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuZz456StGreenUsWarehouse preset when built for legacy graphql`, () => { + const skuZz456StGreenUsWarehousePreset = InventoryEntryDraft.presets + .skuZz456StGreenUsWarehouse() + .buildGraphql(); + expect(skuZz456StGreenUsWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-zz-456-st-green-us-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-zz-456-st-green-us-warehouse.ts new file mode 100644 index 000000000..420a7d6d7 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-zz-456-st-green-us-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .usWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .zz456St03() + .build(); + +const skuZz456StGreenUsWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('zz456-st-green-us-warehouse') + .sku(variant.sku!) + .quantityOnStock(999) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuZz456StGreenUsWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-zz-456-st-red-default-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-zz-456-st-red-default-warehouse.spec.ts new file mode 100644 index 000000000..c81d2645f --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-zz-456-st-red-default-warehouse.spec.ts @@ -0,0 +1,40 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuZz456StRedDefaultWarehouse preset`, () => { + it(`should return a skuZz456StRedDefaultWarehouse preset when built for rest`, () => { + const skuZz456StRedDefaultWarehousePreset = InventoryEntryDraftRest.presets + .skuZz456StRedDefaultWarehouse() + .build(); + expect(skuZz456StRedDefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuZz456StRedDefaultWarehouse preset when built for graphql`, () => { + const skuZz456StRedDefaultWarehousePreset = + InventoryEntryDraftGraphql.presets + .skuZz456StRedDefaultWarehouse() + .build(); + expect(skuZz456StRedDefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuZz456StRedDefaultWarehouse preset when built for legacy rest`, () => { + const skuZz456StRedDefaultWarehousePreset = InventoryEntryDraft.presets + .skuZz456StRedDefaultWarehouse() + .buildRest(); + expect(skuZz456StRedDefaultWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuZz456StRedDefaultWarehouse preset when built for legacy graphql`, () => { + const skuZz456StRedDefaultWarehousePreset = InventoryEntryDraft.presets + .skuZz456StRedDefaultWarehouse() + .buildGraphql(); + expect(skuZz456StRedDefaultWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-zz-456-st-red-default-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-zz-456-st-red-default-warehouse.ts new file mode 100644 index 000000000..451062c85 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-zz-456-st-red-default-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .defaultWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .zz456St01() + .build(); + +const skuZz456StRedDefaultWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('zz456-st-red-default-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuZz456StRedDefaultWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-zz-456-st-red-eu-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-zz-456-st-red-eu-warehouse.spec.ts new file mode 100644 index 000000000..17a4f1174 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-zz-456-st-red-eu-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuZz456StRedEuWarehouse preset`, () => { + it(`should return a skuZz456StRedEuWarehouse preset when built for rest`, () => { + const skuZz456StRedEuWarehousePreset = InventoryEntryDraftRest.presets + .skuZz456StRedEuWarehouse() + .build(); + expect(skuZz456StRedEuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuZz456StRedEuWarehouse preset when built for graphql`, () => { + const skuZz456StRedEuWarehousePreset = InventoryEntryDraftGraphql.presets + .skuZz456StRedEuWarehouse() + .build(); + expect(skuZz456StRedEuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuZz456StRedEuWarehouse preset when built for legacy rest`, () => { + const skuZz456StRedEuWarehousePreset = InventoryEntryDraft.presets + .skuZz456StRedEuWarehouse() + .buildRest(); + expect(skuZz456StRedEuWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuZz456StRedEuWarehouse preset when built for legacy graphql`, () => { + const skuZz456StRedEuWarehousePreset = InventoryEntryDraft.presets + .skuZz456StRedEuWarehouse() + .buildGraphql(); + expect(skuZz456StRedEuWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-zz-456-st-red-eu-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-zz-456-st-red-eu-warehouse.ts new file mode 100644 index 000000000..8a188faac --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-zz-456-st-red-eu-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .euWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .zz456St01() + .build(); + +const skuZz456StRedEuWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('zz456-st-red-eu-warehouse') + .sku(variant.sku!) + .quantityOnStock(1000) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuZz456StRedEuWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-zz-456-st-red-us-warehouse.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-zz-456-st-red-us-warehouse.spec.ts new file mode 100644 index 000000000..0b1e7919f --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-zz-456-st-red-us-warehouse.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuZz456StRedUsWarehouse preset`, () => { + it(`should return a skuZz456StRedUsWarehouse preset when built for rest`, () => { + const skuZz456StRedUsWarehousePreset = InventoryEntryDraftRest.presets + .skuZz456StRedUsWarehouse() + .build(); + expect(skuZz456StRedUsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuZz456StRedUsWarehouse preset when built for graphql`, () => { + const skuZz456StRedUsWarehousePreset = InventoryEntryDraftGraphql.presets + .skuZz456StRedUsWarehouse() + .build(); + expect(skuZz456StRedUsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuZz456StRedUsWarehouse preset when built for legacy rest`, () => { + const skuZz456StRedUsWarehousePreset = InventoryEntryDraft.presets + .skuZz456StRedUsWarehouse() + .buildRest(); + expect(skuZz456StRedUsWarehousePreset).toMatchInlineSnapshot(); + }); + + it(`should return a skuZz456StRedUsWarehouse preset when built for legacy graphql`, () => { + const skuZz456StRedUsWarehousePreset = InventoryEntryDraft.presets + .skuZz456StRedUsWarehouse() + .buildGraphql(); + expect(skuZz456StRedUsWarehousePreset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-zz-456-st-red-us-warehouse.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-zz-456-st-red-us-warehouse.ts new file mode 100644 index 000000000..915976b47 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-zz-456-st-red-us-warehouse.ts @@ -0,0 +1,28 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .usWarehouse() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .zz456St01() + .build(); + +const skuZz456StRedUsWarehouse = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .key('zz456-st-red-us-warehouse') + .sku(variant.sku!) + .quantityOnStock(999) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuZz456StRedUsWarehouse; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-zz456-st-blue-default.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-zz456-st-blue-default.spec.ts deleted file mode 100644 index cb6b12a3b..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-zz456-st-blue-default.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuZz456StBlueDefault from './sku-zz456-st-blue-default'; - -describe(`with skuZz456StBlueDefault preset and default-warehouse channel`, () => { - it(`should return a skuZz456StBlueDefault preset`, () => { - const skuZz456StBlueDefaultPreset = - skuZz456StBlueDefault().build(); - expect(skuZz456StBlueDefaultPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "zz456-st-blue-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "zz456-st-blue", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuZz456StBlueDefault preset when built for graphql`, () => { - const skuZz456StBlueDefaultPresetGraphql = - skuZz456StBlueDefault().buildGraphql(); - expect(skuZz456StBlueDefaultPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "zz456-st-blue-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "zz456-st-blue", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-zz456-st-blue-default.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-zz456-st-blue-default.ts deleted file mode 100644 index 83cc5268d..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-zz456-st-blue-default.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const defaultWarehouse = ChannelDraft.presets.sampleDataB2B - .defaultWarehouse() - .build(); - -const zz456St02 = ProductVariantDraft.presets.sampleDataB2B - .zz456St02() - .build(); - -const skuZz456StBlueDefault = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${zz456St02.sku}-${defaultWarehouse.key}`) - .sku(zz456St02.sku!) - .quantityOnStock(1000) - .supplyChannel( - KeyReferenceDraft.presets.channel().key(defaultWarehouse.key) - ); - -export default skuZz456StBlueDefault; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-zz456-st-blue-eu.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-zz456-st-blue-eu.spec.ts deleted file mode 100644 index 91d0de0f0..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-zz456-st-blue-eu.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuZz456StBlueEu from './sku-zz456-st-blue-eu'; - -describe(`with skuZz456StBlueEu preset and eu-warehouse channel`, () => { - it(`should return a skuZz456StBlueEu preset`, () => { - const skuZz456StBlueEuPreset = - skuZz456StBlueEu().build(); - expect(skuZz456StBlueEuPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "zz456-st-blue-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "zz456-st-blue", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuZz456StBlueEu preset when built for graphql`, () => { - const skuZz456StBlueEuPresetGraphql = - skuZz456StBlueEu().buildGraphql(); - expect(skuZz456StBlueEuPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "zz456-st-blue-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "zz456-st-blue", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-zz456-st-blue-eu.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-zz456-st-blue-eu.ts deleted file mode 100644 index f2e9abdfd..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-zz456-st-blue-eu.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const euWarehouse = ChannelDraft.presets.sampleDataB2B - .euWarehouse() - .build(); - -const zz456St02 = ProductVariantDraft.presets.sampleDataB2B - .zz456St02() - .build(); - -const skuZz456StBlueEu = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${zz456St02.sku}-${euWarehouse.key}`) - .sku(zz456St02.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(euWarehouse.key)); - -export default skuZz456StBlueEu; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-zz456-st-blue-us.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-zz456-st-blue-us.spec.ts deleted file mode 100644 index 13421f7ef..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-zz456-st-blue-us.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuZz456StBlueUs from './sku-zz456-st-blue-us'; - -describe(`with skuZz456StBlueUs preset and us-warehouse channel`, () => { - it(`should return a skuZz456StBlueUs preset`, () => { - const skuZz456StBlueUsPreset = - skuZz456StBlueUs().build(); - expect(skuZz456StBlueUsPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "zz456-st-blue-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "zz456-st-blue", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuZz456StBlueUs preset when built for graphql`, () => { - const skuZz456StBlueUsPresetGraphql = - skuZz456StBlueUs().buildGraphql(); - expect(skuZz456StBlueUsPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "zz456-st-blue-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "zz456-st-blue", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-zz456-st-blue-us.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-zz456-st-blue-us.ts deleted file mode 100644 index 928d8dfb7..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-zz456-st-blue-us.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const usWarehouse = ChannelDraft.presets.sampleDataB2B - .usWarehouse() - .build(); - -const zz456St02 = ProductVariantDraft.presets.sampleDataB2B - .zz456St02() - .build(); - -const skuZz456StBlueUs = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${zz456St02.sku}-${usWarehouse.key}`) - .sku(zz456St02.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(usWarehouse.key)); - -export default skuZz456StBlueUs; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-zz456-st-green-default.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-zz456-st-green-default.spec.ts deleted file mode 100644 index 1081afb4c..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-zz456-st-green-default.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuZz456StGreenDefault from './sku-zz456-st-green-default'; - -describe(`with skuZz456StGreenDefault preset and default-warehouse channel`, () => { - it(`should return a skuZz456StGreenDefault preset`, () => { - const skuZz456StGreenDefaultPreset = - skuZz456StGreenDefault().build(); - expect(skuZz456StGreenDefaultPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "zz456-st-green-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "zz456-st-green", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuZz456StGreenDefault preset when built for graphql`, () => { - const skuZz456StGreenDefaultPresetGraphql = - skuZz456StGreenDefault().buildGraphql(); - expect(skuZz456StGreenDefaultPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "zz456-st-green-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "zz456-st-green", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-zz456-st-green-default.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-zz456-st-green-default.ts deleted file mode 100644 index ff4604f23..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-zz456-st-green-default.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const defaultWarehouse = ChannelDraft.presets.sampleDataB2B - .defaultWarehouse() - .build(); - -const zz456St03 = ProductVariantDraft.presets.sampleDataB2B - .zz456St03() - .build(); - -const skuZz456StGreenDefault = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${zz456St03.sku}-${defaultWarehouse.key}`) - .sku(zz456St03.sku!) - .quantityOnStock(1000) - .supplyChannel( - KeyReferenceDraft.presets.channel().key(defaultWarehouse.key) - ); - -export default skuZz456StGreenDefault; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-zz456-st-green-eu.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-zz456-st-green-eu.spec.ts deleted file mode 100644 index e81be51bf..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-zz456-st-green-eu.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuZz456StGreenEu from './sku-zz456-st-green-eu'; - -describe(`with skuZz456StGreenEu preset and eu-warehouse channel`, () => { - it(`should return a skuZz456StGreenEu preset`, () => { - const skuZz456StGreenEuPreset = - skuZz456StGreenEu().build(); - expect(skuZz456StGreenEuPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "zz456-st-green-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "zz456-st-green", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuZz456StGreenEu preset when built for graphql`, () => { - const skuZz456StGreenEuPresetGraphql = - skuZz456StGreenEu().buildGraphql(); - expect(skuZz456StGreenEuPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "zz456-st-green-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "zz456-st-green", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-zz456-st-green-eu.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-zz456-st-green-eu.ts deleted file mode 100644 index 5b78d3706..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-zz456-st-green-eu.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const euWarehouse = ChannelDraft.presets.sampleDataB2B - .euWarehouse() - .build(); - -const zz456St03 = ProductVariantDraft.presets.sampleDataB2B - .zz456St03() - .build(); - -const skuZz456StGreenEu = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${zz456St03.sku}-${euWarehouse.key}`) - .sku(zz456St03.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(euWarehouse.key)); - -export default skuZz456StGreenEu; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-zz456-st-green-us.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-zz456-st-green-us.spec.ts deleted file mode 100644 index 8eb578804..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-zz456-st-green-us.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuZz456StGreenUs from './sku-zz456-st-green-us'; - -describe(`with skuZz456StGreenUs preset and us-warehouse channel`, () => { - it(`should return a skuZz456StGreenUs preset`, () => { - const skuZz456StGreenUsPreset = - skuZz456StGreenUs().build(); - expect(skuZz456StGreenUsPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "zz456-st-green-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "zz456-st-green", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuZz456StGreenUs preset when built for graphql`, () => { - const skuZz456StGreenUsPresetGraphql = - skuZz456StGreenUs().buildGraphql(); - expect(skuZz456StGreenUsPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "zz456-st-green-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "zz456-st-green", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-zz456-st-green-us.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-zz456-st-green-us.ts deleted file mode 100644 index d687cb976..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-zz456-st-green-us.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const usWarehouse = ChannelDraft.presets.sampleDataB2B - .usWarehouse() - .build(); - -const zz456St03 = ProductVariantDraft.presets.sampleDataB2B - .zz456St03() - .build(); - -const skuZz456StGreenUs = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${zz456St03.sku}-${usWarehouse.key}`) - .sku(zz456St03.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(usWarehouse.key)); - -export default skuZz456StGreenUs; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-zz456-st-red-default.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-zz456-st-red-default.spec.ts deleted file mode 100644 index 5c197afc1..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-zz456-st-red-default.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuZz456StRedDefault from './sku-zz456-st-red-default'; - -describe(`with skuZz456StRedDefault preset and default-warehouse channel`, () => { - it(`should return a skuZz456StRedDefault preset`, () => { - const skuZz456StRedDefaultPreset = - skuZz456StRedDefault().build(); - expect(skuZz456StRedDefaultPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "zz456-st-red-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "zz456-st-red", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuZz456StRedDefault preset when built for graphql`, () => { - const skuZz456StRedDefaultPresetGraphql = - skuZz456StRedDefault().buildGraphql(); - expect(skuZz456StRedDefaultPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "zz456-st-red-default-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "zz456-st-red", - "supplyChannel": { - "key": "default-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-zz456-st-red-default.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-zz456-st-red-default.ts deleted file mode 100644 index c28d89dcb..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-zz456-st-red-default.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const defaultWarehouse = ChannelDraft.presets.sampleDataB2B - .defaultWarehouse() - .build(); - -const zz456St01 = ProductVariantDraft.presets.sampleDataB2B - .zz456St01() - .build(); - -const skuZz456StRedDefault = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${zz456St01.sku}-${defaultWarehouse.key}`) - .sku(zz456St01.sku!) - .quantityOnStock(1000) - .supplyChannel( - KeyReferenceDraft.presets.channel().key(defaultWarehouse.key) - ); - -export default skuZz456StRedDefault; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-zz456-st-red-eu.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-zz456-st-red-eu.spec.ts deleted file mode 100644 index 71691c850..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-zz456-st-red-eu.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuZz456StRedEu from './sku-zz456-st-red-eu'; - -describe(`with skuZz456StRedEu preset and eu-warehouse channel`, () => { - it(`should return a skuZz456StRedEu preset`, () => { - const skuZz456StRedEuPreset = - skuZz456StRedEu().build(); - expect(skuZz456StRedEuPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "zz456-st-red-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "zz456-st-red", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuZz456StRedEu preset when built for graphql`, () => { - const skuZz456StRedEuPresetGraphql = - skuZz456StRedEu().buildGraphql(); - expect(skuZz456StRedEuPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "zz456-st-red-eu-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "zz456-st-red", - "supplyChannel": { - "key": "eu-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-zz456-st-red-eu.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-zz456-st-red-eu.ts deleted file mode 100644 index b4d7d7407..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-zz456-st-red-eu.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const euWarehouse = ChannelDraft.presets.sampleDataB2B - .euWarehouse() - .build(); - -const zz456St01 = ProductVariantDraft.presets.sampleDataB2B - .zz456St01() - .build(); - -const skuZz456StRedEu = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${zz456St01.sku}-${euWarehouse.key}`) - .sku(zz456St01.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(euWarehouse.key)); - -export default skuZz456StRedEu; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-zz456-st-red-us.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-zz456-st-red-us.spec.ts deleted file mode 100644 index 1409987f2..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-zz456-st-red-us.spec.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { TInventoryEntryDraft } from '../../../types'; -import skuZz456StRedUs from './sku-zz456-st-red-us'; - -describe(`with skuZz456StRedUs preset and us-warehouse channel`, () => { - it(`should return a skuZz456StRedUs preset`, () => { - const skuZz456StRedUsPreset = - skuZz456StRedUs().build(); - expect(skuZz456StRedUsPreset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "zz456-st-red-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "zz456-st-red", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); - - it(`should return a skuZz456StRedUs preset when built for graphql`, () => { - const skuZz456StRedUsPresetGraphql = - skuZz456StRedUs().buildGraphql(); - expect(skuZz456StRedUsPresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": "zz456-st-red-us-warehouse", - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "zz456-st-red", - "supplyChannel": { - "key": "us-warehouse", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-zz456-st-red-us.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-zz456-st-red-us.ts deleted file mode 100644 index d4e24beed..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2b/sku-zz456-st-red-us.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { - ChannelDraft, - type TChannelDraft, -} from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const usWarehouse = ChannelDraft.presets.sampleDataB2B - .usWarehouse() - .build(); - -const zz456St01 = ProductVariantDraft.presets.sampleDataB2B - .zz456St01() - .build(); - -const skuZz456StRedUs = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .key(`${zz456St01.sku}-${usWarehouse.key}`) - .sku(zz456St01.sku!) - .quantityOnStock(1000) - .supplyChannel(KeyReferenceDraft.presets.channel().key(usWarehouse.key)); - -export default skuZz456StRedUs; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/index.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/index.ts index 13504f5ef..43270dfed 100644 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/index.ts +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/index.ts @@ -1,253 +1,505 @@ -import skuAAR34 from './sku-AAR34'; -import skuADARM04 from './sku-ADARM04'; -import skuADCT01 from './sku-ADCT01'; -import skuADPC09 from './sku-ADPC09'; -import skuADPC7 from './sku-ADPC7'; -import skuALC01 from './sku-ALC01'; -import skuAMR09 from './sku-AMR09'; -import skuARG56 from './sku-ARG56'; -import skuBA092 from './sku-BA092'; -import skuBAMB084 from './sku-BAMB084'; -import skuBARM03 from './sku-BARM03'; -import skuBCOAS08 from './sku-BCOAS08'; -import skuBLP01 from './sku-BLP01'; -import skuBLPC09 from './sku-BLPC09'; -import skuBR0983 from './sku-BR0983'; -import skuBUCK023 from './sku-BUCK023'; -import skuCARM023 from './sku-CARM023'; -import skuCBM03 from './sku-CBM03'; -import skuCCC09 from './sku-CCC09'; -import skuCCG01 from './sku-CCG01'; -import skuCCG02 from './sku-CCG02'; -import skuCCH093 from './sku-CCH093'; -import skuCCM089 from './sku-CCM089'; -import skuCDG09 from './sku-CDG09'; -import skuCJB01 from './sku-CJB01'; -import skuCNS0434 from './sku-CNS0434'; -import skuCOC0843 from './sku-COC0843'; -import skuCQB09 from './sku-CQB09'; -import skuCR098 from './sku-CR098'; -import skuCST01 from './sku-CST01'; -import skuCTSS098 from './sku-CTSS098'; -import skuCTSS0983 from './sku-CTSS0983'; -import skuCWG01 from './sku-CWG01'; -import skuDWEG09 from './sku-DWEG09'; -import skuEARM04 from './sku-EARM04'; -import skuEC0993 from './sku-EC0993'; -import skuEWC07 from './sku-EWC07'; -import skuFARM05 from './sku-FARM05'; -import skuFLAS094 from './sku-FLAS094'; -import skuGARM093 from './sku-GARM093'; -import skuGC01 from './sku-GC01'; -import skuGMCT01 from './sku-GMCT01'; -import skuGPC01 from './sku-GPC01'; -import skuGPC02 from './sku-GPC02'; -import skuGPC03 from './sku-GPC03'; -import skuGRCG01 from './sku-GRCG01'; -import skuHDG02 from './sku-HDG02'; -import skuHP01 from './sku-HP01'; -import skuILC01 from './sku-ILC01'; -import skuIQB09 from './sku-IQB09'; -import skuISP01 from './sku-ISP01'; -import skuJAR08 from './sku-JAR08'; -import skuLAMR03 from './sku-LAMR03'; -import skuLBPC09 from './sku-LBPC09'; -import skuLCO034 from './sku-LCO034'; -import skuLCP01 from './sku-LCP01'; -import skuLCP02 from './sku-LCP02'; -import skuLPC011 from './sku-LPC011'; -import skuLPC09 from './sku-LPC09'; -import skuLPQB084 from './sku-LPQB084'; -import skuMB0973 from './sku-MB0973'; -import skuMCP01 from './sku-MCP01'; -import skuMGD01 from './sku-MGD01'; -import skuMLP01 from './sku-MLP01'; -import skuMMST01 from './sku-MMST01'; -import skuMMST02 from './sku-MMST02'; -import skuMPC02 from './sku-MPC02'; -import skuMPC07 from './sku-MPC07'; -import skuMR05 from './sku-MR05'; -import skuMR08 from './sku-MR08'; -import skuMTB023 from './sku-MTB023'; -import skuMTSS01 from './sku-MTSS01'; -import skuMUQB01 from './sku-MUQB01'; -import skuMWT01 from './sku-MWT01'; -import skuNJOP09 from './sku-NJOP09'; -import skuNR09 from './sku-NR09'; -import skuNTSS01 from './sku-NTSS01'; -import skuNTSS02 from './sku-NTSS02'; -import skuNTSS03 from './sku-NTSS03'; -import skuNTSS05 from './sku-NTSS05'; -import skuNTSS06 from './sku-NTSS06'; -import skuNTSS07 from './sku-NTSS07'; -import skuNTTS04 from './sku-NTTS04'; -import skuOTB07 from './sku-OTB07'; -import skuPAP01 from './sku-PAP01'; -import skuPMAP01 from './sku-PMAP01'; -import skuRB01 from './sku-RB01'; -import skuRB093 from './sku-RB093'; -import skuRCC09 from './sku-RCC09'; -import skuRCD01 from './sku-RCD01'; -import skuRCQB01 from './sku-RCQB01'; -import skuRLC08 from './sku-RLC08'; -import skuRMP01 from './sku-RMP01'; -import skuRST01 from './sku-RST01'; -import skuRST02 from './sku-RST02'; -import skuRWG09 from './sku-RWG09'; -import skuSARM09 from './sku-SARM09'; -import skuSARMO034 from './sku-SARMO034'; -import skuSBG09 from './sku-SBG09'; -import skuSCG09 from './sku-SCG09'; -import skuSCM02 from './sku-SCM02'; -import skuSGB01 from './sku-SGB01'; -import skuSGB02 from './sku-SGB02'; -import skuSHOT095 from './sku-SHOT095'; -import skuSPC01 from './sku-SPC01'; -import skuSPC06 from './sku-SPC06'; -import skuSPOO094 from './sku-SPOO094'; -import skuSQB034 from './sku-SQB034'; -import skuSST02 from './sku-SST02'; -import skuSTM09 from './sku-STM09'; -import skuSTRA095 from './sku-STRA095'; -import skuSWB01 from './sku-SWB01'; -import skuTARM03 from './sku-TARM03'; -import skuTARM034 from './sku-TARM034'; -import skuTCM03 from './sku-TCM03'; -import skuTLSS01 from './sku-TLSS01'; -import skuTST02 from './sku-TST02'; -import skuTTSS01 from './sku-TTSS01'; -import skuVARM09 from './sku-VARM09'; -import skuVC01 from './sku-VC01'; -import skuWCS09 from './sku-WCS09'; -import skuWCSI09 from './sku-WCSI09'; -import skuWOP09 from './sku-WOP09'; -import skuWTP09 from './sku-WTP09'; +import * as skuCst01Presets from './sku-cst-01'; +import * as skuLcp02Presets from './sku-lcp-02'; +import * as skuNtss06Presets from './sku-ntss-06'; +import * as skuCqb09Presets from './sku-cqb-09'; +import * as skuMuqb01Presets from './sku-muqb-01'; +import * as skuLcp01Presets from './sku-lcp-01'; +import * as skuMr08Presets from './sku-mr-08'; +import * as skuNtts04Presets from './sku-ntts-04'; +import * as skuSpc06Presets from './sku-spc-06'; +import * as skuTcm03Presets from './sku-tcm-03'; +import * as skuSarmo034Presets from './sku-sarmo-034'; +import * as skuLco034Presets from './sku-lco-034'; +import * as skuSpc01Presets from './sku-spc-01'; +import * as skuNtss01Presets from './sku-ntss-01'; +import * as skuSqb034Presets from './sku-sqb-034'; +import * as skuCarm023Presets from './sku-carm-023'; +import * as skuScm02Presets from './sku-scm-02'; +import * as skuRlc08Presets from './sku-rlc-08'; +import * as skuSbg09Presets from './sku-sbg-09'; +import * as skuSst02Presets from './sku-sst-02'; +import * as skuEc0993Presets from './sku-ec-0993'; +import * as skuTarm03Presets from './sku-tarm-03'; +import * as skuAdpc09Presets from './sku-adpc-09'; +import * as skuCwg01Presets from './sku-cwg-01'; +import * as skuShot095Presets from './sku-shot-095'; +import * as skuRcqb01Presets from './sku-rcqb-01'; +import * as skuGmct01Presets from './sku-gmct-01'; +import * as skuGarm093Presets from './sku-garm-093'; +import * as skuGc01Presets from './sku-gc-01'; +import * as skuDweg09Presets from './sku-dweg-09'; +import * as skuOtb07Presets from './sku-otb-07'; +import * as skuLpc09Presets from './sku-lpc-09'; +import * as skuRcd01Presets from './sku-rcd-01'; +import * as skuGpc03Presets from './sku-gpc-03'; +import * as skuCbm03Presets from './sku-cbm-03'; +import * as skuJar08Presets from './sku-jar-08'; +import * as skuHdg02Presets from './sku-hdg-02'; +import * as skuBr0983Presets from './sku-br-0983'; +import * as skuMtss01Presets from './sku-mtss-01'; +import * as skuArg56Presets from './sku-arg-56'; +import * as skuWcs09Presets from './sku-wcs-09'; +import * as skuCoc0843Presets from './sku-coc-0843'; +import * as skuBarm03Presets from './sku-barm-03'; +import * as skuHp01Presets from './sku-hp-01'; +import * as skuIsp01Presets from './sku-isp-01'; +import * as skuPap01Presets from './sku-pap-01'; +import * as skuBa092Presets from './sku-ba-092'; +import * as skuMmst01Presets from './sku-mmst-01'; +import * as skuStra095Presets from './sku-stra-095'; +import * as skuCcg01Presets from './sku-ccg-01'; +import * as skuCr098Presets from './sku-cr-098'; +import * as skuLamr03Presets from './sku-lamr-03'; +import * as skuGrcg01Presets from './sku-grcg-01'; +import * as skuRb093Presets from './sku-rb-093'; +import * as skuMpc07Presets from './sku-mpc-07'; +import * as skuCcm089Presets from './sku-ccm-089'; +import * as skuCtss0983Presets from './sku-ctss-0983'; +import * as skuSarm09Presets from './sku-sarm-09'; +import * as skuLpqb084Presets from './sku-lpqb-084'; +import * as skuVarm09Presets from './sku-varm-09'; +import * as skuFarm05Presets from './sku-farm-05'; +import * as skuRwg09Presets from './sku-rwg-09'; +import * as skuBcoas08Presets from './sku-bcoas-08'; +import * as skuGpc01Presets from './sku-gpc-01'; +import * as skuNtss03Presets from './sku-ntss-03'; +import * as skuNtss05Presets from './sku-ntss-05'; +import * as skuRmp01Presets from './sku-rmp-01'; +import * as skuIlc01Presets from './sku-ilc-01'; +import * as skuCdg09Presets from './sku-cdg-09'; +import * as skuAlc01Presets from './sku-alc-01'; +import * as skuMwt01Presets from './sku-mwt-01'; +import * as skuTtss01Presets from './sku-ttss-01'; +import * as skuRcc09Presets from './sku-rcc-09'; +import * as skuEarm04Presets from './sku-earm-04'; +import * as skuMb0973Presets from './sku-mb-0973'; +import * as skuEwc07Presets from './sku-ewc-07'; +import * as skuCch093Presets from './sku-cch-093'; +import * as skuFlas094Presets from './sku-flas-094'; +import * as skuRb01Presets from './sku-rb-01'; +import * as skuMpc02Presets from './sku-mpc-02'; +import * as skuBamb084Presets from './sku-bamb-084'; +import * as skuBlpc09Presets from './sku-blpc-09'; +import * as skuBlp01Presets from './sku-blp-01'; +import * as skuSgb02Presets from './sku-sgb-02'; +import * as skuTst02Presets from './sku-tst-02'; +import * as skuCtss098Presets from './sku-ctss-098'; +import * as skuMr05Presets from './sku-mr-05'; +import * as skuRst01Presets from './sku-rst-01'; +import * as skuWcsi09Presets from './sku-wcsi-09'; +import * as skuStm09Presets from './sku-stm-09'; +import * as skuMgd01Presets from './sku-mgd-01'; +import * as skuWtp09Presets from './sku-wtp-09'; +import * as skuNjop09Presets from './sku-njop-09'; +import * as skuSwb01Presets from './sku-swb-01'; +import * as skuIqb09Presets from './sku-iqb-09'; +import * as skuTarm034Presets from './sku-tarm-034'; +import * as skuBuck023Presets from './sku-buck-023'; +import * as skuNtss02Presets from './sku-ntss-02'; +import * as skuWop09Presets from './sku-wop-09'; +import * as skuVc01Presets from './sku-vc-01'; +import * as skuTlss01Presets from './sku-tlss-01'; +import * as skuAdarm04Presets from './sku-adarm-04'; +import * as skuMlp01Presets from './sku-mlp-01'; +import * as skuAar34Presets from './sku-aar-34'; +import * as skuLbpc09Presets from './sku-lbpc-09'; +import * as skuNtss07Presets from './sku-ntss-07'; +import * as skuScg09Presets from './sku-scg-09'; +import * as skuCns0434Presets from './sku-cns-0434'; +import * as skuMmst02Presets from './sku-mmst-02'; +import * as skuLpc011Presets from './sku-lpc-011'; +import * as skuAmr09Presets from './sku-amr-09'; +import * as skuMcp01Presets from './sku-mcp-01'; +import * as skuPmap01Presets from './sku-pmap-01'; +import * as skuCcg02Presets from './sku-ccg-02'; +import * as skuRst02Presets from './sku-rst-02'; +import * as skuAdpc7Presets from './sku-adpc-7'; +import * as skuAdct01Presets from './sku-adct-01'; +import * as skuNr09Presets from './sku-nr-09'; +import * as skuMtb023Presets from './sku-mtb-023'; +import * as skuCjb01Presets from './sku-cjb-01'; +import * as skuSpoo094Presets from './sku-spoo-094'; +import * as skuCcc09Presets from './sku-ccc-09'; +import * as skuSgb01Presets from './sku-sgb-01'; +import * as skuGpc02Presets from './sku-gpc-02'; -const presets = { - skuAAR34, - skuADARM04, - skuADCT01, - skuADPC7, - skuADPC09, - skuALC01, - skuAMR09, - skuARG56, - skuBA092, - skuBAMB084, - skuBARM03, - skuBCOAS08, - skuBLP01, - skuBLPC09, - skuBR0983, - skuBUCK023, - skuCARM023, - skuCBM03, - skuCCC09, - skuCCG01, - skuCCG02, - skuCCH093, - skuCCM089, - skuCDG09, - skuCJB01, - skuCNS0434, - skuCOC0843, - skuCQB09, - skuCR098, - skuCST01, - skuCTSS098, - skuCTSS0983, - skuCWG01, - skuDWEG09, - skuEARM04, - skuEC0993, - skuEWC07, - skuFARM05, - skuFLAS094, - skuGARM093, - skuGC01, - skuGMCT01, - skuGPC01, - skuGPC02, - skuGPC03, - skuGRCG01, - skuHDG02, - skuHP01, - skuILC01, - skuIQB09, - skuISP01, - skuJAR08, - skuLAMR03, - skuLBPC09, - skuLCO034, - skuLCP01, - skuLCP02, - skuLPC09, - skuLPC011, - skuLPQB084, - skuMB0973, - skuMCP01, - skuMGD01, - skuMLP01, - skuMMST01, - skuMMST02, - skuMPC02, - skuMPC07, - skuMR05, - skuMR08, - skuMTB023, - skuMTSS01, - skuMUQB01, - skuMWT01, - skuNJOP09, - skuNR09, - skuNTSS01, - skuNTSS02, - skuNTSS03, - skuNTTS04, - skuNTSS05, - skuNTSS06, - skuNTSS07, - skuOTB07, - skuPAP01, - skuPMAP01, - skuRB01, - skuRB093, - skuRCC09, - skuRCD01, - skuRCQB01, - skuRLC08, - skuRMP01, - skuRST01, - skuRST02, - skuRWG09, - skuSARM09, - skuSARMO034, - skuSBG09, - skuSCG09, - skuSCM02, - skuSGB01, - skuSGB02, - skuSHOT095, - skuSPC01, - skuSPC06, - skuSPOO094, - skuSQB034, - skuSST02, - skuSTM09, - skuSTRA095, - skuSWB01, - skuTARM03, - skuTARM034, - skuTCM03, - skuTLSS01, - skuTST02, - skuTTSS01, - skuVARM09, - skuVC01, - skuWCS09, - skuWCSI09, - skuWOP09, - skuWTP09, +export const restPresets = { + skuCst01: skuCst01Presets.restPreset, + skuLcp02: skuLcp02Presets.restPreset, + skuNtss06: skuNtss06Presets.restPreset, + skuCqb09: skuCqb09Presets.restPreset, + skuMuqb01: skuMuqb01Presets.restPreset, + skuLcp01: skuLcp01Presets.restPreset, + skuMr08: skuMr08Presets.restPreset, + skuNtts04: skuNtts04Presets.restPreset, + skuSpc06: skuSpc06Presets.restPreset, + skuTcm03: skuTcm03Presets.restPreset, + skuSarmo034: skuSarmo034Presets.restPreset, + skuLco034: skuLco034Presets.restPreset, + skuSpc01: skuSpc01Presets.restPreset, + skuNtss01: skuNtss01Presets.restPreset, + skuSqb034: skuSqb034Presets.restPreset, + skuCarm023: skuCarm023Presets.restPreset, + skuScm02: skuScm02Presets.restPreset, + skuRlc08: skuRlc08Presets.restPreset, + skuSbg09: skuSbg09Presets.restPreset, + skuSst02: skuSst02Presets.restPreset, + skuEc0993: skuEc0993Presets.restPreset, + skuTarm03: skuTarm03Presets.restPreset, + skuAdpc09: skuAdpc09Presets.restPreset, + skuCwg01: skuCwg01Presets.restPreset, + skuShot095: skuShot095Presets.restPreset, + skuRcqb01: skuRcqb01Presets.restPreset, + skuGmct01: skuGmct01Presets.restPreset, + skuGarm093: skuGarm093Presets.restPreset, + skuGc01: skuGc01Presets.restPreset, + skuDweg09: skuDweg09Presets.restPreset, + skuOtb07: skuOtb07Presets.restPreset, + skuLpc09: skuLpc09Presets.restPreset, + skuRcd01: skuRcd01Presets.restPreset, + skuGpc03: skuGpc03Presets.restPreset, + skuCbm03: skuCbm03Presets.restPreset, + skuJar08: skuJar08Presets.restPreset, + skuHdg02: skuHdg02Presets.restPreset, + skuBr0983: skuBr0983Presets.restPreset, + skuMtss01: skuMtss01Presets.restPreset, + skuArg56: skuArg56Presets.restPreset, + skuWcs09: skuWcs09Presets.restPreset, + skuCoc0843: skuCoc0843Presets.restPreset, + skuBarm03: skuBarm03Presets.restPreset, + skuHp01: skuHp01Presets.restPreset, + skuIsp01: skuIsp01Presets.restPreset, + skuPap01: skuPap01Presets.restPreset, + skuBa092: skuBa092Presets.restPreset, + skuMmst01: skuMmst01Presets.restPreset, + skuStra095: skuStra095Presets.restPreset, + skuCcg01: skuCcg01Presets.restPreset, + skuCr098: skuCr098Presets.restPreset, + skuLamr03: skuLamr03Presets.restPreset, + skuGrcg01: skuGrcg01Presets.restPreset, + skuRb093: skuRb093Presets.restPreset, + skuMpc07: skuMpc07Presets.restPreset, + skuCcm089: skuCcm089Presets.restPreset, + skuCtss0983: skuCtss0983Presets.restPreset, + skuSarm09: skuSarm09Presets.restPreset, + skuLpqb084: skuLpqb084Presets.restPreset, + skuVarm09: skuVarm09Presets.restPreset, + skuFarm05: skuFarm05Presets.restPreset, + skuRwg09: skuRwg09Presets.restPreset, + skuBcoas08: skuBcoas08Presets.restPreset, + skuGpc01: skuGpc01Presets.restPreset, + skuNtss03: skuNtss03Presets.restPreset, + skuNtss05: skuNtss05Presets.restPreset, + skuRmp01: skuRmp01Presets.restPreset, + skuIlc01: skuIlc01Presets.restPreset, + skuCdg09: skuCdg09Presets.restPreset, + skuAlc01: skuAlc01Presets.restPreset, + skuMwt01: skuMwt01Presets.restPreset, + skuTtss01: skuTtss01Presets.restPreset, + skuRcc09: skuRcc09Presets.restPreset, + skuEarm04: skuEarm04Presets.restPreset, + skuMb0973: skuMb0973Presets.restPreset, + skuEwc07: skuEwc07Presets.restPreset, + skuCch093: skuCch093Presets.restPreset, + skuFlas094: skuFlas094Presets.restPreset, + skuRb01: skuRb01Presets.restPreset, + skuMpc02: skuMpc02Presets.restPreset, + skuBamb084: skuBamb084Presets.restPreset, + skuBlpc09: skuBlpc09Presets.restPreset, + skuBlp01: skuBlp01Presets.restPreset, + skuSgb02: skuSgb02Presets.restPreset, + skuTst02: skuTst02Presets.restPreset, + skuCtss098: skuCtss098Presets.restPreset, + skuMr05: skuMr05Presets.restPreset, + skuRst01: skuRst01Presets.restPreset, + skuWcsi09: skuWcsi09Presets.restPreset, + skuStm09: skuStm09Presets.restPreset, + skuMgd01: skuMgd01Presets.restPreset, + skuWtp09: skuWtp09Presets.restPreset, + skuNjop09: skuNjop09Presets.restPreset, + skuSwb01: skuSwb01Presets.restPreset, + skuIqb09: skuIqb09Presets.restPreset, + skuTarm034: skuTarm034Presets.restPreset, + skuBuck023: skuBuck023Presets.restPreset, + skuNtss02: skuNtss02Presets.restPreset, + skuWop09: skuWop09Presets.restPreset, + skuVc01: skuVc01Presets.restPreset, + skuTlss01: skuTlss01Presets.restPreset, + skuAdarm04: skuAdarm04Presets.restPreset, + skuMlp01: skuMlp01Presets.restPreset, + skuAar34: skuAar34Presets.restPreset, + skuLbpc09: skuLbpc09Presets.restPreset, + skuNtss07: skuNtss07Presets.restPreset, + skuScg09: skuScg09Presets.restPreset, + skuCns0434: skuCns0434Presets.restPreset, + skuMmst02: skuMmst02Presets.restPreset, + skuLpc011: skuLpc011Presets.restPreset, + skuAmr09: skuAmr09Presets.restPreset, + skuMcp01: skuMcp01Presets.restPreset, + skuPmap01: skuPmap01Presets.restPreset, + skuCcg02: skuCcg02Presets.restPreset, + skuRst02: skuRst02Presets.restPreset, + skuAdpc7: skuAdpc7Presets.restPreset, + skuAdct01: skuAdct01Presets.restPreset, + skuNr09: skuNr09Presets.restPreset, + skuMtb023: skuMtb023Presets.restPreset, + skuCjb01: skuCjb01Presets.restPreset, + skuSpoo094: skuSpoo094Presets.restPreset, + skuCcc09: skuCcc09Presets.restPreset, + skuSgb01: skuSgb01Presets.restPreset, + skuGpc02: skuGpc02Presets.restPreset, }; -export default presets; +export const graphqlPresets = { + skuCst01: skuCst01Presets.graphqlPreset, + skuLcp02: skuLcp02Presets.graphqlPreset, + skuNtss06: skuNtss06Presets.graphqlPreset, + skuCqb09: skuCqb09Presets.graphqlPreset, + skuMuqb01: skuMuqb01Presets.graphqlPreset, + skuLcp01: skuLcp01Presets.graphqlPreset, + skuMr08: skuMr08Presets.graphqlPreset, + skuNtts04: skuNtts04Presets.graphqlPreset, + skuSpc06: skuSpc06Presets.graphqlPreset, + skuTcm03: skuTcm03Presets.graphqlPreset, + skuSarmo034: skuSarmo034Presets.graphqlPreset, + skuLco034: skuLco034Presets.graphqlPreset, + skuSpc01: skuSpc01Presets.graphqlPreset, + skuNtss01: skuNtss01Presets.graphqlPreset, + skuSqb034: skuSqb034Presets.graphqlPreset, + skuCarm023: skuCarm023Presets.graphqlPreset, + skuScm02: skuScm02Presets.graphqlPreset, + skuRlc08: skuRlc08Presets.graphqlPreset, + skuSbg09: skuSbg09Presets.graphqlPreset, + skuSst02: skuSst02Presets.graphqlPreset, + skuEc0993: skuEc0993Presets.graphqlPreset, + skuTarm03: skuTarm03Presets.graphqlPreset, + skuAdpc09: skuAdpc09Presets.graphqlPreset, + skuCwg01: skuCwg01Presets.graphqlPreset, + skuShot095: skuShot095Presets.graphqlPreset, + skuRcqb01: skuRcqb01Presets.graphqlPreset, + skuGmct01: skuGmct01Presets.graphqlPreset, + skuGarm093: skuGarm093Presets.graphqlPreset, + skuGc01: skuGc01Presets.graphqlPreset, + skuDweg09: skuDweg09Presets.graphqlPreset, + skuOtb07: skuOtb07Presets.graphqlPreset, + skuLpc09: skuLpc09Presets.graphqlPreset, + skuRcd01: skuRcd01Presets.graphqlPreset, + skuGpc03: skuGpc03Presets.graphqlPreset, + skuCbm03: skuCbm03Presets.graphqlPreset, + skuJar08: skuJar08Presets.graphqlPreset, + skuHdg02: skuHdg02Presets.graphqlPreset, + skuBr0983: skuBr0983Presets.graphqlPreset, + skuMtss01: skuMtss01Presets.graphqlPreset, + skuArg56: skuArg56Presets.graphqlPreset, + skuWcs09: skuWcs09Presets.graphqlPreset, + skuCoc0843: skuCoc0843Presets.graphqlPreset, + skuBarm03: skuBarm03Presets.graphqlPreset, + skuHp01: skuHp01Presets.graphqlPreset, + skuIsp01: skuIsp01Presets.graphqlPreset, + skuPap01: skuPap01Presets.graphqlPreset, + skuBa092: skuBa092Presets.graphqlPreset, + skuMmst01: skuMmst01Presets.graphqlPreset, + skuStra095: skuStra095Presets.graphqlPreset, + skuCcg01: skuCcg01Presets.graphqlPreset, + skuCr098: skuCr098Presets.graphqlPreset, + skuLamr03: skuLamr03Presets.graphqlPreset, + skuGrcg01: skuGrcg01Presets.graphqlPreset, + skuRb093: skuRb093Presets.graphqlPreset, + skuMpc07: skuMpc07Presets.graphqlPreset, + skuCcm089: skuCcm089Presets.graphqlPreset, + skuCtss0983: skuCtss0983Presets.graphqlPreset, + skuSarm09: skuSarm09Presets.graphqlPreset, + skuLpqb084: skuLpqb084Presets.graphqlPreset, + skuVarm09: skuVarm09Presets.graphqlPreset, + skuFarm05: skuFarm05Presets.graphqlPreset, + skuRwg09: skuRwg09Presets.graphqlPreset, + skuBcoas08: skuBcoas08Presets.graphqlPreset, + skuGpc01: skuGpc01Presets.graphqlPreset, + skuNtss03: skuNtss03Presets.graphqlPreset, + skuNtss05: skuNtss05Presets.graphqlPreset, + skuRmp01: skuRmp01Presets.graphqlPreset, + skuIlc01: skuIlc01Presets.graphqlPreset, + skuCdg09: skuCdg09Presets.graphqlPreset, + skuAlc01: skuAlc01Presets.graphqlPreset, + skuMwt01: skuMwt01Presets.graphqlPreset, + skuTtss01: skuTtss01Presets.graphqlPreset, + skuRcc09: skuRcc09Presets.graphqlPreset, + skuEarm04: skuEarm04Presets.graphqlPreset, + skuMb0973: skuMb0973Presets.graphqlPreset, + skuEwc07: skuEwc07Presets.graphqlPreset, + skuCch093: skuCch093Presets.graphqlPreset, + skuFlas094: skuFlas094Presets.graphqlPreset, + skuRb01: skuRb01Presets.graphqlPreset, + skuMpc02: skuMpc02Presets.graphqlPreset, + skuBamb084: skuBamb084Presets.graphqlPreset, + skuBlpc09: skuBlpc09Presets.graphqlPreset, + skuBlp01: skuBlp01Presets.graphqlPreset, + skuSgb02: skuSgb02Presets.graphqlPreset, + skuTst02: skuTst02Presets.graphqlPreset, + skuCtss098: skuCtss098Presets.graphqlPreset, + skuMr05: skuMr05Presets.graphqlPreset, + skuRst01: skuRst01Presets.graphqlPreset, + skuWcsi09: skuWcsi09Presets.graphqlPreset, + skuStm09: skuStm09Presets.graphqlPreset, + skuMgd01: skuMgd01Presets.graphqlPreset, + skuWtp09: skuWtp09Presets.graphqlPreset, + skuNjop09: skuNjop09Presets.graphqlPreset, + skuSwb01: skuSwb01Presets.graphqlPreset, + skuIqb09: skuIqb09Presets.graphqlPreset, + skuTarm034: skuTarm034Presets.graphqlPreset, + skuBuck023: skuBuck023Presets.graphqlPreset, + skuNtss02: skuNtss02Presets.graphqlPreset, + skuWop09: skuWop09Presets.graphqlPreset, + skuVc01: skuVc01Presets.graphqlPreset, + skuTlss01: skuTlss01Presets.graphqlPreset, + skuAdarm04: skuAdarm04Presets.graphqlPreset, + skuMlp01: skuMlp01Presets.graphqlPreset, + skuAar34: skuAar34Presets.graphqlPreset, + skuLbpc09: skuLbpc09Presets.graphqlPreset, + skuNtss07: skuNtss07Presets.graphqlPreset, + skuScg09: skuScg09Presets.graphqlPreset, + skuCns0434: skuCns0434Presets.graphqlPreset, + skuMmst02: skuMmst02Presets.graphqlPreset, + skuLpc011: skuLpc011Presets.graphqlPreset, + skuAmr09: skuAmr09Presets.graphqlPreset, + skuMcp01: skuMcp01Presets.graphqlPreset, + skuPmap01: skuPmap01Presets.graphqlPreset, + skuCcg02: skuCcg02Presets.graphqlPreset, + skuRst02: skuRst02Presets.graphqlPreset, + skuAdpc7: skuAdpc7Presets.graphqlPreset, + skuAdct01: skuAdct01Presets.graphqlPreset, + skuNr09: skuNr09Presets.graphqlPreset, + skuMtb023: skuMtb023Presets.graphqlPreset, + skuCjb01: skuCjb01Presets.graphqlPreset, + skuSpoo094: skuSpoo094Presets.graphqlPreset, + skuCcc09: skuCcc09Presets.graphqlPreset, + skuSgb01: skuSgb01Presets.graphqlPreset, + skuGpc02: skuGpc02Presets.graphqlPreset, +}; + +export const compatPresets = { + skuCst01: skuCst01Presets.compatPreset, + skuLcp02: skuLcp02Presets.compatPreset, + skuNtss06: skuNtss06Presets.compatPreset, + skuCqb09: skuCqb09Presets.compatPreset, + skuMuqb01: skuMuqb01Presets.compatPreset, + skuLcp01: skuLcp01Presets.compatPreset, + skuMr08: skuMr08Presets.compatPreset, + skuNtts04: skuNtts04Presets.compatPreset, + skuSpc06: skuSpc06Presets.compatPreset, + skuTcm03: skuTcm03Presets.compatPreset, + skuSarmo034: skuSarmo034Presets.compatPreset, + skuLco034: skuLco034Presets.compatPreset, + skuSpc01: skuSpc01Presets.compatPreset, + skuNtss01: skuNtss01Presets.compatPreset, + skuSqb034: skuSqb034Presets.compatPreset, + skuCarm023: skuCarm023Presets.compatPreset, + skuScm02: skuScm02Presets.compatPreset, + skuRlc08: skuRlc08Presets.compatPreset, + skuSbg09: skuSbg09Presets.compatPreset, + skuSst02: skuSst02Presets.compatPreset, + skuEc0993: skuEc0993Presets.compatPreset, + skuTarm03: skuTarm03Presets.compatPreset, + skuAdpc09: skuAdpc09Presets.compatPreset, + skuCwg01: skuCwg01Presets.compatPreset, + skuShot095: skuShot095Presets.compatPreset, + skuRcqb01: skuRcqb01Presets.compatPreset, + skuGmct01: skuGmct01Presets.compatPreset, + skuGarm093: skuGarm093Presets.compatPreset, + skuGc01: skuGc01Presets.compatPreset, + skuDweg09: skuDweg09Presets.compatPreset, + skuOtb07: skuOtb07Presets.compatPreset, + skuLpc09: skuLpc09Presets.compatPreset, + skuRcd01: skuRcd01Presets.compatPreset, + skuGpc03: skuGpc03Presets.compatPreset, + skuCbm03: skuCbm03Presets.compatPreset, + skuJar08: skuJar08Presets.compatPreset, + skuHdg02: skuHdg02Presets.compatPreset, + skuBr0983: skuBr0983Presets.compatPreset, + skuMtss01: skuMtss01Presets.compatPreset, + skuArg56: skuArg56Presets.compatPreset, + skuWcs09: skuWcs09Presets.compatPreset, + skuCoc0843: skuCoc0843Presets.compatPreset, + skuBarm03: skuBarm03Presets.compatPreset, + skuHp01: skuHp01Presets.compatPreset, + skuIsp01: skuIsp01Presets.compatPreset, + skuPap01: skuPap01Presets.compatPreset, + skuBa092: skuBa092Presets.compatPreset, + skuMmst01: skuMmst01Presets.compatPreset, + skuStra095: skuStra095Presets.compatPreset, + skuCcg01: skuCcg01Presets.compatPreset, + skuCr098: skuCr098Presets.compatPreset, + skuLamr03: skuLamr03Presets.compatPreset, + skuGrcg01: skuGrcg01Presets.compatPreset, + skuRb093: skuRb093Presets.compatPreset, + skuMpc07: skuMpc07Presets.compatPreset, + skuCcm089: skuCcm089Presets.compatPreset, + skuCtss0983: skuCtss0983Presets.compatPreset, + skuSarm09: skuSarm09Presets.compatPreset, + skuLpqb084: skuLpqb084Presets.compatPreset, + skuVarm09: skuVarm09Presets.compatPreset, + skuFarm05: skuFarm05Presets.compatPreset, + skuRwg09: skuRwg09Presets.compatPreset, + skuBcoas08: skuBcoas08Presets.compatPreset, + skuGpc01: skuGpc01Presets.compatPreset, + skuNtss03: skuNtss03Presets.compatPreset, + skuNtss05: skuNtss05Presets.compatPreset, + skuRmp01: skuRmp01Presets.compatPreset, + skuIlc01: skuIlc01Presets.compatPreset, + skuCdg09: skuCdg09Presets.compatPreset, + skuAlc01: skuAlc01Presets.compatPreset, + skuMwt01: skuMwt01Presets.compatPreset, + skuTtss01: skuTtss01Presets.compatPreset, + skuRcc09: skuRcc09Presets.compatPreset, + skuEarm04: skuEarm04Presets.compatPreset, + skuMb0973: skuMb0973Presets.compatPreset, + skuEwc07: skuEwc07Presets.compatPreset, + skuCch093: skuCch093Presets.compatPreset, + skuFlas094: skuFlas094Presets.compatPreset, + skuRb01: skuRb01Presets.compatPreset, + skuMpc02: skuMpc02Presets.compatPreset, + skuBamb084: skuBamb084Presets.compatPreset, + skuBlpc09: skuBlpc09Presets.compatPreset, + skuBlp01: skuBlp01Presets.compatPreset, + skuSgb02: skuSgb02Presets.compatPreset, + skuTst02: skuTst02Presets.compatPreset, + skuCtss098: skuCtss098Presets.compatPreset, + skuMr05: skuMr05Presets.compatPreset, + skuRst01: skuRst01Presets.compatPreset, + skuWcsi09: skuWcsi09Presets.compatPreset, + skuStm09: skuStm09Presets.compatPreset, + skuMgd01: skuMgd01Presets.compatPreset, + skuWtp09: skuWtp09Presets.compatPreset, + skuNjop09: skuNjop09Presets.compatPreset, + skuSwb01: skuSwb01Presets.compatPreset, + skuIqb09: skuIqb09Presets.compatPreset, + skuTarm034: skuTarm034Presets.compatPreset, + skuBuck023: skuBuck023Presets.compatPreset, + skuNtss02: skuNtss02Presets.compatPreset, + skuWop09: skuWop09Presets.compatPreset, + skuVc01: skuVc01Presets.compatPreset, + skuTlss01: skuTlss01Presets.compatPreset, + skuAdarm04: skuAdarm04Presets.compatPreset, + skuMlp01: skuMlp01Presets.compatPreset, + skuAar34: skuAar34Presets.compatPreset, + skuLbpc09: skuLbpc09Presets.compatPreset, + skuNtss07: skuNtss07Presets.compatPreset, + skuScg09: skuScg09Presets.compatPreset, + skuCns0434: skuCns0434Presets.compatPreset, + skuMmst02: skuMmst02Presets.compatPreset, + skuLpc011: skuLpc011Presets.compatPreset, + skuAmr09: skuAmr09Presets.compatPreset, + skuMcp01: skuMcp01Presets.compatPreset, + skuPmap01: skuPmap01Presets.compatPreset, + skuCcg02: skuCcg02Presets.compatPreset, + skuRst02: skuRst02Presets.compatPreset, + skuAdpc7: skuAdpc7Presets.compatPreset, + skuAdct01: skuAdct01Presets.compatPreset, + skuNr09: skuNr09Presets.compatPreset, + skuMtb023: skuMtb023Presets.compatPreset, + skuCjb01: skuCjb01Presets.compatPreset, + skuSpoo094: skuSpoo094Presets.compatPreset, + skuCcc09: skuCcc09Presets.compatPreset, + skuSgb01: skuSgb01Presets.compatPreset, + skuGpc02: skuGpc02Presets.compatPreset, +}; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-AAR34.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-AAR34.spec.ts deleted file mode 100644 index 15bf1e743..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-AAR34.spec.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { - TInventoryEntryDraft, - TInventoryEntryDraftGraphql, -} from '../../../types'; -import skuAAR34 from './sku-AAR34'; - -describe('With skuAAR34 preset', () => { - it('should return skuAAR34 preset', () => { - const skuAAR34Preset = skuAAR34().build(); - expect(skuAAR34Preset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 100, - "restockableInDays": undefined, - "sku": "AAR-34", - "supplyChannel": undefined, - } - `); - }); - - it('should return skuAAR34 preset when built for GraphQL', () => { - const skuAAR34PresetGraphql = - skuAAR34().buildGraphql(); - expect(skuAAR34PresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 100, - "restockableInDays": undefined, - "sku": "AAR-34", - "supplyChannel": undefined, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-AAR34.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-AAR34.ts deleted file mode 100644 index ac3bb3637..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-AAR34.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const ariaRug01Preset = ProductVariantDraft.presets.sampleDataB2CLifestyle - .ariaRug01() - .build(); - -const skuAAR34 = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .sku(ariaRug01Preset.sku!) - .quantityOnStock(100); - -export default skuAAR34; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-ADARM04.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-ADARM04.spec.ts deleted file mode 100644 index 23fe4536a..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-ADARM04.spec.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { - TInventoryEntryDraft, - TInventoryEntryDraftGraphql, -} from '../../../types'; -import skuADARM04 from './sku-ADARM04'; - -describe('With skuADARM04 preset', () => { - it('should return skuADARM04 preset', () => { - const skuADARM04Preset = skuADARM04().build(); - expect(skuADARM04Preset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 100, - "restockableInDays": undefined, - "sku": "ADARM-04", - "supplyChannel": undefined, - } - `); - }); - - it('should return skuADARM04 preset when built for GraphQL', () => { - const skuADARM04PresetGraphql = - skuADARM04().buildGraphql(); - expect(skuADARM04PresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 100, - "restockableInDays": undefined, - "sku": "ADARM-04", - "supplyChannel": undefined, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-ADARM04.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-ADARM04.ts deleted file mode 100644 index c737e623a..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-ADARM04.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const artDecoChair01Preset = ProductVariantDraft.presets.sampleDataB2CLifestyle - .artDecoChair01() - .build(); - -const skuADARM04 = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .sku(artDecoChair01Preset.sku!) - .quantityOnStock(100); - -export default skuADARM04; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-ADCT01.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-ADCT01.spec.ts deleted file mode 100644 index e68ac8e1e..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-ADCT01.spec.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { - TInventoryEntryDraft, - TInventoryEntryDraftGraphql, -} from '../../../types'; -import skuADCT01 from './sku-ADCT01'; - -describe('With skuADCT01 preset', () => { - it('should return skuADCT01 preset', () => { - const skuADCT01Preset = skuADCT01().build(); - expect(skuADCT01Preset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 90, - "restockableInDays": undefined, - "sku": "ADCT-01", - "supplyChannel": undefined, - } - `); - }); - - it('should return skuADCT01 preset when built for GraphQL', () => { - const skuADCT01PresetGraphql = - skuADCT01().buildGraphql(); - expect(skuADCT01PresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 90, - "restockableInDays": undefined, - "sku": "ADCT-01", - "supplyChannel": undefined, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-ADCT01.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-ADCT01.ts deleted file mode 100644 index df0f1f3f0..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-ADCT01.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const artDecoCoffeTable01Preset = - ProductVariantDraft.presets.sampleDataB2CLifestyle - .artDecoCoffeeTable01() - .build(); - -const skuADCT01 = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .sku(artDecoCoffeTable01Preset.sku!) - .quantityOnStock(90); - -export default skuADCT01; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-ADPC09.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-ADPC09.spec.ts deleted file mode 100644 index 73b63aacc..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-ADPC09.spec.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { - TInventoryEntryDraft, - TInventoryEntryDraftGraphql, -} from '../../../types'; -import skuADPC09 from './sku-ADPC09'; - -describe('With skuADPC09 preset', () => { - it('should return skuADPC09 preset', () => { - const skuADPC09Preset = skuADPC09().build(); - expect(skuADPC09Preset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 100, - "restockableInDays": undefined, - "sku": "ADPC-09", - "supplyChannel": undefined, - } - `); - }); - - it('should return skuADPC09 preset when built for GraphQL', () => { - const skuADPC09PresetGraphql = - skuADPC09().buildGraphql(); - expect(skuADPC09PresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 100, - "restockableInDays": undefined, - "sku": "ADPC-09", - "supplyChannel": undefined, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-ADPC09.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-ADPC09.ts deleted file mode 100644 index ef9f73a13..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-ADPC09.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const patternedPillowCover01Preset = - ProductVariantDraft.presets.sampleDataB2CLifestyle - .patternedPillowCover01() - .build(); - -const skuADPC09 = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .sku(patternedPillowCover01Preset.sku!) - .quantityOnStock(100); - -export default skuADPC09; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-ADPC7.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-ADPC7.spec.ts deleted file mode 100644 index 60808c3a8..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-ADPC7.spec.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { - TInventoryEntryDraft, - TInventoryEntryDraftGraphql, -} from '../../../types'; -import skuADPC7 from './sku-ADPC7'; - -describe('With skuADPC7 preset', () => { - it('should return skuADPC7 preset', () => { - const skuADPC7Preset = skuADPC7().build(); - expect(skuADPC7Preset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 100, - "restockableInDays": undefined, - "sku": "ADPC-7", - "supplyChannel": undefined, - } - `); - }); - - it('should return skuADPC7 preset when built for GraphQL', () => { - const skuADPC7PresetGraphql = - skuADPC7().buildGraphql(); - expect(skuADPC7PresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 100, - "restockableInDays": undefined, - "sku": "ADPC-7", - "supplyChannel": undefined, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-ADPC7.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-ADPC7.ts deleted file mode 100644 index 8334a5557..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-ADPC7.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const patternedPillowCover02Preset = - ProductVariantDraft.presets.sampleDataB2CLifestyle - .patternedPillowCover02() - .build(); - -const skuADPC7 = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .sku(patternedPillowCover02Preset.sku!) - .quantityOnStock(100); - -export default skuADPC7; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-ALC01.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-ALC01.spec.ts deleted file mode 100644 index 73a977d6a..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-ALC01.spec.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { - TInventoryEntryDraft, - TInventoryEntryDraftGraphql, -} from '../../../types'; -import skuALC01 from './sku-ALC01'; - -describe('With skuALC01 preset', () => { - it('should return skuALC01 preset', () => { - const skuALC01Preset = skuALC01().build(); - expect(skuALC01Preset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 73, - "restockableInDays": undefined, - "sku": "ALC-01", - "supplyChannel": undefined, - } - `); - }); - - it('should return skuALC01 preset when built for GraphQL', () => { - const skuALC01PresetGraphql = - skuALC01().buildGraphql(); - expect(skuALC01PresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 73, - "restockableInDays": undefined, - "sku": "ALC-01", - "supplyChannel": undefined, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-ALC01.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-ALC01.ts deleted file mode 100644 index 2b0bf69f5..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-ALC01.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const abigailLoungeChair01Preset = - ProductVariantDraft.presets.sampleDataB2CLifestyle - .abigailLoungeChair01() - .build(); - -const skuALC01 = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .sku(abigailLoungeChair01Preset.sku!) - .quantityOnStock(73); - -export default skuALC01; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-AMR09.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-AMR09.spec.ts deleted file mode 100644 index 827d500b2..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-AMR09.spec.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { - TInventoryEntryDraft, - TInventoryEntryDraftGraphql, -} from '../../../types'; -import skuAMR09 from './sku-AMR09'; - -describe('With skuAMR09 preset', () => { - it('should return skuAMR09 preset', () => { - const skuAMR09Preset = skuAMR09().build(); - expect(skuAMR09Preset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 100, - "restockableInDays": undefined, - "sku": "AMR-09", - "supplyChannel": undefined, - } - `); - }); - - it('should return skuAMR09 preset when built for GraphQL', () => { - const skuAMR09PresetGraphql = - skuAMR09().buildGraphql(); - expect(skuAMR09PresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 100, - "restockableInDays": undefined, - "sku": "AMR-09", - "supplyChannel": undefined, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-AMR09.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-AMR09.ts deleted file mode 100644 index 9cde5ed10..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-AMR09.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const amaliaRug01Preset = ProductVariantDraft.presets.sampleDataB2CLifestyle - .amaliaRug01() - .build(); - -const skuAMR09 = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .sku(amaliaRug01Preset.sku!) - .quantityOnStock(100); - -export default skuAMR09; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-ARG56.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-ARG56.spec.ts deleted file mode 100644 index 3e8f415ca..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-ARG56.spec.ts +++ /dev/null @@ -1,44 +0,0 @@ -import { - TInventoryEntryDraft, - TInventoryEntryDraftGraphql, -} from '../../../types'; -import skuARG56 from './sku-ARG56'; - -describe('With skuARG56 preset', () => { - it('should return skuARG56 preset', () => { - const skuARG56Preset = skuARG56().build(); - expect(skuARG56Preset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 100, - "restockableInDays": undefined, - "sku": "ARG-56", - "supplyChannel": { - "key": "inventory-channel", - "typeId": "channel", - }, - } - `); - }); - - it('should return skuARG56 preset when built for GraphQL', () => { - const skuARG56PresetGraphql = - skuARG56().buildGraphql(); - expect(skuARG56PresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 100, - "restockableInDays": undefined, - "sku": "ARG-56", - "supplyChannel": { - "key": "inventory-channel", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-ARG56.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-ARG56.ts deleted file mode 100644 index 307bf9ca6..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-ARG56.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { ChannelDraft, TChannelDraft } from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const ashenRug01Preset = ProductVariantDraft.presets.sampleDataB2CLifestyle - .ashenRug01() - .build(); - -const inventoryChannel = ChannelDraft.presets.sampleDataB2CLifestyle - .inventoryChannel() - .build(); - -const skuARG56 = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .sku(ashenRug01Preset.sku!) - .supplyChannel( - KeyReferenceDraft.presets.channel().key(inventoryChannel.key!) - ) - .quantityOnStock(100); - -export default skuARG56; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-BA092.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-BA092.spec.ts deleted file mode 100644 index b64611a98..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-BA092.spec.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { - TInventoryEntryDraft, - TInventoryEntryDraftGraphql, -} from '../../../types'; -import skuBA092 from './sku-BA092'; - -describe('With skuBA092 preset', () => { - it('should return skuBA092 preset', () => { - const skuBA092Preset = skuBA092().build(); - expect(skuBA092Preset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 98, - "restockableInDays": undefined, - "sku": "BA-092", - "supplyChannel": undefined, - } - `); - }); - - it('should return skuBA092 preset when built for GraphQL', () => { - const skuBA092PresetGraphql = - skuBA092().buildGraphql(); - expect(skuBA092PresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 98, - "restockableInDays": undefined, - "sku": "BA-092", - "supplyChannel": undefined, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-BA092.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-BA092.ts deleted file mode 100644 index dee2c45fb..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-BA092.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const leatherWeaveChair01Preset = - ProductVariantDraft.presets.sampleDataB2CLifestyle - .leatherWeaveChair01() - .build(); - -const skuBA092 = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .sku(leatherWeaveChair01Preset.sku!) - .quantityOnStock(98); - -export default skuBA092; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-BAMB084.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-BAMB084.spec.ts deleted file mode 100644 index a7b89231e..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-BAMB084.spec.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { - TInventoryEntryDraft, - TInventoryEntryDraftGraphql, -} from '../../../types'; -import skuBAMB084 from './sku-BAMB084'; - -describe('With skuBAMB084 preset', () => { - it('should return skuBAMB084 preset', () => { - const skuBAMB084Preset = skuBAMB084().build(); - expect(skuBAMB084Preset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 100, - "restockableInDays": undefined, - "sku": "BAMB-084", - "supplyChannel": undefined, - } - `); - }); - - it('should return skuBAMB084 preset when built for GraphQL', () => { - const skuBAMB084PresetGraphql = - skuBAMB084().buildGraphql(); - expect(skuBAMB084PresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 100, - "restockableInDays": undefined, - "sku": "BAMB-084", - "supplyChannel": undefined, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-BAMB084.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-BAMB084.ts deleted file mode 100644 index 7f6968b53..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-BAMB084.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const squareBambooCoaster01Preset = - ProductVariantDraft.presets.sampleDataB2CLifestyle - .squareBambooCoaster01() - .build(); - -const skuBAMB084 = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .sku(squareBambooCoaster01Preset.sku!) - .quantityOnStock(100); - -export default skuBAMB084; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-BARM03.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-BARM03.spec.ts deleted file mode 100644 index 497e6b1b0..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-BARM03.spec.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { - TInventoryEntryDraft, - TInventoryEntryDraftGraphql, -} from '../../../types'; -import skuBARM03 from './sku-BARM03'; - -describe('With skuBARM03 preset', () => { - it('should return skuBARM03 preset', () => { - const skuBARM03Preset = skuBARM03().build(); - expect(skuBARM03Preset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 100, - "restockableInDays": undefined, - "sku": "BARM-03", - "supplyChannel": undefined, - } - `); - }); - - it('should return skuBARM03 preset when built for GraphQL', () => { - const skuBARM03PresetGraphql = - skuBARM03().buildGraphql(); - expect(skuBARM03PresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 100, - "restockableInDays": undefined, - "sku": "BARM-03", - "supplyChannel": undefined, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-BARM03.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-BARM03.ts deleted file mode 100644 index b4df2c0db..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-BARM03.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const brunoChair01Preset = ProductVariantDraft.presets.sampleDataB2CLifestyle - .brunoChair01() - .build(); - -const skuBARM03 = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .sku(brunoChair01Preset.sku!) - .quantityOnStock(100); - -export default skuBARM03; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-BCOAS08.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-BCOAS08.spec.ts deleted file mode 100644 index e3378f660..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-BCOAS08.spec.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { - TInventoryEntryDraft, - TInventoryEntryDraftGraphql, -} from '../../../types'; -import skuBCOAS08 from './sku-BCOAS08'; - -describe('With skuBCOAS08 preset', () => { - it('should return skuBCOAS08 preset', () => { - const skuBCOAS08Preset = skuBCOAS08().build(); - expect(skuBCOAS08Preset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 100, - "restockableInDays": undefined, - "sku": "BCOAS-08", - "supplyChannel": undefined, - } - `); - }); - - it('should return skuBCOAS08 preset when built for GraphQL', () => { - const skuBCOAS08PresetGraphql = - skuBCOAS08().buildGraphql(); - expect(skuBCOAS08PresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 100, - "restockableInDays": undefined, - "sku": "BCOAS-08", - "supplyChannel": undefined, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-BCOAS08.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-BCOAS08.ts deleted file mode 100644 index 275e1aff9..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-BCOAS08.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const modernBlackCoaster01Preset = - ProductVariantDraft.presets.sampleDataB2CLifestyle - .modernBlackCoaster01() - .build(); - -const skuBCOAS08 = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .sku(modernBlackCoaster01Preset.sku!) - .quantityOnStock(100); - -export default skuBCOAS08; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-BLP01.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-BLP01.spec.ts deleted file mode 100644 index 80ac36f50..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-BLP01.spec.ts +++ /dev/null @@ -1,44 +0,0 @@ -import { - TInventoryEntryDraft, - TInventoryEntryDraftGraphql, -} from '../../../types'; -import skuBLP01 from './sku-BLP01'; - -describe('With skuBLP01 preset', () => { - it('should return skuBLP01 preset', () => { - const skuBLP01Preset = skuBLP01().build(); - expect(skuBLP01Preset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 80, - "restockableInDays": undefined, - "sku": "BLP-01", - "supplyChannel": { - "key": "inventory-channel", - "typeId": "channel", - }, - } - `); - }); - - it('should return skuBLP01 preset when built for GraphQL', () => { - const skuBLP01PresetGraphql = - skuBLP01().buildGraphql(); - expect(skuBLP01PresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 80, - "restockableInDays": undefined, - "sku": "BLP-01", - "supplyChannel": { - "key": "inventory-channel", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-BLP01.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-BLP01.ts deleted file mode 100644 index 781c6c6c5..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-BLP01.ts +++ /dev/null @@ -1,28 +0,0 @@ -import { ChannelDraft, TChannelDraft } from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const purpleLandscapePainting01Preset = - ProductVariantDraft.presets.sampleDataB2CLifestyle - .purpleLandscapePainting01() - .build(); - -const inventoryChannel = ChannelDraft.presets.sampleDataB2CLifestyle - .inventoryChannel() - .build(); - -const skuBLP01 = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .sku(purpleLandscapePainting01Preset.sku!) - .supplyChannel( - KeyReferenceDraft.presets.channel().key(inventoryChannel.key!) - ) - .quantityOnStock(80); - -export default skuBLP01; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-BLPC09.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-BLPC09.spec.ts deleted file mode 100644 index a906f2704..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-BLPC09.spec.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { - TInventoryEntryDraft, - TInventoryEntryDraftGraphql, -} from '../../../types'; -import skuBLPC09 from './sku-BLPC09'; - -describe('With skuBLPC09 preset', () => { - it('should return skuBLPC09 preset', () => { - const skuBLPC09Preset = skuBLPC09().build(); - expect(skuBLPC09Preset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 100, - "restockableInDays": undefined, - "sku": "BLPC-09", - "supplyChannel": undefined, - } - `); - }); - - it('should return skuBLPC09 preset when built for GraphQL', () => { - const skuBLPC09PresetGraphql = - skuBLPC09().buildGraphql(); - expect(skuBLPC09PresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 100, - "restockableInDays": undefined, - "sku": "BLPC-09", - "supplyChannel": undefined, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-BLPC09.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-BLPC09.ts deleted file mode 100644 index ef909d354..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-BLPC09.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const cocoaPillowCover01Preset = - ProductVariantDraft.presets.sampleDataB2CLifestyle - .cocoaPillowCover01() - .build(); - -const skuBLPC09 = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .sku(cocoaPillowCover01Preset.sku!) - .quantityOnStock(100); - -export default skuBLPC09; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-BR0983.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-BR0983.spec.ts deleted file mode 100644 index 3ce4dc8ce..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-BR0983.spec.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { - TInventoryEntryDraft, - TInventoryEntryDraftGraphql, -} from '../../../types'; -import skuBR0983 from './sku-BR0983'; - -describe('With skuBR0983 preset', () => { - it('should return skuBR0983 preset', () => { - const skuBR0983Preset = skuBR0983().build(); - expect(skuBR0983Preset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 99, - "restockableInDays": undefined, - "sku": "BR-0983", - "supplyChannel": undefined, - } - `); - }); - - it('should return skuBR0983 preset when built for GraphQL', () => { - const skuBR0983PresetGraphql = - skuBR0983().buildGraphql(); - expect(skuBR0983PresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 99, - "restockableInDays": undefined, - "sku": "BR-0983", - "supplyChannel": undefined, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-BR0983.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-BR0983.ts deleted file mode 100644 index 79d0979b0..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-BR0983.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const braidedRug01Preset = ProductVariantDraft.presets.sampleDataB2CLifestyle - .braidedRug01() - .build(); - -const skuBR0983 = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .sku(braidedRug01Preset.sku!) - .quantityOnStock(99); - -export default skuBR0983; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-BUCK023.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-BUCK023.spec.ts deleted file mode 100644 index 078eaa139..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-BUCK023.spec.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { - TInventoryEntryDraft, - TInventoryEntryDraftGraphql, -} from '../../../types'; -import skuBUCK023 from './sku-BUCK023'; - -describe('With skuBUCK023 preset', () => { - it('should return skuBUCK023 preset', () => { - const skuBUCK023Preset = skuBUCK023().build(); - expect(skuBUCK023Preset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 100, - "restockableInDays": undefined, - "sku": "BUCK-023", - "supplyChannel": undefined, - } - `); - }); - - it('should return skuBUCK023 preset when built for GraphQL', () => { - const skuBUCK023PresetGraphql = - skuBUCK023().buildGraphql(); - expect(skuBUCK023PresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 100, - "restockableInDays": undefined, - "sku": "BUCK-023", - "supplyChannel": undefined, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-BUCK023.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-BUCK023.ts deleted file mode 100644 index 2fd182904..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-BUCK023.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const iceBucket01Preset = ProductVariantDraft.presets.sampleDataB2CLifestyle - .iceBucket01() - .build(); - -const skuBUCK023 = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .sku(iceBucket01Preset.sku!) - .quantityOnStock(100); - -export default skuBUCK023; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-CARM023.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-CARM023.spec.ts deleted file mode 100644 index ab7ce7ad3..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-CARM023.spec.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { - TInventoryEntryDraft, - TInventoryEntryDraftGraphql, -} from '../../../types'; -import skuCARM023 from './sku-CARM023'; - -describe('With skuCARM023 preset', () => { - it('should return skuCARM023 preset', () => { - const skuCARM023Preset = skuCARM023().build(); - expect(skuCARM023Preset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 100, - "restockableInDays": undefined, - "sku": "CARM-023", - "supplyChannel": undefined, - } - `); - }); - - it('should return skuCARM023 preset when built for GraphQL', () => { - const skuCARM023PresetGraphql = - skuCARM023().buildGraphql(); - expect(skuCARM023PresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 100, - "restockableInDays": undefined, - "sku": "CARM-023", - "supplyChannel": undefined, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-CARM023.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-CARM023.ts deleted file mode 100644 index 6e99fe872..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-CARM023.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const charlieArmchair01Preset = - ProductVariantDraft.presets.sampleDataB2CLifestyle - .charlieArmchair01() - .build(); - -const skuCARM023 = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .sku(charlieArmchair01Preset.sku!) - .quantityOnStock(100); - -export default skuCARM023; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-CBM03.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-CBM03.spec.ts deleted file mode 100644 index 5b3617ce0..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-CBM03.spec.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { - TInventoryEntryDraft, - TInventoryEntryDraftGraphql, -} from '../../../types'; -import skuCBM03 from './sku-CBM03'; - -describe('With skuCBM03 preset', () => { - it('should return skuCBM03 preset', () => { - const skuCBM03Preset = skuCBM03().build(); - expect(skuCBM03Preset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 100, - "restockableInDays": undefined, - "sku": "CBM-03", - "supplyChannel": undefined, - } - `); - }); - - it('should return skuCBM03 preset when built for GraphQL', () => { - const skuCBM03PresetGraphql = - skuCBM03().buildGraphql(); - expect(skuCBM03PresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 100, - "restockableInDays": undefined, - "sku": "CBM-03", - "supplyChannel": undefined, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-CBM03.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-CBM03.ts deleted file mode 100644 index c5a4e62d8..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-CBM03.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const classicBeerMug01Preset = - ProductVariantDraft.presets.sampleDataB2CLifestyle - .classicBeerMug01() - .build(); - -const skuCBM03 = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .sku(classicBeerMug01Preset.sku!) - .quantityOnStock(100); - -export default skuCBM03; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-CCC09.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-CCC09.spec.ts deleted file mode 100644 index be6e23870..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-CCC09.spec.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { - TInventoryEntryDraft, - TInventoryEntryDraftGraphql, -} from '../../../types'; -import skuCCC09 from './sku-CCC09'; - -describe('With skuCCC09 preset', () => { - it('should return skuCCC09 preset', () => { - const skuCCC09Preset = skuCCC09().build(); - expect(skuCCC09Preset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 99, - "restockableInDays": undefined, - "sku": "CCC-09", - "supplyChannel": undefined, - } - `); - }); - - it('should return skuCCC09 preset when built for GraphQL', () => { - const skuCCC09PresetGraphql = - skuCCC09().buildGraphql(); - expect(skuCCC09PresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 99, - "restockableInDays": undefined, - "sku": "CCC-09", - "supplyChannel": undefined, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-CCC09.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-CCC09.ts deleted file mode 100644 index 06dd699b8..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-CCC09.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const classicCoffeeCup01Preset = - ProductVariantDraft.presets.sampleDataB2CLifestyle - .classicCoffeeCup01() - .build(); - -const skuCCC09 = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .sku(classicCoffeeCup01Preset.sku!) - .quantityOnStock(99); - -export default skuCCC09; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-CCG01.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-CCG01.spec.ts deleted file mode 100644 index 99f28927c..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-CCG01.spec.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { - TInventoryEntryDraft, - TInventoryEntryDraftGraphql, -} from '../../../types'; -import skuCCG01 from './sku-CCG01'; - -describe('With skuCCG01 preset', () => { - it('should return skuCCG01 preset', () => { - const skuCCG01Preset = skuCCG01().build(); - expect(skuCCG01Preset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 99, - "restockableInDays": undefined, - "sku": "CCG-01", - "supplyChannel": undefined, - } - `); - }); - - it('should return skuCCG01 preset when built for GraphQL', () => { - const skuCCG01PresetGraphql = - skuCCG01().buildGraphql(); - expect(skuCCG01PresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 99, - "restockableInDays": undefined, - "sku": "CCG-01", - "supplyChannel": undefined, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-CCG01.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-CCG01.ts deleted file mode 100644 index 5439c6b00..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-CCG01.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const classicChampagneGlasses01Preset = - ProductVariantDraft.presets.sampleDataB2CLifestyle - .classicChampagneGlasses01() - .build(); - -const skuCCG01 = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .sku(classicChampagneGlasses01Preset.sku!) - .quantityOnStock(99); - -export default skuCCG01; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-CCG02.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-CCG02.spec.ts deleted file mode 100644 index 7258f8edc..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-CCG02.spec.ts +++ /dev/null @@ -1,44 +0,0 @@ -import { - TInventoryEntryDraft, - TInventoryEntryDraftGraphql, -} from '../../../types'; -import skuCCG02 from './sku-CCG02'; - -describe('With skuCCG02 preset', () => { - it('should return skuCCG02 preset', () => { - const skuCCG02Preset = skuCCG02().build(); - expect(skuCCG02Preset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 100, - "restockableInDays": undefined, - "sku": "CCG-02", - "supplyChannel": { - "key": "inventory-channel", - "typeId": "channel", - }, - } - `); - }); - - it('should return skuCCG02 preset when built for GraphQL', () => { - const skuCCG02PresetGraphql = - skuCCG02().buildGraphql(); - expect(skuCCG02PresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 100, - "restockableInDays": undefined, - "sku": "CCG-02", - "supplyChannel": { - "key": "inventory-channel", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-CCG02.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-CCG02.ts deleted file mode 100644 index 045c757ea..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-CCG02.ts +++ /dev/null @@ -1,28 +0,0 @@ -import { ChannelDraft, TChannelDraft } from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const clinkChampagneGlass01Preset = - ProductVariantDraft.presets.sampleDataB2CLifestyle - .clinkChampagneGlass01() - .build(); - -const inventoryChannel = ChannelDraft.presets.sampleDataB2CLifestyle - .inventoryChannel() - .build(); - -const skuCCG02 = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .sku(clinkChampagneGlass01Preset.sku!) - .supplyChannel( - KeyReferenceDraft.presets.channel().key(inventoryChannel.key!) - ) - .quantityOnStock(100); - -export default skuCCG02; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-CCH093.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-CCH093.spec.ts deleted file mode 100644 index 16ac07295..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-CCH093.spec.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { - TInventoryEntryDraft, - TInventoryEntryDraftGraphql, -} from '../../../types'; -import skuCCH093 from './sku-CCH093'; - -describe('With skuCCH093 preset', () => { - it('should return skuCCH093 preset', () => { - const skuCCH093Preset = skuCCH093().build(); - expect(skuCCH093Preset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 100, - "restockableInDays": undefined, - "sku": "CCH-093", - "supplyChannel": undefined, - } - `); - }); - - it('should return skuCCH093 preset when built for GraphQL', () => { - const skuCCH093PresetGraphql = - skuCCH093().buildGraphql(); - expect(skuCCH093PresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 100, - "restockableInDays": undefined, - "sku": "CCH-093", - "supplyChannel": undefined, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-CCH093.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-CCH093.ts deleted file mode 100644 index 2d03a783f..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-CCH093.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const charcoalChair01Preset = ProductVariantDraft.presets.sampleDataB2CLifestyle - .charcoalChair01() - .build(); - -const skuCCH093 = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .sku(charcoalChair01Preset.sku!) - .quantityOnStock(100); - -export default skuCCH093; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-CCM089.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-CCM089.spec.ts deleted file mode 100644 index 15605732a..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-CCM089.spec.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { - TInventoryEntryDraft, - TInventoryEntryDraftGraphql, -} from '../../../types'; -import skuCCM089 from './sku-CCM089'; - -describe('With skuCCM089 preset', () => { - it('should return skuCCM089 preset', () => { - const skuCCM089Preset = skuCCM089().build(); - expect(skuCCM089Preset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 100, - "restockableInDays": undefined, - "sku": "CCM-089", - "supplyChannel": undefined, - } - `); - }); - - it('should return skuCCM089 preset when built for GraphQL', () => { - const skuCCM089PresetGraphql = - skuCCM089().buildGraphql(); - expect(skuCCM089PresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 100, - "restockableInDays": undefined, - "sku": "CCM-089", - "supplyChannel": undefined, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-CCM089.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-CCM089.ts deleted file mode 100644 index 69e190b4e..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-CCM089.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const comfortCoffeeMug01Preset = - ProductVariantDraft.presets.sampleDataB2CLifestyle - .comfortCoffeeMug01() - .build(); - -const skuCCM089 = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .sku(comfortCoffeeMug01Preset.sku!) - .quantityOnStock(100); - -export default skuCCM089; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-CDG09.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-CDG09.spec.ts deleted file mode 100644 index 91f19834a..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-CDG09.spec.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { - TInventoryEntryDraft, - TInventoryEntryDraftGraphql, -} from '../../../types'; -import skuCDG09 from './sku-CDG09'; - -describe('With skuCDG09 preset', () => { - it('should return skuCDG09 preset', () => { - const skuCDG09Preset = skuCDG09().build(); - expect(skuCDG09Preset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 100, - "restockableInDays": undefined, - "sku": "CDG-09", - "supplyChannel": undefined, - } - `); - }); - - it('should return skuCDG09 preset when built for GraphQL', () => { - const skuCDG09PresetGraphql = - skuCDG09().buildGraphql(); - expect(skuCDG09PresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 100, - "restockableInDays": undefined, - "sku": "CDG-09", - "supplyChannel": undefined, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-CDG09.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-CDG09.ts deleted file mode 100644 index a9bb7c917..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-CDG09.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const crystalDrinkingGlass01Preset = - ProductVariantDraft.presets.sampleDataB2CLifestyle - .crystalDrinkingGlass01() - .build(); - -const skuCDG09 = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .sku(crystalDrinkingGlass01Preset.sku!) - .quantityOnStock(100); - -export default skuCDG09; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-CJB01.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-CJB01.spec.ts deleted file mode 100644 index c26c31d3c..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-CJB01.spec.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { - TInventoryEntryDraft, - TInventoryEntryDraftGraphql, -} from '../../../types'; -import skuCJB01 from './sku-CJB01'; - -describe('With skuCJB01 preset', () => { - it('should return skuCJB01 preset', () => { - const skuCJB01Preset = skuCJB01().build(); - expect(skuCJB01Preset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 96, - "restockableInDays": undefined, - "sku": "CJB-01", - "supplyChannel": undefined, - } - `); - }); - - it('should return skuCJB01 preset when built for GraphQL', () => { - const skuCJB01PresetGraphql = - skuCJB01().buildGraphql(); - expect(skuCJB01PresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 96, - "restockableInDays": undefined, - "sku": "CJB-01", - "supplyChannel": undefined, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-CJB01.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-CJB01.ts deleted file mode 100644 index f8ec3da44..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-CJB01.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const cubeJuteBasket01Preset = - ProductVariantDraft.presets.sampleDataB2CLifestyle - .cubeJuteBasket01() - .build(); - -const skuCJB01 = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .sku(cubeJuteBasket01Preset.sku!) - .quantityOnStock(96); - -export default skuCJB01; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-CNS0434.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-CNS0434.spec.ts deleted file mode 100644 index 0430cfe11..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-CNS0434.spec.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { - TInventoryEntryDraft, - TInventoryEntryDraftGraphql, -} from '../../../types'; -import skuCNS0434 from './sku-CNS0434'; - -describe('With skuCNS0434 preset', () => { - it('should return skuCNS0434 preset', () => { - const skuCNS0434Preset = skuCNS0434().build(); - expect(skuCNS0434Preset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 100, - "restockableInDays": undefined, - "sku": "CNS-0434", - "supplyChannel": undefined, - } - `); - }); - - it('should return skuCNS0434 preset when built for GraphQL', () => { - const skuCNS0434PresetGraphql = - skuCNS0434().buildGraphql(); - expect(skuCNS0434PresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 100, - "restockableInDays": undefined, - "sku": "CNS-0434", - "supplyChannel": undefined, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-CNS0434.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-CNS0434.ts deleted file mode 100644 index 3cb0c52f9..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-CNS0434.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const minimalistCedarNightstand01Preset = - ProductVariantDraft.presets.sampleDataB2CLifestyle - .minimalistCedarNightstand01() - .build(); - -const skuCNS0434 = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .sku(minimalistCedarNightstand01Preset.sku!) - .quantityOnStock(100); - -export default skuCNS0434; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-COC0843.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-COC0843.spec.ts deleted file mode 100644 index 8ff0e3063..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-COC0843.spec.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { - TInventoryEntryDraft, - TInventoryEntryDraftGraphql, -} from '../../../types'; -import skuCOC0843 from './sku-COC0843'; - -describe('With skuCOC0843 preset', () => { - it('should return skuCOC0843 preset', () => { - const skuCOC0843Preset = skuCOC0843().build(); - expect(skuCOC0843Preset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 100, - "restockableInDays": undefined, - "sku": "COC-0843", - "supplyChannel": undefined, - } - `); - }); - - it('should return skuCOC0843 preset when built for GraphQL', () => { - const skuCOC0843PresetGraphql = - skuCOC0843().buildGraphql(); - expect(skuCOC0843PresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 100, - "restockableInDays": undefined, - "sku": "COC-0843", - "supplyChannel": undefined, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-COC0843.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-COC0843.ts deleted file mode 100644 index d6dbd7518..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-COC0843.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const cocktailShakerSet01Preset = - ProductVariantDraft.presets.sampleDataB2CLifestyle - .cocktailShakerSet01() - .build(); - -const skuCOC0843 = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .sku(cocktailShakerSet01Preset.sku!) - .quantityOnStock(100); - -export default skuCOC0843; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-CQB09.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-CQB09.spec.ts deleted file mode 100644 index 9147cd705..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-CQB09.spec.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { - TInventoryEntryDraft, - TInventoryEntryDraftGraphql, -} from '../../../types'; -import skuCQB09 from './sku-CQB09'; - -describe('With skuCQB09 preset', () => { - it('should return skuCQB09 preset', () => { - const skuCQB09Preset = skuCQB09().build(); - expect(skuCQB09Preset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "CQB-09", - "supplyChannel": undefined, - } - `); - }); - - it('should return skuCQB09 preset when built for GraphQL', () => { - const skuCQB09PresetGraphql = - skuCQB09().buildGraphql(); - expect(skuCQB09PresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "CQB-09", - "supplyChannel": undefined, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-CQB09.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-CQB09.ts deleted file mode 100644 index c2888fe21..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-CQB09.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const cloudQueenBed01Preset = ProductVariantDraft.presets.sampleDataB2CLifestyle - .cloudQueenBed01() - .build(); - -const skuCQB09 = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .sku(cloudQueenBed01Preset.sku!) - .quantityOnStock(1000); - -export default skuCQB09; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-CR098.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-CR098.spec.ts deleted file mode 100644 index faecfdfa7..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-CR098.spec.ts +++ /dev/null @@ -1,44 +0,0 @@ -import { - TInventoryEntryDraft, - TInventoryEntryDraftGraphql, -} from '../../../types'; -import skuCR098 from './sku-CR098'; - -describe('With skuCR098 preset', () => { - it('should return skuCR098 preset', () => { - const skuCR098Preset = skuCR098().build(); - expect(skuCR098Preset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 100, - "restockableInDays": undefined, - "sku": "CR-098", - "supplyChannel": { - "key": "inventory-channel", - "typeId": "channel", - }, - } - `); - }); - - it('should return skuCR098 preset when built for GraphQL', () => { - const skuCR098PresetGraphql = - skuCR098().buildGraphql(); - expect(skuCR098PresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 100, - "restockableInDays": undefined, - "sku": "CR-098", - "supplyChannel": { - "key": "inventory-channel", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-CR098.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-CR098.ts deleted file mode 100644 index fd0379d4c..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-CR098.ts +++ /dev/null @@ -1,28 +0,0 @@ -import { ChannelDraft, TChannelDraft } from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const cobblestoneRug01Preset = - ProductVariantDraft.presets.sampleDataB2CLifestyle - .cobblestoneRug01() - .build(); - -const inventoryChannel = ChannelDraft.presets.sampleDataB2CLifestyle - .inventoryChannel() - .build(); - -const skuCR098 = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .sku(cobblestoneRug01Preset.sku!) - .supplyChannel( - KeyReferenceDraft.presets.channel().key(inventoryChannel.key!) - ) - .quantityOnStock(100); - -export default skuCR098; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-CST01.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-CST01.spec.ts deleted file mode 100644 index ca9a5084d..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-CST01.spec.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { - TInventoryEntryDraft, - TInventoryEntryDraftGraphql, -} from '../../../types'; -import skuCST01 from './sku-CST01'; - -describe('With skuCST01 preset', () => { - it('should return skuCST01 preset', () => { - const skuCST01Preset = skuCST01().build(); - expect(skuCST01Preset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 100, - "restockableInDays": undefined, - "sku": "CST-01", - "supplyChannel": undefined, - } - `); - }); - - it('should return skuCST01 preset when built for GraphQL', () => { - const skuCST01PresetGraphql = - skuCST01().buildGraphql(); - expect(skuCST01PresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 100, - "restockableInDays": undefined, - "sku": "CST-01", - "supplyChannel": undefined, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-CST01.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-CST01.ts deleted file mode 100644 index 84b99b0b0..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-CST01.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const classicServingTray01Preset = - ProductVariantDraft.presets.sampleDataB2CLifestyle - .classicServingTray01() - .build(); - -const skuCST01 = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .sku(classicServingTray01Preset.sku!) - .quantityOnStock(100); - -export default skuCST01; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-CTSS098.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-CTSS098.spec.ts deleted file mode 100644 index 0395ddc5d..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-CTSS098.spec.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { - TInventoryEntryDraft, - TInventoryEntryDraftGraphql, -} from '../../../types'; -import skuCTSS098 from './sku-CTSS098'; - -describe('With skuCTSS098 preset', () => { - it('should return skuCTSS098 preset', () => { - const skuCTSS098Preset = skuCTSS098().build(); - expect(skuCTSS098Preset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "CTSS-098", - "supplyChannel": undefined, - } - `); - }); - - it('should return skuCTSS098 preset when built for GraphQL', () => { - const skuCTSS098PresetGraphql = - skuCTSS098().buildGraphql(); - expect(skuCTSS098PresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "CTSS-098", - "supplyChannel": undefined, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-CTSS098.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-CTSS098.ts deleted file mode 100644 index 7c7d31221..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-CTSS098.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const canelaThreeSeaterSofa01Preset = - ProductVariantDraft.presets.sampleDataB2CLifestyle - .canelaThreeSeaterSofa01() - .build(); - -const skuCTSS098 = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .sku(canelaThreeSeaterSofa01Preset.sku!) - .quantityOnStock(1000); - -export default skuCTSS098; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-CTSS0983.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-CTSS0983.spec.ts deleted file mode 100644 index 1ec2d2538..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-CTSS0983.spec.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { - TInventoryEntryDraft, - TInventoryEntryDraftGraphql, -} from '../../../types'; -import skuCTSS0983 from './sku-CTSS0983'; - -describe('With skuCTSS0983 preset', () => { - it('should return skuCTSS0983 preset', () => { - const skuCTSS0983Preset = skuCTSS0983().build(); - expect(skuCTSS0983Preset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 99, - "restockableInDays": undefined, - "sku": "CTSS-0983", - "supplyChannel": undefined, - } - `); - }); - - it('should return skuCTSS0983 preset when built for GraphQL', () => { - const skuCTSS0983PresetGraphql = - skuCTSS0983().buildGraphql(); - expect(skuCTSS0983PresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 99, - "restockableInDays": undefined, - "sku": "CTSS-0983", - "supplyChannel": undefined, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-CTSS0983.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-CTSS0983.ts deleted file mode 100644 index eed98cf1d..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-CTSS0983.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const cottonTwoSeaterSofa01Preset = - ProductVariantDraft.presets.sampleDataB2CLifestyle - .cottonTwoSeaterSofa01() - .build(); - -const skuCTSS0983 = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .sku(cottonTwoSeaterSofa01Preset.sku!) - .quantityOnStock(99); - -export default skuCTSS0983; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-CWG01.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-CWG01.spec.ts deleted file mode 100644 index d0f4d22ff..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-CWG01.spec.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { - TInventoryEntryDraft, - TInventoryEntryDraftGraphql, -} from '../../../types'; -import skuCWG01 from './sku-CWG01'; - -describe('With skuCWG01 preset', () => { - it('should return skuCWG01 preset', () => { - const skuCWG01Preset = skuCWG01().build(); - expect(skuCWG01Preset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 99, - "restockableInDays": undefined, - "sku": "CWG-01", - "supplyChannel": undefined, - } - `); - }); - - it('should return skuCWG01 preset when built for GraphQL', () => { - const skuCWG01PresetGraphql = - skuCWG01().buildGraphql(); - expect(skuCWG01PresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 99, - "restockableInDays": undefined, - "sku": "CWG-01", - "supplyChannel": undefined, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-CWG01.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-CWG01.ts deleted file mode 100644 index e32bed858..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-CWG01.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const chiantiWineGlass01Preset = - ProductVariantDraft.presets.sampleDataB2CLifestyle - .chiantiWineGlass01() - .build(); - -const skuCWG01 = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .sku(chiantiWineGlass01Preset.sku!) - .quantityOnStock(99); - -export default skuCWG01; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-DWEG09.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-DWEG09.spec.ts deleted file mode 100644 index 634809584..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-DWEG09.spec.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { - TInventoryEntryDraft, - TInventoryEntryDraftGraphql, -} from '../../../types'; -import skuDWEG09 from './sku-DWEG09'; - -describe('With skuDWEG09 preset', () => { - it('should return skuDWEG09 preset', () => { - const skuDWEG09Preset = skuDWEG09().build(); - expect(skuDWEG09Preset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 100, - "restockableInDays": undefined, - "sku": "DWEG-09", - "supplyChannel": undefined, - } - `); - }); - - it('should return skuDWEG09 preset when built for GraphQL', () => { - const skuDWEG09PresetGraphql = - skuDWEG09().buildGraphql(); - expect(skuDWEG09PresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 100, - "restockableInDays": undefined, - "sku": "DWEG-09", - "supplyChannel": undefined, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-DWEG09.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-DWEG09.ts deleted file mode 100644 index 4d747fffa..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-DWEG09.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const doubleWalledEspressoGlass01Preset = - ProductVariantDraft.presets.sampleDataB2CLifestyle - .doubleWalledEspressoGlass01() - .build(); - -const skuDWEG09 = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .sku(doubleWalledEspressoGlass01Preset.sku!) - .quantityOnStock(100); - -export default skuDWEG09; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-EARM04.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-EARM04.spec.ts deleted file mode 100644 index 46d7c2a7d..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-EARM04.spec.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { - TInventoryEntryDraft, - TInventoryEntryDraftGraphql, -} from '../../../types'; -import skuEARM04 from './sku-EARM04'; - -describe('With skuEARM04 preset', () => { - it('should return skuEARM04 preset', () => { - const skuEARM04Preset = skuEARM04().build(); - expect(skuEARM04Preset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "EARM-04", - "supplyChannel": undefined, - } - `); - }); - - it('should return skuEARM04 preset when built for GraphQL', () => { - const skuEARM04PresetGraphql = - skuEARM04().buildGraphql(); - expect(skuEARM04PresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "EARM-04", - "supplyChannel": undefined, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-EARM04.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-EARM04.ts deleted file mode 100644 index 863aec050..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-EARM04.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const edgarArmchair01Preset = ProductVariantDraft.presets.sampleDataB2CLifestyle - .edgarArmchair01() - .build(); - -const skuEARM04 = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .sku(edgarArmchair01Preset.sku!) - .quantityOnStock(1000); - -export default skuEARM04; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-EC0993.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-EC0993.spec.ts deleted file mode 100644 index dd1b40a6e..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-EC0993.spec.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { - TInventoryEntryDraft, - TInventoryEntryDraftGraphql, -} from '../../../types'; -import skuEC0993 from './sku-EC0993'; - -describe('With skuEC0993 preset', () => { - it('should return skuEC0993 preset', () => { - const skuEC0993Preset = skuEC0993().build(); - expect(skuEC0993Preset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 100, - "restockableInDays": undefined, - "sku": "EC-0993", - "supplyChannel": undefined, - } - `); - }); - - it('should return skuEC0993 preset when built for GraphQL', () => { - const skuEC0993PresetGraphql = - skuEC0993().buildGraphql(); - expect(skuEC0993PresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 100, - "restockableInDays": undefined, - "sku": "EC-0993", - "supplyChannel": undefined, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-EC0993.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-EC0993.ts deleted file mode 100644 index b4d1f8de3..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-EC0993.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const evergreenCandle01Preset = - ProductVariantDraft.presets.sampleDataB2CLifestyle - .evergreenCandle01() - .build(); - -const skuEC0993 = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .sku(evergreenCandle01Preset.sku!) - .quantityOnStock(100); - -export default skuEC0993; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-EWC07.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-EWC07.spec.ts deleted file mode 100644 index 9ee5b7541..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-EWC07.spec.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { - TInventoryEntryDraft, - TInventoryEntryDraftGraphql, -} from '../../../types'; -import skuEWC07 from './sku-EWC07'; - -describe('With skuEWC07 preset', () => { - it('should return skuEWC07 preset', () => { - const skuEWC07Preset = skuEWC07().build(); - expect(skuEWC07Preset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 100, - "restockableInDays": undefined, - "sku": "EWC-07", - "supplyChannel": undefined, - } - `); - }); - - it('should return skuEWC07 preset when built for GraphQL', () => { - const skuEWC07PresetGraphql = - skuEWC07().buildGraphql(); - expect(skuEWC07PresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 100, - "restockableInDays": undefined, - "sku": "EWC-07", - "supplyChannel": undefined, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-EWC07.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-EWC07.ts deleted file mode 100644 index 00fca3ad0..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-EWC07.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const entrywayCloset01Preset = - ProductVariantDraft.presets.sampleDataB2CLifestyle - .entrywayCloset01() - .build(); - -const skuEWC07 = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .sku(entrywayCloset01Preset.sku!) - .quantityOnStock(100); - -export default skuEWC07; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-FARM05.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-FARM05.spec.ts deleted file mode 100644 index 4848fb058..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-FARM05.spec.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { - TInventoryEntryDraft, - TInventoryEntryDraftGraphql, -} from '../../../types'; -import skuFARM05 from './sku-FARM05'; - -describe('With skuFARM05 preset', () => { - it('should return skuFARM05 preset', () => { - const skuFARM05Preset = skuFARM05().build(); - expect(skuFARM05Preset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "FARM-05", - "supplyChannel": undefined, - } - `); - }); - - it('should return skuFARM05 preset when built for GraphQL', () => { - const skuFARM05PresetGraphql = - skuFARM05().buildGraphql(); - expect(skuFARM05PresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "FARM-05", - "supplyChannel": undefined, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-FARM05.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-FARM05.ts deleted file mode 100644 index 4c32b8274..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-FARM05.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const fawnArmchair01Preset = ProductVariantDraft.presets.sampleDataB2CLifestyle - .fawnArmchair01() - .build(); - -const skuFARM05 = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .sku(fawnArmchair01Preset.sku!) - .quantityOnStock(1000); - -export default skuFARM05; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-FLAS094.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-FLAS094.spec.ts deleted file mode 100644 index e6efb696b..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-FLAS094.spec.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { - TInventoryEntryDraft, - TInventoryEntryDraftGraphql, -} from '../../../types'; -import skuFLAS094 from './sku-FLAS094'; - -describe('With skuFLAS094 preset', () => { - it('should return skuFLAS094 preset', () => { - const skuFLAS094Preset = skuFLAS094().build(); - expect(skuFLAS094Preset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 100, - "restockableInDays": undefined, - "sku": "FLAS-094", - "supplyChannel": undefined, - } - `); - }); - - it('should return skuFLAS094 preset when built for GraphQL', () => { - const skuFLAS094PresetGraphql = - skuFLAS094().buildGraphql(); - expect(skuFLAS094PresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 100, - "restockableInDays": undefined, - "sku": "FLAS-094", - "supplyChannel": undefined, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-FLAS094.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-FLAS094.ts deleted file mode 100644 index dd861593b..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-FLAS094.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const steelHipFlask01Preset = ProductVariantDraft.presets.sampleDataB2CLifestyle - .steelHipFlask01() - .build(); - -const skuFLAS094 = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .sku(steelHipFlask01Preset.sku!) - .quantityOnStock(100); - -export default skuFLAS094; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-GARM093.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-GARM093.spec.ts deleted file mode 100644 index 3728c9a0d..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-GARM093.spec.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { - TInventoryEntryDraft, - TInventoryEntryDraftGraphql, -} from '../../../types'; -import skuGARM093 from './sku-GARM093'; - -describe('With skuGARM093 preset', () => { - it('should return skuGARM093 preset', () => { - const skuGARM093Preset = skuGARM093().build(); - expect(skuGARM093Preset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 100, - "restockableInDays": undefined, - "sku": "GARM-093", - "supplyChannel": undefined, - } - `); - }); - - it('should return skuGARM093 preset when built for GraphQL', () => { - const skuGARM093PresetGraphql = - skuGARM093().buildGraphql(); - expect(skuGARM093PresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 100, - "restockableInDays": undefined, - "sku": "GARM-093", - "supplyChannel": undefined, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-GARM093.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-GARM093.ts deleted file mode 100644 index 5326f175a..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-GARM093.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const glamArmchair01Preset = ProductVariantDraft.presets.sampleDataB2CLifestyle - .glamArmchair01() - .build(); - -const skuGARM093 = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .sku(glamArmchair01Preset.sku!) - .quantityOnStock(100); - -export default skuGARM093; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-GC01.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-GC01.spec.ts deleted file mode 100644 index 9b0ff33c1..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-GC01.spec.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { - TInventoryEntryDraft, - TInventoryEntryDraftGraphql, -} from '../../../types'; -import skuGC01 from './sku-GC01'; - -describe('With skuGC01 preset', () => { - it('should return skuGC01 preset', () => { - const skuGC01Preset = skuGC01().build(); - expect(skuGC01Preset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 100, - "restockableInDays": undefined, - "sku": "GC-01", - "supplyChannel": undefined, - } - `); - }); - - it('should return skuGC01 preset when built for GraphQL', () => { - const skuGC01PresetGraphql = - skuGC01().buildGraphql(); - expect(skuGC01PresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 100, - "restockableInDays": undefined, - "sku": "GC-01", - "supplyChannel": undefined, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-GC01.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-GC01.ts deleted file mode 100644 index fa7b07fb3..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-GC01.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const greenServingPlate01Preset = - ProductVariantDraft.presets.sampleDataB2CLifestyle - .greenServingPlate01() - .build(); - -const skuGC01 = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .sku(greenServingPlate01Preset.sku!) - .quantityOnStock(100); - -export default skuGC01; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-GMCT01.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-GMCT01.spec.ts deleted file mode 100644 index 3f96be9fc..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-GMCT01.spec.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { - TInventoryEntryDraft, - TInventoryEntryDraftGraphql, -} from '../../../types'; -import skuGMCT01 from './sku-GMCT01'; - -describe('With skuGMCT01 preset', () => { - it('should return skuGMCT01 preset', () => { - const skuGMCT01Preset = skuGMCT01().build(); - expect(skuGMCT01Preset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 98, - "restockableInDays": undefined, - "sku": "GMCT-01", - "supplyChannel": undefined, - } - `); - }); - - it('should return skuGMCT01 preset when built for GraphQL', () => { - const skuGMCT01PresetGraphql = - skuGMCT01().buildGraphql(); - expect(skuGMCT01PresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 98, - "restockableInDays": undefined, - "sku": "GMCT-01", - "supplyChannel": undefined, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-GMCT01.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-GMCT01.ts deleted file mode 100644 index a56a845a5..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-GMCT01.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const modernGoldCoffeeTable01Preset = - ProductVariantDraft.presets.sampleDataB2CLifestyle - .modernGoldCoffeeTable01() - .build(); - -const skuGMCT01 = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .sku(modernGoldCoffeeTable01Preset.sku!) - .quantityOnStock(98); - -export default skuGMCT01; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-GPC01.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-GPC01.spec.ts deleted file mode 100644 index a50d2dffd..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-GPC01.spec.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { - TInventoryEntryDraft, - TInventoryEntryDraftGraphql, -} from '../../../types'; -import skuGPC01 from './sku-GPC01'; - -describe('With skuGPC01 preset', () => { - it('should return skuGPC01 preset', () => { - const skuGPC01Preset = skuGPC01().build(); - expect(skuGPC01Preset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 81, - "restockableInDays": undefined, - "sku": "GPC-01", - "supplyChannel": undefined, - } - `); - }); - - it('should return skuGPC01 preset when built for GraphQL', () => { - const skuGPC01PresetGraphql = - skuGPC01().buildGraphql(); - expect(skuGPC01PresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 81, - "restockableInDays": undefined, - "sku": "GPC-01", - "supplyChannel": undefined, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-GPC01.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-GPC01.ts deleted file mode 100644 index 7bdf16555..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-GPC01.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const geometricPillowCase01Preset = - ProductVariantDraft.presets.sampleDataB2CLifestyle - .geometricPillowCase01() - .build(); - -const skuGPC01 = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .sku(geometricPillowCase01Preset.sku!) - .quantityOnStock(81); - -export default skuGPC01; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-GPC02.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-GPC02.spec.ts deleted file mode 100644 index a568a1623..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-GPC02.spec.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { - TInventoryEntryDraft, - TInventoryEntryDraftGraphql, -} from '../../../types'; -import skuGPC02 from './sku-GPC02'; - -describe('With skuGPC02 preset', () => { - it('should return skuGPC02 preset', () => { - const skuGPC02Preset = skuGPC02().build(); - expect(skuGPC02Preset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 100, - "restockableInDays": undefined, - "sku": "GPC-02", - "supplyChannel": undefined, - } - `); - }); - - it('should return skuGPC02 preset when built for GraphQL', () => { - const skuGPC02PresetGraphql = - skuGPC02().buildGraphql(); - expect(skuGPC02PresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 100, - "restockableInDays": undefined, - "sku": "GPC-02", - "supplyChannel": undefined, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-GPC02.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-GPC02.ts deleted file mode 100644 index bec8f6bf9..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-GPC02.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const geometricPillowCase02Preset = - ProductVariantDraft.presets.sampleDataB2CLifestyle - .geometricPillowCase02() - .build(); - -const skuGPC02 = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .sku(geometricPillowCase02Preset.sku!) - .quantityOnStock(100); - -export default skuGPC02; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-GPC03.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-GPC03.spec.ts deleted file mode 100644 index 07bede0e5..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-GPC03.spec.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { - TInventoryEntryDraft, - TInventoryEntryDraftGraphql, -} from '../../../types'; -import skuGPC03 from './sku-GPC03'; - -describe('With skuGPC03 preset', () => { - it('should return skuGPC03 preset', () => { - const skuGPC03Preset = skuGPC03().build(); - expect(skuGPC03Preset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 100, - "restockableInDays": undefined, - "sku": "GPC-03", - "supplyChannel": undefined, - } - `); - }); - - it('should return skuGPC03 preset when built for GraphQL', () => { - const skuGPC03PresetGraphql = - skuGPC03().buildGraphql(); - expect(skuGPC03PresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 100, - "restockableInDays": undefined, - "sku": "GPC-03", - "supplyChannel": undefined, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-GPC03.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-GPC03.ts deleted file mode 100644 index 31571c996..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-GPC03.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const geometricPillowCase03Preset = - ProductVariantDraft.presets.sampleDataB2CLifestyle - .geometricPillowCase03() - .build(); - -const skuGPC03 = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .sku(geometricPillowCase03Preset.sku!) - .quantityOnStock(100); - -export default skuGPC03; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-GRCG01.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-GRCG01.spec.ts deleted file mode 100644 index 975ac09e2..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-GRCG01.spec.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { - TInventoryEntryDraft, - TInventoryEntryDraftGraphql, -} from '../../../types'; -import skuGRCG01 from './sku-GRCG01'; - -describe('With skuGRCG01 preset', () => { - it('should return skuGRCG01 preset', () => { - const skuGRCG01Preset = skuGRCG01().build(); - expect(skuGRCG01Preset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 0, - "restockableInDays": undefined, - "sku": "GRCG-01", - "supplyChannel": undefined, - } - `); - }); - - it('should return skuGRCG01 preset when built for GraphQL', () => { - const skuGRCG01PresetGraphql = - skuGRCG01().buildGraphql(); - expect(skuGRCG01PresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 0, - "restockableInDays": undefined, - "sku": "GRCG-01", - "supplyChannel": undefined, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-GRCG01.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-GRCG01.ts deleted file mode 100644 index 58331ebd5..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-GRCG01.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const goldRimmedChampagneGlasses01Preset = - ProductVariantDraft.presets.sampleDataB2CLifestyle - .goldRimmedChampagneGlasses01() - .build(); - -const skuGRCG01 = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .sku(goldRimmedChampagneGlasses01Preset.sku!) - .quantityOnStock(0); - -export default skuGRCG01; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-HDG02.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-HDG02.spec.ts deleted file mode 100644 index 9438dfa72..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-HDG02.spec.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { - TInventoryEntryDraft, - TInventoryEntryDraftGraphql, -} from '../../../types'; -import skuHDG02 from './sku-HDG02'; - -describe('With skuHDG02 preset', () => { - it('should return skuHDG02 preset', () => { - const skuHDG02Preset = skuHDG02().build(); - expect(skuHDG02Preset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 100, - "restockableInDays": undefined, - "sku": "HDG-02", - "supplyChannel": undefined, - } - `); - }); - - it('should return skuHDG02 preset when built for GraphQL', () => { - const skuHDG02PresetGraphql = - skuHDG02().buildGraphql(); - expect(skuHDG02PresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 100, - "restockableInDays": undefined, - "sku": "HDG-02", - "supplyChannel": undefined, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-HDG02.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-HDG02.ts deleted file mode 100644 index cf243c27b..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-HDG02.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const harmonyDrinkingGlass01Preset = - ProductVariantDraft.presets.sampleDataB2CLifestyle - .harmonyDrinkingGlass01() - .build(); - -const skuHDG02 = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .sku(harmonyDrinkingGlass01Preset.sku!) - .quantityOnStock(100); - -export default skuHDG02; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-HP01.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-HP01.spec.ts deleted file mode 100644 index 7822729d1..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-HP01.spec.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { - TInventoryEntryDraft, - TInventoryEntryDraftGraphql, -} from '../../../types'; -import skuHP01 from './sku-HP01'; - -describe('With skuHP01 preset', () => { - it('should return skuHP01 preset', () => { - const skuHP01Preset = skuHP01().build(); - expect(skuHP01Preset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 100, - "restockableInDays": undefined, - "sku": "HP-01", - "supplyChannel": undefined, - } - `); - }); - - it('should return skuHP01 preset when built for GraphQL', () => { - const skuHP01PresetGraphql = - skuHP01().buildGraphql(); - expect(skuHP01PresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 100, - "restockableInDays": undefined, - "sku": "HP-01", - "supplyChannel": undefined, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-HP01.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-HP01.ts deleted file mode 100644 index 17360e178..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-HP01.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const harvestPlate01Preset = ProductVariantDraft.presets.sampleDataB2CLifestyle - .harvestPlate01() - .build(); - -const skuHP01 = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .sku(harvestPlate01Preset.sku!) - .quantityOnStock(100); - -export default skuHP01; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-ILC01.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-ILC01.spec.ts deleted file mode 100644 index 9ffdc174c..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-ILC01.spec.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { - TInventoryEntryDraft, - TInventoryEntryDraftGraphql, -} from '../../../types'; -import skuILC01 from './sku-ILC01'; - -describe('With skuILC01 preset', () => { - it('should return skuILC01 preset', () => { - const skuILC01Preset = skuILC01().build(); - expect(skuILC01Preset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 100, - "restockableInDays": undefined, - "sku": "ILC-01", - "supplyChannel": undefined, - } - `); - }); - - it('should return skuILC01 preset when built for GraphQL', () => { - const skuILC01PresetGraphql = - skuILC01().buildGraphql(); - expect(skuILC01PresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 100, - "restockableInDays": undefined, - "sku": "ILC-01", - "supplyChannel": undefined, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-ILC01.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-ILC01.ts deleted file mode 100644 index bfec70058..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-ILC01.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const ivoryLoungeChair01Preset = - ProductVariantDraft.presets.sampleDataB2CLifestyle - .ivoryLoungeChair01() - .build(); - -const skuILC01 = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .sku(ivoryLoungeChair01Preset.sku!) - .quantityOnStock(100); - -export default skuILC01; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-IQB09.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-IQB09.spec.ts deleted file mode 100644 index bad1e2c62..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-IQB09.spec.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { - TInventoryEntryDraft, - TInventoryEntryDraftGraphql, -} from '../../../types'; -import skuIQB09 from './sku-IQB09'; - -describe('With skuIQB09 preset', () => { - it('should return skuIQB09 preset', () => { - const skuIQB09Preset = skuIQB09().build(); - expect(skuIQB09Preset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 100, - "restockableInDays": undefined, - "sku": "IQB-09", - "supplyChannel": undefined, - } - `); - }); - - it('should return skuIQB09 preset when built for GraphQL', () => { - const skuIQB09PresetGraphql = - skuIQB09().buildGraphql(); - expect(skuIQB09PresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 100, - "restockableInDays": undefined, - "sku": "IQB-09", - "supplyChannel": undefined, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-IQB09.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-IQB09.ts deleted file mode 100644 index 004242a43..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-IQB09.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const serenityQueenBed01Preset = - ProductVariantDraft.presets.sampleDataB2CLifestyle - .serenityQueenBed01() - .build(); - -const skuIQB09 = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .sku(serenityQueenBed01Preset.sku!) - .quantityOnStock(100); - -export default skuIQB09; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-ISP01.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-ISP01.spec.ts deleted file mode 100644 index 0496c6d4e..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-ISP01.spec.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { - TInventoryEntryDraft, - TInventoryEntryDraftGraphql, -} from '../../../types'; -import skuISP01 from './sku-ISP01'; - -describe('With skuISP01 preset', () => { - it('should return skuISP01 preset', () => { - const skuISP01Preset = skuISP01().build(); - expect(skuISP01Preset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 100, - "restockableInDays": undefined, - "sku": "ISP-01", - "supplyChannel": undefined, - } - `); - }); - - it('should return skuISP01 preset when built for GraphQL', () => { - const skuISP01PresetGraphql = - skuISP01().buildGraphql(); - expect(skuISP01PresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 100, - "restockableInDays": undefined, - "sku": "ISP-01", - "supplyChannel": undefined, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-ISP01.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-ISP01.ts deleted file mode 100644 index 9e6956215..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-ISP01.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const ivoryPlate01Preset = ProductVariantDraft.presets.sampleDataB2CLifestyle - .ivoryPlate01() - .build(); - -const skuISP01 = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .sku(ivoryPlate01Preset.sku!) - .quantityOnStock(100); - -export default skuISP01; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-JAR08.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-JAR08.spec.ts deleted file mode 100644 index c7fa5bc11..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-JAR08.spec.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { - TInventoryEntryDraft, - TInventoryEntryDraftGraphql, -} from '../../../types'; -import skuJAR08 from './sku-JAR08'; - -describe('With skuJAR08 preset', () => { - it('should return skuJAR08 preset', () => { - const skuJAR08Preset = skuJAR08().build(); - expect(skuJAR08Preset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 100, - "restockableInDays": undefined, - "sku": "JAR-08", - "supplyChannel": undefined, - } - `); - }); - - it('should return skuJAR08 preset when built for GraphQL', () => { - const skuJAR08PresetGraphql = - skuJAR08().buildGraphql(); - expect(skuJAR08PresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 100, - "restockableInDays": undefined, - "sku": "JAR-08", - "supplyChannel": undefined, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-JAR08.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-JAR08.ts deleted file mode 100644 index 84a0c666a..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-JAR08.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const juteRug01Preset = ProductVariantDraft.presets.sampleDataB2CLifestyle - .juteRug01() - .build(); - -const skuJAR08 = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .sku(juteRug01Preset.sku!) - .quantityOnStock(100); - -export default skuJAR08; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-LAMR03.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-LAMR03.spec.ts deleted file mode 100644 index 70ec10856..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-LAMR03.spec.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { - TInventoryEntryDraft, - TInventoryEntryDraftGraphql, -} from '../../../types'; -import skuLAMR03 from './sku-LAMR03'; - -describe('With skuLAMR03 preset', () => { - it('should return skuLAMR03 preset', () => { - const skuLAMR03Preset = skuLAMR03().build(); - expect(skuLAMR03Preset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 100, - "restockableInDays": undefined, - "sku": "LAMR-03", - "supplyChannel": undefined, - } - `); - }); - - it('should return skuLAMR03 preset when built for GraphQL', () => { - const skuLAMR03PresetGraphql = - skuLAMR03().buildGraphql(); - expect(skuLAMR03PresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 100, - "restockableInDays": undefined, - "sku": "LAMR-03", - "supplyChannel": undefined, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-LAMR03.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-LAMR03.ts deleted file mode 100644 index f26b6dffb..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-LAMR03.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const leahArmchair01Preset = ProductVariantDraft.presets.sampleDataB2CLifestyle - .leahArmchair01() - .build(); - -const skuLAMR03 = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .sku(leahArmchair01Preset.sku!) - .quantityOnStock(100); - -export default skuLAMR03; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-LBPC09.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-LBPC09.spec.ts deleted file mode 100644 index 5b5cab4d8..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-LBPC09.spec.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { - TInventoryEntryDraft, - TInventoryEntryDraftGraphql, -} from '../../../types'; -import skuLBPC09 from './sku-LBPC09'; - -describe('With skuLBPC09 preset', () => { - it('should return skuLBPC09 preset', () => { - const skuLBPC09Preset = skuLBPC09().build(); - expect(skuLBPC09Preset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 100, - "restockableInDays": undefined, - "sku": "LBPC-09", - "supplyChannel": undefined, - } - `); - }); - - it('should return skuLBPC09 preset when built for GraphQL', () => { - const skuLBPC09PresetGraphql = - skuLBPC09().buildGraphql(); - expect(skuLBPC09PresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 100, - "restockableInDays": undefined, - "sku": "LBPC-09", - "supplyChannel": undefined, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-LBPC09.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-LBPC09.ts deleted file mode 100644 index 474afd808..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-LBPC09.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const benPillowCover01Preset = - ProductVariantDraft.presets.sampleDataB2CLifestyle - .benPillowCover01() - .build(); - -const skuLBPC09 = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .sku(benPillowCover01Preset.sku!) - .quantityOnStock(100); - -export default skuLBPC09; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-LCO034.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-LCO034.spec.ts deleted file mode 100644 index b00815f60..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-LCO034.spec.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { - TInventoryEntryDraft, - TInventoryEntryDraftGraphql, -} from '../../../types'; -import skuLCO034 from './sku-LCO034'; - -describe('With skuLCO034 preset', () => { - it('should return skuLCO034 preset', () => { - const skuLCO034Preset = skuLCO034().build(); - expect(skuLCO034Preset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "LCO-034", - "supplyChannel": undefined, - } - `); - }); - - it('should return skuLCO034 preset when built for GraphQL', () => { - const skuLCO034PresetGraphql = - skuLCO034().buildGraphql(); - expect(skuLCO034PresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "LCO-034", - "supplyChannel": undefined, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-LCO034.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-LCO034.ts deleted file mode 100644 index b7cbe7c6c..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-LCO034.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const leatherCoaster01Preset = - ProductVariantDraft.presets.sampleDataB2CLifestyle - .leatherCoaster01() - .build(); - -const skuLCO034 = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .sku(leatherCoaster01Preset.sku!) - .quantityOnStock(1000); - -export default skuLCO034; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-LCP01.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-LCP01.spec.ts deleted file mode 100644 index 7decb2869..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-LCP01.spec.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { - TInventoryEntryDraft, - TInventoryEntryDraftGraphql, -} from '../../../types'; -import skuLCP01 from './sku-LCP01'; - -describe('With skuLCP01 preset', () => { - it('should return skuLCP01 preset', () => { - const skuLCP01Preset = skuLCP01().build(); - expect(skuLCP01Preset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 74, - "restockableInDays": undefined, - "sku": "LCP-01", - "supplyChannel": undefined, - } - `); - }); - - it('should return skuLCP01 preset when built for GraphQL', () => { - const skuLCP01PresetGraphql = - skuLCP01().buildGraphql(); - expect(skuLCP01PresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 74, - "restockableInDays": undefined, - "sku": "LCP-01", - "supplyChannel": undefined, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-LCP01.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-LCP01.ts deleted file mode 100644 index 53e59d1f2..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-LCP01.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const largeCeramicPlate01Preset = - ProductVariantDraft.presets.sampleDataB2CLifestyle - .largeCeramicPlate01() - .build(); - -const skuLCP01 = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .sku(largeCeramicPlate01Preset.sku!) - .quantityOnStock(74); - -export default skuLCP01; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-LCP02.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-LCP02.spec.ts deleted file mode 100644 index 8b6adbf51..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-LCP02.spec.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { - TInventoryEntryDraft, - TInventoryEntryDraftGraphql, -} from '../../../types'; -import skuLCP02 from './sku-LCP02'; - -describe('With skuLCP02 preset', () => { - it('should return skuLCP02 preset', () => { - const skuLCP02Preset = skuLCP02().build(); - expect(skuLCP02Preset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 100, - "restockableInDays": undefined, - "sku": "LCP-02", - "supplyChannel": undefined, - } - `); - }); - - it('should return skuLCP02 preset when built for GraphQL', () => { - const skuLCP02PresetGraphql = - skuLCP02().buildGraphql(); - expect(skuLCP02PresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 100, - "restockableInDays": undefined, - "sku": "LCP-02", - "supplyChannel": undefined, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-LCP02.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-LCP02.ts deleted file mode 100644 index 3d6af82eb..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-LCP02.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const largeCeramicPlate02Preset = - ProductVariantDraft.presets.sampleDataB2CLifestyle - .largeCeramicPlate02() - .build(); - -const skuLCP02 = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .sku(largeCeramicPlate02Preset.sku!) - .quantityOnStock(100); - -export default skuLCP02; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-LPC011.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-LPC011.spec.ts deleted file mode 100644 index 4182de880..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-LPC011.spec.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { - TInventoryEntryDraft, - TInventoryEntryDraftGraphql, -} from '../../../types'; -import skuLPC011 from './sku-LPC011'; - -describe('With skuLPC011 preset', () => { - it('should return skuLPC011 preset', () => { - const skuLPC011Preset = skuLPC011().build(); - expect(skuLPC011Preset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 100, - "restockableInDays": undefined, - "sku": "LPC-011", - "supplyChannel": undefined, - } - `); - }); - - it('should return skuLPC011 preset when built for GraphQL', () => { - const skuLPC011PresetGraphql = - skuLPC011().buildGraphql(); - expect(skuLPC011PresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 100, - "restockableInDays": undefined, - "sku": "LPC-011", - "supplyChannel": undefined, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-LPC011.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-LPC011.ts deleted file mode 100644 index b77a2b862..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-LPC011.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const luxePillowCover01Preset = - ProductVariantDraft.presets.sampleDataB2CLifestyle - .luxePillowCover01() - .build(); - -const skuLPC011 = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .sku(luxePillowCover01Preset.sku!) - .quantityOnStock(100); - -export default skuLPC011; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-LPC09.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-LPC09.spec.ts deleted file mode 100644 index 42dd5bff9..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-LPC09.spec.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { - TInventoryEntryDraft, - TInventoryEntryDraftGraphql, -} from '../../../types'; -import skuLPC09 from './sku-LPC09'; - -describe('With skuLPC09 preset', () => { - it('should return skuLPC09 preset', () => { - const skuLPC09Preset = skuLPC09().build(); - expect(skuLPC09Preset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 100, - "restockableInDays": undefined, - "sku": "LPC-09", - "supplyChannel": undefined, - } - `); - }); - - it('should return skuLPC09 preset when built for GraphQL', () => { - const skuLPC09PresetGraphql = - skuLPC09().buildGraphql(); - expect(skuLPC09PresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 100, - "restockableInDays": undefined, - "sku": "LPC-09", - "supplyChannel": undefined, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-LPC09.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-LPC09.ts deleted file mode 100644 index 398435d75..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-LPC09.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const lanaPillowCover01Preset = - ProductVariantDraft.presets.sampleDataB2CLifestyle - .lanaPillowCover01() - .build(); - -const skuLPC09 = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .sku(lanaPillowCover01Preset.sku!) - .quantityOnStock(100); - -export default skuLPC09; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-LPQB084.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-LPQB084.spec.ts deleted file mode 100644 index 3beafa05a..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-LPQB084.spec.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { - TInventoryEntryDraft, - TInventoryEntryDraftGraphql, -} from '../../../types'; -import skuLPQB084 from './sku-LPQB084'; - -describe('With skuLPQB084 preset', () => { - it('should return skuLPQB084 preset', () => { - const skuLPQB084Preset = skuLPQB084().build(); - expect(skuLPQB084Preset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 100, - "restockableInDays": undefined, - "sku": "LPQB-084", - "supplyChannel": undefined, - } - `); - }); - - it('should return skuLPQB084 preset when built for GraphQL', () => { - const skuLPQB084PresetGraphql = - skuLPQB084().buildGraphql(); - expect(skuLPQB084PresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 100, - "restockableInDays": undefined, - "sku": "LPQB-084", - "supplyChannel": undefined, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-LPQB084.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-LPQB084.ts deleted file mode 100644 index ac339ce7f..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-LPQB084.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const tanQueenBed01Preset = ProductVariantDraft.presets.sampleDataB2CLifestyle - .tanQueenBed01() - .build(); - -const skuLPQB084 = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .sku(tanQueenBed01Preset.sku!) - .quantityOnStock(100); - -export default skuLPQB084; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-MB0973.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-MB0973.spec.ts deleted file mode 100644 index 56bfc53be..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-MB0973.spec.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { - TInventoryEntryDraft, - TInventoryEntryDraftGraphql, -} from '../../../types'; -import skuMB0973 from './sku-MB0973'; - -describe('With skuMB0973 preset', () => { - it('should return skuMB0973 preset', () => { - const skuMB0973Preset = skuMB0973().build(); - expect(skuMB0973Preset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 100, - "restockableInDays": undefined, - "sku": "MB-0973", - "supplyChannel": undefined, - } - `); - }); - - it('should return skuMB0973 preset when built for GraphQL', () => { - const skuMB0973PresetGraphql = - skuMB0973().buildGraphql(); - expect(skuMB0973PresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 100, - "restockableInDays": undefined, - "sku": "MB-0973", - "supplyChannel": undefined, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-MB0973.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-MB0973.ts deleted file mode 100644 index 0c7b11bb9..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-MB0973.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const modernBookcase01Preset = - ProductVariantDraft.presets.sampleDataB2CLifestyle - .modernBookcase01() - .build(); - -const skuMB0973 = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .sku(modernBookcase01Preset.sku!) - .quantityOnStock(100); - -export default skuMB0973; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-MCP01.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-MCP01.spec.ts deleted file mode 100644 index 942be5123..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-MCP01.spec.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { - TInventoryEntryDraft, - TInventoryEntryDraftGraphql, -} from '../../../types'; -import skuMCP01 from './sku-MCP01'; - -describe('With skuMCP01 preset', () => { - it('should return skuMCP01 preset', () => { - const skuMCP01Preset = skuMCP01().build(); - expect(skuMCP01Preset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 100, - "restockableInDays": undefined, - "sku": "MCP-01", - "supplyChannel": undefined, - } - `); - }); - - it('should return skuMCP01 preset when built for GraphQL', () => { - const skuMCP01PresetGraphql = - skuMCP01().buildGraphql(); - expect(skuMCP01PresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 100, - "restockableInDays": undefined, - "sku": "MCP-01", - "supplyChannel": undefined, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-MCP01.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-MCP01.ts deleted file mode 100644 index 48e7052d8..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-MCP01.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const modernCeramicPlate01Preset = - ProductVariantDraft.presets.sampleDataB2CLifestyle - .modernCeramicPlate01() - .build(); - -const skuMCP01 = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .sku(modernCeramicPlate01Preset.sku!) - .quantityOnStock(100); - -export default skuMCP01; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-MGD01.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-MGD01.spec.ts deleted file mode 100644 index 69ab50a84..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-MGD01.spec.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { - TInventoryEntryDraft, - TInventoryEntryDraftGraphql, -} from '../../../types'; -import skuMGD01 from './sku-MGD01'; - -describe('With skuMGD01 preset', () => { - it('should return skuMGD01 preset', () => { - const skuMGD01Preset = skuMGD01().build(); - expect(skuMGD01Preset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 76, - "restockableInDays": undefined, - "sku": "MGD-01", - "supplyChannel": undefined, - } - `); - }); - - it('should return skuMGD01 preset when built for GraphQL', () => { - const skuMGD01PresetGraphql = - skuMGD01().buildGraphql(); - expect(skuMGD01PresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 76, - "restockableInDays": undefined, - "sku": "MGD-01", - "supplyChannel": undefined, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-MGD01.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-MGD01.ts deleted file mode 100644 index 0c1fd27cd..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-MGD01.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const modernGlamDresser01Preset = - ProductVariantDraft.presets.sampleDataB2CLifestyle - .modernGlamDresser01() - .build(); - -const skuMGD01 = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .sku(modernGlamDresser01Preset.sku!) - .quantityOnStock(76); - -export default skuMGD01; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-MLP01.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-MLP01.spec.ts deleted file mode 100644 index bb7631bf0..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-MLP01.spec.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { - TInventoryEntryDraft, - TInventoryEntryDraftGraphql, -} from '../../../types'; -import skuMLP01 from './sku-MLP01'; - -describe('With skuMLP01 preset', () => { - it('should return skuMLP01 preset', () => { - const skuMLP01Preset = skuMLP01().build(); - expect(skuMLP01Preset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 84, - "restockableInDays": undefined, - "sku": "MLP-01", - "supplyChannel": undefined, - } - `); - }); - - it('should return skuMLP01 preset when built for GraphQL', () => { - const skuMLP01PresetGraphql = - skuMLP01().buildGraphql(); - expect(skuMLP01PresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 84, - "restockableInDays": undefined, - "sku": "MLP-01", - "supplyChannel": undefined, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-MLP01.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-MLP01.ts deleted file mode 100644 index 6fb9cafa8..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-MLP01.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const modernLandscapePainting01Preset = - ProductVariantDraft.presets.sampleDataB2CLifestyle - .modernLandscapePainting01() - .build(); - -const skuMLP01 = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .sku(modernLandscapePainting01Preset.sku!) - .quantityOnStock(84); - -export default skuMLP01; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-MMST01.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-MMST01.spec.ts deleted file mode 100644 index 19440fdb8..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-MMST01.spec.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { - TInventoryEntryDraft, - TInventoryEntryDraftGraphql, -} from '../../../types'; -import skuMMST01 from './sku-MMST01'; - -describe('With skuMMST01 preset', () => { - it('should return skuMMST01 preset', () => { - const skuMMST01Preset = skuMMST01().build(); - expect(skuMMST01Preset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 72, - "restockableInDays": undefined, - "sku": "MMST-01", - "supplyChannel": undefined, - } - `); - }); - - it('should return skuMMST01 preset when built for GraphQL', () => { - const skuMMST01PresetGraphql = - skuMMST01().buildGraphql(); - expect(skuMMST01PresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 72, - "restockableInDays": undefined, - "sku": "MMST-01", - "supplyChannel": undefined, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-MMST01.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-MMST01.ts deleted file mode 100644 index b3f6f6626..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-MMST01.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const minimalistModernSideTable01Preset = - ProductVariantDraft.presets.sampleDataB2CLifestyle - .minimalistModernSideTable01() - .build(); - -const skuMMST01 = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .sku(minimalistModernSideTable01Preset.sku!) - .quantityOnStock(72); - -export default skuMMST01; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-MMST02.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-MMST02.spec.ts deleted file mode 100644 index 105d3202a..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-MMST02.spec.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { - TInventoryEntryDraft, - TInventoryEntryDraftGraphql, -} from '../../../types'; -import skuMMST02 from './sku-MMST02'; - -describe('With skuMMST02 preset', () => { - it('should return skuMMST02 preset', () => { - const skuMMST02Preset = skuMMST02().build(); - expect(skuMMST02Preset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 100, - "restockableInDays": undefined, - "sku": "MMST-02", - "supplyChannel": undefined, - } - `); - }); - - it('should return skuMMST02 preset when built for GraphQL', () => { - const skuMMST02PresetGraphql = - skuMMST02().buildGraphql(); - expect(skuMMST02PresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 100, - "restockableInDays": undefined, - "sku": "MMST-02", - "supplyChannel": undefined, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-MMST02.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-MMST02.ts deleted file mode 100644 index 47065cf6f..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-MMST02.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const minimalistModernSideTable02Preset = - ProductVariantDraft.presets.sampleDataB2CLifestyle - .minimalistModernSideTable02() - .build(); - -const skuMMST02 = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .sku(minimalistModernSideTable02Preset.sku!) - .quantityOnStock(100); - -export default skuMMST02; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-MPC02.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-MPC02.spec.ts deleted file mode 100644 index 2d06793b4..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-MPC02.spec.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { - TInventoryEntryDraft, - TInventoryEntryDraftGraphql, -} from '../../../types'; -import skuMPC02 from './sku-MPC02'; - -describe('With skuMPC02 preset', () => { - it('should return skuMPC02 preset', () => { - const skuMPC02Preset = skuMPC02().build(); - expect(skuMPC02Preset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 100, - "restockableInDays": undefined, - "sku": "MPC-02", - "supplyChannel": undefined, - } - `); - }); - - it('should return skuMPC02 preset when built for GraphQL', () => { - const skuMPC02PresetGraphql = - skuMPC02().buildGraphql(); - expect(skuMPC02PresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 100, - "restockableInDays": undefined, - "sku": "MPC-02", - "supplyChannel": undefined, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-MPC02.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-MPC02.ts deleted file mode 100644 index 2f2043168..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-MPC02.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const mayaPillowCover01Preset = - ProductVariantDraft.presets.sampleDataB2CLifestyle - .mayaPillowCover01() - .build(); - -const skuMPC02 = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .sku(mayaPillowCover01Preset.sku!) - .quantityOnStock(100); - -export default skuMPC02; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-MPC07.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-MPC07.spec.ts deleted file mode 100644 index b4366a7a5..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-MPC07.spec.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { - TInventoryEntryDraft, - TInventoryEntryDraftGraphql, -} from '../../../types'; -import skuMPC07 from './sku-MPC07'; - -describe('With skuMPC07 preset', () => { - it('should return skuMPC07 preset', () => { - const skuMPC07Preset = skuMPC07().build(); - expect(skuMPC07Preset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 100, - "restockableInDays": undefined, - "sku": "MPC-07", - "supplyChannel": undefined, - } - `); - }); - - it('should return skuMPC07 preset when built for GraphQL', () => { - const skuMPC07PresetGraphql = - skuMPC07().buildGraphql(); - expect(skuMPC07PresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 100, - "restockableInDays": undefined, - "sku": "MPC-07", - "supplyChannel": undefined, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-MPC07.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-MPC07.ts deleted file mode 100644 index 036a2f9a5..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-MPC07.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const mayaPillowCover02Preset = - ProductVariantDraft.presets.sampleDataB2CLifestyle - .mayaPillowCover02() - .build(); - -const skuMPC07 = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .sku(mayaPillowCover02Preset.sku!) - .quantityOnStock(100); - -export default skuMPC07; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-MR05.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-MR05.spec.ts deleted file mode 100644 index b991467ae..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-MR05.spec.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { - TInventoryEntryDraft, - TInventoryEntryDraftGraphql, -} from '../../../types'; -import skuMR05 from './sku-MR05'; - -describe('With skuMR05 preset', () => { - it('should return skuMR05 preset', () => { - const skuMR05Preset = skuMR05().build(); - expect(skuMR05Preset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 100, - "restockableInDays": undefined, - "sku": "MR-05", - "supplyChannel": undefined, - } - `); - }); - - it('should return skuMR05 preset when built for GraphQL', () => { - const skuMR05PresetGraphql = - skuMR05().buildGraphql(); - expect(skuMR05PresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 100, - "restockableInDays": undefined, - "sku": "MR-05", - "supplyChannel": undefined, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-MR05.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-MR05.ts deleted file mode 100644 index 8e82e102b..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-MR05.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const meadowRug03Preset = ProductVariantDraft.presets.sampleDataB2CLifestyle - .meadowRug03() - .build(); - -const skuMR05 = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .sku(meadowRug03Preset.sku!) - .quantityOnStock(100); - -export default skuMR05; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-MR08.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-MR08.spec.ts deleted file mode 100644 index 077862eff..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-MR08.spec.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { - TInventoryEntryDraft, - TInventoryEntryDraftGraphql, -} from '../../../types'; -import skuMR08 from './sku-MR08'; - -describe('With skuMR08 preset', () => { - it('should return skuMR08 preset', () => { - const skuMR08Preset = skuMR08().build(); - expect(skuMR08Preset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 100, - "restockableInDays": undefined, - "sku": "MR-08", - "supplyChannel": undefined, - } - `); - }); - - it('should return skuMR08 preset when built for GraphQL', () => { - const skuMR08PresetGraphql = - skuMR08().buildGraphql(); - expect(skuMR08PresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 100, - "restockableInDays": undefined, - "sku": "MR-08", - "supplyChannel": undefined, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-MR08.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-MR08.ts deleted file mode 100644 index 260c62073..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-MR08.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const meadowRug02Preset = ProductVariantDraft.presets.sampleDataB2CLifestyle - .meadowRug02() - .build(); - -const skuMR08 = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .sku(meadowRug02Preset.sku!) - .quantityOnStock(100); - -export default skuMR08; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-MTB023.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-MTB023.spec.ts deleted file mode 100644 index 01850bf91..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-MTB023.spec.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { - TInventoryEntryDraft, - TInventoryEntryDraftGraphql, -} from '../../../types'; -import skuMTB023 from './sku-MTB023'; - -describe('With skuMTB023 preset', () => { - it('should return skuMTB023 preset', () => { - const skuMTB023Preset = skuMTB023().build(); - expect(skuMTB023Preset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 100, - "restockableInDays": undefined, - "sku": "MTB-023", - "supplyChannel": undefined, - } - `); - }); - - it('should return skuMTB023 preset when built for GraphQL', () => { - const skuMTB023PresetGraphql = - skuMTB023().buildGraphql(); - expect(skuMTB023PresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 100, - "restockableInDays": undefined, - "sku": "MTB-023", - "supplyChannel": undefined, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-MTB023.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-MTB023.ts deleted file mode 100644 index 78ccbc812..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-MTB023.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const opalKingBed01Preset = ProductVariantDraft.presets.sampleDataB2CLifestyle - .opalKingBed01() - .build(); - -const skuMTB023 = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .sku(opalKingBed01Preset.sku!) - .quantityOnStock(100); - -export default skuMTB023; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-MTSS01.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-MTSS01.spec.ts deleted file mode 100644 index 80432715c..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-MTSS01.spec.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { - TInventoryEntryDraft, - TInventoryEntryDraftGraphql, -} from '../../../types'; -import skuMTSS01 from './sku-MTSS01'; - -describe('With skuMTSS01 preset', () => { - it('should return skuMTSS01 preset', () => { - const skuMTSS01Preset = skuMTSS01().build(); - expect(skuMTSS01Preset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 94, - "restockableInDays": undefined, - "sku": "MTSS-01", - "supplyChannel": undefined, - } - `); - }); - - it('should return skuMTSS01 preset when built for GraphQL', () => { - const skuMTSS01PresetGraphql = - skuMTSS01().buildGraphql(); - expect(skuMTSS01PresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 94, - "restockableInDays": undefined, - "sku": "MTSS-01", - "supplyChannel": undefined, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-MTSS01.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-MTSS01.ts deleted file mode 100644 index d099305d4..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-MTSS01.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const modernThreeSeaterSofa01Preset = - ProductVariantDraft.presets.sampleDataB2CLifestyle - .modernThreeSeaterSofa01() - .build(); - -const skuMTSS01 = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .sku(modernThreeSeaterSofa01Preset.sku!) - .quantityOnStock(94); - -export default skuMTSS01; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-MUQB01.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-MUQB01.spec.ts deleted file mode 100644 index b6aa6b5c7..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-MUQB01.spec.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { - TInventoryEntryDraft, - TInventoryEntryDraftGraphql, -} from '../../../types'; -import skuMUQB01 from './sku-MUQB01'; - -describe('With skuMUQB01 preset', () => { - it('should return skuMUQB01 preset', () => { - const skuMUQB01Preset = skuMUQB01().build(); - expect(skuMUQB01Preset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 95, - "restockableInDays": undefined, - "sku": "MUQB-01", - "supplyChannel": undefined, - } - `); - }); - - it('should return skuMUQB01 preset when built for GraphQL', () => { - const skuMUQB01PresetGraphql = - skuMUQB01().buildGraphql(); - expect(skuMUQB01PresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 95, - "restockableInDays": undefined, - "sku": "MUQB-01", - "supplyChannel": undefined, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-MUQB01.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-MUQB01.ts deleted file mode 100644 index 182ee2518..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-MUQB01.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const modernUpholsteredQueenBed01Preset = - ProductVariantDraft.presets.sampleDataB2CLifestyle - .modernUpholsteredQueenBed01() - .build(); - -const skuMUQB01 = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .sku(modernUpholsteredQueenBed01Preset.sku!) - .quantityOnStock(95); - -export default skuMUQB01; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-MWT01.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-MWT01.spec.ts deleted file mode 100644 index 54a732846..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-MWT01.spec.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { - TInventoryEntryDraft, - TInventoryEntryDraftGraphql, -} from '../../../types'; -import skuMWT01 from './sku-MWT01'; - -describe('With skuMWT01 preset', () => { - it('should return skuMWT01 preset', () => { - const skuMWT01Preset = skuMWT01().build(); - expect(skuMWT01Preset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 100, - "restockableInDays": undefined, - "sku": "MWT-01", - "supplyChannel": undefined, - } - `); - }); - - it('should return skuMWT01 preset when built for GraphQL', () => { - const skuMWT01PresetGraphql = - skuMWT01().buildGraphql(); - expect(skuMWT01PresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 100, - "restockableInDays": undefined, - "sku": "MWT-01", - "supplyChannel": undefined, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-MWT01.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-MWT01.ts deleted file mode 100644 index 4e6fce914..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-MWT01.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const marquisTray01Preset = ProductVariantDraft.presets.sampleDataB2CLifestyle - .marquisTray01() - .build(); - -const skuMWT01 = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .sku(marquisTray01Preset.sku!) - .quantityOnStock(100); - -export default skuMWT01; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-NJOP09.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-NJOP09.spec.ts deleted file mode 100644 index 7efe140eb..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-NJOP09.spec.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { - TInventoryEntryDraft, - TInventoryEntryDraftGraphql, -} from '../../../types'; -import skuNJOP09 from './sku-NJOP09'; - -describe('With skuNJOP09 preset', () => { - it('should return skuNJOP09 preset', () => { - const skuNJOP09Preset = skuNJOP09().build(); - expect(skuNJOP09Preset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "NJOP-09", - "supplyChannel": undefined, - } - `); - }); - - it('should return skuNJOP09 preset when built for GraphQL', () => { - const skuNJOP09PresetGraphql = - skuNJOP09().buildGraphql(); - expect(skuNJOP09PresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "NJOP-09", - "supplyChannel": undefined, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-NJOP09.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-NJOP09.ts deleted file mode 100644 index cc1d315a0..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-NJOP09.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const wilmaChair01Preset = ProductVariantDraft.presets.sampleDataB2CLifestyle - .wilmaChair01() - .build(); - -const skuNJOP09 = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .sku(wilmaChair01Preset.sku!) - .quantityOnStock(1000); - -export default skuNJOP09; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-NR09.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-NR09.spec.ts deleted file mode 100644 index 9b85a07b6..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-NR09.spec.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { - TInventoryEntryDraft, - TInventoryEntryDraftGraphql, -} from '../../../types'; -import skuNR09 from './sku-NR09'; - -describe('With skuNR09 preset', () => { - it('should return skuNR09 preset', () => { - const skuNR09Preset = skuNR09().build(); - expect(skuNR09Preset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 100, - "restockableInDays": undefined, - "sku": "NR-09", - "supplyChannel": undefined, - } - `); - }); - - it('should return skuNR09 preset when built for GraphQL', () => { - const skuNR09PresetGraphql = - skuNR09().buildGraphql(); - expect(skuNR09PresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 100, - "restockableInDays": undefined, - "sku": "NR-09", - "supplyChannel": undefined, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-NR09.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-NR09.ts deleted file mode 100644 index dc821dabf..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-NR09.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const naturaRug01Preset = ProductVariantDraft.presets.sampleDataB2CLifestyle - .naturaRug01() - .build(); - -const skuNR09 = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .sku(naturaRug01Preset.sku!) - .quantityOnStock(100); - -export default skuNR09; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-NTSS01.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-NTSS01.spec.ts deleted file mode 100644 index df32ed445..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-NTSS01.spec.ts +++ /dev/null @@ -1,44 +0,0 @@ -import { - TInventoryEntryDraft, - TInventoryEntryDraftGraphql, -} from '../../../types'; -import skuNTSS01 from './sku-NTSS01'; - -describe('With skuNTSS01 preset', () => { - it('should return skuNTSS01 preset', () => { - const skuNTSS01Preset = skuNTSS01().build(); - expect(skuNTSS01Preset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 97, - "restockableInDays": undefined, - "sku": "NTSS-01", - "supplyChannel": { - "key": "inventory-channel", - "typeId": "channel", - }, - } - `); - }); - - it('should return skuNTSS01 preset when built for GraphQL', () => { - const skuNTSS01PresetGraphql = - skuNTSS01().buildGraphql(); - expect(skuNTSS01PresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 97, - "restockableInDays": undefined, - "sku": "NTSS-01", - "supplyChannel": { - "key": "inventory-channel", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-NTSS01.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-NTSS01.ts deleted file mode 100644 index d83344d28..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-NTSS01.ts +++ /dev/null @@ -1,28 +0,0 @@ -import { ChannelDraft, TChannelDraft } from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const nalaTwoSeaterSofa01Preset = - ProductVariantDraft.presets.sampleDataB2CLifestyle - .nalaTwoSeaterSofa01() - .build(); - -const inventoryChannel = ChannelDraft.presets.sampleDataB2CLifestyle - .inventoryChannel() - .build(); - -const skuNTSS01 = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .sku(nalaTwoSeaterSofa01Preset.sku!) - .supplyChannel( - KeyReferenceDraft.presets.channel().key(inventoryChannel.key!) - ) - .quantityOnStock(97); - -export default skuNTSS01; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-NTSS02.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-NTSS02.spec.ts deleted file mode 100644 index 33c54fc84..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-NTSS02.spec.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { - TInventoryEntryDraft, - TInventoryEntryDraftGraphql, -} from '../../../types'; -import skuNTSS02 from './sku-NTSS02'; - -describe('With skuNTSS02 preset', () => { - it('should return skuNTSS02 preset', () => { - const skuNTSS02Preset = skuNTSS02().build(); - expect(skuNTSS02Preset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 100, - "restockableInDays": undefined, - "sku": "NTSS-02", - "supplyChannel": undefined, - } - `); - }); - - it('should return skuNTSS02 preset when built for GraphQL', () => { - const skuNTSS02PresetGraphql = - skuNTSS02().buildGraphql(); - expect(skuNTSS02PresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 100, - "restockableInDays": undefined, - "sku": "NTSS-02", - "supplyChannel": undefined, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-NTSS02.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-NTSS02.ts deleted file mode 100644 index 574a5d5a5..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-NTSS02.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const nalaTwoSeaterSofa02Preset = - ProductVariantDraft.presets.sampleDataB2CLifestyle - .nalaTwoSeaterSofa02() - .build(); - -const skuNTSS02 = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .sku(nalaTwoSeaterSofa02Preset.sku!) - .quantityOnStock(100); - -export default skuNTSS02; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-NTSS03.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-NTSS03.spec.ts deleted file mode 100644 index f04dabfd2..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-NTSS03.spec.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { - TInventoryEntryDraft, - TInventoryEntryDraftGraphql, -} from '../../../types'; -import skuNTSS03 from './sku-NTSS03'; - -describe('With skuNTSS03 preset', () => { - it('should return skuNTSS03 preset', () => { - const skuNTSS03Preset = skuNTSS03().build(); - expect(skuNTSS03Preset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 100, - "restockableInDays": undefined, - "sku": "NTSS-03", - "supplyChannel": undefined, - } - `); - }); - - it('should return skuNTSS03 preset when built for GraphQL', () => { - const skuNTSS03PresetGraphql = - skuNTSS03().buildGraphql(); - expect(skuNTSS03PresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 100, - "restockableInDays": undefined, - "sku": "NTSS-03", - "supplyChannel": undefined, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-NTSS03.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-NTSS03.ts deleted file mode 100644 index 3d903c2f3..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-NTSS03.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const nalaTwoSeaterSofa03Preset = - ProductVariantDraft.presets.sampleDataB2CLifestyle - .nalaTwoSeaterSofa03() - .build(); - -const skuNTSS03 = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .sku(nalaTwoSeaterSofa03Preset.sku!) - .quantityOnStock(100); - -export default skuNTSS03; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-NTSS05.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-NTSS05.spec.ts deleted file mode 100644 index 070bdc938..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-NTSS05.spec.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { - TInventoryEntryDraft, - TInventoryEntryDraftGraphql, -} from '../../../types'; -import skuNTSS05 from './sku-NTSS05'; - -describe('With skuNTSS05 preset', () => { - it('should return skuNTSS05 preset', () => { - const skuNTSS05Preset = skuNTSS05().build(); - expect(skuNTSS05Preset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 100, - "restockableInDays": undefined, - "sku": "NTSS-05", - "supplyChannel": undefined, - } - `); - }); - - it('should return skuNTSS05 preset when built for GraphQL', () => { - const skuNTSS05PresetGraphql = - skuNTSS05().buildGraphql(); - expect(skuNTSS05PresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 100, - "restockableInDays": undefined, - "sku": "NTSS-05", - "supplyChannel": undefined, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-NTSS05.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-NTSS05.ts deleted file mode 100644 index 206660d13..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-NTSS05.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const nalaTwoSeaterSofa05Preset = - ProductVariantDraft.presets.sampleDataB2CLifestyle - .nalaTwoSeaterSofa05() - .build(); - -const skuNTSS05 = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .sku(nalaTwoSeaterSofa05Preset.sku!) - .quantityOnStock(100); - -export default skuNTSS05; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-NTSS06.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-NTSS06.spec.ts deleted file mode 100644 index ad161e1f2..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-NTSS06.spec.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { - TInventoryEntryDraft, - TInventoryEntryDraftGraphql, -} from '../../../types'; -import skuNTSS06 from './sku-NTSS06'; - -describe('With skuNTSS06 preset', () => { - it('should return skuNTSS06 preset', () => { - const skuNTSS06Preset = skuNTSS06().build(); - expect(skuNTSS06Preset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 100, - "restockableInDays": undefined, - "sku": "NTSS-06", - "supplyChannel": undefined, - } - `); - }); - - it('should return skuNTSS06 preset when built for GraphQL', () => { - const skuNTSS06PresetGraphql = - skuNTSS06().buildGraphql(); - expect(skuNTSS06PresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 100, - "restockableInDays": undefined, - "sku": "NTSS-06", - "supplyChannel": undefined, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-NTSS06.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-NTSS06.ts deleted file mode 100644 index bbfa9d11a..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-NTSS06.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const nalaTwoSeaterSofa06Preset = - ProductVariantDraft.presets.sampleDataB2CLifestyle - .nalaTwoSeaterSofa06() - .build(); - -const skuNTSS06 = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .sku(nalaTwoSeaterSofa06Preset.sku!) - .quantityOnStock(100); - -export default skuNTSS06; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-NTSS07.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-NTSS07.spec.ts deleted file mode 100644 index ced33a42a..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-NTSS07.spec.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { - TInventoryEntryDraft, - TInventoryEntryDraftGraphql, -} from '../../../types'; -import skuNTSS07 from './sku-NTSS07'; - -describe('With skuNTSS07 preset', () => { - it('should return skuNTSS07 preset', () => { - const skuNTSS07Preset = skuNTSS07().build(); - expect(skuNTSS07Preset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 100, - "restockableInDays": undefined, - "sku": "NTSS-07", - "supplyChannel": undefined, - } - `); - }); - - it('should return skuNTSS07 preset when built for GraphQL', () => { - const skuNTSS07PresetGraphql = - skuNTSS07().buildGraphql(); - expect(skuNTSS07PresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 100, - "restockableInDays": undefined, - "sku": "NTSS-07", - "supplyChannel": undefined, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-NTSS07.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-NTSS07.ts deleted file mode 100644 index f864676f9..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-NTSS07.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const nalaTwoSeaterSofa07Preset = - ProductVariantDraft.presets.sampleDataB2CLifestyle - .nalaTwoSeaterSofa07() - .build(); - -const skuNTSS07 = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .sku(nalaTwoSeaterSofa07Preset.sku!) - .quantityOnStock(100); - -export default skuNTSS07; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-NTTS04.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-NTTS04.spec.ts deleted file mode 100644 index 3c1f78298..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-NTTS04.spec.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { - TInventoryEntryDraft, - TInventoryEntryDraftGraphql, -} from '../../../types'; -import skuNTTS04 from './sku-NTTS04'; - -describe('With skuNTTS04 preset', () => { - it('should return skuNTTS04 preset', () => { - const skuNTTS04Preset = skuNTTS04().build(); - expect(skuNTTS04Preset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 100, - "restockableInDays": undefined, - "sku": "NTTS-04", - "supplyChannel": undefined, - } - `); - }); - - it('should return skuNTTS04 preset when built for GraphQL', () => { - const skuNTTS04PresetGraphql = - skuNTTS04().buildGraphql(); - expect(skuNTTS04PresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 100, - "restockableInDays": undefined, - "sku": "NTTS-04", - "supplyChannel": undefined, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-NTTS04.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-NTTS04.ts deleted file mode 100644 index 369ebff92..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-NTTS04.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const nalaTwoSeaterSofa04Preset = - ProductVariantDraft.presets.sampleDataB2CLifestyle - .nalaTwoSeaterSofa04() - .build(); - -const skuNTTS04 = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .sku(nalaTwoSeaterSofa04Preset.sku!) - .quantityOnStock(100); - -export default skuNTTS04; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-OTB07.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-OTB07.spec.ts deleted file mode 100644 index 3f32a87ac..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-OTB07.spec.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { - TInventoryEntryDraft, - TInventoryEntryDraftGraphql, -} from '../../../types'; -import skuOTB07 from './sku-OTB07'; - -describe('With skuOTB07 preset', () => { - it('should return skuOTB07 preset', () => { - const skuOTB07Preset = skuOTB07().build(); - expect(skuOTB07Preset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 100, - "restockableInDays": undefined, - "sku": "OTB-07", - "supplyChannel": undefined, - } - `); - }); - - it('should return skuOTB07 preset when built for GraphQL', () => { - const skuOTB07PresetGraphql = - skuOTB07().buildGraphql(); - expect(skuOTB07PresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 100, - "restockableInDays": undefined, - "sku": "OTB-07", - "supplyChannel": undefined, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-OTB07.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-OTB07.ts deleted file mode 100644 index f5e360d79..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-OTB07.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const orionDoubleBed01Preset = - ProductVariantDraft.presets.sampleDataB2CLifestyle - .orionDoubleBed01() - .build(); - -const skuOTB07 = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .sku(orionDoubleBed01Preset.sku!) - .quantityOnStock(100); - -export default skuOTB07; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-PAP01.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-PAP01.spec.ts deleted file mode 100644 index 871809d3f..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-PAP01.spec.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { - TInventoryEntryDraft, - TInventoryEntryDraftGraphql, -} from '../../../types'; -import skuPAP01 from './sku-PAP01'; - -describe('With skuPAP01 preset', () => { - it('should return skuPAP01 preset', () => { - const skuPAP01Preset = skuPAP01().build(); - expect(skuPAP01Preset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 95, - "restockableInDays": undefined, - "sku": "PAP-01", - "supplyChannel": undefined, - } - `); - }); - - it('should return skuPAP01 preset when built for GraphQL', () => { - const skuPAP01PresetGraphql = - skuPAP01().buildGraphql(); - expect(skuPAP01PresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 95, - "restockableInDays": undefined, - "sku": "PAP-01", - "supplyChannel": undefined, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-PAP01.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-PAP01.ts deleted file mode 100644 index 8972fff81..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-PAP01.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const pinkAbstractPainting01Preset = - ProductVariantDraft.presets.sampleDataB2CLifestyle - .pinkAbstractPainting01() - .build(); - -const skuPAP01 = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .sku(pinkAbstractPainting01Preset.sku!) - .quantityOnStock(95); - -export default skuPAP01; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-PMAP01.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-PMAP01.spec.ts deleted file mode 100644 index feb1326ed..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-PMAP01.spec.ts +++ /dev/null @@ -1,44 +0,0 @@ -import { - TInventoryEntryDraft, - TInventoryEntryDraftGraphql, -} from '../../../types'; -import skuPMAP01 from './sku-PMAP01'; - -describe('With skuPMAP01 preset', () => { - it('should return skuPMAP01 preset', () => { - const skuPMAP01Preset = skuPMAP01().build(); - expect(skuPMAP01Preset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 91, - "restockableInDays": undefined, - "sku": "PMAP-01", - "supplyChannel": { - "key": "inventory-channel", - "typeId": "channel", - }, - } - `); - }); - - it('should return skuPMAP01 preset when built for GraphQL', () => { - const skuPMAP01PresetGraphql = - skuPMAP01().buildGraphql(); - expect(skuPMAP01PresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 91, - "restockableInDays": undefined, - "sku": "PMAP-01", - "supplyChannel": { - "key": "inventory-channel", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-PMAP01.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-PMAP01.ts deleted file mode 100644 index c6030373c..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-PMAP01.ts +++ /dev/null @@ -1,28 +0,0 @@ -import { ChannelDraft, TChannelDraft } from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const purpleMinimalistAbstractPainting01Preset = - ProductVariantDraft.presets.sampleDataB2CLifestyle - .purpleMinimalistAbstractPainting01() - .build(); - -const inventoryChannel = ChannelDraft.presets.sampleDataB2CLifestyle - .inventoryChannel() - .build(); - -const skuPMAP01 = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .sku(purpleMinimalistAbstractPainting01Preset.sku!) - .supplyChannel( - KeyReferenceDraft.presets.channel().key(inventoryChannel.key!) - ) - .quantityOnStock(91); - -export default skuPMAP01; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-RB01.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-RB01.spec.ts deleted file mode 100644 index 3d298b2b3..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-RB01.spec.ts +++ /dev/null @@ -1,44 +0,0 @@ -import { - TInventoryEntryDraft, - TInventoryEntryDraftGraphql, -} from '../../../types'; -import skuRB01 from './sku-RB01'; - -describe('With skuRB01 preset', () => { - it('should return skuRB01 preset', () => { - const skuRB01Preset = skuRB01().build(); - expect(skuRB01Preset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 100, - "restockableInDays": undefined, - "sku": "RB-01", - "supplyChannel": { - "key": "inventory-channel", - "typeId": "channel", - }, - } - `); - }); - - it('should return skuRB01 preset when built for GraphQL', () => { - const skuRB01PresetGraphql = - skuRB01().buildGraphql(); - expect(skuRB01PresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 100, - "restockableInDays": undefined, - "sku": "RB-01", - "supplyChannel": { - "key": "inventory-channel", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-RB01.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-RB01.ts deleted file mode 100644 index c89d7aea6..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-RB01.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { ChannelDraft, TChannelDraft } from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const rusticBowl01Preset = ProductVariantDraft.presets.sampleDataB2CLifestyle - .rusticBowl01() - .build(); - -const inventoryChannel = ChannelDraft.presets.sampleDataB2CLifestyle - .inventoryChannel() - .build(); - -const skuRB01 = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .sku(rusticBowl01Preset.sku!) - .supplyChannel( - KeyReferenceDraft.presets.channel().key(inventoryChannel.key!) - ) - .quantityOnStock(100); - -export default skuRB01; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-RB093.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-RB093.spec.ts deleted file mode 100644 index 61431a867..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-RB093.spec.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { - TInventoryEntryDraft, - TInventoryEntryDraftGraphql, -} from '../../../types'; -import skuRB093 from './sku-RB093'; - -describe('With skuRB093 preset', () => { - it('should return skuRB093 preset', () => { - const skuRB093Preset = skuRB093().build(); - expect(skuRB093Preset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 100, - "restockableInDays": undefined, - "sku": "RB-093", - "supplyChannel": undefined, - } - `); - }); - - it('should return skuRB093 preset when built for GraphQL', () => { - const skuRB093PresetGraphql = - skuRB093().buildGraphql(); - expect(skuRB093PresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 100, - "restockableInDays": undefined, - "sku": "RB-093", - "supplyChannel": undefined, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-RB093.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-RB093.ts deleted file mode 100644 index 518c9f3cf..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-RB093.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const ravenBowl01Preset = ProductVariantDraft.presets.sampleDataB2CLifestyle - .ravenBowl01() - .build(); - -const skuRB093 = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .sku(ravenBowl01Preset.sku!) - .quantityOnStock(100); - -export default skuRB093; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-RCC09.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-RCC09.spec.ts deleted file mode 100644 index 84847f79a..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-RCC09.spec.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { - TInventoryEntryDraft, - TInventoryEntryDraftGraphql, -} from '../../../types'; -import skuRCC09 from './sku-RCC09'; - -describe('With skuRCC09 preset', () => { - it('should return skuRCC09 preset', () => { - const skuRCC09Preset = skuRCC09().build(); - expect(skuRCC09Preset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 100, - "restockableInDays": undefined, - "sku": "RCC-09", - "supplyChannel": undefined, - } - `); - }); - - it('should return skuRCC09 preset when built for GraphQL', () => { - const skuRCC09PresetGraphql = - skuRCC09().buildGraphql(); - expect(skuRCC09PresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 100, - "restockableInDays": undefined, - "sku": "RCC-09", - "supplyChannel": undefined, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-RCC09.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-RCC09.ts deleted file mode 100644 index a4c6af88c..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-RCC09.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const rusticOvenCasserole01Preset = - ProductVariantDraft.presets.sampleDataB2CLifestyle - .rusticOvenCasserole01() - .build(); - -const skuRCC09 = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .sku(rusticOvenCasserole01Preset.sku!) - .quantityOnStock(100); - -export default skuRCC09; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-RCD01.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-RCD01.spec.ts deleted file mode 100644 index 3da4528b0..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-RCD01.spec.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { - TInventoryEntryDraft, - TInventoryEntryDraftGraphql, -} from '../../../types'; -import skuRCD01 from './sku-RCD01'; - -describe('With skuRCD01 preset', () => { - it('should return skuRCD01 preset', () => { - const skuRCD01Preset = skuRCD01().build(); - expect(skuRCD01Preset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 98, - "restockableInDays": undefined, - "sku": "RCD-01", - "supplyChannel": undefined, - } - `); - }); - - it('should return skuRCD01 preset when built for GraphQL', () => { - const skuRCD01PresetGraphql = - skuRCD01().buildGraphql(); - expect(skuRCD01PresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 98, - "restockableInDays": undefined, - "sku": "RCD-01", - "supplyChannel": undefined, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-RCD01.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-RCD01.ts deleted file mode 100644 index 21dbe7f28..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-RCD01.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const rusticCountryDresser01Preset = - ProductVariantDraft.presets.sampleDataB2CLifestyle - .rusticCountryDresser01() - .build(); - -const skuRCD01 = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .sku(rusticCountryDresser01Preset.sku!) - .quantityOnStock(98); - -export default skuRCD01; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-RCQB01.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-RCQB01.spec.ts deleted file mode 100644 index b399b345b..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-RCQB01.spec.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { - TInventoryEntryDraft, - TInventoryEntryDraftGraphql, -} from '../../../types'; -import skuRCQB01 from './sku-RCQB01'; - -describe('With skuRCQB01 preset', () => { - it('should return skuRCQB01 preset', () => { - const skuRCQB01Preset = skuRCQB01().build(); - expect(skuRCQB01Preset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 76, - "restockableInDays": undefined, - "sku": "RCQB-01", - "supplyChannel": undefined, - } - `); - }); - - it('should return skuRCQB01 preset when built for GraphQL', () => { - const skuRCQB01PresetGraphql = - skuRCQB01().buildGraphql(); - expect(skuRCQB01PresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 76, - "restockableInDays": undefined, - "sku": "RCQB-01", - "supplyChannel": undefined, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-RCQB01.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-RCQB01.ts deleted file mode 100644 index 398646c61..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-RCQB01.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const rusticCountryQueenBed01Preset = - ProductVariantDraft.presets.sampleDataB2CLifestyle - .rusticCountryQueenBed01() - .build(); - -const skuRCQB01 = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .sku(rusticCountryQueenBed01Preset.sku!) - .quantityOnStock(76); - -export default skuRCQB01; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-RLC08.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-RLC08.spec.ts deleted file mode 100644 index 3f0928739..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-RLC08.spec.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { - TInventoryEntryDraft, - TInventoryEntryDraftGraphql, -} from '../../../types'; -import skuRLC08 from './sku-RLC08'; - -describe('With skuRLC08 preset', () => { - it('should return skuRLC08 preset', () => { - const skuRLC08Preset = skuRLC08().build(); - expect(skuRLC08Preset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 100, - "restockableInDays": undefined, - "sku": "RLC-08", - "supplyChannel": undefined, - } - `); - }); - - it('should return skuRLC08 preset when built for GraphQL', () => { - const skuRLC08PresetGraphql = - skuRLC08().buildGraphql(); - expect(skuRLC08PresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 100, - "restockableInDays": undefined, - "sku": "RLC-08", - "supplyChannel": undefined, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-RLC08.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-RLC08.ts deleted file mode 100644 index 6e7d2a785..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-RLC08.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const rattanLoungeChair01Preset = - ProductVariantDraft.presets.sampleDataB2CLifestyle - .rattanLoungeChair01() - .build(); - -const skuRLC08 = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .sku(rattanLoungeChair01Preset.sku!) - .quantityOnStock(100); - -export default skuRLC08; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-RMP01.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-RMP01.spec.ts deleted file mode 100644 index c00e92959..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-RMP01.spec.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { - TInventoryEntryDraft, - TInventoryEntryDraftGraphql, -} from '../../../types'; -import skuRMP01 from './sku-RMP01'; - -describe('With skuRMP01 preset', () => { - it('should return skuRMP01 preset', () => { - const skuRMP01Preset = skuRMP01().build(); - expect(skuRMP01Preset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 0, - "restockableInDays": undefined, - "sku": "RMP-01", - "supplyChannel": undefined, - } - `); - }); - - it('should return skuRMP01 preset when built for GraphQL', () => { - const skuRMP01PresetGraphql = - skuRMP01().buildGraphql(); - expect(skuRMP01PresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 0, - "restockableInDays": undefined, - "sku": "RMP-01", - "supplyChannel": undefined, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-RMP01.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-RMP01.ts deleted file mode 100644 index fcc21eb22..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-RMP01.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const redModernPainting01Preset = - ProductVariantDraft.presets.sampleDataB2CLifestyle - .redModernPainting01() - .build(); - -const skuRMP01 = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .sku(redModernPainting01Preset.sku!) - .quantityOnStock(0); - -export default skuRMP01; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-RST01.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-RST01.spec.ts deleted file mode 100644 index d436632f9..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-RST01.spec.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { - TInventoryEntryDraft, - TInventoryEntryDraftGraphql, -} from '../../../types'; -import skuRST01 from './sku-RST01'; - -describe('With skuRST01 preset', () => { - it('should return skuRST01 preset', () => { - const skuRST01Preset = skuRST01().build(); - expect(skuRST01Preset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 100, - "restockableInDays": undefined, - "sku": "RST-01", - "supplyChannel": undefined, - } - `); - }); - - it('should return skuRST01 preset when built for GraphQL', () => { - const skuRST01PresetGraphql = - skuRST01().buildGraphql(); - expect(skuRST01PresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 100, - "restockableInDays": undefined, - "sku": "RST-01", - "supplyChannel": undefined, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-RST01.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-RST01.ts deleted file mode 100644 index 45deac567..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-RST01.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const roundServingTray01Preset = - ProductVariantDraft.presets.sampleDataB2CLifestyle - .roundServingTray01() - .build(); - -const skuRST01 = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .sku(roundServingTray01Preset.sku!) - .quantityOnStock(100); - -export default skuRST01; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-RST02.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-RST02.spec.ts deleted file mode 100644 index d5c314e30..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-RST02.spec.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { - TInventoryEntryDraft, - TInventoryEntryDraftGraphql, -} from '../../../types'; -import skuRST02 from './sku-RST02'; - -describe('With skuRST02 preset', () => { - it('should return skuRST02 preset', () => { - const skuRST02Preset = skuRST02().build(); - expect(skuRST02Preset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 100, - "restockableInDays": undefined, - "sku": "RST-02", - "supplyChannel": undefined, - } - `); - }); - - it('should return skuRST02 preset when built for GraphQL', () => { - const skuRST02PresetGraphql = - skuRST02().buildGraphql(); - expect(skuRST02PresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 100, - "restockableInDays": undefined, - "sku": "RST-02", - "supplyChannel": undefined, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-RST02.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-RST02.ts deleted file mode 100644 index 42dcb0673..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-RST02.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const rectangleServingTray01Preset = - ProductVariantDraft.presets.sampleDataB2CLifestyle - .rectangleServingTray01() - .build(); - -const skuRST02 = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .sku(rectangleServingTray01Preset.sku!) - .quantityOnStock(100); - -export default skuRST02; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-RWG09.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-RWG09.spec.ts deleted file mode 100644 index a114f4bad..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-RWG09.spec.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { - TInventoryEntryDraft, - TInventoryEntryDraftGraphql, -} from '../../../types'; -import skuRWG09 from './sku-RWG09'; - -describe('With skuRWG09 preset', () => { - it('should return skuRWG09 preset', () => { - const skuRWG09Preset = skuRWG09().build(); - expect(skuRWG09Preset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 100, - "restockableInDays": undefined, - "sku": "RWG-09", - "supplyChannel": undefined, - } - `); - }); - - it('should return skuRWG09 preset when built for GraphQL', () => { - const skuRWG09PresetGraphql = - skuRWG09().buildGraphql(); - expect(skuRWG09PresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 100, - "restockableInDays": undefined, - "sku": "RWG-09", - "supplyChannel": undefined, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-RWG09.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-RWG09.ts deleted file mode 100644 index f742e4002..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-RWG09.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const ryeWhiskeyGlass01Preset = - ProductVariantDraft.presets.sampleDataB2CLifestyle - .ryeWhiskeyGlass01() - .build(); - -const skuRWG09 = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .sku(ryeWhiskeyGlass01Preset.sku!) - .quantityOnStock(100); - -export default skuRWG09; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-SARM09.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-SARM09.spec.ts deleted file mode 100644 index caa4cc12a..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-SARM09.spec.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { - TInventoryEntryDraft, - TInventoryEntryDraftGraphql, -} from '../../../types'; -import skuSARM09 from './sku-SARM09'; - -describe('With skuSARM09 preset', () => { - it('should return skuSARM09 preset', () => { - const skuSARM09Preset = skuSARM09().build(); - expect(skuSARM09Preset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 100, - "restockableInDays": undefined, - "sku": "SARM-09", - "supplyChannel": undefined, - } - `); - }); - - it('should return skuSARM09 preset when built for GraphQL', () => { - const skuSARM09PresetGraphql = - skuSARM09().buildGraphql(); - expect(skuSARM09PresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 100, - "restockableInDays": undefined, - "sku": "SARM-09", - "supplyChannel": undefined, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-SARM09.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-SARM09.ts deleted file mode 100644 index 00b842c22..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-SARM09.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const slateArmchair01Preset = ProductVariantDraft.presets.sampleDataB2CLifestyle - .slateArmchair01() - .build(); - -const skuSARM09 = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .sku(slateArmchair01Preset.sku!) - .quantityOnStock(100); - -export default skuSARM09; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-SARMO034.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-SARMO034.spec.ts deleted file mode 100644 index 984e01d99..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-SARMO034.spec.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { - TInventoryEntryDraft, - TInventoryEntryDraftGraphql, -} from '../../../types'; -import skuSARMO034 from './sku-SARMO034'; - -describe('With skuSARMO034 preset', () => { - it('should return skuSARMO034 preset', () => { - const skuSARMO034Preset = skuSARMO034().build(); - expect(skuSARMO034Preset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 100, - "restockableInDays": undefined, - "sku": "SARMO-034", - "supplyChannel": undefined, - } - `); - }); - - it('should return skuSARMO034 preset when built for GraphQL', () => { - const skuSARMO034PresetGraphql = - skuSARMO034().buildGraphql(); - expect(skuSARMO034PresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 100, - "restockableInDays": undefined, - "sku": "SARMO-034", - "supplyChannel": undefined, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-SARMO034.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-SARMO034.ts deleted file mode 100644 index 3d2104d23..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-SARMO034.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const sallyArmchair01Preset = ProductVariantDraft.presets.sampleDataB2CLifestyle - .sallyArmchair01() - .build(); - -const skuSARMO034 = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .sku(sallyArmchair01Preset.sku!) - .quantityOnStock(100); - -export default skuSARMO034; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-SBG09.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-SBG09.spec.ts deleted file mode 100644 index 55ae576e3..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-SBG09.spec.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { - TInventoryEntryDraft, - TInventoryEntryDraftGraphql, -} from '../../../types'; -import skuSBG09 from './sku-SBG09'; - -describe('With skuSBG09 preset', () => { - it('should return skuSBG09 preset', () => { - const skuSBG09Preset = skuSBG09().build(); - expect(skuSBG09Preset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 100, - "restockableInDays": undefined, - "sku": "SBG-09", - "supplyChannel": undefined, - } - `); - }); - - it('should return skuSBG09 preset when built for GraphQL', () => { - const skuSBG09PresetGraphql = - skuSBG09().buildGraphql(); - expect(skuSBG09PresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 100, - "restockableInDays": undefined, - "sku": "SBG-09", - "supplyChannel": undefined, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-SBG09.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-SBG09.ts deleted file mode 100644 index 244a76afd..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-SBG09.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const stoutBeerGlass01Preset = - ProductVariantDraft.presets.sampleDataB2CLifestyle - .stoutBeerGlass01() - .build(); - -const skuSBG09 = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .sku(stoutBeerGlass01Preset.sku!) - .quantityOnStock(100); - -export default skuSBG09; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-SCG09.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-SCG09.spec.ts deleted file mode 100644 index beb92fa90..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-SCG09.spec.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { - TInventoryEntryDraft, - TInventoryEntryDraftGraphql, -} from '../../../types'; -import skuSCG09 from './sku-SCG09'; - -describe('With skuSCG09 preset', () => { - it('should return skuSCG09 preset', () => { - const skuSCG09Preset = skuSCG09().build(); - expect(skuSCG09Preset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 100, - "restockableInDays": undefined, - "sku": "SCG-09", - "supplyChannel": undefined, - } - `); - }); - - it('should return skuSCG09 preset when built for GraphQL', () => { - const skuSCG09PresetGraphql = - skuSCG09().buildGraphql(); - expect(skuSCG09PresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 100, - "restockableInDays": undefined, - "sku": "SCG-09", - "supplyChannel": undefined, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-SCG09.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-SCG09.ts deleted file mode 100644 index bde084c2c..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-SCG09.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const sparkleChampagneGlass01Preset = - ProductVariantDraft.presets.sampleDataB2CLifestyle - .sparkleChampagneGlass01() - .build(); - -const skuSCG09 = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .sku(sparkleChampagneGlass01Preset.sku!) - .quantityOnStock(100); - -export default skuSCG09; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-SCM02.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-SCM02.spec.ts deleted file mode 100644 index e4e90cbd2..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-SCM02.spec.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { - TInventoryEntryDraft, - TInventoryEntryDraftGraphql, -} from '../../../types'; -import skuSCM02 from './sku-SCM02'; - -describe('With skuSCM02 preset', () => { - it('should return skuSCM02 preset', () => { - const skuSCM02Preset = skuSCM02().build(); - expect(skuSCM02Preset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 100, - "restockableInDays": undefined, - "sku": "SCM-02", - "supplyChannel": undefined, - } - `); - }); - - it('should return skuSCM02 preset when built for GraphQL', () => { - const skuSCM02PresetGraphql = - skuSCM02().buildGraphql(); - expect(skuSCM02PresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 100, - "restockableInDays": undefined, - "sku": "SCM-02", - "supplyChannel": undefined, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-SCM02.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-SCM02.ts deleted file mode 100644 index c86a23bed..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-SCM02.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const sipperCoffeeMug01Preset = - ProductVariantDraft.presets.sampleDataB2CLifestyle - .sipperCoffeeMug01() - .build(); - -const skuSCM02 = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .sku(sipperCoffeeMug01Preset.sku!) - .quantityOnStock(100); - -export default skuSCM02; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-SGB01.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-SGB01.spec.ts deleted file mode 100644 index 444149bb1..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-SGB01.spec.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { - TInventoryEntryDraft, - TInventoryEntryDraftGraphql, -} from '../../../types'; -import skuSGB01 from './sku-SGB01'; - -describe('With skuSGB01 preset', () => { - it('should return skuSGB01 preset', () => { - const skuSGB01Preset = skuSGB01().build(); - expect(skuSGB01Preset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "SGB-01", - "supplyChannel": undefined, - } - `); - }); - - it('should return skuSGB01 preset when built for GraphQL', () => { - const skuSGB01PresetGraphql = - skuSGB01().buildGraphql(); - expect(skuSGB01PresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "SGB-01", - "supplyChannel": undefined, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-SGB01.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-SGB01.ts deleted file mode 100644 index 1dbb62288..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-SGB01.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const sunnaiGlassBowl01Preset = - ProductVariantDraft.presets.sampleDataB2CLifestyle - .sunnaiGlassBowl01() - .build(); - -const skuSGB01 = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .sku(sunnaiGlassBowl01Preset.sku!) - .quantityOnStock(1000); - -export default skuSGB01; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-SGB02.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-SGB02.spec.ts deleted file mode 100644 index 8c5a9a432..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-SGB02.spec.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { - TInventoryEntryDraft, - TInventoryEntryDraftGraphql, -} from '../../../types'; -import skuSGB02 from './sku-SGB02'; - -describe('With skuSGB02 preset', () => { - it('should return skuSGB02 preset', () => { - const skuSGB02Preset = skuSGB02().build(); - expect(skuSGB02Preset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 100, - "restockableInDays": undefined, - "sku": "SGB-02", - "supplyChannel": undefined, - } - `); - }); - - it('should return skuSGB02 preset when built for GraphQL', () => { - const skuSGB02PresetGraphql = - skuSGB02().buildGraphql(); - expect(skuSGB02PresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 100, - "restockableInDays": undefined, - "sku": "SGB-02", - "supplyChannel": undefined, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-SGB02.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-SGB02.ts deleted file mode 100644 index 803b797a2..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-SGB02.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const sunnaiGlassBowl02Preset = - ProductVariantDraft.presets.sampleDataB2CLifestyle - .sunnaiGlassBowl02() - .build(); - -const skuSGB02 = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .sku(sunnaiGlassBowl02Preset.sku!) - .quantityOnStock(100); - -export default skuSGB02; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-SHOT095.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-SHOT095.spec.ts deleted file mode 100644 index 9a460fe79..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-SHOT095.spec.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { - TInventoryEntryDraft, - TInventoryEntryDraftGraphql, -} from '../../../types'; -import skuSHOT095 from './sku-SHOT095'; - -describe('With skuSHOT095 preset', () => { - it('should return skuSHOT095 preset', () => { - const skuSHOT095Preset = skuSHOT095().build(); - expect(skuSHOT095Preset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 100, - "restockableInDays": undefined, - "sku": "SHOT-095", - "supplyChannel": undefined, - } - `); - }); - - it('should return skuSHOT095 preset when built for GraphQL', () => { - const skuSHOT095PresetGraphql = - skuSHOT095().buildGraphql(); - expect(skuSHOT095PresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 100, - "restockableInDays": undefined, - "sku": "SHOT-095", - "supplyChannel": undefined, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-SHOT095.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-SHOT095.ts deleted file mode 100644 index d20d36bbf..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-SHOT095.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const doubleSidedShotGlass01Preset = - ProductVariantDraft.presets.sampleDataB2CLifestyle - .doubleSidedShotGlass01() - .build(); - -const skuSHOT095 = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .sku(doubleSidedShotGlass01Preset.sku!) - .quantityOnStock(100); - -export default skuSHOT095; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-SPC01.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-SPC01.spec.ts deleted file mode 100644 index c2f09e864..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-SPC01.spec.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { - TInventoryEntryDraft, - TInventoryEntryDraftGraphql, -} from '../../../types'; -import skuSPC01 from './sku-SPC01'; - -describe('With skuSPC01 preset', () => { - it('should return skuSPC01 preset', () => { - const skuSPC01Preset = skuSPC01().build(); - expect(skuSPC01Preset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 98, - "restockableInDays": undefined, - "sku": "SPC-01", - "supplyChannel": undefined, - } - `); - }); - - it('should return skuSPC01 preset when built for GraphQL', () => { - const skuSPC01PresetGraphql = - skuSPC01().buildGraphql(); - expect(skuSPC01PresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 98, - "restockableInDays": undefined, - "sku": "SPC-01", - "supplyChannel": undefined, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-SPC01.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-SPC01.ts deleted file mode 100644 index 5f0b195de..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-SPC01.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const sweatPeaCandle01Preset = - ProductVariantDraft.presets.sampleDataB2CLifestyle - .sweetPeaCandle01() - .build(); - -const skuSPC01 = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .sku(sweatPeaCandle01Preset.sku!) - .quantityOnStock(98); - -export default skuSPC01; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-SPC06.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-SPC06.spec.ts deleted file mode 100644 index eda9fc2d0..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-SPC06.spec.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { - TInventoryEntryDraft, - TInventoryEntryDraftGraphql, -} from '../../../types'; -import skuSPC06 from './sku-SPC06'; - -describe('With skuSPC06 preset', () => { - it('should return skuSPC06 preset', () => { - const skuSPC06Preset = skuSPC06().build(); - expect(skuSPC06Preset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 100, - "restockableInDays": undefined, - "sku": "SPC-06", - "supplyChannel": undefined, - } - `); - }); - - it('should return skuSPC06 preset when built for GraphQL', () => { - const skuSPC06PresetGraphql = - skuSPC06().buildGraphql(); - expect(skuSPC06PresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 100, - "restockableInDays": undefined, - "sku": "SPC-06", - "supplyChannel": undefined, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-SPC06.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-SPC06.ts deleted file mode 100644 index 8286b30bf..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-SPC06.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const silkyPillowCover01Preset = - ProductVariantDraft.presets.sampleDataB2CLifestyle - .silkyPillowCover01() - .build(); - -const skuSPC06 = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .sku(silkyPillowCover01Preset.sku!) - .quantityOnStock(100); - -export default skuSPC06; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-SPOO094.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-SPOO094.spec.ts deleted file mode 100644 index 66dfe8862..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-SPOO094.spec.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { - TInventoryEntryDraft, - TInventoryEntryDraftGraphql, -} from '../../../types'; -import skuSPOO094 from './sku-SPOO094'; - -describe('With skuSPOO094 preset', () => { - it('should return skuSPOO094 preset', () => { - const skuSPOO094Preset = skuSPOO094().build(); - expect(skuSPOO094Preset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 100, - "restockableInDays": undefined, - "sku": "SPOO-094", - "supplyChannel": undefined, - } - `); - }); - - it('should return skuSPOO094 preset when built for GraphQL', () => { - const skuSPOO094PresetGraphql = - skuSPOO094().buildGraphql(); - expect(skuSPOO094PresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 100, - "restockableInDays": undefined, - "sku": "SPOO-094", - "supplyChannel": undefined, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-SPOO094.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-SPOO094.ts deleted file mode 100644 index c49130a1e..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-SPOO094.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const cocktailStirringSpoon01Preset = - ProductVariantDraft.presets.sampleDataB2CLifestyle - .cocktailStirringSpoon01() - .build(); - -const skuSPOO094 = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .sku(cocktailStirringSpoon01Preset.sku!) - .quantityOnStock(100); - -export default skuSPOO094; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-SQB034.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-SQB034.spec.ts deleted file mode 100644 index 55a7b1e8a..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-SQB034.spec.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { - TInventoryEntryDraft, - TInventoryEntryDraftGraphql, -} from '../../../types'; -import skuSQB034 from './sku-SQB034'; - -describe('With skuSQB034 preset', () => { - it('should return skuSQB034 preset', () => { - const skuSQB034Preset = skuSQB034().build(); - expect(skuSQB034Preset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 100, - "restockableInDays": undefined, - "sku": "SQB-034", - "supplyChannel": undefined, - } - `); - }); - - it('should return skuSQB034 preset when built for GraphQL', () => { - const skuSQB034PresetGraphql = - skuSQB034().buildGraphql(); - expect(skuSQB034PresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 100, - "restockableInDays": undefined, - "sku": "SQB-034", - "supplyChannel": undefined, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-SQB034.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-SQB034.ts deleted file mode 100644 index c1f4cad2f..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-SQB034.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const ecruDoubleBed01Preset = ProductVariantDraft.presets.sampleDataB2CLifestyle - .ecruDoubleBed01() - .build(); - -const skuSQB034 = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .sku(ecruDoubleBed01Preset.sku!) - .quantityOnStock(100); - -export default skuSQB034; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-SST02.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-SST02.spec.ts deleted file mode 100644 index 683b96553..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-SST02.spec.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { - TInventoryEntryDraft, - TInventoryEntryDraftGraphql, -} from '../../../types'; -import skuSST02 from './sku-SST02'; - -describe('With skuSST02 preset', () => { - it('should return skuSST02 preset', () => { - const skuSST02Preset = skuSST02().build(); - expect(skuSST02Preset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 100, - "restockableInDays": undefined, - "sku": "SST-02", - "supplyChannel": undefined, - } - `); - }); - - it('should return skuSST02 preset when built for GraphQL', () => { - const skuSST02PresetGraphql = - skuSST02().buildGraphql(); - expect(skuSST02PresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 100, - "restockableInDays": undefined, - "sku": "SST-02", - "supplyChannel": undefined, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-SST02.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-SST02.ts deleted file mode 100644 index 54e5c1f2b..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-SST02.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const stoneServingTray01Preset = - ProductVariantDraft.presets.sampleDataB2CLifestyle - .stoneServingTray01() - .build(); - -const skuSST02 = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .sku(stoneServingTray01Preset.sku!) - .quantityOnStock(100); - -export default skuSST02; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-STM09.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-STM09.spec.ts deleted file mode 100644 index 503412847..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-STM09.spec.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { - TInventoryEntryDraft, - TInventoryEntryDraftGraphql, -} from '../../../types'; -import skuSTM09 from './sku-STM09'; - -describe('With skuSTM09 preset', () => { - it('should return skuSTM09 preset', () => { - const skuSTM09Preset = skuSTM09().build(); - expect(skuSTM09Preset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 100, - "restockableInDays": undefined, - "sku": "STM-09", - "supplyChannel": undefined, - } - `); - }); - - it('should return skuSTM09 preset when built for GraphQL', () => { - const skuSTM09PresetGraphql = - skuSTM09().buildGraphql(); - expect(skuSTM09PresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 100, - "restockableInDays": undefined, - "sku": "STM-09", - "supplyChannel": undefined, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-STM09.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-STM09.ts deleted file mode 100644 index 37dc71af6..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-STM09.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const sandTeaCup01Preset = ProductVariantDraft.presets.sampleDataB2CLifestyle - .sandTeaCup01() - .build(); - -const skuSTM09 = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .sku(sandTeaCup01Preset.sku!) - .quantityOnStock(100); - -export default skuSTM09; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-STRA095.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-STRA095.spec.ts deleted file mode 100644 index d5272597a..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-STRA095.spec.ts +++ /dev/null @@ -1,44 +0,0 @@ -import { - TInventoryEntryDraft, - TInventoryEntryDraftGraphql, -} from '../../../types'; -import skuSTRA095 from './sku-STRA095'; - -describe('With skuSTRA095 preset', () => { - it('should return skuSTRA095 preset', () => { - const skuSTRA095Preset = skuSTRA095().build(); - expect(skuSTRA095Preset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 100, - "restockableInDays": undefined, - "sku": "STRA-095", - "supplyChannel": { - "key": "inventory-channel", - "typeId": "channel", - }, - } - `); - }); - - it('should return skuSTRA095 preset when built for GraphQL', () => { - const skuSTRA095PresetGraphql = - skuSTRA095().buildGraphql(); - expect(skuSTRA095PresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 100, - "restockableInDays": undefined, - "sku": "STRA-095", - "supplyChannel": { - "key": "inventory-channel", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-STRA095.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-STRA095.ts deleted file mode 100644 index 6f530e214..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-STRA095.ts +++ /dev/null @@ -1,28 +0,0 @@ -import { ChannelDraft, TChannelDraft } from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const cocktailStrainer01Preset = - ProductVariantDraft.presets.sampleDataB2CLifestyle - .cocktailStrainer01() - .build(); - -const inventoryChannel = ChannelDraft.presets.sampleDataB2CLifestyle - .inventoryChannel() - .build(); - -const skuSTRA095 = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .sku(cocktailStrainer01Preset.sku!) - .supplyChannel( - KeyReferenceDraft.presets.channel().key(inventoryChannel.key!) - ) - .quantityOnStock(100); - -export default skuSTRA095; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-SWB01.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-SWB01.spec.ts deleted file mode 100644 index 7c00f04a4..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-SWB01.spec.ts +++ /dev/null @@ -1,44 +0,0 @@ -import { - TInventoryEntryDraft, - TInventoryEntryDraftGraphql, -} from '../../../types'; -import skuSWB01 from './sku-SWB01'; - -describe('With skuSWB01 preset', () => { - it('should return skuSWB01 preset', () => { - const skuSWB01Preset = skuSWB01().build(); - expect(skuSWB01Preset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 100, - "restockableInDays": undefined, - "sku": "SWB-01", - "supplyChannel": { - "key": "inventory-channel", - "typeId": "channel", - }, - } - `); - }); - - it('should return skuSWB01 preset when built for GraphQL', () => { - const skuSWB01PresetGraphql = - skuSWB01().buildGraphql(); - expect(skuSWB01PresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 100, - "restockableInDays": undefined, - "sku": "SWB-01", - "supplyChannel": { - "key": "inventory-channel", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-SWB01.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-SWB01.ts deleted file mode 100644 index 326bc2342..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-SWB01.ts +++ /dev/null @@ -1,28 +0,0 @@ -import { ChannelDraft, TChannelDraft } from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const smallWoodenBowl01Preset = - ProductVariantDraft.presets.sampleDataB2CLifestyle - .smallWoodenBowl01() - .build(); - -const inventoryChannel = ChannelDraft.presets.sampleDataB2CLifestyle - .inventoryChannel() - .build(); - -const skuSWB01 = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .sku(smallWoodenBowl01Preset.sku!) - .supplyChannel( - KeyReferenceDraft.presets.channel().key(inventoryChannel.key!) - ) - .quantityOnStock(100); - -export default skuSWB01; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-TARM03.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-TARM03.spec.ts deleted file mode 100644 index cf5c35ac9..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-TARM03.spec.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { - TInventoryEntryDraft, - TInventoryEntryDraftGraphql, -} from '../../../types'; -import skuTARM03 from './sku-TARM03'; - -describe('With skuTARM03 preset', () => { - it('should return skuTARM03 preset', () => { - const skuTARM03Preset = skuTARM03().build(); - expect(skuTARM03Preset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 100, - "restockableInDays": undefined, - "sku": "TARM-03", - "supplyChannel": undefined, - } - `); - }); - - it('should return skuTARM03 preset when built for GraphQL', () => { - const skuTARM03PresetGraphql = - skuTARM03().buildGraphql(); - expect(skuTARM03PresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 100, - "restockableInDays": undefined, - "sku": "TARM-03", - "supplyChannel": undefined, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-TARM03.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-TARM03.ts deleted file mode 100644 index 642e9c44e..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-TARM03.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const turnerVelvetArmchair01Preset = - ProductVariantDraft.presets.sampleDataB2CLifestyle - .turnerVelvetArmchair01() - .build(); - -const skuTARM03 = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .sku(turnerVelvetArmchair01Preset.sku!) - .quantityOnStock(100); - -export default skuTARM03; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-TARM034.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-TARM034.spec.ts deleted file mode 100644 index 4c80d3c76..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-TARM034.spec.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { - TInventoryEntryDraft, - TInventoryEntryDraftGraphql, -} from '../../../types'; -import skuTARM034 from './sku-TARM034'; - -describe('With skuTARM034 preset', () => { - it('should return skuTARM034 preset', () => { - const skuTARM034Preset = skuTARM034().build(); - expect(skuTARM034Preset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 100, - "restockableInDays": undefined, - "sku": "TARM-034", - "supplyChannel": undefined, - } - `); - }); - - it('should return skuTARM034 preset when built for GraphQL', () => { - const skuTARM034PresetGraphql = - skuTARM034().buildGraphql(); - expect(skuTARM034PresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 100, - "restockableInDays": undefined, - "sku": "TARM-034", - "supplyChannel": undefined, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-TARM034.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-TARM034.ts deleted file mode 100644 index 9212b1c49..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-TARM034.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const traditionalArmchair01Preset = - ProductVariantDraft.presets.sampleDataB2CLifestyle - .traditionalArmchair01() - .build(); - -const skuTARM034 = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .sku(traditionalArmchair01Preset.sku!) - .quantityOnStock(100); - -export default skuTARM034; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-TCM03.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-TCM03.spec.ts deleted file mode 100644 index 56762cfbc..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-TCM03.spec.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { - TInventoryEntryDraft, - TInventoryEntryDraftGraphql, -} from '../../../types'; -import skuTCM03 from './sku-TCM03'; - -describe('With skuTCM03 preset', () => { - it('should return skuTCM03 preset', () => { - const skuTCM03Preset = skuTCM03().build(); - expect(skuTCM03Preset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 99, - "restockableInDays": undefined, - "sku": "TCM-03", - "supplyChannel": undefined, - } - `); - }); - - it('should return skuTCM03 preset when built for GraphQL', () => { - const skuTCM03PresetGraphql = - skuTCM03().buildGraphql(); - expect(skuTCM03PresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 99, - "restockableInDays": undefined, - "sku": "TCM-03", - "supplyChannel": undefined, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-TCM03.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-TCM03.ts deleted file mode 100644 index 4fe5ffe00..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-TCM03.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const travelCoffeeMug01Preset = - ProductVariantDraft.presets.sampleDataB2CLifestyle - .travelCoffeeMug01() - .build(); - -const skuTCM03 = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .sku(travelCoffeeMug01Preset.sku!) - .quantityOnStock(99); - -export default skuTCM03; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-TLSS01.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-TLSS01.spec.ts deleted file mode 100644 index 276c18bb2..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-TLSS01.spec.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { - TInventoryEntryDraft, - TInventoryEntryDraftGraphql, -} from '../../../types'; -import skuTLSS01 from './sku-TLSS01'; - -describe('With skuTLSS01 preset', () => { - it('should return skuTLSS01 preset', () => { - const skuTLSS01Preset = skuTLSS01().build(); - expect(skuTLSS01Preset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 98, - "restockableInDays": undefined, - "sku": "TLSS-01", - "supplyChannel": undefined, - } - `); - }); - - it('should return skuTLSS01 preset when built for GraphQL', () => { - const skuTLSS01PresetGraphql = - skuTLSS01().buildGraphql(); - expect(skuTLSS01PresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 98, - "restockableInDays": undefined, - "sku": "TLSS-01", - "supplyChannel": undefined, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-TLSS01.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-TLSS01.ts deleted file mode 100644 index 04668a8c8..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-TLSS01.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const traditionalLSeaterSofa01Preset = - ProductVariantDraft.presets.sampleDataB2CLifestyle - .traditionalLSeaterSofa01() - .build(); - -const skuTLSS01 = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .sku(traditionalLSeaterSofa01Preset.sku!) - .quantityOnStock(98); - -export default skuTLSS01; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-TST02.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-TST02.spec.ts deleted file mode 100644 index 8939a87e0..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-TST02.spec.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { - TInventoryEntryDraft, - TInventoryEntryDraftGraphql, -} from '../../../types'; -import skuTST02 from './sku-TST02'; - -describe('With skuTST02 preset', () => { - it('should return skuTST02 preset', () => { - const skuTST02Preset = skuTST02().build(); - expect(skuTST02Preset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 100, - "restockableInDays": undefined, - "sku": "TST-02", - "supplyChannel": undefined, - } - `); - }); - - it('should return skuTST02 preset when built for GraphQL', () => { - const skuTST02PresetGraphql = - skuTST02().buildGraphql(); - expect(skuTST02PresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 100, - "restockableInDays": undefined, - "sku": "TST-02", - "supplyChannel": undefined, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-TST02.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-TST02.ts deleted file mode 100644 index 6e93b73b9..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-TST02.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const teakServingPlatter01Preset = - ProductVariantDraft.presets.sampleDataB2CLifestyle - .teakServingPlatter01() - .build(); - -const skuTST02 = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .sku(teakServingPlatter01Preset.sku!) - .quantityOnStock(100); - -export default skuTST02; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-TTSS01.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-TTSS01.spec.ts deleted file mode 100644 index f606e4935..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-TTSS01.spec.ts +++ /dev/null @@ -1,44 +0,0 @@ -import { - TInventoryEntryDraft, - TInventoryEntryDraftGraphql, -} from '../../../types'; -import skuTTSS01 from './sku-TTSS01'; - -describe('With skuTTSS01 preset', () => { - it('should return skuTTSS01 preset', () => { - const skuTTSS01Preset = skuTTSS01().build(); - expect(skuTTSS01Preset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 76, - "restockableInDays": undefined, - "sku": "TTSS-01", - "supplyChannel": { - "key": "inventory-channel", - "typeId": "channel", - }, - } - `); - }); - - it('should return skuTTSS01 preset when built for GraphQL', () => { - const skuTTSS01PresetGraphql = - skuTTSS01().buildGraphql(); - expect(skuTTSS01PresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 76, - "restockableInDays": undefined, - "sku": "TTSS-01", - "supplyChannel": { - "key": "inventory-channel", - "typeId": "channel", - }, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-TTSS01.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-TTSS01.ts deleted file mode 100644 index 6ba8b205a..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-TTSS01.ts +++ /dev/null @@ -1,28 +0,0 @@ -import { ChannelDraft, TChannelDraft } from '@commercetools-test-data/channel'; -import { KeyReferenceDraft } from '@commercetools-test-data/commons'; -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const traditionalThreeSeaterSofa01Preset = - ProductVariantDraft.presets.sampleDataB2CLifestyle - .traditionalThreeSeaterSofa01() - .build(); - -const inventoryChannel = ChannelDraft.presets.sampleDataB2CLifestyle - .inventoryChannel() - .build(); - -const skuTTSS01 = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .sku(traditionalThreeSeaterSofa01Preset.sku!) - .supplyChannel( - KeyReferenceDraft.presets.channel().key(inventoryChannel.key!) - ) - .quantityOnStock(76); - -export default skuTTSS01; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-VARM09.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-VARM09.spec.ts deleted file mode 100644 index 21182b904..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-VARM09.spec.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { - TInventoryEntryDraft, - TInventoryEntryDraftGraphql, -} from '../../../types'; -import skuVARM09 from './sku-VARM09'; - -describe('With skuVARM09 preset', () => { - it('should return skuVARM09 preset', () => { - const skuVARM09Preset = skuVARM09().build(); - expect(skuVARM09Preset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "VARM-09", - "supplyChannel": undefined, - } - `); - }); - - it('should return skuVARM09 preset when built for GraphQL', () => { - const skuVARM09PresetGraphql = - skuVARM09().buildGraphql(); - expect(skuVARM09PresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 1000, - "restockableInDays": undefined, - "sku": "VARM-09", - "supplyChannel": undefined, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-VARM09.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-VARM09.ts deleted file mode 100644 index 889a1a464..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-VARM09.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const emeraldVelvetChair01Preset = - ProductVariantDraft.presets.sampleDataB2CLifestyle - .emeraldVelvetChair01() - .build(); - -const skuVARM09 = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .sku(emeraldVelvetChair01Preset.sku!) - .quantityOnStock(1000); - -export default skuVARM09; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-VC01.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-VC01.spec.ts deleted file mode 100644 index 7c142d83f..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-VC01.spec.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { - TInventoryEntryDraft, - TInventoryEntryDraftGraphql, -} from '../../../types'; -import skuVC01 from './sku-VC01'; - -describe('With skuVC01 preset', () => { - it('should return skuVC01 preset', () => { - const skuVC01Preset = skuVC01().build(); - expect(skuVC01Preset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 98, - "restockableInDays": undefined, - "sku": "VC-01", - "supplyChannel": undefined, - } - `); - }); - - it('should return skuVC01 preset when built for GraphQL', () => { - const skuVC01PresetGraphql = - skuVC01().buildGraphql(); - expect(skuVC01PresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 98, - "restockableInDays": undefined, - "sku": "VC-01", - "supplyChannel": undefined, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-VC01.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-VC01.ts deleted file mode 100644 index f180d8f74..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-VC01.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const vanillaCandle01Preset = ProductVariantDraft.presets.sampleDataB2CLifestyle - .vanillaCandle01() - .build(); - -const skuVC01 = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .sku(vanillaCandle01Preset.sku!) - .quantityOnStock(98); - -export default skuVC01; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-WCS09.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-WCS09.spec.ts deleted file mode 100644 index d0bd2958b..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-WCS09.spec.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { - TInventoryEntryDraft, - TInventoryEntryDraftGraphql, -} from '../../../types'; -import skuWCS09 from './sku-WCS09'; - -describe('With skuWCS09 preset', () => { - it('should return skuWCS09 preset', () => { - const skuWCS09Preset = skuWCS09().build(); - expect(skuWCS09Preset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 100, - "restockableInDays": undefined, - "sku": "WCS-09", - "supplyChannel": undefined, - } - `); - }); - - it('should return skuWCS09 preset when built for GraphQL', () => { - const skuWCS09PresetGraphql = - skuWCS09().buildGraphql(); - expect(skuWCS09PresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 100, - "restockableInDays": undefined, - "sku": "WCS-09", - "supplyChannel": undefined, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-WCS09.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-WCS09.ts deleted file mode 100644 index cbfbe4883..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-WCS09.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const walnutCabinet01Preset = ProductVariantDraft.presets.sampleDataB2CLifestyle - .walnutCabinet01() - .build(); - -const skuWCS09 = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .sku(walnutCabinet01Preset.sku!) - .quantityOnStock(100); - -export default skuWCS09; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-WCSI09.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-WCSI09.spec.ts deleted file mode 100644 index cb9e77f20..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-WCSI09.spec.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { - TInventoryEntryDraft, - TInventoryEntryDraftGraphql, -} from '../../../types'; -import skuWCSI09 from './sku-WCSI09'; - -describe('With skuWCSI09 preset', () => { - it('should return skuWCSI09 preset', () => { - const skuWCSI09Preset = skuWCSI09().build(); - expect(skuWCSI09Preset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 100, - "restockableInDays": undefined, - "sku": "WCSI-09", - "supplyChannel": undefined, - } - `); - }); - - it('should return skuWCSI09 preset when built for GraphQL', () => { - const skuWCSI09PresetGraphql = - skuWCSI09().buildGraphql(); - expect(skuWCSI09PresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 100, - "restockableInDays": undefined, - "sku": "WCSI-09", - "supplyChannel": undefined, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-WCSI09.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-WCSI09.ts deleted file mode 100644 index 5f83c203a..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-WCSI09.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const walnutCounterStool01Preset = - ProductVariantDraft.presets.sampleDataB2CLifestyle - .walnutCounterStool01() - .build(); - -const skuWCSI09 = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .sku(walnutCounterStool01Preset.sku!) - .quantityOnStock(100); - -export default skuWCSI09; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-WOP09.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-WOP09.spec.ts deleted file mode 100644 index a0ba619d8..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-WOP09.spec.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { - TInventoryEntryDraft, - TInventoryEntryDraftGraphql, -} from '../../../types'; -import skuWOP09 from './sku-WOP09'; - -describe('With skuWOP09 preset', () => { - it('should return skuWOP09 preset', () => { - const skuWOP09Preset = skuWOP09().build(); - expect(skuWOP09Preset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 100, - "restockableInDays": undefined, - "sku": "WOP-09", - "supplyChannel": undefined, - } - `); - }); - - it('should return skuWOP09 preset when built for GraphQL', () => { - const skuWOP09PresetGraphql = - skuWOP09().buildGraphql(); - expect(skuWOP09PresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 100, - "restockableInDays": undefined, - "sku": "WOP-09", - "supplyChannel": undefined, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-WOP09.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-WOP09.ts deleted file mode 100644 index 3e80a4176..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-WOP09.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const wineBottleOpener01Preset = - ProductVariantDraft.presets.sampleDataB2CLifestyle - .wineBottleOpener01() - .build(); - -const skuWOP09 = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .sku(wineBottleOpener01Preset.sku!) - .quantityOnStock(100); - -export default skuWOP09; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-WTP09.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-WTP09.spec.ts deleted file mode 100644 index dbf7cffeb..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-WTP09.spec.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { - TInventoryEntryDraft, - TInventoryEntryDraftGraphql, -} from '../../../types'; -import skuWTP09 from './sku-WTP09'; - -describe('With skuWTP09 preset', () => { - it('should return skuWTP09 preset', () => { - const skuWTP09Preset = skuWTP09().build(); - expect(skuWTP09Preset).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 100, - "restockableInDays": undefined, - "sku": "WTP-09", - "supplyChannel": undefined, - } - `); - }); - - it('should return skuWTP09 preset when built for GraphQL', () => { - const skuWTP09PresetGraphql = - skuWTP09().buildGraphql(); - expect(skuWTP09PresetGraphql).toMatchInlineSnapshot(` - { - "custom": null, - "expectedDelivery": undefined, - "key": undefined, - "quantityOnStock": 100, - "restockableInDays": undefined, - "sku": "WTP-09", - "supplyChannel": undefined, - } - `); - }); -}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-WTP09.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-WTP09.ts deleted file mode 100644 index 0be81d91a..000000000 --- a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-WTP09.ts +++ /dev/null @@ -1,18 +0,0 @@ -import { - ProductVariantDraft, - type TProductVariantDraft, -} from '@commercetools-test-data/product'; -import type { TInventoryEntryDraftBuilder } from '../../../types'; -import * as InventoryEntryDraft from '../../index'; - -const willowTeapot01Preset = ProductVariantDraft.presets.sampleDataB2CLifestyle - .willowTeapot01() - .build(); - -const skuWTP09 = (): TInventoryEntryDraftBuilder => - InventoryEntryDraft.presets - .empty() - .sku(willowTeapot01Preset.sku!) - .quantityOnStock(100); - -export default skuWTP09; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-aar-34.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-aar-34.spec.ts new file mode 100644 index 000000000..bbe81b58f --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-aar-34.spec.ts @@ -0,0 +1,37 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuAar34 preset`, () => { + it(`should return a skuAar34 preset when built for rest`, () => { + const skuAar34Preset = InventoryEntryDraftRest.presets.skuAar34().build(); + expect(skuAar34Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuAar34 preset when built for graphql`, () => { + const skuAar34Preset = InventoryEntryDraftGraphql.presets + .skuAar34() + .build(); + expect(skuAar34Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuAar34 preset when built for legacy rest`, () => { + const skuAar34Preset = InventoryEntryDraft.presets + .skuAar34() + .buildRest(); + expect(skuAar34Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuAar34 preset when built for legacy graphql`, () => { + const skuAar34Preset = InventoryEntryDraft.presets + .skuAar34() + .buildGraphql(); + expect(skuAar34Preset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-aar-34.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-aar-34.ts new file mode 100644 index 000000000..39d81f73e --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-aar-34.ts @@ -0,0 +1,14 @@ +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const variant = ProductVariantDraft.presets.sampleData + .ariaRug01() + .build(); + +const skuAar34 = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets.empty().sku(variant.sku!).quantityOnStock(100); +export default skuAar34; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-adarm-04.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-adarm-04.spec.ts new file mode 100644 index 000000000..bdc91b37a --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-adarm-04.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuAdarm04 preset`, () => { + it(`should return a skuAdarm04 preset when built for rest`, () => { + const skuAdarm04Preset = InventoryEntryDraftRest.presets + .skuAdarm04() + .build(); + expect(skuAdarm04Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuAdarm04 preset when built for graphql`, () => { + const skuAdarm04Preset = InventoryEntryDraftGraphql.presets + .skuAdarm04() + .build(); + expect(skuAdarm04Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuAdarm04 preset when built for legacy rest`, () => { + const skuAdarm04Preset = InventoryEntryDraft.presets + .skuAdarm04() + .buildRest(); + expect(skuAdarm04Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuAdarm04 preset when built for legacy graphql`, () => { + const skuAdarm04Preset = InventoryEntryDraft.presets + .skuAdarm04() + .buildGraphql(); + expect(skuAdarm04Preset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-adarm-04.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-adarm-04.ts new file mode 100644 index 000000000..cdd5c252c --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-adarm-04.ts @@ -0,0 +1,14 @@ +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const variant = ProductVariantDraft.presets.sampleData + .artDecoChair01() + .build(); + +const skuAdarm04 = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets.empty().sku(variant.sku!).quantityOnStock(100); +export default skuAdarm04; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-adct-01.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-adct-01.spec.ts new file mode 100644 index 000000000..7b9c9eada --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-adct-01.spec.ts @@ -0,0 +1,37 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuAdct01 preset`, () => { + it(`should return a skuAdct01 preset when built for rest`, () => { + const skuAdct01Preset = InventoryEntryDraftRest.presets.skuAdct01().build(); + expect(skuAdct01Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuAdct01 preset when built for graphql`, () => { + const skuAdct01Preset = InventoryEntryDraftGraphql.presets + .skuAdct01() + .build(); + expect(skuAdct01Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuAdct01 preset when built for legacy rest`, () => { + const skuAdct01Preset = InventoryEntryDraft.presets + .skuAdct01() + .buildRest(); + expect(skuAdct01Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuAdct01 preset when built for legacy graphql`, () => { + const skuAdct01Preset = InventoryEntryDraft.presets + .skuAdct01() + .buildGraphql(); + expect(skuAdct01Preset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-adct-01.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-adct-01.ts new file mode 100644 index 000000000..ffd4d1a48 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-adct-01.ts @@ -0,0 +1,14 @@ +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const variant = ProductVariantDraft.presets.sampleData + .artDecoCoffeeTable01() + .build(); + +const skuAdct01 = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets.empty().sku(variant.sku!).quantityOnStock(90); +export default skuAdct01; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-adpc-09.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-adpc-09.spec.ts new file mode 100644 index 000000000..a7b26e0ac --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-adpc-09.spec.ts @@ -0,0 +1,37 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuAdpc09 preset`, () => { + it(`should return a skuAdpc09 preset when built for rest`, () => { + const skuAdpc09Preset = InventoryEntryDraftRest.presets.skuAdpc09().build(); + expect(skuAdpc09Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuAdpc09 preset when built for graphql`, () => { + const skuAdpc09Preset = InventoryEntryDraftGraphql.presets + .skuAdpc09() + .build(); + expect(skuAdpc09Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuAdpc09 preset when built for legacy rest`, () => { + const skuAdpc09Preset = InventoryEntryDraft.presets + .skuAdpc09() + .buildRest(); + expect(skuAdpc09Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuAdpc09 preset when built for legacy graphql`, () => { + const skuAdpc09Preset = InventoryEntryDraft.presets + .skuAdpc09() + .buildGraphql(); + expect(skuAdpc09Preset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-adpc-09.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-adpc-09.ts new file mode 100644 index 000000000..c04e41d09 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-adpc-09.ts @@ -0,0 +1,14 @@ +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const variant = ProductVariantDraft.presets.sampleData + .patternedPillowCover01() + .build(); + +const skuAdpc09 = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets.empty().sku(variant.sku!).quantityOnStock(100); +export default skuAdpc09; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-adpc-7.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-adpc-7.spec.ts new file mode 100644 index 000000000..2c57beda5 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-adpc-7.spec.ts @@ -0,0 +1,37 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuAdpc7 preset`, () => { + it(`should return a skuAdpc7 preset when built for rest`, () => { + const skuAdpc7Preset = InventoryEntryDraftRest.presets.skuAdpc7().build(); + expect(skuAdpc7Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuAdpc7 preset when built for graphql`, () => { + const skuAdpc7Preset = InventoryEntryDraftGraphql.presets + .skuAdpc7() + .build(); + expect(skuAdpc7Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuAdpc7 preset when built for legacy rest`, () => { + const skuAdpc7Preset = InventoryEntryDraft.presets + .skuAdpc7() + .buildRest(); + expect(skuAdpc7Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuAdpc7 preset when built for legacy graphql`, () => { + const skuAdpc7Preset = InventoryEntryDraft.presets + .skuAdpc7() + .buildGraphql(); + expect(skuAdpc7Preset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-adpc-7.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-adpc-7.ts new file mode 100644 index 000000000..b2ee8aa7b --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-adpc-7.ts @@ -0,0 +1,14 @@ +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const variant = ProductVariantDraft.presets.sampleData + .patternedPillowCover02() + .build(); + +const skuAdpc7 = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets.empty().sku(variant.sku!).quantityOnStock(100); +export default skuAdpc7; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-alc-01.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-alc-01.spec.ts new file mode 100644 index 000000000..83b142e06 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-alc-01.spec.ts @@ -0,0 +1,37 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuAlc01 preset`, () => { + it(`should return a skuAlc01 preset when built for rest`, () => { + const skuAlc01Preset = InventoryEntryDraftRest.presets.skuAlc01().build(); + expect(skuAlc01Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuAlc01 preset when built for graphql`, () => { + const skuAlc01Preset = InventoryEntryDraftGraphql.presets + .skuAlc01() + .build(); + expect(skuAlc01Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuAlc01 preset when built for legacy rest`, () => { + const skuAlc01Preset = InventoryEntryDraft.presets + .skuAlc01() + .buildRest(); + expect(skuAlc01Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuAlc01 preset when built for legacy graphql`, () => { + const skuAlc01Preset = InventoryEntryDraft.presets + .skuAlc01() + .buildGraphql(); + expect(skuAlc01Preset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-alc-01.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-alc-01.ts new file mode 100644 index 000000000..c1e448504 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-alc-01.ts @@ -0,0 +1,14 @@ +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const variant = ProductVariantDraft.presets.sampleData + .abigailLoungeChair01() + .build(); + +const skuAlc01 = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets.empty().sku(variant.sku!).quantityOnStock(73); +export default skuAlc01; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-amr-09.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-amr-09.spec.ts new file mode 100644 index 000000000..0dc579b52 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-amr-09.spec.ts @@ -0,0 +1,37 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuAmr09 preset`, () => { + it(`should return a skuAmr09 preset when built for rest`, () => { + const skuAmr09Preset = InventoryEntryDraftRest.presets.skuAmr09().build(); + expect(skuAmr09Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuAmr09 preset when built for graphql`, () => { + const skuAmr09Preset = InventoryEntryDraftGraphql.presets + .skuAmr09() + .build(); + expect(skuAmr09Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuAmr09 preset when built for legacy rest`, () => { + const skuAmr09Preset = InventoryEntryDraft.presets + .skuAmr09() + .buildRest(); + expect(skuAmr09Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuAmr09 preset when built for legacy graphql`, () => { + const skuAmr09Preset = InventoryEntryDraft.presets + .skuAmr09() + .buildGraphql(); + expect(skuAmr09Preset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-amr-09.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-amr-09.ts new file mode 100644 index 000000000..9c109560d --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-amr-09.ts @@ -0,0 +1,14 @@ +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const variant = ProductVariantDraft.presets.sampleData + .amaliaRug01() + .build(); + +const skuAmr09 = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets.empty().sku(variant.sku!).quantityOnStock(100); +export default skuAmr09; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-arg-56.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-arg-56.spec.ts new file mode 100644 index 000000000..ae1898b78 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-arg-56.spec.ts @@ -0,0 +1,37 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuArg56 preset`, () => { + it(`should return a skuArg56 preset when built for rest`, () => { + const skuArg56Preset = InventoryEntryDraftRest.presets.skuArg56().build(); + expect(skuArg56Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuArg56 preset when built for graphql`, () => { + const skuArg56Preset = InventoryEntryDraftGraphql.presets + .skuArg56() + .build(); + expect(skuArg56Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuArg56 preset when built for legacy rest`, () => { + const skuArg56Preset = InventoryEntryDraft.presets + .skuArg56() + .buildRest(); + expect(skuArg56Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuArg56 preset when built for legacy graphql`, () => { + const skuArg56Preset = InventoryEntryDraft.presets + .skuArg56() + .buildGraphql(); + expect(skuArg56Preset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-arg-56.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-arg-56.ts new file mode 100644 index 000000000..c5b28ffaf --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-arg-56.ts @@ -0,0 +1,27 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .inventoryChannel() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .ashenRug01() + .build(); + +const skuArg56 = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .sku(variant.sku!) + .quantityOnStock(100) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuArg56; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-ba-092.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-ba-092.spec.ts new file mode 100644 index 000000000..79cf8d87e --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-ba-092.spec.ts @@ -0,0 +1,37 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuBa092 preset`, () => { + it(`should return a skuBa092 preset when built for rest`, () => { + const skuBa092Preset = InventoryEntryDraftRest.presets.skuBa092().build(); + expect(skuBa092Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuBa092 preset when built for graphql`, () => { + const skuBa092Preset = InventoryEntryDraftGraphql.presets + .skuBa092() + .build(); + expect(skuBa092Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuBa092 preset when built for legacy rest`, () => { + const skuBa092Preset = InventoryEntryDraft.presets + .skuBa092() + .buildRest(); + expect(skuBa092Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuBa092 preset when built for legacy graphql`, () => { + const skuBa092Preset = InventoryEntryDraft.presets + .skuBa092() + .buildGraphql(); + expect(skuBa092Preset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-ba-092.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-ba-092.ts new file mode 100644 index 000000000..f1a977f6b --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-ba-092.ts @@ -0,0 +1,14 @@ +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const variant = ProductVariantDraft.presets.sampleData + .leatherWeaveChair01() + .build(); + +const skuBa092 = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets.empty().sku(variant.sku!).quantityOnStock(98); +export default skuBa092; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-bamb-084.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-bamb-084.spec.ts new file mode 100644 index 000000000..2a9d170d3 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-bamb-084.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuBamb084 preset`, () => { + it(`should return a skuBamb084 preset when built for rest`, () => { + const skuBamb084Preset = InventoryEntryDraftRest.presets + .skuBamb084() + .build(); + expect(skuBamb084Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuBamb084 preset when built for graphql`, () => { + const skuBamb084Preset = InventoryEntryDraftGraphql.presets + .skuBamb084() + .build(); + expect(skuBamb084Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuBamb084 preset when built for legacy rest`, () => { + const skuBamb084Preset = InventoryEntryDraft.presets + .skuBamb084() + .buildRest(); + expect(skuBamb084Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuBamb084 preset when built for legacy graphql`, () => { + const skuBamb084Preset = InventoryEntryDraft.presets + .skuBamb084() + .buildGraphql(); + expect(skuBamb084Preset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-bamb-084.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-bamb-084.ts new file mode 100644 index 000000000..82e61ed55 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-bamb-084.ts @@ -0,0 +1,14 @@ +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const variant = ProductVariantDraft.presets.sampleData + .squareBambooCoaster01() + .build(); + +const skuBamb084 = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets.empty().sku(variant.sku!).quantityOnStock(100); +export default skuBamb084; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-barm-03.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-barm-03.spec.ts new file mode 100644 index 000000000..efbc73876 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-barm-03.spec.ts @@ -0,0 +1,37 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuBarm03 preset`, () => { + it(`should return a skuBarm03 preset when built for rest`, () => { + const skuBarm03Preset = InventoryEntryDraftRest.presets.skuBarm03().build(); + expect(skuBarm03Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuBarm03 preset when built for graphql`, () => { + const skuBarm03Preset = InventoryEntryDraftGraphql.presets + .skuBarm03() + .build(); + expect(skuBarm03Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuBarm03 preset when built for legacy rest`, () => { + const skuBarm03Preset = InventoryEntryDraft.presets + .skuBarm03() + .buildRest(); + expect(skuBarm03Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuBarm03 preset when built for legacy graphql`, () => { + const skuBarm03Preset = InventoryEntryDraft.presets + .skuBarm03() + .buildGraphql(); + expect(skuBarm03Preset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-barm-03.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-barm-03.ts new file mode 100644 index 000000000..1dc7e6950 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-barm-03.ts @@ -0,0 +1,14 @@ +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const variant = ProductVariantDraft.presets.sampleData + .brunoChair01() + .build(); + +const skuBarm03 = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets.empty().sku(variant.sku!).quantityOnStock(100); +export default skuBarm03; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-bcoas-08.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-bcoas-08.spec.ts new file mode 100644 index 000000000..ea17ec129 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-bcoas-08.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuBcoas08 preset`, () => { + it(`should return a skuBcoas08 preset when built for rest`, () => { + const skuBcoas08Preset = InventoryEntryDraftRest.presets + .skuBcoas08() + .build(); + expect(skuBcoas08Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuBcoas08 preset when built for graphql`, () => { + const skuBcoas08Preset = InventoryEntryDraftGraphql.presets + .skuBcoas08() + .build(); + expect(skuBcoas08Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuBcoas08 preset when built for legacy rest`, () => { + const skuBcoas08Preset = InventoryEntryDraft.presets + .skuBcoas08() + .buildRest(); + expect(skuBcoas08Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuBcoas08 preset when built for legacy graphql`, () => { + const skuBcoas08Preset = InventoryEntryDraft.presets + .skuBcoas08() + .buildGraphql(); + expect(skuBcoas08Preset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-bcoas-08.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-bcoas-08.ts new file mode 100644 index 000000000..cda0a0143 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-bcoas-08.ts @@ -0,0 +1,14 @@ +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const variant = ProductVariantDraft.presets.sampleData + .modernBlackCoaster01() + .build(); + +const skuBcoas08 = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets.empty().sku(variant.sku!).quantityOnStock(100); +export default skuBcoas08; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-blp-01.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-blp-01.spec.ts new file mode 100644 index 000000000..d9196cb7e --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-blp-01.spec.ts @@ -0,0 +1,37 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuBlp01 preset`, () => { + it(`should return a skuBlp01 preset when built for rest`, () => { + const skuBlp01Preset = InventoryEntryDraftRest.presets.skuBlp01().build(); + expect(skuBlp01Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuBlp01 preset when built for graphql`, () => { + const skuBlp01Preset = InventoryEntryDraftGraphql.presets + .skuBlp01() + .build(); + expect(skuBlp01Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuBlp01 preset when built for legacy rest`, () => { + const skuBlp01Preset = InventoryEntryDraft.presets + .skuBlp01() + .buildRest(); + expect(skuBlp01Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuBlp01 preset when built for legacy graphql`, () => { + const skuBlp01Preset = InventoryEntryDraft.presets + .skuBlp01() + .buildGraphql(); + expect(skuBlp01Preset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-blp-01.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-blp-01.ts new file mode 100644 index 000000000..95cbbd5dc --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-blp-01.ts @@ -0,0 +1,27 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .inventoryChannel() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .purpleLandscapePainting01() + .build(); + +const skuBlp01 = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .sku(variant.sku!) + .quantityOnStock(80) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuBlp01; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-blpc-09.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-blpc-09.spec.ts new file mode 100644 index 000000000..112fa3314 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-blpc-09.spec.ts @@ -0,0 +1,37 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuBlpc09 preset`, () => { + it(`should return a skuBlpc09 preset when built for rest`, () => { + const skuBlpc09Preset = InventoryEntryDraftRest.presets.skuBlpc09().build(); + expect(skuBlpc09Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuBlpc09 preset when built for graphql`, () => { + const skuBlpc09Preset = InventoryEntryDraftGraphql.presets + .skuBlpc09() + .build(); + expect(skuBlpc09Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuBlpc09 preset when built for legacy rest`, () => { + const skuBlpc09Preset = InventoryEntryDraft.presets + .skuBlpc09() + .buildRest(); + expect(skuBlpc09Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuBlpc09 preset when built for legacy graphql`, () => { + const skuBlpc09Preset = InventoryEntryDraft.presets + .skuBlpc09() + .buildGraphql(); + expect(skuBlpc09Preset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-blpc-09.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-blpc-09.ts new file mode 100644 index 000000000..7c0a90f8d --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-blpc-09.ts @@ -0,0 +1,14 @@ +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const variant = ProductVariantDraft.presets.sampleData + .cocoaPillowCover01() + .build(); + +const skuBlpc09 = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets.empty().sku(variant.sku!).quantityOnStock(100); +export default skuBlpc09; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-br-0983.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-br-0983.spec.ts new file mode 100644 index 000000000..b9441fad9 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-br-0983.spec.ts @@ -0,0 +1,37 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuBr0983 preset`, () => { + it(`should return a skuBr0983 preset when built for rest`, () => { + const skuBr0983Preset = InventoryEntryDraftRest.presets.skuBr0983().build(); + expect(skuBr0983Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuBr0983 preset when built for graphql`, () => { + const skuBr0983Preset = InventoryEntryDraftGraphql.presets + .skuBr0983() + .build(); + expect(skuBr0983Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuBr0983 preset when built for legacy rest`, () => { + const skuBr0983Preset = InventoryEntryDraft.presets + .skuBr0983() + .buildRest(); + expect(skuBr0983Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuBr0983 preset when built for legacy graphql`, () => { + const skuBr0983Preset = InventoryEntryDraft.presets + .skuBr0983() + .buildGraphql(); + expect(skuBr0983Preset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-br-0983.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-br-0983.ts new file mode 100644 index 000000000..376efaee8 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-br-0983.ts @@ -0,0 +1,14 @@ +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const variant = ProductVariantDraft.presets.sampleData + .braidedRug01() + .build(); + +const skuBr0983 = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets.empty().sku(variant.sku!).quantityOnStock(99); +export default skuBr0983; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-buck-023.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-buck-023.spec.ts new file mode 100644 index 000000000..2076a535f --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-buck-023.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuBuck023 preset`, () => { + it(`should return a skuBuck023 preset when built for rest`, () => { + const skuBuck023Preset = InventoryEntryDraftRest.presets + .skuBuck023() + .build(); + expect(skuBuck023Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuBuck023 preset when built for graphql`, () => { + const skuBuck023Preset = InventoryEntryDraftGraphql.presets + .skuBuck023() + .build(); + expect(skuBuck023Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuBuck023 preset when built for legacy rest`, () => { + const skuBuck023Preset = InventoryEntryDraft.presets + .skuBuck023() + .buildRest(); + expect(skuBuck023Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuBuck023 preset when built for legacy graphql`, () => { + const skuBuck023Preset = InventoryEntryDraft.presets + .skuBuck023() + .buildGraphql(); + expect(skuBuck023Preset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-buck-023.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-buck-023.ts new file mode 100644 index 000000000..4719b3023 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-buck-023.ts @@ -0,0 +1,14 @@ +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const variant = ProductVariantDraft.presets.sampleData + .iceBucket01() + .build(); + +const skuBuck023 = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets.empty().sku(variant.sku!).quantityOnStock(100); +export default skuBuck023; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-carm-023.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-carm-023.spec.ts new file mode 100644 index 000000000..20bb82d3d --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-carm-023.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuCarm023 preset`, () => { + it(`should return a skuCarm023 preset when built for rest`, () => { + const skuCarm023Preset = InventoryEntryDraftRest.presets + .skuCarm023() + .build(); + expect(skuCarm023Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuCarm023 preset when built for graphql`, () => { + const skuCarm023Preset = InventoryEntryDraftGraphql.presets + .skuCarm023() + .build(); + expect(skuCarm023Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuCarm023 preset when built for legacy rest`, () => { + const skuCarm023Preset = InventoryEntryDraft.presets + .skuCarm023() + .buildRest(); + expect(skuCarm023Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuCarm023 preset when built for legacy graphql`, () => { + const skuCarm023Preset = InventoryEntryDraft.presets + .skuCarm023() + .buildGraphql(); + expect(skuCarm023Preset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-carm-023.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-carm-023.ts new file mode 100644 index 000000000..35af5e05b --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-carm-023.ts @@ -0,0 +1,14 @@ +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const variant = ProductVariantDraft.presets.sampleData + .charlieArmchair01() + .build(); + +const skuCarm023 = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets.empty().sku(variant.sku!).quantityOnStock(100); +export default skuCarm023; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-cbm-03.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-cbm-03.spec.ts new file mode 100644 index 000000000..969c994ff --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-cbm-03.spec.ts @@ -0,0 +1,37 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuCbm03 preset`, () => { + it(`should return a skuCbm03 preset when built for rest`, () => { + const skuCbm03Preset = InventoryEntryDraftRest.presets.skuCbm03().build(); + expect(skuCbm03Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuCbm03 preset when built for graphql`, () => { + const skuCbm03Preset = InventoryEntryDraftGraphql.presets + .skuCbm03() + .build(); + expect(skuCbm03Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuCbm03 preset when built for legacy rest`, () => { + const skuCbm03Preset = InventoryEntryDraft.presets + .skuCbm03() + .buildRest(); + expect(skuCbm03Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuCbm03 preset when built for legacy graphql`, () => { + const skuCbm03Preset = InventoryEntryDraft.presets + .skuCbm03() + .buildGraphql(); + expect(skuCbm03Preset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-cbm-03.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-cbm-03.ts new file mode 100644 index 000000000..3803c6e07 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-cbm-03.ts @@ -0,0 +1,14 @@ +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const variant = ProductVariantDraft.presets.sampleData + .classicBeerMug01() + .build(); + +const skuCbm03 = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets.empty().sku(variant.sku!).quantityOnStock(100); +export default skuCbm03; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-ccc-09.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-ccc-09.spec.ts new file mode 100644 index 000000000..85ce27f04 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-ccc-09.spec.ts @@ -0,0 +1,37 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuCcc09 preset`, () => { + it(`should return a skuCcc09 preset when built for rest`, () => { + const skuCcc09Preset = InventoryEntryDraftRest.presets.skuCcc09().build(); + expect(skuCcc09Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuCcc09 preset when built for graphql`, () => { + const skuCcc09Preset = InventoryEntryDraftGraphql.presets + .skuCcc09() + .build(); + expect(skuCcc09Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuCcc09 preset when built for legacy rest`, () => { + const skuCcc09Preset = InventoryEntryDraft.presets + .skuCcc09() + .buildRest(); + expect(skuCcc09Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuCcc09 preset when built for legacy graphql`, () => { + const skuCcc09Preset = InventoryEntryDraft.presets + .skuCcc09() + .buildGraphql(); + expect(skuCcc09Preset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-ccc-09.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-ccc-09.ts new file mode 100644 index 000000000..7ebcdcfe3 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-ccc-09.ts @@ -0,0 +1,14 @@ +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const variant = ProductVariantDraft.presets.sampleData + .classicCoffeeCup01() + .build(); + +const skuCcc09 = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets.empty().sku(variant.sku!).quantityOnStock(99); +export default skuCcc09; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-ccg-01.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-ccg-01.spec.ts new file mode 100644 index 000000000..bc31e89b7 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-ccg-01.spec.ts @@ -0,0 +1,37 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuCcg01 preset`, () => { + it(`should return a skuCcg01 preset when built for rest`, () => { + const skuCcg01Preset = InventoryEntryDraftRest.presets.skuCcg01().build(); + expect(skuCcg01Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuCcg01 preset when built for graphql`, () => { + const skuCcg01Preset = InventoryEntryDraftGraphql.presets + .skuCcg01() + .build(); + expect(skuCcg01Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuCcg01 preset when built for legacy rest`, () => { + const skuCcg01Preset = InventoryEntryDraft.presets + .skuCcg01() + .buildRest(); + expect(skuCcg01Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuCcg01 preset when built for legacy graphql`, () => { + const skuCcg01Preset = InventoryEntryDraft.presets + .skuCcg01() + .buildGraphql(); + expect(skuCcg01Preset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-ccg-01.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-ccg-01.ts new file mode 100644 index 000000000..52a3c9a7e --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-ccg-01.ts @@ -0,0 +1,14 @@ +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const variant = ProductVariantDraft.presets.sampleData + .classicChampagneGlasses01() + .build(); + +const skuCcg01 = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets.empty().sku(variant.sku!).quantityOnStock(99); +export default skuCcg01; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-ccg-02.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-ccg-02.spec.ts new file mode 100644 index 000000000..4f48341ac --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-ccg-02.spec.ts @@ -0,0 +1,37 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuCcg02 preset`, () => { + it(`should return a skuCcg02 preset when built for rest`, () => { + const skuCcg02Preset = InventoryEntryDraftRest.presets.skuCcg02().build(); + expect(skuCcg02Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuCcg02 preset when built for graphql`, () => { + const skuCcg02Preset = InventoryEntryDraftGraphql.presets + .skuCcg02() + .build(); + expect(skuCcg02Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuCcg02 preset when built for legacy rest`, () => { + const skuCcg02Preset = InventoryEntryDraft.presets + .skuCcg02() + .buildRest(); + expect(skuCcg02Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuCcg02 preset when built for legacy graphql`, () => { + const skuCcg02Preset = InventoryEntryDraft.presets + .skuCcg02() + .buildGraphql(); + expect(skuCcg02Preset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-ccg-02.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-ccg-02.ts new file mode 100644 index 000000000..dfdd81474 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-ccg-02.ts @@ -0,0 +1,27 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .inventoryChannel() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .clinkChampagneGlass01() + .build(); + +const skuCcg02 = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .sku(variant.sku!) + .quantityOnStock(100) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuCcg02; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-cch-093.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-cch-093.spec.ts new file mode 100644 index 000000000..46175af04 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-cch-093.spec.ts @@ -0,0 +1,37 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuCch093 preset`, () => { + it(`should return a skuCch093 preset when built for rest`, () => { + const skuCch093Preset = InventoryEntryDraftRest.presets.skuCch093().build(); + expect(skuCch093Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuCch093 preset when built for graphql`, () => { + const skuCch093Preset = InventoryEntryDraftGraphql.presets + .skuCch093() + .build(); + expect(skuCch093Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuCch093 preset when built for legacy rest`, () => { + const skuCch093Preset = InventoryEntryDraft.presets + .skuCch093() + .buildRest(); + expect(skuCch093Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuCch093 preset when built for legacy graphql`, () => { + const skuCch093Preset = InventoryEntryDraft.presets + .skuCch093() + .buildGraphql(); + expect(skuCch093Preset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-cch-093.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-cch-093.ts new file mode 100644 index 000000000..411548aa6 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-cch-093.ts @@ -0,0 +1,14 @@ +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const variant = ProductVariantDraft.presets.sampleData + .charcoalChair01() + .build(); + +const skuCch093 = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets.empty().sku(variant.sku!).quantityOnStock(100); +export default skuCch093; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-ccm-089.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-ccm-089.spec.ts new file mode 100644 index 000000000..5b6ade949 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-ccm-089.spec.ts @@ -0,0 +1,37 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuCcm089 preset`, () => { + it(`should return a skuCcm089 preset when built for rest`, () => { + const skuCcm089Preset = InventoryEntryDraftRest.presets.skuCcm089().build(); + expect(skuCcm089Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuCcm089 preset when built for graphql`, () => { + const skuCcm089Preset = InventoryEntryDraftGraphql.presets + .skuCcm089() + .build(); + expect(skuCcm089Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuCcm089 preset when built for legacy rest`, () => { + const skuCcm089Preset = InventoryEntryDraft.presets + .skuCcm089() + .buildRest(); + expect(skuCcm089Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuCcm089 preset when built for legacy graphql`, () => { + const skuCcm089Preset = InventoryEntryDraft.presets + .skuCcm089() + .buildGraphql(); + expect(skuCcm089Preset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-ccm-089.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-ccm-089.ts new file mode 100644 index 000000000..50d8e8193 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-ccm-089.ts @@ -0,0 +1,14 @@ +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const variant = ProductVariantDraft.presets.sampleData + .comfortCoffeeMug01() + .build(); + +const skuCcm089 = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets.empty().sku(variant.sku!).quantityOnStock(100); +export default skuCcm089; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-cdg-09.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-cdg-09.spec.ts new file mode 100644 index 000000000..63800fc01 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-cdg-09.spec.ts @@ -0,0 +1,37 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuCdg09 preset`, () => { + it(`should return a skuCdg09 preset when built for rest`, () => { + const skuCdg09Preset = InventoryEntryDraftRest.presets.skuCdg09().build(); + expect(skuCdg09Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuCdg09 preset when built for graphql`, () => { + const skuCdg09Preset = InventoryEntryDraftGraphql.presets + .skuCdg09() + .build(); + expect(skuCdg09Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuCdg09 preset when built for legacy rest`, () => { + const skuCdg09Preset = InventoryEntryDraft.presets + .skuCdg09() + .buildRest(); + expect(skuCdg09Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuCdg09 preset when built for legacy graphql`, () => { + const skuCdg09Preset = InventoryEntryDraft.presets + .skuCdg09() + .buildGraphql(); + expect(skuCdg09Preset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-cdg-09.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-cdg-09.ts new file mode 100644 index 000000000..bdcd05cab --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-cdg-09.ts @@ -0,0 +1,14 @@ +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const variant = ProductVariantDraft.presets.sampleData + .crystalDrinkingGlass01() + .build(); + +const skuCdg09 = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets.empty().sku(variant.sku!).quantityOnStock(100); +export default skuCdg09; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-cjb-01.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-cjb-01.spec.ts new file mode 100644 index 000000000..ca19b3465 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-cjb-01.spec.ts @@ -0,0 +1,37 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuCjb01 preset`, () => { + it(`should return a skuCjb01 preset when built for rest`, () => { + const skuCjb01Preset = InventoryEntryDraftRest.presets.skuCjb01().build(); + expect(skuCjb01Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuCjb01 preset when built for graphql`, () => { + const skuCjb01Preset = InventoryEntryDraftGraphql.presets + .skuCjb01() + .build(); + expect(skuCjb01Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuCjb01 preset when built for legacy rest`, () => { + const skuCjb01Preset = InventoryEntryDraft.presets + .skuCjb01() + .buildRest(); + expect(skuCjb01Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuCjb01 preset when built for legacy graphql`, () => { + const skuCjb01Preset = InventoryEntryDraft.presets + .skuCjb01() + .buildGraphql(); + expect(skuCjb01Preset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-cjb-01.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-cjb-01.ts new file mode 100644 index 000000000..8c1459403 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-cjb-01.ts @@ -0,0 +1,14 @@ +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const variant = ProductVariantDraft.presets.sampleData + .cubeJuteBasket01() + .build(); + +const skuCjb01 = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets.empty().sku(variant.sku!).quantityOnStock(96); +export default skuCjb01; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-cns-0434.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-cns-0434.spec.ts new file mode 100644 index 000000000..5790f5c06 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-cns-0434.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuCns0434 preset`, () => { + it(`should return a skuCns0434 preset when built for rest`, () => { + const skuCns0434Preset = InventoryEntryDraftRest.presets + .skuCns0434() + .build(); + expect(skuCns0434Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuCns0434 preset when built for graphql`, () => { + const skuCns0434Preset = InventoryEntryDraftGraphql.presets + .skuCns0434() + .build(); + expect(skuCns0434Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuCns0434 preset when built for legacy rest`, () => { + const skuCns0434Preset = InventoryEntryDraft.presets + .skuCns0434() + .buildRest(); + expect(skuCns0434Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuCns0434 preset when built for legacy graphql`, () => { + const skuCns0434Preset = InventoryEntryDraft.presets + .skuCns0434() + .buildGraphql(); + expect(skuCns0434Preset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-cns-0434.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-cns-0434.ts new file mode 100644 index 000000000..f907e8e74 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-cns-0434.ts @@ -0,0 +1,14 @@ +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const variant = ProductVariantDraft.presets.sampleData + .minimalistCedarNightstand01() + .build(); + +const skuCns0434 = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets.empty().sku(variant.sku!).quantityOnStock(100); +export default skuCns0434; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-coc-0843.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-coc-0843.spec.ts new file mode 100644 index 000000000..419481c31 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-coc-0843.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuCoc0843 preset`, () => { + it(`should return a skuCoc0843 preset when built for rest`, () => { + const skuCoc0843Preset = InventoryEntryDraftRest.presets + .skuCoc0843() + .build(); + expect(skuCoc0843Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuCoc0843 preset when built for graphql`, () => { + const skuCoc0843Preset = InventoryEntryDraftGraphql.presets + .skuCoc0843() + .build(); + expect(skuCoc0843Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuCoc0843 preset when built for legacy rest`, () => { + const skuCoc0843Preset = InventoryEntryDraft.presets + .skuCoc0843() + .buildRest(); + expect(skuCoc0843Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuCoc0843 preset when built for legacy graphql`, () => { + const skuCoc0843Preset = InventoryEntryDraft.presets + .skuCoc0843() + .buildGraphql(); + expect(skuCoc0843Preset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-coc-0843.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-coc-0843.ts new file mode 100644 index 000000000..a07073169 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-coc-0843.ts @@ -0,0 +1,14 @@ +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const variant = ProductVariantDraft.presets.sampleData + .cocktailShakerSet01() + .build(); + +const skuCoc0843 = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets.empty().sku(variant.sku!).quantityOnStock(100); +export default skuCoc0843; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-cqb-09.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-cqb-09.spec.ts new file mode 100644 index 000000000..9981fd649 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-cqb-09.spec.ts @@ -0,0 +1,37 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuCqb09 preset`, () => { + it(`should return a skuCqb09 preset when built for rest`, () => { + const skuCqb09Preset = InventoryEntryDraftRest.presets.skuCqb09().build(); + expect(skuCqb09Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuCqb09 preset when built for graphql`, () => { + const skuCqb09Preset = InventoryEntryDraftGraphql.presets + .skuCqb09() + .build(); + expect(skuCqb09Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuCqb09 preset when built for legacy rest`, () => { + const skuCqb09Preset = InventoryEntryDraft.presets + .skuCqb09() + .buildRest(); + expect(skuCqb09Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuCqb09 preset when built for legacy graphql`, () => { + const skuCqb09Preset = InventoryEntryDraft.presets + .skuCqb09() + .buildGraphql(); + expect(skuCqb09Preset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-cqb-09.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-cqb-09.ts new file mode 100644 index 000000000..60c8e3165 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-cqb-09.ts @@ -0,0 +1,14 @@ +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const variant = ProductVariantDraft.presets.sampleData + .cloudQueenBed01() + .build(); + +const skuCqb09 = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets.empty().sku(variant.sku!).quantityOnStock(1000); +export default skuCqb09; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-cr-098.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-cr-098.spec.ts new file mode 100644 index 000000000..6d6997452 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-cr-098.spec.ts @@ -0,0 +1,37 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuCr098 preset`, () => { + it(`should return a skuCr098 preset when built for rest`, () => { + const skuCr098Preset = InventoryEntryDraftRest.presets.skuCr098().build(); + expect(skuCr098Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuCr098 preset when built for graphql`, () => { + const skuCr098Preset = InventoryEntryDraftGraphql.presets + .skuCr098() + .build(); + expect(skuCr098Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuCr098 preset when built for legacy rest`, () => { + const skuCr098Preset = InventoryEntryDraft.presets + .skuCr098() + .buildRest(); + expect(skuCr098Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuCr098 preset when built for legacy graphql`, () => { + const skuCr098Preset = InventoryEntryDraft.presets + .skuCr098() + .buildGraphql(); + expect(skuCr098Preset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-cr-098.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-cr-098.ts new file mode 100644 index 000000000..6a4d577fc --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-cr-098.ts @@ -0,0 +1,27 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .inventoryChannel() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .cobblestoneRug01() + .build(); + +const skuCr098 = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .sku(variant.sku!) + .quantityOnStock(100) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuCr098; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-cst-01.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-cst-01.spec.ts new file mode 100644 index 000000000..14fbd764a --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-cst-01.spec.ts @@ -0,0 +1,37 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuCst01 preset`, () => { + it(`should return a skuCst01 preset when built for rest`, () => { + const skuCst01Preset = InventoryEntryDraftRest.presets.skuCst01().build(); + expect(skuCst01Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuCst01 preset when built for graphql`, () => { + const skuCst01Preset = InventoryEntryDraftGraphql.presets + .skuCst01() + .build(); + expect(skuCst01Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuCst01 preset when built for legacy rest`, () => { + const skuCst01Preset = InventoryEntryDraft.presets + .skuCst01() + .buildRest(); + expect(skuCst01Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuCst01 preset when built for legacy graphql`, () => { + const skuCst01Preset = InventoryEntryDraft.presets + .skuCst01() + .buildGraphql(); + expect(skuCst01Preset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-cst-01.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-cst-01.ts new file mode 100644 index 000000000..9356ce239 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-cst-01.ts @@ -0,0 +1,14 @@ +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const variant = ProductVariantDraft.presets.sampleData + .classicServingTray01() + .build(); + +const skuCst01 = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets.empty().sku(variant.sku!).quantityOnStock(100); +export default skuCst01; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-ctss-098.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-ctss-098.spec.ts new file mode 100644 index 000000000..3ceb6ede9 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-ctss-098.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuCtss098 preset`, () => { + it(`should return a skuCtss098 preset when built for rest`, () => { + const skuCtss098Preset = InventoryEntryDraftRest.presets + .skuCtss098() + .build(); + expect(skuCtss098Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuCtss098 preset when built for graphql`, () => { + const skuCtss098Preset = InventoryEntryDraftGraphql.presets + .skuCtss098() + .build(); + expect(skuCtss098Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuCtss098 preset when built for legacy rest`, () => { + const skuCtss098Preset = InventoryEntryDraft.presets + .skuCtss098() + .buildRest(); + expect(skuCtss098Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuCtss098 preset when built for legacy graphql`, () => { + const skuCtss098Preset = InventoryEntryDraft.presets + .skuCtss098() + .buildGraphql(); + expect(skuCtss098Preset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-ctss-098.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-ctss-098.ts new file mode 100644 index 000000000..0aaf3d0b3 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-ctss-098.ts @@ -0,0 +1,14 @@ +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const variant = ProductVariantDraft.presets.sampleData + .canelaThreeSeaterSofa01() + .build(); + +const skuCtss098 = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets.empty().sku(variant.sku!).quantityOnStock(1000); +export default skuCtss098; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-ctss-0983.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-ctss-0983.spec.ts new file mode 100644 index 000000000..dcf937b84 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-ctss-0983.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuCtss0983 preset`, () => { + it(`should return a skuCtss0983 preset when built for rest`, () => { + const skuCtss0983Preset = InventoryEntryDraftRest.presets + .skuCtss0983() + .build(); + expect(skuCtss0983Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuCtss0983 preset when built for graphql`, () => { + const skuCtss0983Preset = InventoryEntryDraftGraphql.presets + .skuCtss0983() + .build(); + expect(skuCtss0983Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuCtss0983 preset when built for legacy rest`, () => { + const skuCtss0983Preset = InventoryEntryDraft.presets + .skuCtss0983() + .buildRest(); + expect(skuCtss0983Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuCtss0983 preset when built for legacy graphql`, () => { + const skuCtss0983Preset = InventoryEntryDraft.presets + .skuCtss0983() + .buildGraphql(); + expect(skuCtss0983Preset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-ctss-0983.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-ctss-0983.ts new file mode 100644 index 000000000..9e89777f0 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-ctss-0983.ts @@ -0,0 +1,14 @@ +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const variant = ProductVariantDraft.presets.sampleData + .cottonTwoSeaterSofa01() + .build(); + +const skuCtss0983 = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets.empty().sku(variant.sku!).quantityOnStock(99); +export default skuCtss0983; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-cwg-01.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-cwg-01.spec.ts new file mode 100644 index 000000000..764d5f4a3 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-cwg-01.spec.ts @@ -0,0 +1,37 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuCwg01 preset`, () => { + it(`should return a skuCwg01 preset when built for rest`, () => { + const skuCwg01Preset = InventoryEntryDraftRest.presets.skuCwg01().build(); + expect(skuCwg01Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuCwg01 preset when built for graphql`, () => { + const skuCwg01Preset = InventoryEntryDraftGraphql.presets + .skuCwg01() + .build(); + expect(skuCwg01Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuCwg01 preset when built for legacy rest`, () => { + const skuCwg01Preset = InventoryEntryDraft.presets + .skuCwg01() + .buildRest(); + expect(skuCwg01Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuCwg01 preset when built for legacy graphql`, () => { + const skuCwg01Preset = InventoryEntryDraft.presets + .skuCwg01() + .buildGraphql(); + expect(skuCwg01Preset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-cwg-01.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-cwg-01.ts new file mode 100644 index 000000000..6663612a5 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-cwg-01.ts @@ -0,0 +1,14 @@ +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const variant = ProductVariantDraft.presets.sampleData + .chiantiWineGlass01() + .build(); + +const skuCwg01 = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets.empty().sku(variant.sku!).quantityOnStock(99); +export default skuCwg01; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-dweg-09.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-dweg-09.spec.ts new file mode 100644 index 000000000..e6086d83e --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-dweg-09.spec.ts @@ -0,0 +1,37 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuDweg09 preset`, () => { + it(`should return a skuDweg09 preset when built for rest`, () => { + const skuDweg09Preset = InventoryEntryDraftRest.presets.skuDweg09().build(); + expect(skuDweg09Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuDweg09 preset when built for graphql`, () => { + const skuDweg09Preset = InventoryEntryDraftGraphql.presets + .skuDweg09() + .build(); + expect(skuDweg09Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuDweg09 preset when built for legacy rest`, () => { + const skuDweg09Preset = InventoryEntryDraft.presets + .skuDweg09() + .buildRest(); + expect(skuDweg09Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuDweg09 preset when built for legacy graphql`, () => { + const skuDweg09Preset = InventoryEntryDraft.presets + .skuDweg09() + .buildGraphql(); + expect(skuDweg09Preset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-dweg-09.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-dweg-09.ts new file mode 100644 index 000000000..517ff8abb --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-dweg-09.ts @@ -0,0 +1,14 @@ +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const variant = ProductVariantDraft.presets.sampleData + .doubleWalledEspressoGlass01() + .build(); + +const skuDweg09 = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets.empty().sku(variant.sku!).quantityOnStock(100); +export default skuDweg09; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-earm-04.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-earm-04.spec.ts new file mode 100644 index 000000000..eb407737c --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-earm-04.spec.ts @@ -0,0 +1,37 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuEarm04 preset`, () => { + it(`should return a skuEarm04 preset when built for rest`, () => { + const skuEarm04Preset = InventoryEntryDraftRest.presets.skuEarm04().build(); + expect(skuEarm04Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuEarm04 preset when built for graphql`, () => { + const skuEarm04Preset = InventoryEntryDraftGraphql.presets + .skuEarm04() + .build(); + expect(skuEarm04Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuEarm04 preset when built for legacy rest`, () => { + const skuEarm04Preset = InventoryEntryDraft.presets + .skuEarm04() + .buildRest(); + expect(skuEarm04Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuEarm04 preset when built for legacy graphql`, () => { + const skuEarm04Preset = InventoryEntryDraft.presets + .skuEarm04() + .buildGraphql(); + expect(skuEarm04Preset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-earm-04.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-earm-04.ts new file mode 100644 index 000000000..cc7cedea9 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-earm-04.ts @@ -0,0 +1,14 @@ +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const variant = ProductVariantDraft.presets.sampleData + .edgarArmchair01() + .build(); + +const skuEarm04 = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets.empty().sku(variant.sku!).quantityOnStock(1000); +export default skuEarm04; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-ec-0993.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-ec-0993.spec.ts new file mode 100644 index 000000000..8211c11cd --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-ec-0993.spec.ts @@ -0,0 +1,37 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuEc0993 preset`, () => { + it(`should return a skuEc0993 preset when built for rest`, () => { + const skuEc0993Preset = InventoryEntryDraftRest.presets.skuEc0993().build(); + expect(skuEc0993Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuEc0993 preset when built for graphql`, () => { + const skuEc0993Preset = InventoryEntryDraftGraphql.presets + .skuEc0993() + .build(); + expect(skuEc0993Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuEc0993 preset when built for legacy rest`, () => { + const skuEc0993Preset = InventoryEntryDraft.presets + .skuEc0993() + .buildRest(); + expect(skuEc0993Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuEc0993 preset when built for legacy graphql`, () => { + const skuEc0993Preset = InventoryEntryDraft.presets + .skuEc0993() + .buildGraphql(); + expect(skuEc0993Preset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-ec-0993.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-ec-0993.ts new file mode 100644 index 000000000..3c4459f6a --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-ec-0993.ts @@ -0,0 +1,14 @@ +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const variant = ProductVariantDraft.presets.sampleData + .evergreenCandle01() + .build(); + +const skuEc0993 = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets.empty().sku(variant.sku!).quantityOnStock(100); +export default skuEc0993; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-ewc-07.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-ewc-07.spec.ts new file mode 100644 index 000000000..1bed84167 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-ewc-07.spec.ts @@ -0,0 +1,37 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuEwc07 preset`, () => { + it(`should return a skuEwc07 preset when built for rest`, () => { + const skuEwc07Preset = InventoryEntryDraftRest.presets.skuEwc07().build(); + expect(skuEwc07Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuEwc07 preset when built for graphql`, () => { + const skuEwc07Preset = InventoryEntryDraftGraphql.presets + .skuEwc07() + .build(); + expect(skuEwc07Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuEwc07 preset when built for legacy rest`, () => { + const skuEwc07Preset = InventoryEntryDraft.presets + .skuEwc07() + .buildRest(); + expect(skuEwc07Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuEwc07 preset when built for legacy graphql`, () => { + const skuEwc07Preset = InventoryEntryDraft.presets + .skuEwc07() + .buildGraphql(); + expect(skuEwc07Preset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-ewc-07.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-ewc-07.ts new file mode 100644 index 000000000..111894636 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-ewc-07.ts @@ -0,0 +1,14 @@ +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const variant = ProductVariantDraft.presets.sampleData + .entrywayCloset01() + .build(); + +const skuEwc07 = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets.empty().sku(variant.sku!).quantityOnStock(100); +export default skuEwc07; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-farm-05.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-farm-05.spec.ts new file mode 100644 index 000000000..e49f8a568 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-farm-05.spec.ts @@ -0,0 +1,37 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuFarm05 preset`, () => { + it(`should return a skuFarm05 preset when built for rest`, () => { + const skuFarm05Preset = InventoryEntryDraftRest.presets.skuFarm05().build(); + expect(skuFarm05Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuFarm05 preset when built for graphql`, () => { + const skuFarm05Preset = InventoryEntryDraftGraphql.presets + .skuFarm05() + .build(); + expect(skuFarm05Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuFarm05 preset when built for legacy rest`, () => { + const skuFarm05Preset = InventoryEntryDraft.presets + .skuFarm05() + .buildRest(); + expect(skuFarm05Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuFarm05 preset when built for legacy graphql`, () => { + const skuFarm05Preset = InventoryEntryDraft.presets + .skuFarm05() + .buildGraphql(); + expect(skuFarm05Preset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-farm-05.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-farm-05.ts new file mode 100644 index 000000000..4a1a663de --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-farm-05.ts @@ -0,0 +1,14 @@ +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const variant = ProductVariantDraft.presets.sampleData + .fawnArmchair01() + .build(); + +const skuFarm05 = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets.empty().sku(variant.sku!).quantityOnStock(1000); +export default skuFarm05; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-flas-094.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-flas-094.spec.ts new file mode 100644 index 000000000..984009c74 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-flas-094.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuFlas094 preset`, () => { + it(`should return a skuFlas094 preset when built for rest`, () => { + const skuFlas094Preset = InventoryEntryDraftRest.presets + .skuFlas094() + .build(); + expect(skuFlas094Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuFlas094 preset when built for graphql`, () => { + const skuFlas094Preset = InventoryEntryDraftGraphql.presets + .skuFlas094() + .build(); + expect(skuFlas094Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuFlas094 preset when built for legacy rest`, () => { + const skuFlas094Preset = InventoryEntryDraft.presets + .skuFlas094() + .buildRest(); + expect(skuFlas094Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuFlas094 preset when built for legacy graphql`, () => { + const skuFlas094Preset = InventoryEntryDraft.presets + .skuFlas094() + .buildGraphql(); + expect(skuFlas094Preset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-flas-094.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-flas-094.ts new file mode 100644 index 000000000..4219df9e7 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-flas-094.ts @@ -0,0 +1,14 @@ +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const variant = ProductVariantDraft.presets.sampleData + .steelHipFlask01() + .build(); + +const skuFlas094 = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets.empty().sku(variant.sku!).quantityOnStock(100); +export default skuFlas094; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-garm-093.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-garm-093.spec.ts new file mode 100644 index 000000000..ed63ae513 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-garm-093.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuGarm093 preset`, () => { + it(`should return a skuGarm093 preset when built for rest`, () => { + const skuGarm093Preset = InventoryEntryDraftRest.presets + .skuGarm093() + .build(); + expect(skuGarm093Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuGarm093 preset when built for graphql`, () => { + const skuGarm093Preset = InventoryEntryDraftGraphql.presets + .skuGarm093() + .build(); + expect(skuGarm093Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuGarm093 preset when built for legacy rest`, () => { + const skuGarm093Preset = InventoryEntryDraft.presets + .skuGarm093() + .buildRest(); + expect(skuGarm093Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuGarm093 preset when built for legacy graphql`, () => { + const skuGarm093Preset = InventoryEntryDraft.presets + .skuGarm093() + .buildGraphql(); + expect(skuGarm093Preset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-garm-093.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-garm-093.ts new file mode 100644 index 000000000..9c0ffc19b --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-garm-093.ts @@ -0,0 +1,14 @@ +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const variant = ProductVariantDraft.presets.sampleData + .glamArmchair01() + .build(); + +const skuGarm093 = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets.empty().sku(variant.sku!).quantityOnStock(100); +export default skuGarm093; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-gc-01.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-gc-01.spec.ts new file mode 100644 index 000000000..02624906b --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-gc-01.spec.ts @@ -0,0 +1,35 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuGc01 preset`, () => { + it(`should return a skuGc01 preset when built for rest`, () => { + const skuGc01Preset = InventoryEntryDraftRest.presets.skuGc01().build(); + expect(skuGc01Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuGc01 preset when built for graphql`, () => { + const skuGc01Preset = InventoryEntryDraftGraphql.presets.skuGc01().build(); + expect(skuGc01Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuGc01 preset when built for legacy rest`, () => { + const skuGc01Preset = InventoryEntryDraft.presets + .skuGc01() + .buildRest(); + expect(skuGc01Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuGc01 preset when built for legacy graphql`, () => { + const skuGc01Preset = InventoryEntryDraft.presets + .skuGc01() + .buildGraphql(); + expect(skuGc01Preset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-gc-01.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-gc-01.ts new file mode 100644 index 000000000..8a97388d5 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-gc-01.ts @@ -0,0 +1,14 @@ +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const variant = ProductVariantDraft.presets.sampleData + .greenServingPlate01() + .build(); + +const skuGc01 = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets.empty().sku(variant.sku!).quantityOnStock(100); +export default skuGc01; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-gmct-01.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-gmct-01.spec.ts new file mode 100644 index 000000000..3ec83b43a --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-gmct-01.spec.ts @@ -0,0 +1,37 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuGmct01 preset`, () => { + it(`should return a skuGmct01 preset when built for rest`, () => { + const skuGmct01Preset = InventoryEntryDraftRest.presets.skuGmct01().build(); + expect(skuGmct01Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuGmct01 preset when built for graphql`, () => { + const skuGmct01Preset = InventoryEntryDraftGraphql.presets + .skuGmct01() + .build(); + expect(skuGmct01Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuGmct01 preset when built for legacy rest`, () => { + const skuGmct01Preset = InventoryEntryDraft.presets + .skuGmct01() + .buildRest(); + expect(skuGmct01Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuGmct01 preset when built for legacy graphql`, () => { + const skuGmct01Preset = InventoryEntryDraft.presets + .skuGmct01() + .buildGraphql(); + expect(skuGmct01Preset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-gmct-01.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-gmct-01.ts new file mode 100644 index 000000000..09144c5b3 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-gmct-01.ts @@ -0,0 +1,14 @@ +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const variant = ProductVariantDraft.presets.sampleData + .modernGoldCoffeeTable01() + .build(); + +const skuGmct01 = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets.empty().sku(variant.sku!).quantityOnStock(98); +export default skuGmct01; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-gpc-01.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-gpc-01.spec.ts new file mode 100644 index 000000000..2eb5ca20f --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-gpc-01.spec.ts @@ -0,0 +1,37 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuGpc01 preset`, () => { + it(`should return a skuGpc01 preset when built for rest`, () => { + const skuGpc01Preset = InventoryEntryDraftRest.presets.skuGpc01().build(); + expect(skuGpc01Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuGpc01 preset when built for graphql`, () => { + const skuGpc01Preset = InventoryEntryDraftGraphql.presets + .skuGpc01() + .build(); + expect(skuGpc01Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuGpc01 preset when built for legacy rest`, () => { + const skuGpc01Preset = InventoryEntryDraft.presets + .skuGpc01() + .buildRest(); + expect(skuGpc01Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuGpc01 preset when built for legacy graphql`, () => { + const skuGpc01Preset = InventoryEntryDraft.presets + .skuGpc01() + .buildGraphql(); + expect(skuGpc01Preset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-gpc-01.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-gpc-01.ts new file mode 100644 index 000000000..6307ca7cd --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-gpc-01.ts @@ -0,0 +1,14 @@ +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const variant = ProductVariantDraft.presets.sampleData + .geometricPillowCase01() + .build(); + +const skuGpc01 = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets.empty().sku(variant.sku!).quantityOnStock(81); +export default skuGpc01; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-gpc-02.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-gpc-02.spec.ts new file mode 100644 index 000000000..d38ac0350 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-gpc-02.spec.ts @@ -0,0 +1,37 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuGpc02 preset`, () => { + it(`should return a skuGpc02 preset when built for rest`, () => { + const skuGpc02Preset = InventoryEntryDraftRest.presets.skuGpc02().build(); + expect(skuGpc02Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuGpc02 preset when built for graphql`, () => { + const skuGpc02Preset = InventoryEntryDraftGraphql.presets + .skuGpc02() + .build(); + expect(skuGpc02Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuGpc02 preset when built for legacy rest`, () => { + const skuGpc02Preset = InventoryEntryDraft.presets + .skuGpc02() + .buildRest(); + expect(skuGpc02Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuGpc02 preset when built for legacy graphql`, () => { + const skuGpc02Preset = InventoryEntryDraft.presets + .skuGpc02() + .buildGraphql(); + expect(skuGpc02Preset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-gpc-02.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-gpc-02.ts new file mode 100644 index 000000000..4e3b33320 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-gpc-02.ts @@ -0,0 +1,14 @@ +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const variant = ProductVariantDraft.presets.sampleData + .geometricPillowCase02() + .build(); + +const skuGpc02 = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets.empty().sku(variant.sku!).quantityOnStock(100); +export default skuGpc02; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-gpc-03.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-gpc-03.spec.ts new file mode 100644 index 000000000..04d995f62 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-gpc-03.spec.ts @@ -0,0 +1,37 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuGpc03 preset`, () => { + it(`should return a skuGpc03 preset when built for rest`, () => { + const skuGpc03Preset = InventoryEntryDraftRest.presets.skuGpc03().build(); + expect(skuGpc03Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuGpc03 preset when built for graphql`, () => { + const skuGpc03Preset = InventoryEntryDraftGraphql.presets + .skuGpc03() + .build(); + expect(skuGpc03Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuGpc03 preset when built for legacy rest`, () => { + const skuGpc03Preset = InventoryEntryDraft.presets + .skuGpc03() + .buildRest(); + expect(skuGpc03Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuGpc03 preset when built for legacy graphql`, () => { + const skuGpc03Preset = InventoryEntryDraft.presets + .skuGpc03() + .buildGraphql(); + expect(skuGpc03Preset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-gpc-03.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-gpc-03.ts new file mode 100644 index 000000000..21bdb1d94 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-gpc-03.ts @@ -0,0 +1,14 @@ +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const variant = ProductVariantDraft.presets.sampleData + .geometricPillowCase03() + .build(); + +const skuGpc03 = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets.empty().sku(variant.sku!).quantityOnStock(100); +export default skuGpc03; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-grcg-01.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-grcg-01.spec.ts new file mode 100644 index 000000000..0954660d3 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-grcg-01.spec.ts @@ -0,0 +1,37 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuGrcg01 preset`, () => { + it(`should return a skuGrcg01 preset when built for rest`, () => { + const skuGrcg01Preset = InventoryEntryDraftRest.presets.skuGrcg01().build(); + expect(skuGrcg01Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuGrcg01 preset when built for graphql`, () => { + const skuGrcg01Preset = InventoryEntryDraftGraphql.presets + .skuGrcg01() + .build(); + expect(skuGrcg01Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuGrcg01 preset when built for legacy rest`, () => { + const skuGrcg01Preset = InventoryEntryDraft.presets + .skuGrcg01() + .buildRest(); + expect(skuGrcg01Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuGrcg01 preset when built for legacy graphql`, () => { + const skuGrcg01Preset = InventoryEntryDraft.presets + .skuGrcg01() + .buildGraphql(); + expect(skuGrcg01Preset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-grcg-01.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-grcg-01.ts new file mode 100644 index 000000000..cc7ba9e4b --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-grcg-01.ts @@ -0,0 +1,14 @@ +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const variant = ProductVariantDraft.presets.sampleData + .goldRimmedChampagneGlasses01() + .build(); + +const skuGrcg01 = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets.empty().sku(variant.sku!).quantityOnStock(0); +export default skuGrcg01; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-hdg-02.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-hdg-02.spec.ts new file mode 100644 index 000000000..5645eaa39 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-hdg-02.spec.ts @@ -0,0 +1,37 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuHdg02 preset`, () => { + it(`should return a skuHdg02 preset when built for rest`, () => { + const skuHdg02Preset = InventoryEntryDraftRest.presets.skuHdg02().build(); + expect(skuHdg02Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuHdg02 preset when built for graphql`, () => { + const skuHdg02Preset = InventoryEntryDraftGraphql.presets + .skuHdg02() + .build(); + expect(skuHdg02Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuHdg02 preset when built for legacy rest`, () => { + const skuHdg02Preset = InventoryEntryDraft.presets + .skuHdg02() + .buildRest(); + expect(skuHdg02Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuHdg02 preset when built for legacy graphql`, () => { + const skuHdg02Preset = InventoryEntryDraft.presets + .skuHdg02() + .buildGraphql(); + expect(skuHdg02Preset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-hdg-02.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-hdg-02.ts new file mode 100644 index 000000000..9831c9ed2 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-hdg-02.ts @@ -0,0 +1,14 @@ +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const variant = ProductVariantDraft.presets.sampleData + .harmonyDrinkingGlass01() + .build(); + +const skuHdg02 = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets.empty().sku(variant.sku!).quantityOnStock(100); +export default skuHdg02; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-hp-01.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-hp-01.spec.ts new file mode 100644 index 000000000..70e114be7 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-hp-01.spec.ts @@ -0,0 +1,35 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuHp01 preset`, () => { + it(`should return a skuHp01 preset when built for rest`, () => { + const skuHp01Preset = InventoryEntryDraftRest.presets.skuHp01().build(); + expect(skuHp01Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuHp01 preset when built for graphql`, () => { + const skuHp01Preset = InventoryEntryDraftGraphql.presets.skuHp01().build(); + expect(skuHp01Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuHp01 preset when built for legacy rest`, () => { + const skuHp01Preset = InventoryEntryDraft.presets + .skuHp01() + .buildRest(); + expect(skuHp01Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuHp01 preset when built for legacy graphql`, () => { + const skuHp01Preset = InventoryEntryDraft.presets + .skuHp01() + .buildGraphql(); + expect(skuHp01Preset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-hp-01.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-hp-01.ts new file mode 100644 index 000000000..1f925d53b --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-hp-01.ts @@ -0,0 +1,14 @@ +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const variant = ProductVariantDraft.presets.sampleData + .harvestPlate01() + .build(); + +const skuHp01 = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets.empty().sku(variant.sku!).quantityOnStock(100); +export default skuHp01; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-ilc-01.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-ilc-01.spec.ts new file mode 100644 index 000000000..06f14970a --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-ilc-01.spec.ts @@ -0,0 +1,37 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuIlc01 preset`, () => { + it(`should return a skuIlc01 preset when built for rest`, () => { + const skuIlc01Preset = InventoryEntryDraftRest.presets.skuIlc01().build(); + expect(skuIlc01Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuIlc01 preset when built for graphql`, () => { + const skuIlc01Preset = InventoryEntryDraftGraphql.presets + .skuIlc01() + .build(); + expect(skuIlc01Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuIlc01 preset when built for legacy rest`, () => { + const skuIlc01Preset = InventoryEntryDraft.presets + .skuIlc01() + .buildRest(); + expect(skuIlc01Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuIlc01 preset when built for legacy graphql`, () => { + const skuIlc01Preset = InventoryEntryDraft.presets + .skuIlc01() + .buildGraphql(); + expect(skuIlc01Preset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-ilc-01.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-ilc-01.ts new file mode 100644 index 000000000..5c22f72b4 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-ilc-01.ts @@ -0,0 +1,14 @@ +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const variant = ProductVariantDraft.presets.sampleData + .ivoryLoungeChair01() + .build(); + +const skuIlc01 = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets.empty().sku(variant.sku!).quantityOnStock(100); +export default skuIlc01; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-iqb-09.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-iqb-09.spec.ts new file mode 100644 index 000000000..977d64535 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-iqb-09.spec.ts @@ -0,0 +1,37 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuIqb09 preset`, () => { + it(`should return a skuIqb09 preset when built for rest`, () => { + const skuIqb09Preset = InventoryEntryDraftRest.presets.skuIqb09().build(); + expect(skuIqb09Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuIqb09 preset when built for graphql`, () => { + const skuIqb09Preset = InventoryEntryDraftGraphql.presets + .skuIqb09() + .build(); + expect(skuIqb09Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuIqb09 preset when built for legacy rest`, () => { + const skuIqb09Preset = InventoryEntryDraft.presets + .skuIqb09() + .buildRest(); + expect(skuIqb09Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuIqb09 preset when built for legacy graphql`, () => { + const skuIqb09Preset = InventoryEntryDraft.presets + .skuIqb09() + .buildGraphql(); + expect(skuIqb09Preset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-iqb-09.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-iqb-09.ts new file mode 100644 index 000000000..58e560764 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-iqb-09.ts @@ -0,0 +1,14 @@ +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const variant = ProductVariantDraft.presets.sampleData + .serenityQueenBed01() + .build(); + +const skuIqb09 = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets.empty().sku(variant.sku!).quantityOnStock(100); +export default skuIqb09; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-isp-01.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-isp-01.spec.ts new file mode 100644 index 000000000..754998096 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-isp-01.spec.ts @@ -0,0 +1,37 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuIsp01 preset`, () => { + it(`should return a skuIsp01 preset when built for rest`, () => { + const skuIsp01Preset = InventoryEntryDraftRest.presets.skuIsp01().build(); + expect(skuIsp01Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuIsp01 preset when built for graphql`, () => { + const skuIsp01Preset = InventoryEntryDraftGraphql.presets + .skuIsp01() + .build(); + expect(skuIsp01Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuIsp01 preset when built for legacy rest`, () => { + const skuIsp01Preset = InventoryEntryDraft.presets + .skuIsp01() + .buildRest(); + expect(skuIsp01Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuIsp01 preset when built for legacy graphql`, () => { + const skuIsp01Preset = InventoryEntryDraft.presets + .skuIsp01() + .buildGraphql(); + expect(skuIsp01Preset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-isp-01.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-isp-01.ts new file mode 100644 index 000000000..5a466ae64 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-isp-01.ts @@ -0,0 +1,14 @@ +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const variant = ProductVariantDraft.presets.sampleData + .ivoryPlate01() + .build(); + +const skuIsp01 = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets.empty().sku(variant.sku!).quantityOnStock(100); +export default skuIsp01; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-jar-08.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-jar-08.spec.ts new file mode 100644 index 000000000..072ad134d --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-jar-08.spec.ts @@ -0,0 +1,37 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuJar08 preset`, () => { + it(`should return a skuJar08 preset when built for rest`, () => { + const skuJar08Preset = InventoryEntryDraftRest.presets.skuJar08().build(); + expect(skuJar08Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuJar08 preset when built for graphql`, () => { + const skuJar08Preset = InventoryEntryDraftGraphql.presets + .skuJar08() + .build(); + expect(skuJar08Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuJar08 preset when built for legacy rest`, () => { + const skuJar08Preset = InventoryEntryDraft.presets + .skuJar08() + .buildRest(); + expect(skuJar08Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuJar08 preset when built for legacy graphql`, () => { + const skuJar08Preset = InventoryEntryDraft.presets + .skuJar08() + .buildGraphql(); + expect(skuJar08Preset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-jar-08.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-jar-08.ts new file mode 100644 index 000000000..5b760ad21 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-jar-08.ts @@ -0,0 +1,14 @@ +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const variant = ProductVariantDraft.presets.sampleData + .juteRug01() + .build(); + +const skuJar08 = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets.empty().sku(variant.sku!).quantityOnStock(100); +export default skuJar08; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-lamr-03.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-lamr-03.spec.ts new file mode 100644 index 000000000..f5c393876 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-lamr-03.spec.ts @@ -0,0 +1,37 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuLamr03 preset`, () => { + it(`should return a skuLamr03 preset when built for rest`, () => { + const skuLamr03Preset = InventoryEntryDraftRest.presets.skuLamr03().build(); + expect(skuLamr03Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuLamr03 preset when built for graphql`, () => { + const skuLamr03Preset = InventoryEntryDraftGraphql.presets + .skuLamr03() + .build(); + expect(skuLamr03Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuLamr03 preset when built for legacy rest`, () => { + const skuLamr03Preset = InventoryEntryDraft.presets + .skuLamr03() + .buildRest(); + expect(skuLamr03Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuLamr03 preset when built for legacy graphql`, () => { + const skuLamr03Preset = InventoryEntryDraft.presets + .skuLamr03() + .buildGraphql(); + expect(skuLamr03Preset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-lamr-03.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-lamr-03.ts new file mode 100644 index 000000000..f56a606ae --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-lamr-03.ts @@ -0,0 +1,14 @@ +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const variant = ProductVariantDraft.presets.sampleData + .leahArmchair01() + .build(); + +const skuLamr03 = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets.empty().sku(variant.sku!).quantityOnStock(100); +export default skuLamr03; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-lbpc-09.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-lbpc-09.spec.ts new file mode 100644 index 000000000..830ca15a9 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-lbpc-09.spec.ts @@ -0,0 +1,37 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuLbpc09 preset`, () => { + it(`should return a skuLbpc09 preset when built for rest`, () => { + const skuLbpc09Preset = InventoryEntryDraftRest.presets.skuLbpc09().build(); + expect(skuLbpc09Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuLbpc09 preset when built for graphql`, () => { + const skuLbpc09Preset = InventoryEntryDraftGraphql.presets + .skuLbpc09() + .build(); + expect(skuLbpc09Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuLbpc09 preset when built for legacy rest`, () => { + const skuLbpc09Preset = InventoryEntryDraft.presets + .skuLbpc09() + .buildRest(); + expect(skuLbpc09Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuLbpc09 preset when built for legacy graphql`, () => { + const skuLbpc09Preset = InventoryEntryDraft.presets + .skuLbpc09() + .buildGraphql(); + expect(skuLbpc09Preset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-lbpc-09.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-lbpc-09.ts new file mode 100644 index 000000000..bb6e91e48 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-lbpc-09.ts @@ -0,0 +1,14 @@ +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const variant = ProductVariantDraft.presets.sampleData + .benPillowCover01() + .build(); + +const skuLbpc09 = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets.empty().sku(variant.sku!).quantityOnStock(100); +export default skuLbpc09; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-lco-034.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-lco-034.spec.ts new file mode 100644 index 000000000..784e1c82a --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-lco-034.spec.ts @@ -0,0 +1,37 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuLco034 preset`, () => { + it(`should return a skuLco034 preset when built for rest`, () => { + const skuLco034Preset = InventoryEntryDraftRest.presets.skuLco034().build(); + expect(skuLco034Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuLco034 preset when built for graphql`, () => { + const skuLco034Preset = InventoryEntryDraftGraphql.presets + .skuLco034() + .build(); + expect(skuLco034Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuLco034 preset when built for legacy rest`, () => { + const skuLco034Preset = InventoryEntryDraft.presets + .skuLco034() + .buildRest(); + expect(skuLco034Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuLco034 preset when built for legacy graphql`, () => { + const skuLco034Preset = InventoryEntryDraft.presets + .skuLco034() + .buildGraphql(); + expect(skuLco034Preset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-lco-034.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-lco-034.ts new file mode 100644 index 000000000..5bfd6e5a9 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-lco-034.ts @@ -0,0 +1,14 @@ +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const variant = ProductVariantDraft.presets.sampleData + .leatherCoaster01() + .build(); + +const skuLco034 = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets.empty().sku(variant.sku!).quantityOnStock(1000); +export default skuLco034; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-lcp-01.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-lcp-01.spec.ts new file mode 100644 index 000000000..4aab325a1 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-lcp-01.spec.ts @@ -0,0 +1,37 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuLcp01 preset`, () => { + it(`should return a skuLcp01 preset when built for rest`, () => { + const skuLcp01Preset = InventoryEntryDraftRest.presets.skuLcp01().build(); + expect(skuLcp01Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuLcp01 preset when built for graphql`, () => { + const skuLcp01Preset = InventoryEntryDraftGraphql.presets + .skuLcp01() + .build(); + expect(skuLcp01Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuLcp01 preset when built for legacy rest`, () => { + const skuLcp01Preset = InventoryEntryDraft.presets + .skuLcp01() + .buildRest(); + expect(skuLcp01Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuLcp01 preset when built for legacy graphql`, () => { + const skuLcp01Preset = InventoryEntryDraft.presets + .skuLcp01() + .buildGraphql(); + expect(skuLcp01Preset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-lcp-01.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-lcp-01.ts new file mode 100644 index 000000000..93ef1303a --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-lcp-01.ts @@ -0,0 +1,14 @@ +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const variant = ProductVariantDraft.presets.sampleData + .largeCeramicPlate01() + .build(); + +const skuLcp01 = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets.empty().sku(variant.sku!).quantityOnStock(74); +export default skuLcp01; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-lcp-02.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-lcp-02.spec.ts new file mode 100644 index 000000000..332def0f3 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-lcp-02.spec.ts @@ -0,0 +1,37 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuLcp02 preset`, () => { + it(`should return a skuLcp02 preset when built for rest`, () => { + const skuLcp02Preset = InventoryEntryDraftRest.presets.skuLcp02().build(); + expect(skuLcp02Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuLcp02 preset when built for graphql`, () => { + const skuLcp02Preset = InventoryEntryDraftGraphql.presets + .skuLcp02() + .build(); + expect(skuLcp02Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuLcp02 preset when built for legacy rest`, () => { + const skuLcp02Preset = InventoryEntryDraft.presets + .skuLcp02() + .buildRest(); + expect(skuLcp02Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuLcp02 preset when built for legacy graphql`, () => { + const skuLcp02Preset = InventoryEntryDraft.presets + .skuLcp02() + .buildGraphql(); + expect(skuLcp02Preset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-lcp-02.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-lcp-02.ts new file mode 100644 index 000000000..666a1a192 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-lcp-02.ts @@ -0,0 +1,14 @@ +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const variant = ProductVariantDraft.presets.sampleData + .largeCeramicPlate02() + .build(); + +const skuLcp02 = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets.empty().sku(variant.sku!).quantityOnStock(100); +export default skuLcp02; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-lpc-011.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-lpc-011.spec.ts new file mode 100644 index 000000000..c0e047c11 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-lpc-011.spec.ts @@ -0,0 +1,37 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuLpc011 preset`, () => { + it(`should return a skuLpc011 preset when built for rest`, () => { + const skuLpc011Preset = InventoryEntryDraftRest.presets.skuLpc011().build(); + expect(skuLpc011Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuLpc011 preset when built for graphql`, () => { + const skuLpc011Preset = InventoryEntryDraftGraphql.presets + .skuLpc011() + .build(); + expect(skuLpc011Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuLpc011 preset when built for legacy rest`, () => { + const skuLpc011Preset = InventoryEntryDraft.presets + .skuLpc011() + .buildRest(); + expect(skuLpc011Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuLpc011 preset when built for legacy graphql`, () => { + const skuLpc011Preset = InventoryEntryDraft.presets + .skuLpc011() + .buildGraphql(); + expect(skuLpc011Preset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-lpc-011.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-lpc-011.ts new file mode 100644 index 000000000..217d9c2ae --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-lpc-011.ts @@ -0,0 +1,14 @@ +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const variant = ProductVariantDraft.presets.sampleData + .luxePillowCover01() + .build(); + +const skuLpc011 = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets.empty().sku(variant.sku!).quantityOnStock(100); +export default skuLpc011; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-lpc-09.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-lpc-09.spec.ts new file mode 100644 index 000000000..05ad9d941 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-lpc-09.spec.ts @@ -0,0 +1,37 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuLpc09 preset`, () => { + it(`should return a skuLpc09 preset when built for rest`, () => { + const skuLpc09Preset = InventoryEntryDraftRest.presets.skuLpc09().build(); + expect(skuLpc09Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuLpc09 preset when built for graphql`, () => { + const skuLpc09Preset = InventoryEntryDraftGraphql.presets + .skuLpc09() + .build(); + expect(skuLpc09Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuLpc09 preset when built for legacy rest`, () => { + const skuLpc09Preset = InventoryEntryDraft.presets + .skuLpc09() + .buildRest(); + expect(skuLpc09Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuLpc09 preset when built for legacy graphql`, () => { + const skuLpc09Preset = InventoryEntryDraft.presets + .skuLpc09() + .buildGraphql(); + expect(skuLpc09Preset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-lpc-09.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-lpc-09.ts new file mode 100644 index 000000000..48838c59c --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-lpc-09.ts @@ -0,0 +1,14 @@ +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const variant = ProductVariantDraft.presets.sampleData + .lanaPillowCover01() + .build(); + +const skuLpc09 = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets.empty().sku(variant.sku!).quantityOnStock(100); +export default skuLpc09; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-lpqb-084.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-lpqb-084.spec.ts new file mode 100644 index 000000000..b3e47c088 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-lpqb-084.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuLpqb084 preset`, () => { + it(`should return a skuLpqb084 preset when built for rest`, () => { + const skuLpqb084Preset = InventoryEntryDraftRest.presets + .skuLpqb084() + .build(); + expect(skuLpqb084Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuLpqb084 preset when built for graphql`, () => { + const skuLpqb084Preset = InventoryEntryDraftGraphql.presets + .skuLpqb084() + .build(); + expect(skuLpqb084Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuLpqb084 preset when built for legacy rest`, () => { + const skuLpqb084Preset = InventoryEntryDraft.presets + .skuLpqb084() + .buildRest(); + expect(skuLpqb084Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuLpqb084 preset when built for legacy graphql`, () => { + const skuLpqb084Preset = InventoryEntryDraft.presets + .skuLpqb084() + .buildGraphql(); + expect(skuLpqb084Preset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-lpqb-084.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-lpqb-084.ts new file mode 100644 index 000000000..0433a36b7 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-lpqb-084.ts @@ -0,0 +1,14 @@ +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const variant = ProductVariantDraft.presets.sampleData + .tanQueenBed01() + .build(); + +const skuLpqb084 = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets.empty().sku(variant.sku!).quantityOnStock(100); +export default skuLpqb084; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-mb-0973.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-mb-0973.spec.ts new file mode 100644 index 000000000..9ab364146 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-mb-0973.spec.ts @@ -0,0 +1,37 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuMb0973 preset`, () => { + it(`should return a skuMb0973 preset when built for rest`, () => { + const skuMb0973Preset = InventoryEntryDraftRest.presets.skuMb0973().build(); + expect(skuMb0973Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuMb0973 preset when built for graphql`, () => { + const skuMb0973Preset = InventoryEntryDraftGraphql.presets + .skuMb0973() + .build(); + expect(skuMb0973Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuMb0973 preset when built for legacy rest`, () => { + const skuMb0973Preset = InventoryEntryDraft.presets + .skuMb0973() + .buildRest(); + expect(skuMb0973Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuMb0973 preset when built for legacy graphql`, () => { + const skuMb0973Preset = InventoryEntryDraft.presets + .skuMb0973() + .buildGraphql(); + expect(skuMb0973Preset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-mb-0973.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-mb-0973.ts new file mode 100644 index 000000000..aa65dfb2b --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-mb-0973.ts @@ -0,0 +1,14 @@ +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const variant = ProductVariantDraft.presets.sampleData + .modernBookcase01() + .build(); + +const skuMb0973 = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets.empty().sku(variant.sku!).quantityOnStock(100); +export default skuMb0973; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-mcp-01.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-mcp-01.spec.ts new file mode 100644 index 000000000..5354a761b --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-mcp-01.spec.ts @@ -0,0 +1,37 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuMcp01 preset`, () => { + it(`should return a skuMcp01 preset when built for rest`, () => { + const skuMcp01Preset = InventoryEntryDraftRest.presets.skuMcp01().build(); + expect(skuMcp01Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuMcp01 preset when built for graphql`, () => { + const skuMcp01Preset = InventoryEntryDraftGraphql.presets + .skuMcp01() + .build(); + expect(skuMcp01Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuMcp01 preset when built for legacy rest`, () => { + const skuMcp01Preset = InventoryEntryDraft.presets + .skuMcp01() + .buildRest(); + expect(skuMcp01Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuMcp01 preset when built for legacy graphql`, () => { + const skuMcp01Preset = InventoryEntryDraft.presets + .skuMcp01() + .buildGraphql(); + expect(skuMcp01Preset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-mcp-01.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-mcp-01.ts new file mode 100644 index 000000000..dff8cf8dd --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-mcp-01.ts @@ -0,0 +1,14 @@ +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const variant = ProductVariantDraft.presets.sampleData + .modernCeramicPlate01() + .build(); + +const skuMcp01 = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets.empty().sku(variant.sku!).quantityOnStock(100); +export default skuMcp01; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-mgd-01.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-mgd-01.spec.ts new file mode 100644 index 000000000..510e6b8fd --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-mgd-01.spec.ts @@ -0,0 +1,37 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuMgd01 preset`, () => { + it(`should return a skuMgd01 preset when built for rest`, () => { + const skuMgd01Preset = InventoryEntryDraftRest.presets.skuMgd01().build(); + expect(skuMgd01Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuMgd01 preset when built for graphql`, () => { + const skuMgd01Preset = InventoryEntryDraftGraphql.presets + .skuMgd01() + .build(); + expect(skuMgd01Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuMgd01 preset when built for legacy rest`, () => { + const skuMgd01Preset = InventoryEntryDraft.presets + .skuMgd01() + .buildRest(); + expect(skuMgd01Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuMgd01 preset when built for legacy graphql`, () => { + const skuMgd01Preset = InventoryEntryDraft.presets + .skuMgd01() + .buildGraphql(); + expect(skuMgd01Preset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-mgd-01.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-mgd-01.ts new file mode 100644 index 000000000..b6fbba5ef --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-mgd-01.ts @@ -0,0 +1,14 @@ +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const variant = ProductVariantDraft.presets.sampleData + .modernGlamDresser01() + .build(); + +const skuMgd01 = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets.empty().sku(variant.sku!).quantityOnStock(76); +export default skuMgd01; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-mlp-01.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-mlp-01.spec.ts new file mode 100644 index 000000000..2b8467017 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-mlp-01.spec.ts @@ -0,0 +1,37 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuMlp01 preset`, () => { + it(`should return a skuMlp01 preset when built for rest`, () => { + const skuMlp01Preset = InventoryEntryDraftRest.presets.skuMlp01().build(); + expect(skuMlp01Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuMlp01 preset when built for graphql`, () => { + const skuMlp01Preset = InventoryEntryDraftGraphql.presets + .skuMlp01() + .build(); + expect(skuMlp01Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuMlp01 preset when built for legacy rest`, () => { + const skuMlp01Preset = InventoryEntryDraft.presets + .skuMlp01() + .buildRest(); + expect(skuMlp01Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuMlp01 preset when built for legacy graphql`, () => { + const skuMlp01Preset = InventoryEntryDraft.presets + .skuMlp01() + .buildGraphql(); + expect(skuMlp01Preset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-mlp-01.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-mlp-01.ts new file mode 100644 index 000000000..c2bba17f7 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-mlp-01.ts @@ -0,0 +1,14 @@ +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const variant = ProductVariantDraft.presets.sampleData + .modernLandscapePainting01() + .build(); + +const skuMlp01 = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets.empty().sku(variant.sku!).quantityOnStock(84); +export default skuMlp01; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-mmst-01.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-mmst-01.spec.ts new file mode 100644 index 000000000..35d219ab9 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-mmst-01.spec.ts @@ -0,0 +1,37 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuMmst01 preset`, () => { + it(`should return a skuMmst01 preset when built for rest`, () => { + const skuMmst01Preset = InventoryEntryDraftRest.presets.skuMmst01().build(); + expect(skuMmst01Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuMmst01 preset when built for graphql`, () => { + const skuMmst01Preset = InventoryEntryDraftGraphql.presets + .skuMmst01() + .build(); + expect(skuMmst01Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuMmst01 preset when built for legacy rest`, () => { + const skuMmst01Preset = InventoryEntryDraft.presets + .skuMmst01() + .buildRest(); + expect(skuMmst01Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuMmst01 preset when built for legacy graphql`, () => { + const skuMmst01Preset = InventoryEntryDraft.presets + .skuMmst01() + .buildGraphql(); + expect(skuMmst01Preset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-mmst-01.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-mmst-01.ts new file mode 100644 index 000000000..06ea8948a --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-mmst-01.ts @@ -0,0 +1,14 @@ +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const variant = ProductVariantDraft.presets.sampleData + .minimalistModernSideTable01() + .build(); + +const skuMmst01 = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets.empty().sku(variant.sku!).quantityOnStock(72); +export default skuMmst01; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-mmst-02.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-mmst-02.spec.ts new file mode 100644 index 000000000..a79232544 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-mmst-02.spec.ts @@ -0,0 +1,37 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuMmst02 preset`, () => { + it(`should return a skuMmst02 preset when built for rest`, () => { + const skuMmst02Preset = InventoryEntryDraftRest.presets.skuMmst02().build(); + expect(skuMmst02Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuMmst02 preset when built for graphql`, () => { + const skuMmst02Preset = InventoryEntryDraftGraphql.presets + .skuMmst02() + .build(); + expect(skuMmst02Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuMmst02 preset when built for legacy rest`, () => { + const skuMmst02Preset = InventoryEntryDraft.presets + .skuMmst02() + .buildRest(); + expect(skuMmst02Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuMmst02 preset when built for legacy graphql`, () => { + const skuMmst02Preset = InventoryEntryDraft.presets + .skuMmst02() + .buildGraphql(); + expect(skuMmst02Preset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-mmst-02.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-mmst-02.ts new file mode 100644 index 000000000..8f05e582b --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-mmst-02.ts @@ -0,0 +1,14 @@ +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const variant = ProductVariantDraft.presets.sampleData + .minimalistModernSideTable02() + .build(); + +const skuMmst02 = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets.empty().sku(variant.sku!).quantityOnStock(100); +export default skuMmst02; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-mpc-02.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-mpc-02.spec.ts new file mode 100644 index 000000000..6cb5024c3 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-mpc-02.spec.ts @@ -0,0 +1,37 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuMpc02 preset`, () => { + it(`should return a skuMpc02 preset when built for rest`, () => { + const skuMpc02Preset = InventoryEntryDraftRest.presets.skuMpc02().build(); + expect(skuMpc02Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuMpc02 preset when built for graphql`, () => { + const skuMpc02Preset = InventoryEntryDraftGraphql.presets + .skuMpc02() + .build(); + expect(skuMpc02Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuMpc02 preset when built for legacy rest`, () => { + const skuMpc02Preset = InventoryEntryDraft.presets + .skuMpc02() + .buildRest(); + expect(skuMpc02Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuMpc02 preset when built for legacy graphql`, () => { + const skuMpc02Preset = InventoryEntryDraft.presets + .skuMpc02() + .buildGraphql(); + expect(skuMpc02Preset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-mpc-02.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-mpc-02.ts new file mode 100644 index 000000000..38676d32e --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-mpc-02.ts @@ -0,0 +1,14 @@ +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const variant = ProductVariantDraft.presets.sampleData + .mayaPillowCover01() + .build(); + +const skuMpc02 = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets.empty().sku(variant.sku!).quantityOnStock(100); +export default skuMpc02; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-mpc-07.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-mpc-07.spec.ts new file mode 100644 index 000000000..fa56b1b9b --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-mpc-07.spec.ts @@ -0,0 +1,37 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuMpc07 preset`, () => { + it(`should return a skuMpc07 preset when built for rest`, () => { + const skuMpc07Preset = InventoryEntryDraftRest.presets.skuMpc07().build(); + expect(skuMpc07Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuMpc07 preset when built for graphql`, () => { + const skuMpc07Preset = InventoryEntryDraftGraphql.presets + .skuMpc07() + .build(); + expect(skuMpc07Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuMpc07 preset when built for legacy rest`, () => { + const skuMpc07Preset = InventoryEntryDraft.presets + .skuMpc07() + .buildRest(); + expect(skuMpc07Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuMpc07 preset when built for legacy graphql`, () => { + const skuMpc07Preset = InventoryEntryDraft.presets + .skuMpc07() + .buildGraphql(); + expect(skuMpc07Preset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-mpc-07.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-mpc-07.ts new file mode 100644 index 000000000..cfee4d04b --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-mpc-07.ts @@ -0,0 +1,14 @@ +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const variant = ProductVariantDraft.presets.sampleData + .mayaPillowCover02() + .build(); + +const skuMpc07 = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets.empty().sku(variant.sku!).quantityOnStock(100); +export default skuMpc07; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-mr-05.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-mr-05.spec.ts new file mode 100644 index 000000000..7b249f9fd --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-mr-05.spec.ts @@ -0,0 +1,35 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuMr05 preset`, () => { + it(`should return a skuMr05 preset when built for rest`, () => { + const skuMr05Preset = InventoryEntryDraftRest.presets.skuMr05().build(); + expect(skuMr05Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuMr05 preset when built for graphql`, () => { + const skuMr05Preset = InventoryEntryDraftGraphql.presets.skuMr05().build(); + expect(skuMr05Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuMr05 preset when built for legacy rest`, () => { + const skuMr05Preset = InventoryEntryDraft.presets + .skuMr05() + .buildRest(); + expect(skuMr05Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuMr05 preset when built for legacy graphql`, () => { + const skuMr05Preset = InventoryEntryDraft.presets + .skuMr05() + .buildGraphql(); + expect(skuMr05Preset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-mr-05.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-mr-05.ts new file mode 100644 index 000000000..1853f3755 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-mr-05.ts @@ -0,0 +1,14 @@ +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const variant = ProductVariantDraft.presets.sampleData + .meadowRug03() + .build(); + +const skuMr05 = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets.empty().sku(variant.sku!).quantityOnStock(100); +export default skuMr05; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-mr-08.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-mr-08.spec.ts new file mode 100644 index 000000000..1abf59af6 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-mr-08.spec.ts @@ -0,0 +1,35 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuMr08 preset`, () => { + it(`should return a skuMr08 preset when built for rest`, () => { + const skuMr08Preset = InventoryEntryDraftRest.presets.skuMr08().build(); + expect(skuMr08Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuMr08 preset when built for graphql`, () => { + const skuMr08Preset = InventoryEntryDraftGraphql.presets.skuMr08().build(); + expect(skuMr08Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuMr08 preset when built for legacy rest`, () => { + const skuMr08Preset = InventoryEntryDraft.presets + .skuMr08() + .buildRest(); + expect(skuMr08Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuMr08 preset when built for legacy graphql`, () => { + const skuMr08Preset = InventoryEntryDraft.presets + .skuMr08() + .buildGraphql(); + expect(skuMr08Preset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-mr-08.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-mr-08.ts new file mode 100644 index 000000000..699b8ecbb --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-mr-08.ts @@ -0,0 +1,14 @@ +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const variant = ProductVariantDraft.presets.sampleData + .meadowRug02() + .build(); + +const skuMr08 = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets.empty().sku(variant.sku!).quantityOnStock(100); +export default skuMr08; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-mtb-023.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-mtb-023.spec.ts new file mode 100644 index 000000000..ba97f3fb1 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-mtb-023.spec.ts @@ -0,0 +1,37 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuMtb023 preset`, () => { + it(`should return a skuMtb023 preset when built for rest`, () => { + const skuMtb023Preset = InventoryEntryDraftRest.presets.skuMtb023().build(); + expect(skuMtb023Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuMtb023 preset when built for graphql`, () => { + const skuMtb023Preset = InventoryEntryDraftGraphql.presets + .skuMtb023() + .build(); + expect(skuMtb023Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuMtb023 preset when built for legacy rest`, () => { + const skuMtb023Preset = InventoryEntryDraft.presets + .skuMtb023() + .buildRest(); + expect(skuMtb023Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuMtb023 preset when built for legacy graphql`, () => { + const skuMtb023Preset = InventoryEntryDraft.presets + .skuMtb023() + .buildGraphql(); + expect(skuMtb023Preset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-mtb-023.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-mtb-023.ts new file mode 100644 index 000000000..92f876c3c --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-mtb-023.ts @@ -0,0 +1,14 @@ +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const variant = ProductVariantDraft.presets.sampleData + .opalKingBed01() + .build(); + +const skuMtb023 = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets.empty().sku(variant.sku!).quantityOnStock(100); +export default skuMtb023; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-mtss-01.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-mtss-01.spec.ts new file mode 100644 index 000000000..8de16364e --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-mtss-01.spec.ts @@ -0,0 +1,37 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuMtss01 preset`, () => { + it(`should return a skuMtss01 preset when built for rest`, () => { + const skuMtss01Preset = InventoryEntryDraftRest.presets.skuMtss01().build(); + expect(skuMtss01Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuMtss01 preset when built for graphql`, () => { + const skuMtss01Preset = InventoryEntryDraftGraphql.presets + .skuMtss01() + .build(); + expect(skuMtss01Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuMtss01 preset when built for legacy rest`, () => { + const skuMtss01Preset = InventoryEntryDraft.presets + .skuMtss01() + .buildRest(); + expect(skuMtss01Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuMtss01 preset when built for legacy graphql`, () => { + const skuMtss01Preset = InventoryEntryDraft.presets + .skuMtss01() + .buildGraphql(); + expect(skuMtss01Preset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-mtss-01.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-mtss-01.ts new file mode 100644 index 000000000..0aaec26a3 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-mtss-01.ts @@ -0,0 +1,14 @@ +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const variant = ProductVariantDraft.presets.sampleData + .modernThreeSeaterSofa01() + .build(); + +const skuMtss01 = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets.empty().sku(variant.sku!).quantityOnStock(94); +export default skuMtss01; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-muqb-01.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-muqb-01.spec.ts new file mode 100644 index 000000000..7cdefd686 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-muqb-01.spec.ts @@ -0,0 +1,37 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuMuqb01 preset`, () => { + it(`should return a skuMuqb01 preset when built for rest`, () => { + const skuMuqb01Preset = InventoryEntryDraftRest.presets.skuMuqb01().build(); + expect(skuMuqb01Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuMuqb01 preset when built for graphql`, () => { + const skuMuqb01Preset = InventoryEntryDraftGraphql.presets + .skuMuqb01() + .build(); + expect(skuMuqb01Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuMuqb01 preset when built for legacy rest`, () => { + const skuMuqb01Preset = InventoryEntryDraft.presets + .skuMuqb01() + .buildRest(); + expect(skuMuqb01Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuMuqb01 preset when built for legacy graphql`, () => { + const skuMuqb01Preset = InventoryEntryDraft.presets + .skuMuqb01() + .buildGraphql(); + expect(skuMuqb01Preset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-muqb-01.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-muqb-01.ts new file mode 100644 index 000000000..6577652d7 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-muqb-01.ts @@ -0,0 +1,14 @@ +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const variant = ProductVariantDraft.presets.sampleData + .modernUpholsteredQueenBed01() + .build(); + +const skuMuqb01 = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets.empty().sku(variant.sku!).quantityOnStock(95); +export default skuMuqb01; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-mwt-01.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-mwt-01.spec.ts new file mode 100644 index 000000000..7a60c70b5 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-mwt-01.spec.ts @@ -0,0 +1,37 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuMwt01 preset`, () => { + it(`should return a skuMwt01 preset when built for rest`, () => { + const skuMwt01Preset = InventoryEntryDraftRest.presets.skuMwt01().build(); + expect(skuMwt01Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuMwt01 preset when built for graphql`, () => { + const skuMwt01Preset = InventoryEntryDraftGraphql.presets + .skuMwt01() + .build(); + expect(skuMwt01Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuMwt01 preset when built for legacy rest`, () => { + const skuMwt01Preset = InventoryEntryDraft.presets + .skuMwt01() + .buildRest(); + expect(skuMwt01Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuMwt01 preset when built for legacy graphql`, () => { + const skuMwt01Preset = InventoryEntryDraft.presets + .skuMwt01() + .buildGraphql(); + expect(skuMwt01Preset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-mwt-01.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-mwt-01.ts new file mode 100644 index 000000000..db688d6bf --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-mwt-01.ts @@ -0,0 +1,14 @@ +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const variant = ProductVariantDraft.presets.sampleData + .marquisTray01() + .build(); + +const skuMwt01 = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets.empty().sku(variant.sku!).quantityOnStock(100); +export default skuMwt01; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-njop-09.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-njop-09.spec.ts new file mode 100644 index 000000000..15817a3e9 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-njop-09.spec.ts @@ -0,0 +1,37 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuNjop09 preset`, () => { + it(`should return a skuNjop09 preset when built for rest`, () => { + const skuNjop09Preset = InventoryEntryDraftRest.presets.skuNjop09().build(); + expect(skuNjop09Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuNjop09 preset when built for graphql`, () => { + const skuNjop09Preset = InventoryEntryDraftGraphql.presets + .skuNjop09() + .build(); + expect(skuNjop09Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuNjop09 preset when built for legacy rest`, () => { + const skuNjop09Preset = InventoryEntryDraft.presets + .skuNjop09() + .buildRest(); + expect(skuNjop09Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuNjop09 preset when built for legacy graphql`, () => { + const skuNjop09Preset = InventoryEntryDraft.presets + .skuNjop09() + .buildGraphql(); + expect(skuNjop09Preset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-njop-09.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-njop-09.ts new file mode 100644 index 000000000..fbff76499 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-njop-09.ts @@ -0,0 +1,14 @@ +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const variant = ProductVariantDraft.presets.sampleData + .wilmaChair01() + .build(); + +const skuNjop09 = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets.empty().sku(variant.sku!).quantityOnStock(1000); +export default skuNjop09; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-nr-09.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-nr-09.spec.ts new file mode 100644 index 000000000..9bd51219c --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-nr-09.spec.ts @@ -0,0 +1,35 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuNr09 preset`, () => { + it(`should return a skuNr09 preset when built for rest`, () => { + const skuNr09Preset = InventoryEntryDraftRest.presets.skuNr09().build(); + expect(skuNr09Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuNr09 preset when built for graphql`, () => { + const skuNr09Preset = InventoryEntryDraftGraphql.presets.skuNr09().build(); + expect(skuNr09Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuNr09 preset when built for legacy rest`, () => { + const skuNr09Preset = InventoryEntryDraft.presets + .skuNr09() + .buildRest(); + expect(skuNr09Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuNr09 preset when built for legacy graphql`, () => { + const skuNr09Preset = InventoryEntryDraft.presets + .skuNr09() + .buildGraphql(); + expect(skuNr09Preset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-nr-09.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-nr-09.ts new file mode 100644 index 000000000..64a32a373 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-nr-09.ts @@ -0,0 +1,14 @@ +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const variant = ProductVariantDraft.presets.sampleData + .naturaRug01() + .build(); + +const skuNr09 = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets.empty().sku(variant.sku!).quantityOnStock(100); +export default skuNr09; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-ntss-01.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-ntss-01.spec.ts new file mode 100644 index 000000000..556b3681b --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-ntss-01.spec.ts @@ -0,0 +1,37 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuNtss01 preset`, () => { + it(`should return a skuNtss01 preset when built for rest`, () => { + const skuNtss01Preset = InventoryEntryDraftRest.presets.skuNtss01().build(); + expect(skuNtss01Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuNtss01 preset when built for graphql`, () => { + const skuNtss01Preset = InventoryEntryDraftGraphql.presets + .skuNtss01() + .build(); + expect(skuNtss01Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuNtss01 preset when built for legacy rest`, () => { + const skuNtss01Preset = InventoryEntryDraft.presets + .skuNtss01() + .buildRest(); + expect(skuNtss01Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuNtss01 preset when built for legacy graphql`, () => { + const skuNtss01Preset = InventoryEntryDraft.presets + .skuNtss01() + .buildGraphql(); + expect(skuNtss01Preset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-ntss-01.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-ntss-01.ts new file mode 100644 index 000000000..0c4bdbf79 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-ntss-01.ts @@ -0,0 +1,27 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .inventoryChannel() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .nalaTwoSeaterSofa01() + .build(); + +const skuNtss01 = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .sku(variant.sku!) + .quantityOnStock(97) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuNtss01; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-ntss-02.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-ntss-02.spec.ts new file mode 100644 index 000000000..5bd95fdba --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-ntss-02.spec.ts @@ -0,0 +1,37 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuNtss02 preset`, () => { + it(`should return a skuNtss02 preset when built for rest`, () => { + const skuNtss02Preset = InventoryEntryDraftRest.presets.skuNtss02().build(); + expect(skuNtss02Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuNtss02 preset when built for graphql`, () => { + const skuNtss02Preset = InventoryEntryDraftGraphql.presets + .skuNtss02() + .build(); + expect(skuNtss02Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuNtss02 preset when built for legacy rest`, () => { + const skuNtss02Preset = InventoryEntryDraft.presets + .skuNtss02() + .buildRest(); + expect(skuNtss02Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuNtss02 preset when built for legacy graphql`, () => { + const skuNtss02Preset = InventoryEntryDraft.presets + .skuNtss02() + .buildGraphql(); + expect(skuNtss02Preset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-ntss-02.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-ntss-02.ts new file mode 100644 index 000000000..805bb26d8 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-ntss-02.ts @@ -0,0 +1,14 @@ +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const variant = ProductVariantDraft.presets.sampleData + .nalaTwoSeaterSofa02() + .build(); + +const skuNtss02 = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets.empty().sku(variant.sku!).quantityOnStock(100); +export default skuNtss02; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-ntss-03.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-ntss-03.spec.ts new file mode 100644 index 000000000..98bed09a7 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-ntss-03.spec.ts @@ -0,0 +1,37 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuNtss03 preset`, () => { + it(`should return a skuNtss03 preset when built for rest`, () => { + const skuNtss03Preset = InventoryEntryDraftRest.presets.skuNtss03().build(); + expect(skuNtss03Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuNtss03 preset when built for graphql`, () => { + const skuNtss03Preset = InventoryEntryDraftGraphql.presets + .skuNtss03() + .build(); + expect(skuNtss03Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuNtss03 preset when built for legacy rest`, () => { + const skuNtss03Preset = InventoryEntryDraft.presets + .skuNtss03() + .buildRest(); + expect(skuNtss03Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuNtss03 preset when built for legacy graphql`, () => { + const skuNtss03Preset = InventoryEntryDraft.presets + .skuNtss03() + .buildGraphql(); + expect(skuNtss03Preset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-ntss-03.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-ntss-03.ts new file mode 100644 index 000000000..80ccbd7eb --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-ntss-03.ts @@ -0,0 +1,14 @@ +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const variant = ProductVariantDraft.presets.sampleData + .nalaTwoSeaterSofa03() + .build(); + +const skuNtss03 = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets.empty().sku(variant.sku!).quantityOnStock(100); +export default skuNtss03; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-ntss-05.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-ntss-05.spec.ts new file mode 100644 index 000000000..4e3938af5 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-ntss-05.spec.ts @@ -0,0 +1,37 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuNtss05 preset`, () => { + it(`should return a skuNtss05 preset when built for rest`, () => { + const skuNtss05Preset = InventoryEntryDraftRest.presets.skuNtss05().build(); + expect(skuNtss05Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuNtss05 preset when built for graphql`, () => { + const skuNtss05Preset = InventoryEntryDraftGraphql.presets + .skuNtss05() + .build(); + expect(skuNtss05Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuNtss05 preset when built for legacy rest`, () => { + const skuNtss05Preset = InventoryEntryDraft.presets + .skuNtss05() + .buildRest(); + expect(skuNtss05Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuNtss05 preset when built for legacy graphql`, () => { + const skuNtss05Preset = InventoryEntryDraft.presets + .skuNtss05() + .buildGraphql(); + expect(skuNtss05Preset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-ntss-05.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-ntss-05.ts new file mode 100644 index 000000000..c78e7c2f9 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-ntss-05.ts @@ -0,0 +1,14 @@ +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const variant = ProductVariantDraft.presets.sampleData + .nalaTwoSeaterSofa05() + .build(); + +const skuNtss05 = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets.empty().sku(variant.sku!).quantityOnStock(100); +export default skuNtss05; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-ntss-06.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-ntss-06.spec.ts new file mode 100644 index 000000000..00acee43a --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-ntss-06.spec.ts @@ -0,0 +1,37 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuNtss06 preset`, () => { + it(`should return a skuNtss06 preset when built for rest`, () => { + const skuNtss06Preset = InventoryEntryDraftRest.presets.skuNtss06().build(); + expect(skuNtss06Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuNtss06 preset when built for graphql`, () => { + const skuNtss06Preset = InventoryEntryDraftGraphql.presets + .skuNtss06() + .build(); + expect(skuNtss06Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuNtss06 preset when built for legacy rest`, () => { + const skuNtss06Preset = InventoryEntryDraft.presets + .skuNtss06() + .buildRest(); + expect(skuNtss06Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuNtss06 preset when built for legacy graphql`, () => { + const skuNtss06Preset = InventoryEntryDraft.presets + .skuNtss06() + .buildGraphql(); + expect(skuNtss06Preset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-ntss-06.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-ntss-06.ts new file mode 100644 index 000000000..03318afea --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-ntss-06.ts @@ -0,0 +1,14 @@ +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const variant = ProductVariantDraft.presets.sampleData + .nalaTwoSeaterSofa06() + .build(); + +const skuNtss06 = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets.empty().sku(variant.sku!).quantityOnStock(100); +export default skuNtss06; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-ntss-07.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-ntss-07.spec.ts new file mode 100644 index 000000000..a113832ad --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-ntss-07.spec.ts @@ -0,0 +1,37 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuNtss07 preset`, () => { + it(`should return a skuNtss07 preset when built for rest`, () => { + const skuNtss07Preset = InventoryEntryDraftRest.presets.skuNtss07().build(); + expect(skuNtss07Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuNtss07 preset when built for graphql`, () => { + const skuNtss07Preset = InventoryEntryDraftGraphql.presets + .skuNtss07() + .build(); + expect(skuNtss07Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuNtss07 preset when built for legacy rest`, () => { + const skuNtss07Preset = InventoryEntryDraft.presets + .skuNtss07() + .buildRest(); + expect(skuNtss07Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuNtss07 preset when built for legacy graphql`, () => { + const skuNtss07Preset = InventoryEntryDraft.presets + .skuNtss07() + .buildGraphql(); + expect(skuNtss07Preset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-ntss-07.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-ntss-07.ts new file mode 100644 index 000000000..8400ca8da --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-ntss-07.ts @@ -0,0 +1,14 @@ +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const variant = ProductVariantDraft.presets.sampleData + .nalaTwoSeaterSofa07() + .build(); + +const skuNtss07 = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets.empty().sku(variant.sku!).quantityOnStock(100); +export default skuNtss07; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-ntts-04.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-ntts-04.spec.ts new file mode 100644 index 000000000..7fb7ea222 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-ntts-04.spec.ts @@ -0,0 +1,37 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuNtts04 preset`, () => { + it(`should return a skuNtts04 preset when built for rest`, () => { + const skuNtts04Preset = InventoryEntryDraftRest.presets.skuNtts04().build(); + expect(skuNtts04Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuNtts04 preset when built for graphql`, () => { + const skuNtts04Preset = InventoryEntryDraftGraphql.presets + .skuNtts04() + .build(); + expect(skuNtts04Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuNtts04 preset when built for legacy rest`, () => { + const skuNtts04Preset = InventoryEntryDraft.presets + .skuNtts04() + .buildRest(); + expect(skuNtts04Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuNtts04 preset when built for legacy graphql`, () => { + const skuNtts04Preset = InventoryEntryDraft.presets + .skuNtts04() + .buildGraphql(); + expect(skuNtts04Preset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-ntts-04.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-ntts-04.ts new file mode 100644 index 000000000..71d22ac70 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-ntts-04.ts @@ -0,0 +1,14 @@ +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const variant = ProductVariantDraft.presets.sampleData + .nalaTwoSeaterSofa04() + .build(); + +const skuNtts04 = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets.empty().sku(variant.sku!).quantityOnStock(100); +export default skuNtts04; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-otb-07.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-otb-07.spec.ts new file mode 100644 index 000000000..cb293d668 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-otb-07.spec.ts @@ -0,0 +1,37 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuOtb07 preset`, () => { + it(`should return a skuOtb07 preset when built for rest`, () => { + const skuOtb07Preset = InventoryEntryDraftRest.presets.skuOtb07().build(); + expect(skuOtb07Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuOtb07 preset when built for graphql`, () => { + const skuOtb07Preset = InventoryEntryDraftGraphql.presets + .skuOtb07() + .build(); + expect(skuOtb07Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuOtb07 preset when built for legacy rest`, () => { + const skuOtb07Preset = InventoryEntryDraft.presets + .skuOtb07() + .buildRest(); + expect(skuOtb07Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuOtb07 preset when built for legacy graphql`, () => { + const skuOtb07Preset = InventoryEntryDraft.presets + .skuOtb07() + .buildGraphql(); + expect(skuOtb07Preset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-otb-07.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-otb-07.ts new file mode 100644 index 000000000..4d8f77832 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-otb-07.ts @@ -0,0 +1,14 @@ +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const variant = ProductVariantDraft.presets.sampleData + .orionDoubleBed01() + .build(); + +const skuOtb07 = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets.empty().sku(variant.sku!).quantityOnStock(100); +export default skuOtb07; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-pap-01.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-pap-01.spec.ts new file mode 100644 index 000000000..99feb6dd4 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-pap-01.spec.ts @@ -0,0 +1,37 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuPap01 preset`, () => { + it(`should return a skuPap01 preset when built for rest`, () => { + const skuPap01Preset = InventoryEntryDraftRest.presets.skuPap01().build(); + expect(skuPap01Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuPap01 preset when built for graphql`, () => { + const skuPap01Preset = InventoryEntryDraftGraphql.presets + .skuPap01() + .build(); + expect(skuPap01Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuPap01 preset when built for legacy rest`, () => { + const skuPap01Preset = InventoryEntryDraft.presets + .skuPap01() + .buildRest(); + expect(skuPap01Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuPap01 preset when built for legacy graphql`, () => { + const skuPap01Preset = InventoryEntryDraft.presets + .skuPap01() + .buildGraphql(); + expect(skuPap01Preset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-pap-01.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-pap-01.ts new file mode 100644 index 000000000..2257d7f43 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-pap-01.ts @@ -0,0 +1,14 @@ +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const variant = ProductVariantDraft.presets.sampleData + .pinkAbstractPainting01() + .build(); + +const skuPap01 = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets.empty().sku(variant.sku!).quantityOnStock(95); +export default skuPap01; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-pmap-01.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-pmap-01.spec.ts new file mode 100644 index 000000000..0b27eb5fc --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-pmap-01.spec.ts @@ -0,0 +1,37 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuPmap01 preset`, () => { + it(`should return a skuPmap01 preset when built for rest`, () => { + const skuPmap01Preset = InventoryEntryDraftRest.presets.skuPmap01().build(); + expect(skuPmap01Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuPmap01 preset when built for graphql`, () => { + const skuPmap01Preset = InventoryEntryDraftGraphql.presets + .skuPmap01() + .build(); + expect(skuPmap01Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuPmap01 preset when built for legacy rest`, () => { + const skuPmap01Preset = InventoryEntryDraft.presets + .skuPmap01() + .buildRest(); + expect(skuPmap01Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuPmap01 preset when built for legacy graphql`, () => { + const skuPmap01Preset = InventoryEntryDraft.presets + .skuPmap01() + .buildGraphql(); + expect(skuPmap01Preset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-pmap-01.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-pmap-01.ts new file mode 100644 index 000000000..eb74e161b --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-pmap-01.ts @@ -0,0 +1,27 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .inventoryChannel() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .purpleMinimalistAbstractPainting01() + .build(); + +const skuPmap01 = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .sku(variant.sku!) + .quantityOnStock(91) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuPmap01; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-rb-01.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-rb-01.spec.ts new file mode 100644 index 000000000..3dd907c3d --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-rb-01.spec.ts @@ -0,0 +1,35 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuRb01 preset`, () => { + it(`should return a skuRb01 preset when built for rest`, () => { + const skuRb01Preset = InventoryEntryDraftRest.presets.skuRb01().build(); + expect(skuRb01Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuRb01 preset when built for graphql`, () => { + const skuRb01Preset = InventoryEntryDraftGraphql.presets.skuRb01().build(); + expect(skuRb01Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuRb01 preset when built for legacy rest`, () => { + const skuRb01Preset = InventoryEntryDraft.presets + .skuRb01() + .buildRest(); + expect(skuRb01Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuRb01 preset when built for legacy graphql`, () => { + const skuRb01Preset = InventoryEntryDraft.presets + .skuRb01() + .buildGraphql(); + expect(skuRb01Preset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-rb-01.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-rb-01.ts new file mode 100644 index 000000000..2d2b01f5f --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-rb-01.ts @@ -0,0 +1,27 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .inventoryChannel() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .rusticBowl01() + .build(); + +const skuRb01 = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .sku(variant.sku!) + .quantityOnStock(100) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuRb01; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-rb-093.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-rb-093.spec.ts new file mode 100644 index 000000000..6e95d3e1e --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-rb-093.spec.ts @@ -0,0 +1,37 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuRb093 preset`, () => { + it(`should return a skuRb093 preset when built for rest`, () => { + const skuRb093Preset = InventoryEntryDraftRest.presets.skuRb093().build(); + expect(skuRb093Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuRb093 preset when built for graphql`, () => { + const skuRb093Preset = InventoryEntryDraftGraphql.presets + .skuRb093() + .build(); + expect(skuRb093Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuRb093 preset when built for legacy rest`, () => { + const skuRb093Preset = InventoryEntryDraft.presets + .skuRb093() + .buildRest(); + expect(skuRb093Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuRb093 preset when built for legacy graphql`, () => { + const skuRb093Preset = InventoryEntryDraft.presets + .skuRb093() + .buildGraphql(); + expect(skuRb093Preset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-rb-093.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-rb-093.ts new file mode 100644 index 000000000..b5189f484 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-rb-093.ts @@ -0,0 +1,14 @@ +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const variant = ProductVariantDraft.presets.sampleData + .ravenBowl01() + .build(); + +const skuRb093 = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets.empty().sku(variant.sku!).quantityOnStock(100); +export default skuRb093; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-rcc-09.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-rcc-09.spec.ts new file mode 100644 index 000000000..0d4b47a79 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-rcc-09.spec.ts @@ -0,0 +1,37 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuRcc09 preset`, () => { + it(`should return a skuRcc09 preset when built for rest`, () => { + const skuRcc09Preset = InventoryEntryDraftRest.presets.skuRcc09().build(); + expect(skuRcc09Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuRcc09 preset when built for graphql`, () => { + const skuRcc09Preset = InventoryEntryDraftGraphql.presets + .skuRcc09() + .build(); + expect(skuRcc09Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuRcc09 preset when built for legacy rest`, () => { + const skuRcc09Preset = InventoryEntryDraft.presets + .skuRcc09() + .buildRest(); + expect(skuRcc09Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuRcc09 preset when built for legacy graphql`, () => { + const skuRcc09Preset = InventoryEntryDraft.presets + .skuRcc09() + .buildGraphql(); + expect(skuRcc09Preset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-rcc-09.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-rcc-09.ts new file mode 100644 index 000000000..5004829b3 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-rcc-09.ts @@ -0,0 +1,14 @@ +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const variant = ProductVariantDraft.presets.sampleData + .rusticOvenCasserole01() + .build(); + +const skuRcc09 = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets.empty().sku(variant.sku!).quantityOnStock(100); +export default skuRcc09; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-rcd-01.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-rcd-01.spec.ts new file mode 100644 index 000000000..e446bde54 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-rcd-01.spec.ts @@ -0,0 +1,37 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuRcd01 preset`, () => { + it(`should return a skuRcd01 preset when built for rest`, () => { + const skuRcd01Preset = InventoryEntryDraftRest.presets.skuRcd01().build(); + expect(skuRcd01Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuRcd01 preset when built for graphql`, () => { + const skuRcd01Preset = InventoryEntryDraftGraphql.presets + .skuRcd01() + .build(); + expect(skuRcd01Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuRcd01 preset when built for legacy rest`, () => { + const skuRcd01Preset = InventoryEntryDraft.presets + .skuRcd01() + .buildRest(); + expect(skuRcd01Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuRcd01 preset when built for legacy graphql`, () => { + const skuRcd01Preset = InventoryEntryDraft.presets + .skuRcd01() + .buildGraphql(); + expect(skuRcd01Preset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-rcd-01.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-rcd-01.ts new file mode 100644 index 000000000..26650d6d6 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-rcd-01.ts @@ -0,0 +1,14 @@ +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const variant = ProductVariantDraft.presets.sampleData + .rusticCountryDresser01() + .build(); + +const skuRcd01 = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets.empty().sku(variant.sku!).quantityOnStock(98); +export default skuRcd01; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-rcqb-01.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-rcqb-01.spec.ts new file mode 100644 index 000000000..ecfd35829 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-rcqb-01.spec.ts @@ -0,0 +1,37 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuRcqb01 preset`, () => { + it(`should return a skuRcqb01 preset when built for rest`, () => { + const skuRcqb01Preset = InventoryEntryDraftRest.presets.skuRcqb01().build(); + expect(skuRcqb01Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuRcqb01 preset when built for graphql`, () => { + const skuRcqb01Preset = InventoryEntryDraftGraphql.presets + .skuRcqb01() + .build(); + expect(skuRcqb01Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuRcqb01 preset when built for legacy rest`, () => { + const skuRcqb01Preset = InventoryEntryDraft.presets + .skuRcqb01() + .buildRest(); + expect(skuRcqb01Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuRcqb01 preset when built for legacy graphql`, () => { + const skuRcqb01Preset = InventoryEntryDraft.presets + .skuRcqb01() + .buildGraphql(); + expect(skuRcqb01Preset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-rcqb-01.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-rcqb-01.ts new file mode 100644 index 000000000..d63ea6d94 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-rcqb-01.ts @@ -0,0 +1,14 @@ +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const variant = ProductVariantDraft.presets.sampleData + .rusticCountryQueenBed01() + .build(); + +const skuRcqb01 = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets.empty().sku(variant.sku!).quantityOnStock(76); +export default skuRcqb01; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-rlc-08.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-rlc-08.spec.ts new file mode 100644 index 000000000..1a7f3bc5f --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-rlc-08.spec.ts @@ -0,0 +1,37 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuRlc08 preset`, () => { + it(`should return a skuRlc08 preset when built for rest`, () => { + const skuRlc08Preset = InventoryEntryDraftRest.presets.skuRlc08().build(); + expect(skuRlc08Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuRlc08 preset when built for graphql`, () => { + const skuRlc08Preset = InventoryEntryDraftGraphql.presets + .skuRlc08() + .build(); + expect(skuRlc08Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuRlc08 preset when built for legacy rest`, () => { + const skuRlc08Preset = InventoryEntryDraft.presets + .skuRlc08() + .buildRest(); + expect(skuRlc08Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuRlc08 preset when built for legacy graphql`, () => { + const skuRlc08Preset = InventoryEntryDraft.presets + .skuRlc08() + .buildGraphql(); + expect(skuRlc08Preset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-rlc-08.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-rlc-08.ts new file mode 100644 index 000000000..04633ca88 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-rlc-08.ts @@ -0,0 +1,14 @@ +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const variant = ProductVariantDraft.presets.sampleData + .rattanLoungeChair01() + .build(); + +const skuRlc08 = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets.empty().sku(variant.sku!).quantityOnStock(100); +export default skuRlc08; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-rmp-01.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-rmp-01.spec.ts new file mode 100644 index 000000000..8d7016659 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-rmp-01.spec.ts @@ -0,0 +1,37 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuRmp01 preset`, () => { + it(`should return a skuRmp01 preset when built for rest`, () => { + const skuRmp01Preset = InventoryEntryDraftRest.presets.skuRmp01().build(); + expect(skuRmp01Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuRmp01 preset when built for graphql`, () => { + const skuRmp01Preset = InventoryEntryDraftGraphql.presets + .skuRmp01() + .build(); + expect(skuRmp01Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuRmp01 preset when built for legacy rest`, () => { + const skuRmp01Preset = InventoryEntryDraft.presets + .skuRmp01() + .buildRest(); + expect(skuRmp01Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuRmp01 preset when built for legacy graphql`, () => { + const skuRmp01Preset = InventoryEntryDraft.presets + .skuRmp01() + .buildGraphql(); + expect(skuRmp01Preset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-rmp-01.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-rmp-01.ts new file mode 100644 index 000000000..a068d726e --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-rmp-01.ts @@ -0,0 +1,14 @@ +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const variant = ProductVariantDraft.presets.sampleData + .redModernPainting01() + .build(); + +const skuRmp01 = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets.empty().sku(variant.sku!).quantityOnStock(0); +export default skuRmp01; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-rst-01.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-rst-01.spec.ts new file mode 100644 index 000000000..46f0fece3 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-rst-01.spec.ts @@ -0,0 +1,37 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuRst01 preset`, () => { + it(`should return a skuRst01 preset when built for rest`, () => { + const skuRst01Preset = InventoryEntryDraftRest.presets.skuRst01().build(); + expect(skuRst01Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuRst01 preset when built for graphql`, () => { + const skuRst01Preset = InventoryEntryDraftGraphql.presets + .skuRst01() + .build(); + expect(skuRst01Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuRst01 preset when built for legacy rest`, () => { + const skuRst01Preset = InventoryEntryDraft.presets + .skuRst01() + .buildRest(); + expect(skuRst01Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuRst01 preset when built for legacy graphql`, () => { + const skuRst01Preset = InventoryEntryDraft.presets + .skuRst01() + .buildGraphql(); + expect(skuRst01Preset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-rst-01.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-rst-01.ts new file mode 100644 index 000000000..4b2b80c99 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-rst-01.ts @@ -0,0 +1,14 @@ +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const variant = ProductVariantDraft.presets.sampleData + .roundServingTray01() + .build(); + +const skuRst01 = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets.empty().sku(variant.sku!).quantityOnStock(100); +export default skuRst01; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-rst-02.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-rst-02.spec.ts new file mode 100644 index 000000000..56c7d55fd --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-rst-02.spec.ts @@ -0,0 +1,37 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuRst02 preset`, () => { + it(`should return a skuRst02 preset when built for rest`, () => { + const skuRst02Preset = InventoryEntryDraftRest.presets.skuRst02().build(); + expect(skuRst02Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuRst02 preset when built for graphql`, () => { + const skuRst02Preset = InventoryEntryDraftGraphql.presets + .skuRst02() + .build(); + expect(skuRst02Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuRst02 preset when built for legacy rest`, () => { + const skuRst02Preset = InventoryEntryDraft.presets + .skuRst02() + .buildRest(); + expect(skuRst02Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuRst02 preset when built for legacy graphql`, () => { + const skuRst02Preset = InventoryEntryDraft.presets + .skuRst02() + .buildGraphql(); + expect(skuRst02Preset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-rst-02.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-rst-02.ts new file mode 100644 index 000000000..e7cadaa18 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-rst-02.ts @@ -0,0 +1,14 @@ +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const variant = ProductVariantDraft.presets.sampleData + .rectangleServingTray01() + .build(); + +const skuRst02 = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets.empty().sku(variant.sku!).quantityOnStock(100); +export default skuRst02; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-rwg-09.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-rwg-09.spec.ts new file mode 100644 index 000000000..f8dbb423e --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-rwg-09.spec.ts @@ -0,0 +1,37 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuRwg09 preset`, () => { + it(`should return a skuRwg09 preset when built for rest`, () => { + const skuRwg09Preset = InventoryEntryDraftRest.presets.skuRwg09().build(); + expect(skuRwg09Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuRwg09 preset when built for graphql`, () => { + const skuRwg09Preset = InventoryEntryDraftGraphql.presets + .skuRwg09() + .build(); + expect(skuRwg09Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuRwg09 preset when built for legacy rest`, () => { + const skuRwg09Preset = InventoryEntryDraft.presets + .skuRwg09() + .buildRest(); + expect(skuRwg09Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuRwg09 preset when built for legacy graphql`, () => { + const skuRwg09Preset = InventoryEntryDraft.presets + .skuRwg09() + .buildGraphql(); + expect(skuRwg09Preset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-rwg-09.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-rwg-09.ts new file mode 100644 index 000000000..016c34aae --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-rwg-09.ts @@ -0,0 +1,14 @@ +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const variant = ProductVariantDraft.presets.sampleData + .ryeWhiskeyGlass01() + .build(); + +const skuRwg09 = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets.empty().sku(variant.sku!).quantityOnStock(100); +export default skuRwg09; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-sarm-09.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-sarm-09.spec.ts new file mode 100644 index 000000000..894e51183 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-sarm-09.spec.ts @@ -0,0 +1,37 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuSarm09 preset`, () => { + it(`should return a skuSarm09 preset when built for rest`, () => { + const skuSarm09Preset = InventoryEntryDraftRest.presets.skuSarm09().build(); + expect(skuSarm09Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuSarm09 preset when built for graphql`, () => { + const skuSarm09Preset = InventoryEntryDraftGraphql.presets + .skuSarm09() + .build(); + expect(skuSarm09Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuSarm09 preset when built for legacy rest`, () => { + const skuSarm09Preset = InventoryEntryDraft.presets + .skuSarm09() + .buildRest(); + expect(skuSarm09Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuSarm09 preset when built for legacy graphql`, () => { + const skuSarm09Preset = InventoryEntryDraft.presets + .skuSarm09() + .buildGraphql(); + expect(skuSarm09Preset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-sarm-09.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-sarm-09.ts new file mode 100644 index 000000000..baa027775 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-sarm-09.ts @@ -0,0 +1,14 @@ +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const variant = ProductVariantDraft.presets.sampleData + .slateArmchair01() + .build(); + +const skuSarm09 = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets.empty().sku(variant.sku!).quantityOnStock(100); +export default skuSarm09; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-sarmo-034.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-sarmo-034.spec.ts new file mode 100644 index 000000000..1acd40a20 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-sarmo-034.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuSarmo034 preset`, () => { + it(`should return a skuSarmo034 preset when built for rest`, () => { + const skuSarmo034Preset = InventoryEntryDraftRest.presets + .skuSarmo034() + .build(); + expect(skuSarmo034Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuSarmo034 preset when built for graphql`, () => { + const skuSarmo034Preset = InventoryEntryDraftGraphql.presets + .skuSarmo034() + .build(); + expect(skuSarmo034Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuSarmo034 preset when built for legacy rest`, () => { + const skuSarmo034Preset = InventoryEntryDraft.presets + .skuSarmo034() + .buildRest(); + expect(skuSarmo034Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuSarmo034 preset when built for legacy graphql`, () => { + const skuSarmo034Preset = InventoryEntryDraft.presets + .skuSarmo034() + .buildGraphql(); + expect(skuSarmo034Preset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-sarmo-034.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-sarmo-034.ts new file mode 100644 index 000000000..c7d911da6 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-sarmo-034.ts @@ -0,0 +1,14 @@ +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const variant = ProductVariantDraft.presets.sampleData + .sallyArmchair01() + .build(); + +const skuSarmo034 = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets.empty().sku(variant.sku!).quantityOnStock(100); +export default skuSarmo034; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-sbg-09.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-sbg-09.spec.ts new file mode 100644 index 000000000..32c466f20 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-sbg-09.spec.ts @@ -0,0 +1,37 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuSbg09 preset`, () => { + it(`should return a skuSbg09 preset when built for rest`, () => { + const skuSbg09Preset = InventoryEntryDraftRest.presets.skuSbg09().build(); + expect(skuSbg09Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuSbg09 preset when built for graphql`, () => { + const skuSbg09Preset = InventoryEntryDraftGraphql.presets + .skuSbg09() + .build(); + expect(skuSbg09Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuSbg09 preset when built for legacy rest`, () => { + const skuSbg09Preset = InventoryEntryDraft.presets + .skuSbg09() + .buildRest(); + expect(skuSbg09Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuSbg09 preset when built for legacy graphql`, () => { + const skuSbg09Preset = InventoryEntryDraft.presets + .skuSbg09() + .buildGraphql(); + expect(skuSbg09Preset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-sbg-09.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-sbg-09.ts new file mode 100644 index 000000000..e95081889 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-sbg-09.ts @@ -0,0 +1,14 @@ +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const variant = ProductVariantDraft.presets.sampleData + .stoutBeerGlass01() + .build(); + +const skuSbg09 = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets.empty().sku(variant.sku!).quantityOnStock(100); +export default skuSbg09; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-scg-09.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-scg-09.spec.ts new file mode 100644 index 000000000..dba96e039 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-scg-09.spec.ts @@ -0,0 +1,37 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuScg09 preset`, () => { + it(`should return a skuScg09 preset when built for rest`, () => { + const skuScg09Preset = InventoryEntryDraftRest.presets.skuScg09().build(); + expect(skuScg09Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuScg09 preset when built for graphql`, () => { + const skuScg09Preset = InventoryEntryDraftGraphql.presets + .skuScg09() + .build(); + expect(skuScg09Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuScg09 preset when built for legacy rest`, () => { + const skuScg09Preset = InventoryEntryDraft.presets + .skuScg09() + .buildRest(); + expect(skuScg09Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuScg09 preset when built for legacy graphql`, () => { + const skuScg09Preset = InventoryEntryDraft.presets + .skuScg09() + .buildGraphql(); + expect(skuScg09Preset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-scg-09.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-scg-09.ts new file mode 100644 index 000000000..637cbf71d --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-scg-09.ts @@ -0,0 +1,14 @@ +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const variant = ProductVariantDraft.presets.sampleData + .sparkleChampagneGlass01() + .build(); + +const skuScg09 = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets.empty().sku(variant.sku!).quantityOnStock(100); +export default skuScg09; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-scm-02.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-scm-02.spec.ts new file mode 100644 index 000000000..7205badf8 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-scm-02.spec.ts @@ -0,0 +1,37 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuScm02 preset`, () => { + it(`should return a skuScm02 preset when built for rest`, () => { + const skuScm02Preset = InventoryEntryDraftRest.presets.skuScm02().build(); + expect(skuScm02Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuScm02 preset when built for graphql`, () => { + const skuScm02Preset = InventoryEntryDraftGraphql.presets + .skuScm02() + .build(); + expect(skuScm02Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuScm02 preset when built for legacy rest`, () => { + const skuScm02Preset = InventoryEntryDraft.presets + .skuScm02() + .buildRest(); + expect(skuScm02Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuScm02 preset when built for legacy graphql`, () => { + const skuScm02Preset = InventoryEntryDraft.presets + .skuScm02() + .buildGraphql(); + expect(skuScm02Preset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-scm-02.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-scm-02.ts new file mode 100644 index 000000000..e07d0b91a --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-scm-02.ts @@ -0,0 +1,14 @@ +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const variant = ProductVariantDraft.presets.sampleData + .sipperCoffeeMug01() + .build(); + +const skuScm02 = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets.empty().sku(variant.sku!).quantityOnStock(100); +export default skuScm02; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-sgb-01.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-sgb-01.spec.ts new file mode 100644 index 000000000..2fd018f57 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-sgb-01.spec.ts @@ -0,0 +1,37 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuSgb01 preset`, () => { + it(`should return a skuSgb01 preset when built for rest`, () => { + const skuSgb01Preset = InventoryEntryDraftRest.presets.skuSgb01().build(); + expect(skuSgb01Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuSgb01 preset when built for graphql`, () => { + const skuSgb01Preset = InventoryEntryDraftGraphql.presets + .skuSgb01() + .build(); + expect(skuSgb01Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuSgb01 preset when built for legacy rest`, () => { + const skuSgb01Preset = InventoryEntryDraft.presets + .skuSgb01() + .buildRest(); + expect(skuSgb01Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuSgb01 preset when built for legacy graphql`, () => { + const skuSgb01Preset = InventoryEntryDraft.presets + .skuSgb01() + .buildGraphql(); + expect(skuSgb01Preset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-sgb-01.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-sgb-01.ts new file mode 100644 index 000000000..59c507164 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-sgb-01.ts @@ -0,0 +1,14 @@ +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const variant = ProductVariantDraft.presets.sampleData + .sunnaiGlassBowl01() + .build(); + +const skuSgb01 = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets.empty().sku(variant.sku!).quantityOnStock(1000); +export default skuSgb01; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-sgb-02.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-sgb-02.spec.ts new file mode 100644 index 000000000..1f9a8684f --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-sgb-02.spec.ts @@ -0,0 +1,37 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuSgb02 preset`, () => { + it(`should return a skuSgb02 preset when built for rest`, () => { + const skuSgb02Preset = InventoryEntryDraftRest.presets.skuSgb02().build(); + expect(skuSgb02Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuSgb02 preset when built for graphql`, () => { + const skuSgb02Preset = InventoryEntryDraftGraphql.presets + .skuSgb02() + .build(); + expect(skuSgb02Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuSgb02 preset when built for legacy rest`, () => { + const skuSgb02Preset = InventoryEntryDraft.presets + .skuSgb02() + .buildRest(); + expect(skuSgb02Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuSgb02 preset when built for legacy graphql`, () => { + const skuSgb02Preset = InventoryEntryDraft.presets + .skuSgb02() + .buildGraphql(); + expect(skuSgb02Preset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-sgb-02.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-sgb-02.ts new file mode 100644 index 000000000..fd212345d --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-sgb-02.ts @@ -0,0 +1,14 @@ +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const variant = ProductVariantDraft.presets.sampleData + .sunnaiGlassBowl02() + .build(); + +const skuSgb02 = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets.empty().sku(variant.sku!).quantityOnStock(100); +export default skuSgb02; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-shot-095.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-shot-095.spec.ts new file mode 100644 index 000000000..ca457bf7b --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-shot-095.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuShot095 preset`, () => { + it(`should return a skuShot095 preset when built for rest`, () => { + const skuShot095Preset = InventoryEntryDraftRest.presets + .skuShot095() + .build(); + expect(skuShot095Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuShot095 preset when built for graphql`, () => { + const skuShot095Preset = InventoryEntryDraftGraphql.presets + .skuShot095() + .build(); + expect(skuShot095Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuShot095 preset when built for legacy rest`, () => { + const skuShot095Preset = InventoryEntryDraft.presets + .skuShot095() + .buildRest(); + expect(skuShot095Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuShot095 preset when built for legacy graphql`, () => { + const skuShot095Preset = InventoryEntryDraft.presets + .skuShot095() + .buildGraphql(); + expect(skuShot095Preset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-shot-095.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-shot-095.ts new file mode 100644 index 000000000..a9c8708ad --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-shot-095.ts @@ -0,0 +1,14 @@ +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const variant = ProductVariantDraft.presets.sampleData + .doubleSidedShotGlass01() + .build(); + +const skuShot095 = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets.empty().sku(variant.sku!).quantityOnStock(100); +export default skuShot095; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-spc-01.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-spc-01.spec.ts new file mode 100644 index 000000000..db9b8ea70 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-spc-01.spec.ts @@ -0,0 +1,37 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuSpc01 preset`, () => { + it(`should return a skuSpc01 preset when built for rest`, () => { + const skuSpc01Preset = InventoryEntryDraftRest.presets.skuSpc01().build(); + expect(skuSpc01Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuSpc01 preset when built for graphql`, () => { + const skuSpc01Preset = InventoryEntryDraftGraphql.presets + .skuSpc01() + .build(); + expect(skuSpc01Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuSpc01 preset when built for legacy rest`, () => { + const skuSpc01Preset = InventoryEntryDraft.presets + .skuSpc01() + .buildRest(); + expect(skuSpc01Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuSpc01 preset when built for legacy graphql`, () => { + const skuSpc01Preset = InventoryEntryDraft.presets + .skuSpc01() + .buildGraphql(); + expect(skuSpc01Preset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-spc-01.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-spc-01.ts new file mode 100644 index 000000000..2cbb87242 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-spc-01.ts @@ -0,0 +1,14 @@ +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const variant = ProductVariantDraft.presets.sampleData + .sweetPeaCandle01() + .build(); + +const skuSpc01 = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets.empty().sku(variant.sku!).quantityOnStock(98); +export default skuSpc01; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-spc-06.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-spc-06.spec.ts new file mode 100644 index 000000000..0b2e58a3b --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-spc-06.spec.ts @@ -0,0 +1,37 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuSpc06 preset`, () => { + it(`should return a skuSpc06 preset when built for rest`, () => { + const skuSpc06Preset = InventoryEntryDraftRest.presets.skuSpc06().build(); + expect(skuSpc06Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuSpc06 preset when built for graphql`, () => { + const skuSpc06Preset = InventoryEntryDraftGraphql.presets + .skuSpc06() + .build(); + expect(skuSpc06Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuSpc06 preset when built for legacy rest`, () => { + const skuSpc06Preset = InventoryEntryDraft.presets + .skuSpc06() + .buildRest(); + expect(skuSpc06Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuSpc06 preset when built for legacy graphql`, () => { + const skuSpc06Preset = InventoryEntryDraft.presets + .skuSpc06() + .buildGraphql(); + expect(skuSpc06Preset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-spc-06.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-spc-06.ts new file mode 100644 index 000000000..b5fbbb272 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-spc-06.ts @@ -0,0 +1,14 @@ +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const variant = ProductVariantDraft.presets.sampleData + .silkyPillowCover01() + .build(); + +const skuSpc06 = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets.empty().sku(variant.sku!).quantityOnStock(100); +export default skuSpc06; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-spoo-094.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-spoo-094.spec.ts new file mode 100644 index 000000000..13246a470 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-spoo-094.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuSpoo094 preset`, () => { + it(`should return a skuSpoo094 preset when built for rest`, () => { + const skuSpoo094Preset = InventoryEntryDraftRest.presets + .skuSpoo094() + .build(); + expect(skuSpoo094Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuSpoo094 preset when built for graphql`, () => { + const skuSpoo094Preset = InventoryEntryDraftGraphql.presets + .skuSpoo094() + .build(); + expect(skuSpoo094Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuSpoo094 preset when built for legacy rest`, () => { + const skuSpoo094Preset = InventoryEntryDraft.presets + .skuSpoo094() + .buildRest(); + expect(skuSpoo094Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuSpoo094 preset when built for legacy graphql`, () => { + const skuSpoo094Preset = InventoryEntryDraft.presets + .skuSpoo094() + .buildGraphql(); + expect(skuSpoo094Preset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-spoo-094.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-spoo-094.ts new file mode 100644 index 000000000..8d9668476 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-spoo-094.ts @@ -0,0 +1,14 @@ +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const variant = ProductVariantDraft.presets.sampleData + .cocktailStirringSpoon01() + .build(); + +const skuSpoo094 = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets.empty().sku(variant.sku!).quantityOnStock(100); +export default skuSpoo094; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-sqb-034.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-sqb-034.spec.ts new file mode 100644 index 000000000..b1ea363f2 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-sqb-034.spec.ts @@ -0,0 +1,37 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuSqb034 preset`, () => { + it(`should return a skuSqb034 preset when built for rest`, () => { + const skuSqb034Preset = InventoryEntryDraftRest.presets.skuSqb034().build(); + expect(skuSqb034Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuSqb034 preset when built for graphql`, () => { + const skuSqb034Preset = InventoryEntryDraftGraphql.presets + .skuSqb034() + .build(); + expect(skuSqb034Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuSqb034 preset when built for legacy rest`, () => { + const skuSqb034Preset = InventoryEntryDraft.presets + .skuSqb034() + .buildRest(); + expect(skuSqb034Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuSqb034 preset when built for legacy graphql`, () => { + const skuSqb034Preset = InventoryEntryDraft.presets + .skuSqb034() + .buildGraphql(); + expect(skuSqb034Preset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-sqb-034.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-sqb-034.ts new file mode 100644 index 000000000..bf2b5cdb5 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-sqb-034.ts @@ -0,0 +1,14 @@ +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const variant = ProductVariantDraft.presets.sampleData + .ecruDoubleBed01() + .build(); + +const skuSqb034 = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets.empty().sku(variant.sku!).quantityOnStock(100); +export default skuSqb034; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-sst-02.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-sst-02.spec.ts new file mode 100644 index 000000000..7dc17f685 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-sst-02.spec.ts @@ -0,0 +1,37 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuSst02 preset`, () => { + it(`should return a skuSst02 preset when built for rest`, () => { + const skuSst02Preset = InventoryEntryDraftRest.presets.skuSst02().build(); + expect(skuSst02Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuSst02 preset when built for graphql`, () => { + const skuSst02Preset = InventoryEntryDraftGraphql.presets + .skuSst02() + .build(); + expect(skuSst02Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuSst02 preset when built for legacy rest`, () => { + const skuSst02Preset = InventoryEntryDraft.presets + .skuSst02() + .buildRest(); + expect(skuSst02Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuSst02 preset when built for legacy graphql`, () => { + const skuSst02Preset = InventoryEntryDraft.presets + .skuSst02() + .buildGraphql(); + expect(skuSst02Preset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-sst-02.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-sst-02.ts new file mode 100644 index 000000000..86810f087 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-sst-02.ts @@ -0,0 +1,14 @@ +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const variant = ProductVariantDraft.presets.sampleData + .stoneServingTray01() + .build(); + +const skuSst02 = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets.empty().sku(variant.sku!).quantityOnStock(100); +export default skuSst02; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-stm-09.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-stm-09.spec.ts new file mode 100644 index 000000000..396ed8d1a --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-stm-09.spec.ts @@ -0,0 +1,37 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuStm09 preset`, () => { + it(`should return a skuStm09 preset when built for rest`, () => { + const skuStm09Preset = InventoryEntryDraftRest.presets.skuStm09().build(); + expect(skuStm09Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuStm09 preset when built for graphql`, () => { + const skuStm09Preset = InventoryEntryDraftGraphql.presets + .skuStm09() + .build(); + expect(skuStm09Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuStm09 preset when built for legacy rest`, () => { + const skuStm09Preset = InventoryEntryDraft.presets + .skuStm09() + .buildRest(); + expect(skuStm09Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuStm09 preset when built for legacy graphql`, () => { + const skuStm09Preset = InventoryEntryDraft.presets + .skuStm09() + .buildGraphql(); + expect(skuStm09Preset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-stm-09.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-stm-09.ts new file mode 100644 index 000000000..91318b228 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-stm-09.ts @@ -0,0 +1,14 @@ +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const variant = ProductVariantDraft.presets.sampleData + .sandTeaCup01() + .build(); + +const skuStm09 = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets.empty().sku(variant.sku!).quantityOnStock(100); +export default skuStm09; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-stra-095.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-stra-095.spec.ts new file mode 100644 index 000000000..bcd18202d --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-stra-095.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuStra095 preset`, () => { + it(`should return a skuStra095 preset when built for rest`, () => { + const skuStra095Preset = InventoryEntryDraftRest.presets + .skuStra095() + .build(); + expect(skuStra095Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuStra095 preset when built for graphql`, () => { + const skuStra095Preset = InventoryEntryDraftGraphql.presets + .skuStra095() + .build(); + expect(skuStra095Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuStra095 preset when built for legacy rest`, () => { + const skuStra095Preset = InventoryEntryDraft.presets + .skuStra095() + .buildRest(); + expect(skuStra095Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuStra095 preset when built for legacy graphql`, () => { + const skuStra095Preset = InventoryEntryDraft.presets + .skuStra095() + .buildGraphql(); + expect(skuStra095Preset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-stra-095.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-stra-095.ts new file mode 100644 index 000000000..d585a29f1 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-stra-095.ts @@ -0,0 +1,27 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .inventoryChannel() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .cocktailStrainer01() + .build(); + +const skuStra095 = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .sku(variant.sku!) + .quantityOnStock(100) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuStra095; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-swb-01.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-swb-01.spec.ts new file mode 100644 index 000000000..61171dfad --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-swb-01.spec.ts @@ -0,0 +1,37 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuSwb01 preset`, () => { + it(`should return a skuSwb01 preset when built for rest`, () => { + const skuSwb01Preset = InventoryEntryDraftRest.presets.skuSwb01().build(); + expect(skuSwb01Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuSwb01 preset when built for graphql`, () => { + const skuSwb01Preset = InventoryEntryDraftGraphql.presets + .skuSwb01() + .build(); + expect(skuSwb01Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuSwb01 preset when built for legacy rest`, () => { + const skuSwb01Preset = InventoryEntryDraft.presets + .skuSwb01() + .buildRest(); + expect(skuSwb01Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuSwb01 preset when built for legacy graphql`, () => { + const skuSwb01Preset = InventoryEntryDraft.presets + .skuSwb01() + .buildGraphql(); + expect(skuSwb01Preset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-swb-01.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-swb-01.ts new file mode 100644 index 000000000..0e0d79d6b --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-swb-01.ts @@ -0,0 +1,27 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .inventoryChannel() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .smallWoodenBowl01() + .build(); + +const skuSwb01 = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .sku(variant.sku!) + .quantityOnStock(100) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuSwb01; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-tarm-03.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-tarm-03.spec.ts new file mode 100644 index 000000000..6975a77fb --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-tarm-03.spec.ts @@ -0,0 +1,37 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuTarm03 preset`, () => { + it(`should return a skuTarm03 preset when built for rest`, () => { + const skuTarm03Preset = InventoryEntryDraftRest.presets.skuTarm03().build(); + expect(skuTarm03Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuTarm03 preset when built for graphql`, () => { + const skuTarm03Preset = InventoryEntryDraftGraphql.presets + .skuTarm03() + .build(); + expect(skuTarm03Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuTarm03 preset when built for legacy rest`, () => { + const skuTarm03Preset = InventoryEntryDraft.presets + .skuTarm03() + .buildRest(); + expect(skuTarm03Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuTarm03 preset when built for legacy graphql`, () => { + const skuTarm03Preset = InventoryEntryDraft.presets + .skuTarm03() + .buildGraphql(); + expect(skuTarm03Preset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-tarm-03.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-tarm-03.ts new file mode 100644 index 000000000..210ed9ed2 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-tarm-03.ts @@ -0,0 +1,14 @@ +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const variant = ProductVariantDraft.presets.sampleData + .turnerVelvetArmchair01() + .build(); + +const skuTarm03 = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets.empty().sku(variant.sku!).quantityOnStock(100); +export default skuTarm03; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-tarm-034.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-tarm-034.spec.ts new file mode 100644 index 000000000..57facc17a --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-tarm-034.spec.ts @@ -0,0 +1,39 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuTarm034 preset`, () => { + it(`should return a skuTarm034 preset when built for rest`, () => { + const skuTarm034Preset = InventoryEntryDraftRest.presets + .skuTarm034() + .build(); + expect(skuTarm034Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuTarm034 preset when built for graphql`, () => { + const skuTarm034Preset = InventoryEntryDraftGraphql.presets + .skuTarm034() + .build(); + expect(skuTarm034Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuTarm034 preset when built for legacy rest`, () => { + const skuTarm034Preset = InventoryEntryDraft.presets + .skuTarm034() + .buildRest(); + expect(skuTarm034Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuTarm034 preset when built for legacy graphql`, () => { + const skuTarm034Preset = InventoryEntryDraft.presets + .skuTarm034() + .buildGraphql(); + expect(skuTarm034Preset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-tarm-034.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-tarm-034.ts new file mode 100644 index 000000000..d93fbe0d9 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-tarm-034.ts @@ -0,0 +1,14 @@ +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const variant = ProductVariantDraft.presets.sampleData + .traditionalArmchair01() + .build(); + +const skuTarm034 = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets.empty().sku(variant.sku!).quantityOnStock(100); +export default skuTarm034; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-tcm-03.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-tcm-03.spec.ts new file mode 100644 index 000000000..ed9786c0d --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-tcm-03.spec.ts @@ -0,0 +1,37 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuTcm03 preset`, () => { + it(`should return a skuTcm03 preset when built for rest`, () => { + const skuTcm03Preset = InventoryEntryDraftRest.presets.skuTcm03().build(); + expect(skuTcm03Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuTcm03 preset when built for graphql`, () => { + const skuTcm03Preset = InventoryEntryDraftGraphql.presets + .skuTcm03() + .build(); + expect(skuTcm03Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuTcm03 preset when built for legacy rest`, () => { + const skuTcm03Preset = InventoryEntryDraft.presets + .skuTcm03() + .buildRest(); + expect(skuTcm03Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuTcm03 preset when built for legacy graphql`, () => { + const skuTcm03Preset = InventoryEntryDraft.presets + .skuTcm03() + .buildGraphql(); + expect(skuTcm03Preset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-tcm-03.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-tcm-03.ts new file mode 100644 index 000000000..1c6088987 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-tcm-03.ts @@ -0,0 +1,14 @@ +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const variant = ProductVariantDraft.presets.sampleData + .travelCoffeeMug01() + .build(); + +const skuTcm03 = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets.empty().sku(variant.sku!).quantityOnStock(99); +export default skuTcm03; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-tlss-01.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-tlss-01.spec.ts new file mode 100644 index 000000000..0fc2310a6 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-tlss-01.spec.ts @@ -0,0 +1,37 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuTlss01 preset`, () => { + it(`should return a skuTlss01 preset when built for rest`, () => { + const skuTlss01Preset = InventoryEntryDraftRest.presets.skuTlss01().build(); + expect(skuTlss01Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuTlss01 preset when built for graphql`, () => { + const skuTlss01Preset = InventoryEntryDraftGraphql.presets + .skuTlss01() + .build(); + expect(skuTlss01Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuTlss01 preset when built for legacy rest`, () => { + const skuTlss01Preset = InventoryEntryDraft.presets + .skuTlss01() + .buildRest(); + expect(skuTlss01Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuTlss01 preset when built for legacy graphql`, () => { + const skuTlss01Preset = InventoryEntryDraft.presets + .skuTlss01() + .buildGraphql(); + expect(skuTlss01Preset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-tlss-01.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-tlss-01.ts new file mode 100644 index 000000000..406af49d1 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-tlss-01.ts @@ -0,0 +1,14 @@ +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const variant = ProductVariantDraft.presets.sampleData + .traditionalLSeaterSofa01() + .build(); + +const skuTlss01 = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets.empty().sku(variant.sku!).quantityOnStock(98); +export default skuTlss01; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-tst-02.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-tst-02.spec.ts new file mode 100644 index 000000000..c34d7088f --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-tst-02.spec.ts @@ -0,0 +1,37 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuTst02 preset`, () => { + it(`should return a skuTst02 preset when built for rest`, () => { + const skuTst02Preset = InventoryEntryDraftRest.presets.skuTst02().build(); + expect(skuTst02Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuTst02 preset when built for graphql`, () => { + const skuTst02Preset = InventoryEntryDraftGraphql.presets + .skuTst02() + .build(); + expect(skuTst02Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuTst02 preset when built for legacy rest`, () => { + const skuTst02Preset = InventoryEntryDraft.presets + .skuTst02() + .buildRest(); + expect(skuTst02Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuTst02 preset when built for legacy graphql`, () => { + const skuTst02Preset = InventoryEntryDraft.presets + .skuTst02() + .buildGraphql(); + expect(skuTst02Preset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-tst-02.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-tst-02.ts new file mode 100644 index 000000000..ce3bdf009 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-tst-02.ts @@ -0,0 +1,14 @@ +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const variant = ProductVariantDraft.presets.sampleData + .teakServingPlatter01() + .build(); + +const skuTst02 = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets.empty().sku(variant.sku!).quantityOnStock(100); +export default skuTst02; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-ttss-01.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-ttss-01.spec.ts new file mode 100644 index 000000000..b198b26c0 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-ttss-01.spec.ts @@ -0,0 +1,37 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuTtss01 preset`, () => { + it(`should return a skuTtss01 preset when built for rest`, () => { + const skuTtss01Preset = InventoryEntryDraftRest.presets.skuTtss01().build(); + expect(skuTtss01Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuTtss01 preset when built for graphql`, () => { + const skuTtss01Preset = InventoryEntryDraftGraphql.presets + .skuTtss01() + .build(); + expect(skuTtss01Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuTtss01 preset when built for legacy rest`, () => { + const skuTtss01Preset = InventoryEntryDraft.presets + .skuTtss01() + .buildRest(); + expect(skuTtss01Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuTtss01 preset when built for legacy graphql`, () => { + const skuTtss01Preset = InventoryEntryDraft.presets + .skuTtss01() + .buildGraphql(); + expect(skuTtss01Preset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-ttss-01.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-ttss-01.ts new file mode 100644 index 000000000..16ab442a6 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-ttss-01.ts @@ -0,0 +1,27 @@ +import { + ChannelDraft, + type TChannelDraft, +} from '@commercetools-test-data/channel'; +import { KeyReferenceDraft } from '@commercetools-test-data/commons'; +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const supplyChannel = ChannelDraft.presets.sampleData + .inventoryChannel() + .build(); + +const variant = ProductVariantDraft.presets.sampleData + .traditionalThreeSeaterSofa01() + .build(); + +const skuTtss01 = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets + .empty() + .sku(variant.sku!) + .quantityOnStock(76) + .supplyChannel(KeyReferenceDraft.presets.channel().key(supplyChannel.key!)); +export default skuTtss01; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-varm-09.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-varm-09.spec.ts new file mode 100644 index 000000000..4e9f88c37 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-varm-09.spec.ts @@ -0,0 +1,37 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuVarm09 preset`, () => { + it(`should return a skuVarm09 preset when built for rest`, () => { + const skuVarm09Preset = InventoryEntryDraftRest.presets.skuVarm09().build(); + expect(skuVarm09Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuVarm09 preset when built for graphql`, () => { + const skuVarm09Preset = InventoryEntryDraftGraphql.presets + .skuVarm09() + .build(); + expect(skuVarm09Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuVarm09 preset when built for legacy rest`, () => { + const skuVarm09Preset = InventoryEntryDraft.presets + .skuVarm09() + .buildRest(); + expect(skuVarm09Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuVarm09 preset when built for legacy graphql`, () => { + const skuVarm09Preset = InventoryEntryDraft.presets + .skuVarm09() + .buildGraphql(); + expect(skuVarm09Preset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-varm-09.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-varm-09.ts new file mode 100644 index 000000000..d37b11bcb --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-varm-09.ts @@ -0,0 +1,14 @@ +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const variant = ProductVariantDraft.presets.sampleData + .emeraldVelvetChair01() + .build(); + +const skuVarm09 = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets.empty().sku(variant.sku!).quantityOnStock(1000); +export default skuVarm09; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-vc-01.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-vc-01.spec.ts new file mode 100644 index 000000000..b72a089a4 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-vc-01.spec.ts @@ -0,0 +1,35 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuVc01 preset`, () => { + it(`should return a skuVc01 preset when built for rest`, () => { + const skuVc01Preset = InventoryEntryDraftRest.presets.skuVc01().build(); + expect(skuVc01Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuVc01 preset when built for graphql`, () => { + const skuVc01Preset = InventoryEntryDraftGraphql.presets.skuVc01().build(); + expect(skuVc01Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuVc01 preset when built for legacy rest`, () => { + const skuVc01Preset = InventoryEntryDraft.presets + .skuVc01() + .buildRest(); + expect(skuVc01Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuVc01 preset when built for legacy graphql`, () => { + const skuVc01Preset = InventoryEntryDraft.presets + .skuVc01() + .buildGraphql(); + expect(skuVc01Preset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-vc-01.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-vc-01.ts new file mode 100644 index 000000000..ae40c2495 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-vc-01.ts @@ -0,0 +1,14 @@ +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const variant = ProductVariantDraft.presets.sampleData + .vanillaCandle01() + .build(); + +const skuVc01 = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets.empty().sku(variant.sku!).quantityOnStock(98); +export default skuVc01; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-wcs-09.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-wcs-09.spec.ts new file mode 100644 index 000000000..523ac291f --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-wcs-09.spec.ts @@ -0,0 +1,37 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuWcs09 preset`, () => { + it(`should return a skuWcs09 preset when built for rest`, () => { + const skuWcs09Preset = InventoryEntryDraftRest.presets.skuWcs09().build(); + expect(skuWcs09Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuWcs09 preset when built for graphql`, () => { + const skuWcs09Preset = InventoryEntryDraftGraphql.presets + .skuWcs09() + .build(); + expect(skuWcs09Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuWcs09 preset when built for legacy rest`, () => { + const skuWcs09Preset = InventoryEntryDraft.presets + .skuWcs09() + .buildRest(); + expect(skuWcs09Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuWcs09 preset when built for legacy graphql`, () => { + const skuWcs09Preset = InventoryEntryDraft.presets + .skuWcs09() + .buildGraphql(); + expect(skuWcs09Preset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-wcs-09.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-wcs-09.ts new file mode 100644 index 000000000..88c288dbf --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-wcs-09.ts @@ -0,0 +1,14 @@ +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const variant = ProductVariantDraft.presets.sampleData + .walnutCabinet01() + .build(); + +const skuWcs09 = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets.empty().sku(variant.sku!).quantityOnStock(100); +export default skuWcs09; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-wcsi-09.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-wcsi-09.spec.ts new file mode 100644 index 000000000..7e8003e61 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-wcsi-09.spec.ts @@ -0,0 +1,37 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuWcsi09 preset`, () => { + it(`should return a skuWcsi09 preset when built for rest`, () => { + const skuWcsi09Preset = InventoryEntryDraftRest.presets.skuWcsi09().build(); + expect(skuWcsi09Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuWcsi09 preset when built for graphql`, () => { + const skuWcsi09Preset = InventoryEntryDraftGraphql.presets + .skuWcsi09() + .build(); + expect(skuWcsi09Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuWcsi09 preset when built for legacy rest`, () => { + const skuWcsi09Preset = InventoryEntryDraft.presets + .skuWcsi09() + .buildRest(); + expect(skuWcsi09Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuWcsi09 preset when built for legacy graphql`, () => { + const skuWcsi09Preset = InventoryEntryDraft.presets + .skuWcsi09() + .buildGraphql(); + expect(skuWcsi09Preset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-wcsi-09.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-wcsi-09.ts new file mode 100644 index 000000000..73afbbeab --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-wcsi-09.ts @@ -0,0 +1,14 @@ +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const variant = ProductVariantDraft.presets.sampleData + .walnutCounterStool01() + .build(); + +const skuWcsi09 = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets.empty().sku(variant.sku!).quantityOnStock(100); +export default skuWcsi09; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-wop-09.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-wop-09.spec.ts new file mode 100644 index 000000000..f270b58d9 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-wop-09.spec.ts @@ -0,0 +1,37 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuWop09 preset`, () => { + it(`should return a skuWop09 preset when built for rest`, () => { + const skuWop09Preset = InventoryEntryDraftRest.presets.skuWop09().build(); + expect(skuWop09Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuWop09 preset when built for graphql`, () => { + const skuWop09Preset = InventoryEntryDraftGraphql.presets + .skuWop09() + .build(); + expect(skuWop09Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuWop09 preset when built for legacy rest`, () => { + const skuWop09Preset = InventoryEntryDraft.presets + .skuWop09() + .buildRest(); + expect(skuWop09Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuWop09 preset when built for legacy graphql`, () => { + const skuWop09Preset = InventoryEntryDraft.presets + .skuWop09() + .buildGraphql(); + expect(skuWop09Preset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-wop-09.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-wop-09.ts new file mode 100644 index 000000000..109230a7f --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-wop-09.ts @@ -0,0 +1,14 @@ +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const variant = ProductVariantDraft.presets.sampleData + .wineBottleOpener01() + .build(); + +const skuWop09 = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets.empty().sku(variant.sku!).quantityOnStock(100); +export default skuWop09; diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-wtp-09.spec.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-wtp-09.spec.ts new file mode 100644 index 000000000..2d05b9626 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-wtp-09.spec.ts @@ -0,0 +1,37 @@ +import type { + TInventoryEntryDraftGraphql, + TInventoryEntryDraftRest, +} from '../../../types'; +import { + InventoryEntryDraft, + InventoryEntryDraftGraphql, + InventoryEntryDraftRest, +} from '../../index'; + +describe(`with skuWtp09 preset`, () => { + it(`should return a skuWtp09 preset when built for rest`, () => { + const skuWtp09Preset = InventoryEntryDraftRest.presets.skuWtp09().build(); + expect(skuWtp09Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuWtp09 preset when built for graphql`, () => { + const skuWtp09Preset = InventoryEntryDraftGraphql.presets + .skuWtp09() + .build(); + expect(skuWtp09Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuWtp09 preset when built for legacy rest`, () => { + const skuWtp09Preset = InventoryEntryDraft.presets + .skuWtp09() + .buildRest(); + expect(skuWtp09Preset).toMatchInlineSnapshot(); + }); + + it(`should return a skuWtp09 preset when built for legacy graphql`, () => { + const skuWtp09Preset = InventoryEntryDraft.presets + .skuWtp09() + .buildGraphql(); + expect(skuWtp09Preset).toMatchInlineSnapshot(); + }); +}); diff --git a/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-wtp-09.ts b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-wtp-09.ts new file mode 100644 index 000000000..116c0cd24 --- /dev/null +++ b/models/inventory-entry/src/inventory-entry-draft/presets/sample-data-b2c-lifestyle/sku-wtp-09.ts @@ -0,0 +1,14 @@ +import { + ProductVariantDraft, + type TProductVariantDraft, +} from '@commercetools-test-data/product'; +import type { TInventoryEntryDraftBuilder } from '../../../types'; +import * as InventoryEntryDraft from '../../index'; + +const variant = ProductVariantDraft.presets.sampleData + .willowTeapot01() + .build(); + +const skuWtp09 = (): TInventoryEntryDraftBuilder => + InventoryEntryDraft.presets.empty().sku(variant.sku!).quantityOnStock(100); +export default skuWtp09; diff --git a/models/inventory-entry/src/presets/index.ts b/models/inventory-entry/src/presets/index.ts index 763e57fe0..21d9d39b6 100644 --- a/models/inventory-entry/src/presets/index.ts +++ b/models/inventory-entry/src/presets/index.ts @@ -1,3 +1,2 @@ -const presets = {}; - -export default presets; +export const restPresets = {}; +export const graphqlPresets = {}; diff --git a/models/inventory-entry/src/transformers.ts b/models/inventory-entry/src/transformers.ts deleted file mode 100644 index dfa6e9a3c..000000000 --- a/models/inventory-entry/src/transformers.ts +++ /dev/null @@ -1,46 +0,0 @@ -import { - Reference, - TReference, - TReferenceGraphql, -} from '@commercetools-test-data/commons'; -import { Transformer } from '@commercetools-test-data/core'; -import type { - TInventoryEntry, - TInventoryEntryRest, - TInventoryEntryGraphql, -} from './types'; - -const transformers = { - default: Transformer('default', { - buildFields: ['supplyChannel'], - }), - rest: Transformer('rest', { - buildFields: ['supplyChannel'], - replaceFields: ({ fields }) => { - const supplyChannel = Reference.presets - .channelReference() - .id(fields.supplyChannel.id) - .build>(); - return { - ...fields, - supplyChannel, - }; - }, - }), - graphql: Transformer('graphql', { - buildFields: ['supplyChannel'], - replaceFields: ({ fields }) => { - const supplyChannelRef = Reference.presets - .channelReference() - .id(fields.supplyChannel.id) - .buildGraphql>(); - return { - ...fields, - supplyChannelRef, - __typename: 'InventoryEntry', - }; - }, - }), -}; - -export default transformers; diff --git a/models/inventory-entry/src/types.ts b/models/inventory-entry/src/types.ts index 3ef2d11ff..77c483aa6 100644 --- a/models/inventory-entry/src/types.ts +++ b/models/inventory-entry/src/types.ts @@ -1,15 +1,16 @@ import { InventoryEntry, InventoryEntryDraft, - Channel, } from '@commercetools/platform-sdk'; +import { TChannelGraphql } from '@commercetools-test-data/channel'; import type { TReferenceGraphql } from '@commercetools-test-data/commons'; import type { TBuilder } from '@commercetools-test-data/core'; // Default -export type TInventoryEntry = Omit & { - supplyChannel: Channel; -}; +/** + * @deprecated use `TInventoryEntryRest` instead + */ +export type TInventoryEntry = InventoryEntry; export type TInventoryEntryDraft = InventoryEntryDraft; // REST @@ -17,15 +18,20 @@ export type TInventoryEntryRest = InventoryEntry; export type TInventoryEntryDraftRest = InventoryEntryDraft; // GraphQL -export type TInventoryEntryGraphql = TInventoryEntry & { +export type TInventoryEntryGraphql = Omit & { __typename: 'InventoryEntry'; - supplyChannelRef: TReferenceGraphql; + supplyChannel?: TChannelGraphql | null; + supplyChannelRef?: TReferenceGraphql<'channel'> | null; }; export type TInventoryEntryDraftGraphql = TInventoryEntryDraft; export type TInventoryEntryBuilder = TBuilder; export type TInventoryEntryDraftBuilder = TBuilder; -export type TCreateInventoryEntryBuilder = () => TInventoryEntryBuilder; -export type TCreateInventoryEntryDraftBuilder = - () => TInventoryEntryDraftBuilder; +export type TCreateInventoryEntryBuilder< + TInventoryEntryModel extends + | TInventoryEntryRest + | TInventoryEntryGraphql + | TInventoryEntryDraftRest + | TInventoryEntryDraftGraphql, +> = () => TBuilder;