@conduit-client/model 3.7.0-dev1 → 3.7.0-dev2

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.
@@ -128,6 +128,9 @@ export declare function readSpecFiles(): Promise<{
128
128
  exposeRefreshTrue: string;
129
129
  exposeRefreshFalse: string;
130
130
  }>;
131
+ amfOperationExposeRefreshLegacyMixed: TestRaml<{}, {
132
+ exposeRefreshTrueMixed: string;
133
+ }>;
131
134
  amfBindings: TestRaml<{}, {
132
135
  defaultOperationTypeGet: string;
133
136
  defaultOperationTypePost: string;
package/dist/v1/index.js CHANGED
@@ -6014,13 +6014,15 @@ class OperationSchemaBuilder {
6014
6014
  ).refine(
6015
6015
  (config) => {
6016
6016
  const { bindings, exposeRefresh } = config;
6017
- if (exposeRefresh) {
6018
- return !bindings.some((binding) => binding.type === "imperative-legacy");
6017
+ if (!exposeRefresh) {
6018
+ return true;
6019
6019
  }
6020
- return true;
6020
+ return bindings.some(
6021
+ (binding) => binding.type === "wire" || binding.type === "imperative"
6022
+ );
6021
6023
  },
6022
6024
  {
6023
- message: 'Cannot exposeRefresh with "imperative-legacy" binding'
6025
+ message: 'Cannot use exposeRefresh without a "wire" or "imperative" binding'
6024
6026
  }
6025
6027
  ).refine(
6026
6028
  (config) => {