@api-client/core 0.19.20 → 0.19.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@api-client/core",
3
3
  "description": "The API Client's core client library. Works in NodeJS and in a ES enabled browser.",
4
- "version": "0.19.20",
4
+ "version": "0.19.21",
5
5
  "license": "UNLICENSED",
6
6
  "exports": {
7
7
  "./browser.js": {
@@ -743,6 +743,7 @@ export function addSkuField(entity: DomainEntity, info: Partial<ThingSchema> = {
743
743
  type: 'string',
744
744
  required: true,
745
745
  unique: true,
746
+ index: true,
746
747
  })
747
748
  prop.addSemantic({ ...SKU_PRESETS.PRODUCT_STANDARD })
748
749
  return prop
@@ -758,7 +759,7 @@ export function addSkuField(entity: DomainEntity, info: Partial<ThingSchema> = {
758
759
  * - info.name: 'price'
759
760
  * - info.displayName: 'Price'
760
761
  * - required: true
761
- * - schema.maximum: 0
762
+ * - schema.minimum: 0
762
763
  *
763
764
  * @param entity The entity to which the price field will be added.
764
765
  * @param info Additional information about the field.
@@ -774,7 +775,7 @@ export function addPriceField(entity: DomainEntity, info: Partial<ThingSchema> =
774
775
  type: 'number',
775
776
  required: true,
776
777
  schema: {
777
- maximum: 0,
778
+ minimum: 0,
778
779
  },
779
780
  bindings: [
780
781
  {
@@ -910,6 +911,7 @@ export function addCustomStatusField(
910
911
  info: { name: 'status', displayName: 'Status', ...info },
911
912
  type: 'string',
912
913
  required: true,
914
+ index: true,
913
915
  schema: {
914
916
  enum: enumValues,
915
917
  defaultValue: {
@@ -828,7 +828,7 @@ test.group('addPriceField()', () => {
828
828
  assert.equal(field.info.displayName, 'Price')
829
829
  assert.equal(field.type, 'number')
830
830
  assert.isTrue(field.required)
831
- assert.isUndefined(field.schema?.minimum)
831
+ assert.equal(field.schema?.minimum, 0)
832
832
  assert.isTrue(field.semantics.length > 0)
833
833
  })
834
834