@conduit-client/generator-ts 3.14.0 → 3.15.1

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/dist/v1/index.js CHANGED
@@ -4233,9 +4233,9 @@ const GRAPHQL_DOCUMENT_ROOT_TYPE_REPOSITORY = {
4233
4233
  exportedSymbol: "GraphQLDocumentRootTypeRepository",
4234
4234
  isType: true
4235
4235
  };
4236
- const DOCUMENT_NODE = {
4236
+ const PARSED_GRAPHQL_DOCUMENT = {
4237
4237
  module: "@conduit-client/onestore-graphql-parser/v1",
4238
- exportedSymbol: "DocumentNode",
4238
+ exportedSymbol: "ParsedGraphQLDocument",
4239
4239
  isType: true
4240
4240
  };
4241
4241
  const GRAPHQL_QUERY_JSON_SCHEMA = {
@@ -4263,6 +4263,11 @@ const NAMED_FETCH_SERVICE$2 = {
4263
4263
  exportedSymbol: "NamedFetchService",
4264
4264
  isType: true
4265
4265
  };
4266
+ const GRAPHQL_REQUEST_PARAMS = {
4267
+ module: "@conduit-client/graphql-normalization/v1",
4268
+ exportedSymbol: "GraphQLRequestParams",
4269
+ isType: true
4270
+ };
4266
4271
  function GraphQLNormalizedCacheControlGeneratorMixin(Base, commandBaseClass, commandGeneratedClass) {
4267
4272
  return class GraphQLNormalizedCacheControl extends Base {
4268
4273
  constructor() {
@@ -4276,6 +4281,11 @@ function GraphQLNormalizedCacheControlGeneratorMixin(Base, commandBaseClass, com
4276
4281
  get template() {
4277
4282
  return [
4278
4283
  code`export type DocumentRootType = ${GRAPHQL_DOCUMENT_ROOT_TYPE_REPOSITORY}<${GRAPHQL_DATA$1}, ${GRAPHQL_DATA$1}>;`,
4284
+ // CommandConfig is the resolved internal config type (query: DocumentNode).
4285
+ // Config (below, from super.template) is the external-facing type (query: ParsedGraphQLDocument).
4286
+ // The binding layer resolves ParsedGraphQLDocument → DocumentNode before calling the command
4287
+ // constructor; the `as unknown as` cast in buildCommandClass bridges the two externally.
4288
+ code`type CommandConfig = ${GRAPHQL_REQUEST_PARAMS} & Record<string, unknown>;`,
4279
4289
  ...super.template
4280
4290
  ];
4281
4291
  }
@@ -4301,7 +4311,7 @@ function GraphQLNormalizedCacheControlGeneratorMixin(Base, commandBaseClass, com
4301
4311
  return this.buildCommandTypeGenerics();
4302
4312
  }
4303
4313
  get commandConstructorArgs() {
4304
- return code`protected config: Config, protected documentRootType: DocumentRootType, protected services: ${NAMED_CACHE_CONTROLLER_SERVICE} & ${NAMED_PUBSUB_SERVICE$3} & ${this.buildNetworkServicesCode()} & object`;
4314
+ return code`protected config: CommandConfig, protected documentRootType: DocumentRootType, protected services: ${NAMED_CACHE_CONTROLLER_SERVICE} & ${NAMED_PUBSUB_SERVICE$3} & ${this.buildNetworkServicesCode()} & object`;
4305
4315
  }
4306
4316
  get commandConstructorBody() {
4307
4317
  return code`super(config, documentRootType, services);`;
@@ -4352,7 +4362,7 @@ function GraphQLNormalizedCacheControlGeneratorMixin(Base, commandBaseClass, com
4352
4362
  }
4353
4363
  buildCommandConfigType() {
4354
4364
  return code`{
4355
- query: ${DOCUMENT_NODE};
4365
+ query: ${PARSED_GRAPHQL_DOCUMENT};
4356
4366
  variables?: Record<string, unknown>;
4357
4367
  operationName?: string;
4358
4368
  } & Record<string, unknown>`;