@bcrumbs.net/bc-api 0.0.45 → 0.0.46

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/index.cjs.js CHANGED
@@ -3892,9 +3892,9 @@ const redirectToLogin = () => {
3892
3892
  };
3893
3893
 
3894
3894
  const {
3895
- networkInterface: uri$5
3895
+ networkInterface: uri$6
3896
3896
  } = appConfig.dconfig;
3897
- const authLink$3 = context.setContext((operation_1, _a) => __awaiter(void 0, [operation_1, _a], void 0, function* (operation, {
3897
+ const authLink$4 = context.setContext((operation_1, _a) => __awaiter(void 0, [operation_1, _a], void 0, function* (operation, {
3898
3898
  headers
3899
3899
  }) {
3900
3900
  const currentUsertoken = yield getUserToken();
@@ -3918,8 +3918,8 @@ const authLink$3 = context.setContext((operation_1, _a) => __awaiter(void 0, [op
3918
3918
  };
3919
3919
  return resultHeaders;
3920
3920
  }));
3921
- const cache$5 = new client.InMemoryCache();
3922
- const errorLink$4 = error.onError(({
3921
+ const cache$6 = new client.InMemoryCache();
3922
+ const errorLink$5 = error.onError(({
3923
3923
  networkError
3924
3924
  }) => {
3925
3925
  if (networkError && networkError.statusCode === 401) {
@@ -3938,10 +3938,10 @@ const errorLink$4 = error.onError(({
3938
3938
  }
3939
3939
  });
3940
3940
  /* eslint-disable no-process-env */
3941
- const isDevEnv$5 = process.env['NODE_ENV'] !== 'production';
3941
+ const isDevEnv$6 = process.env['NODE_ENV'] !== 'production';
3942
3942
  /* eslint-enable no-process-env */
3943
3943
  const link_dconfig = new apolloLinkRest.RestLink({
3944
- uri: uri$5 || 'https://api.bcrumbs.net',
3944
+ uri: uri$6 || 'https://api.bcrumbs.net',
3945
3945
  bodySerializers: {
3946
3946
  fileEncode: (data, headers) => {
3947
3947
  const formData = new FormData();
@@ -3955,9 +3955,9 @@ const link_dconfig = new apolloLinkRest.RestLink({
3955
3955
  }
3956
3956
  });
3957
3957
  const dconfigClient = new client.ApolloClient({
3958
- link: client.from([authLink$3, errorLink$4, link_dconfig]),
3959
- cache: cache$5,
3960
- connectToDevTools: isDevEnv$5,
3958
+ link: client.from([authLink$4, errorLink$5, link_dconfig]),
3959
+ cache: cache$6,
3960
+ connectToDevTools: isDevEnv$6,
3961
3961
  queryDeduplication: true
3962
3962
  });
3963
3963
  const formSerializer = (data, headers) => {
@@ -3975,13 +3975,13 @@ const formSerializer = (data, headers) => {
3975
3975
  };
3976
3976
  };
3977
3977
  const link_dconfig_token = new apolloLinkRest.RestLink({
3978
- uri: uri$5 || 'https://api.bcrumbs.net',
3978
+ uri: uri$6 || 'https://api.bcrumbs.net',
3979
3979
  defaultSerializer: formSerializer
3980
3980
  });
3981
3981
  const tokenClient = new client.ApolloClient({
3982
- link: client.from([link_dconfig_token, errorLink$4]),
3983
- cache: cache$5,
3984
- connectToDevTools: isDevEnv$5
3982
+ link: client.from([link_dconfig_token, errorLink$5]),
3983
+ cache: cache$6,
3984
+ connectToDevTools: isDevEnv$6
3985
3985
  });
3986
3986
 
3987
3987
  let _$8 = t => t,
@@ -4084,23 +4084,23 @@ const useModelChildrenQuery = (parentId, templateId) => client.useQuery(viewType
4084
4084
  });
4085
4085
 
4086
4086
  const {
4087
- networkInterface: uri$4
4087
+ networkInterface: uri$5
4088
4088
  } = appConfig.dquery;
4089
- const cache$4 = new client.InMemoryCache();
4090
- const errorLink$3 = error.onError(handleHandler);
4089
+ const cache$5 = new client.InMemoryCache();
4090
+ const errorLink$4 = error.onError(handleHandler);
4091
4091
  /* eslint-disable no-process-env */
4092
- const isDevEnv$4 = process.env['NODE_ENV'] !== 'production';
4092
+ const isDevEnv$5 = process.env['NODE_ENV'] !== 'production';
4093
4093
  /* eslint-enable no-process-env */
4094
4094
  const link_dquery$1 = client.createHttpLink({
4095
- uri: uri$4,
4095
+ uri: uri$5,
4096
4096
  fetchOptions: {
4097
4097
  mode: 'cors'
4098
4098
  }
4099
4099
  });
4100
4100
  const dqueryClient = new client.ApolloClient({
4101
- link: client.from([errorLink$3, link_dquery$1]),
4102
- cache: cache$4,
4103
- connectToDevTools: isDevEnv$4,
4101
+ link: client.from([errorLink$4, link_dquery$1]),
4102
+ cache: cache$5,
4103
+ connectToDevTools: isDevEnv$5,
4104
4104
  queryDeduplication: true
4105
4105
  });
4106
4106
 
@@ -5422,19 +5422,19 @@ const useUpdateContentsOrderingMutation = () => client.useMutation(updateContent
5422
5422
  });
5423
5423
 
5424
5424
  const {
5425
- networkInterface: uri$3
5425
+ networkInterface: uri$4
5426
5426
  } = appConfig.showcase;
5427
- const cache$3 = new client.InMemoryCache();
5427
+ const cache$4 = new client.InMemoryCache();
5428
5428
  /* eslint-disable no-process-env */
5429
- const isDevEnv$3 = process.env['NODE_ENV'] !== 'production';
5429
+ const isDevEnv$4 = process.env['NODE_ENV'] !== 'production';
5430
5430
  /* eslint-enable no-process-env */
5431
5431
  const link$1 = new apolloLinkRest.RestLink({
5432
- uri: uri$3 || "https://api.bcrumbs.net"
5432
+ uri: uri$4 || "https://api.bcrumbs.net"
5433
5433
  });
5434
5434
  const showcaseRendererClient = new client.ApolloClient({
5435
5435
  link: link$1,
5436
- cache: cache$3,
5437
- connectToDevTools: isDevEnv$3,
5436
+ cache: cache$4,
5437
+ connectToDevTools: isDevEnv$4,
5438
5438
  queryDeduplication: true
5439
5439
  });
5440
5440
 
@@ -87474,22 +87474,22 @@ const showcaseClient = new client.ApolloClient({
87474
87474
  });
87475
87475
 
87476
87476
  const {
87477
- networkInterface: uri$2
87477
+ networkInterface: uri$3
87478
87478
  } = appConfig.core;
87479
- const authLink$2 = context.setContext(handleAuth);
87480
- const cache$2 = new client.InMemoryCache();
87481
- const errorLink$2 = error.onError(handleHandler);
87479
+ const authLink$3 = context.setContext(handleAuth);
87480
+ const cache$3 = new client.InMemoryCache();
87481
+ const errorLink$3 = error.onError(handleHandler);
87482
87482
  /* eslint-disable no-process-env */
87483
- const isDevEnv$2 = process.env['NODE_ENV'] !== 'production';
87483
+ const isDevEnv$3 = process.env['NODE_ENV'] !== 'production';
87484
87484
  /* eslint-enable no-process-env */
87485
- const httpLink = client.createHttpLink({
87486
- uri: `${uri$2}/gq`,
87485
+ const httpLink$1 = client.createHttpLink({
87486
+ uri: `${uri$3}/gq`,
87487
87487
  fetchOptions: {
87488
87488
  mode: 'cors'
87489
87489
  }
87490
87490
  });
87491
- const batchLink = new batchHttp.BatchHttpLink({
87492
- uri: `${uri$2}/gq`,
87491
+ const batchLink$1 = new batchHttp.BatchHttpLink({
87492
+ uri: `${uri$3}/gq`,
87493
87493
  batchMax: 5,
87494
87494
  // Max number of operations in a single batch
87495
87495
  batchInterval: 200,
@@ -87499,14 +87499,36 @@ const batchLink = new batchHttp.BatchHttpLink({
87499
87499
  }
87500
87500
  });
87501
87501
  // use batch link for queries and http link for mutations
87502
- const splitLink = client.split(({
87502
+ const splitLink$1 = client.split(({
87503
87503
  query
87504
87504
  }) => {
87505
87505
  const definition = utilities.getMainDefinition(query);
87506
87506
  return definition.kind === 'OperationDefinition' && definition.operation === 'query';
87507
- }, batchLink, httpLink);
87507
+ }, batchLink$1, httpLink$1);
87508
87508
  const coreClient = new client.ApolloClient({
87509
- link: client.from([authLink$2, errorLink$2, splitLink]),
87509
+ link: client.from([authLink$3, errorLink$3, splitLink$1]),
87510
+ cache: cache$3,
87511
+ connectToDevTools: isDevEnv$3,
87512
+ queryDeduplication: true
87513
+ });
87514
+
87515
+ const {
87516
+ networkInterface: uri$2
87517
+ } = appConfig.bot;
87518
+ const authLink$2 = context.setContext(handleAuth);
87519
+ const cache$2 = new client.InMemoryCache();
87520
+ const errorLink$2 = error.onError(handleHandler);
87521
+ /* eslint-disable no-process-env */
87522
+ const isDevEnv$2 = process.env['NODE_ENV'] !== 'production';
87523
+ /* eslint-enable no-process-env */
87524
+ const link_dquery = client.createHttpLink({
87525
+ uri: `${uri$2}/gq`,
87526
+ fetchOptions: {
87527
+ mode: 'cors'
87528
+ }
87529
+ });
87530
+ const botClient = new client.ApolloClient({
87531
+ link: client.from([authLink$2, errorLink$2, link_dquery]),
87510
87532
  cache: cache$2,
87511
87533
  connectToDevTools: isDevEnv$2,
87512
87534
  queryDeduplication: true
@@ -87514,21 +87536,21 @@ const coreClient = new client.ApolloClient({
87514
87536
 
87515
87537
  const {
87516
87538
  networkInterface: uri$1
87517
- } = appConfig.bot;
87539
+ } = appConfig.auth;
87518
87540
  const authLink$1 = context.setContext(handleAuth);
87519
87541
  const cache$1 = new client.InMemoryCache();
87520
87542
  const errorLink$1 = error.onError(handleHandler);
87521
87543
  /* eslint-disable no-process-env */
87522
87544
  const isDevEnv$1 = process.env['NODE_ENV'] !== 'production';
87523
87545
  /* eslint-enable no-process-env */
87524
- const link_dquery = client.createHttpLink({
87546
+ const link_auth = client.createHttpLink({
87525
87547
  uri: `${uri$1}/gq`,
87526
87548
  fetchOptions: {
87527
87549
  mode: 'cors'
87528
87550
  }
87529
87551
  });
87530
- const botClient = new client.ApolloClient({
87531
- link: client.from([authLink$1, errorLink$1, link_dquery]),
87552
+ const authClient = new client.ApolloClient({
87553
+ link: client.from([authLink$1, errorLink$1, link_auth]),
87532
87554
  cache: cache$1,
87533
87555
  connectToDevTools: isDevEnv$1,
87534
87556
  queryDeduplication: true
@@ -87536,21 +87558,35 @@ const botClient = new client.ApolloClient({
87536
87558
 
87537
87559
  const {
87538
87560
  networkInterface: uri
87539
- } = appConfig.auth;
87561
+ } = appConfig.billing;
87540
87562
  const authLink = context.setContext(handleAuth);
87541
87563
  const cache = new client.InMemoryCache();
87542
87564
  const errorLink = error.onError(handleHandler);
87543
87565
  /* eslint-disable no-process-env */
87544
87566
  const isDevEnv = process.env['NODE_ENV'] !== 'production';
87545
87567
  /* eslint-enable no-process-env */
87546
- const link_auth = client.createHttpLink({
87568
+ const httpLink = client.createHttpLink({
87547
87569
  uri: `${uri}/gq`,
87548
87570
  fetchOptions: {
87549
87571
  mode: 'cors'
87550
87572
  }
87551
87573
  });
87552
- const authClient = new client.ApolloClient({
87553
- link: client.from([authLink, errorLink, link_auth]),
87574
+ const batchLink = new batchHttp.BatchHttpLink({
87575
+ uri: `${uri}/gq`,
87576
+ batchMax: 5,
87577
+ batchInterval: 200,
87578
+ fetchOptions: {
87579
+ mode: 'cors'
87580
+ }
87581
+ });
87582
+ const splitLink = client.split(({
87583
+ query
87584
+ }) => {
87585
+ const definition = utilities.getMainDefinition(query);
87586
+ return definition.kind === 'OperationDefinition' && definition.operation === 'query';
87587
+ }, batchLink, httpLink);
87588
+ const billingClient = new client.ApolloClient({
87589
+ link: client.from([authLink, errorLink, splitLink]),
87554
87590
  cache,
87555
87591
  connectToDevTools: isDevEnv,
87556
87592
  queryDeduplication: true
@@ -87618,6 +87654,7 @@ exports.addDomain = addDomain;
87618
87654
  exports.addDomainOptions = addDomainOptions;
87619
87655
  exports.appConfig = appConfig;
87620
87656
  exports.authClient = authClient;
87657
+ exports.billingClient = billingClient;
87621
87658
  exports.botClient = botClient;
87622
87659
  exports.clearAuthData = clearAuthData;
87623
87660
  exports.companyUsersQuery = companyUsersQuery;
package/index.esm.js CHANGED
@@ -3890,9 +3890,9 @@ const redirectToLogin = () => {
3890
3890
  };
3891
3891
 
3892
3892
  const {
3893
- networkInterface: uri$5
3893
+ networkInterface: uri$6
3894
3894
  } = appConfig.dconfig;
3895
- const authLink$3 = setContext((operation_1, _a) => __awaiter(void 0, [operation_1, _a], void 0, function* (operation, {
3895
+ const authLink$4 = setContext((operation_1, _a) => __awaiter(void 0, [operation_1, _a], void 0, function* (operation, {
3896
3896
  headers
3897
3897
  }) {
3898
3898
  const currentUsertoken = yield getUserToken();
@@ -3916,8 +3916,8 @@ const authLink$3 = setContext((operation_1, _a) => __awaiter(void 0, [operation_
3916
3916
  };
3917
3917
  return resultHeaders;
3918
3918
  }));
3919
- const cache$5 = new InMemoryCache();
3920
- const errorLink$4 = onError(({
3919
+ const cache$6 = new InMemoryCache();
3920
+ const errorLink$5 = onError(({
3921
3921
  networkError
3922
3922
  }) => {
3923
3923
  if (networkError && networkError.statusCode === 401) {
@@ -3936,10 +3936,10 @@ const errorLink$4 = onError(({
3936
3936
  }
3937
3937
  });
3938
3938
  /* eslint-disable no-process-env */
3939
- const isDevEnv$5 = process.env['NODE_ENV'] !== 'production';
3939
+ const isDevEnv$6 = process.env['NODE_ENV'] !== 'production';
3940
3940
  /* eslint-enable no-process-env */
3941
3941
  const link_dconfig = new RestLink({
3942
- uri: uri$5 || 'https://api.bcrumbs.net',
3942
+ uri: uri$6 || 'https://api.bcrumbs.net',
3943
3943
  bodySerializers: {
3944
3944
  fileEncode: (data, headers) => {
3945
3945
  const formData = new FormData();
@@ -3953,9 +3953,9 @@ const link_dconfig = new RestLink({
3953
3953
  }
3954
3954
  });
3955
3955
  const dconfigClient = new ApolloClient({
3956
- link: from([authLink$3, errorLink$4, link_dconfig]),
3957
- cache: cache$5,
3958
- connectToDevTools: isDevEnv$5,
3956
+ link: from([authLink$4, errorLink$5, link_dconfig]),
3957
+ cache: cache$6,
3958
+ connectToDevTools: isDevEnv$6,
3959
3959
  queryDeduplication: true
3960
3960
  });
3961
3961
  const formSerializer = (data, headers) => {
@@ -3973,13 +3973,13 @@ const formSerializer = (data, headers) => {
3973
3973
  };
3974
3974
  };
3975
3975
  const link_dconfig_token = new RestLink({
3976
- uri: uri$5 || 'https://api.bcrumbs.net',
3976
+ uri: uri$6 || 'https://api.bcrumbs.net',
3977
3977
  defaultSerializer: formSerializer
3978
3978
  });
3979
3979
  const tokenClient = new ApolloClient({
3980
- link: from([link_dconfig_token, errorLink$4]),
3981
- cache: cache$5,
3982
- connectToDevTools: isDevEnv$5
3980
+ link: from([link_dconfig_token, errorLink$5]),
3981
+ cache: cache$6,
3982
+ connectToDevTools: isDevEnv$6
3983
3983
  });
3984
3984
 
3985
3985
  let _$8 = t => t,
@@ -4082,23 +4082,23 @@ const useModelChildrenQuery = (parentId, templateId) => useQuery(viewTypeChildre
4082
4082
  });
4083
4083
 
4084
4084
  const {
4085
- networkInterface: uri$4
4085
+ networkInterface: uri$5
4086
4086
  } = appConfig.dquery;
4087
- const cache$4 = new InMemoryCache();
4088
- const errorLink$3 = onError(handleHandler);
4087
+ const cache$5 = new InMemoryCache();
4088
+ const errorLink$4 = onError(handleHandler);
4089
4089
  /* eslint-disable no-process-env */
4090
- const isDevEnv$4 = process.env['NODE_ENV'] !== 'production';
4090
+ const isDevEnv$5 = process.env['NODE_ENV'] !== 'production';
4091
4091
  /* eslint-enable no-process-env */
4092
4092
  const link_dquery$1 = createHttpLink({
4093
- uri: uri$4,
4093
+ uri: uri$5,
4094
4094
  fetchOptions: {
4095
4095
  mode: 'cors'
4096
4096
  }
4097
4097
  });
4098
4098
  const dqueryClient = new ApolloClient({
4099
- link: from([errorLink$3, link_dquery$1]),
4100
- cache: cache$4,
4101
- connectToDevTools: isDevEnv$4,
4099
+ link: from([errorLink$4, link_dquery$1]),
4100
+ cache: cache$5,
4101
+ connectToDevTools: isDevEnv$5,
4102
4102
  queryDeduplication: true
4103
4103
  });
4104
4104
 
@@ -5420,19 +5420,19 @@ const useUpdateContentsOrderingMutation = () => useMutation(updateContentsOrderi
5420
5420
  });
5421
5421
 
5422
5422
  const {
5423
- networkInterface: uri$3
5423
+ networkInterface: uri$4
5424
5424
  } = appConfig.showcase;
5425
- const cache$3 = new InMemoryCache();
5425
+ const cache$4 = new InMemoryCache();
5426
5426
  /* eslint-disable no-process-env */
5427
- const isDevEnv$3 = process.env['NODE_ENV'] !== 'production';
5427
+ const isDevEnv$4 = process.env['NODE_ENV'] !== 'production';
5428
5428
  /* eslint-enable no-process-env */
5429
5429
  const link$1 = new RestLink({
5430
- uri: uri$3 || "https://api.bcrumbs.net"
5430
+ uri: uri$4 || "https://api.bcrumbs.net"
5431
5431
  });
5432
5432
  const showcaseRendererClient = new ApolloClient({
5433
5433
  link: link$1,
5434
- cache: cache$3,
5435
- connectToDevTools: isDevEnv$3,
5434
+ cache: cache$4,
5435
+ connectToDevTools: isDevEnv$4,
5436
5436
  queryDeduplication: true
5437
5437
  });
5438
5438
 
@@ -87472,22 +87472,22 @@ const showcaseClient = new ApolloClient({
87472
87472
  });
87473
87473
 
87474
87474
  const {
87475
- networkInterface: uri$2
87475
+ networkInterface: uri$3
87476
87476
  } = appConfig.core;
87477
- const authLink$2 = setContext(handleAuth);
87478
- const cache$2 = new InMemoryCache();
87479
- const errorLink$2 = onError(handleHandler);
87477
+ const authLink$3 = setContext(handleAuth);
87478
+ const cache$3 = new InMemoryCache();
87479
+ const errorLink$3 = onError(handleHandler);
87480
87480
  /* eslint-disable no-process-env */
87481
- const isDevEnv$2 = process.env['NODE_ENV'] !== 'production';
87481
+ const isDevEnv$3 = process.env['NODE_ENV'] !== 'production';
87482
87482
  /* eslint-enable no-process-env */
87483
- const httpLink = createHttpLink({
87484
- uri: `${uri$2}/gq`,
87483
+ const httpLink$1 = createHttpLink({
87484
+ uri: `${uri$3}/gq`,
87485
87485
  fetchOptions: {
87486
87486
  mode: 'cors'
87487
87487
  }
87488
87488
  });
87489
- const batchLink = new BatchHttpLink({
87490
- uri: `${uri$2}/gq`,
87489
+ const batchLink$1 = new BatchHttpLink({
87490
+ uri: `${uri$3}/gq`,
87491
87491
  batchMax: 5,
87492
87492
  // Max number of operations in a single batch
87493
87493
  batchInterval: 200,
@@ -87497,14 +87497,36 @@ const batchLink = new BatchHttpLink({
87497
87497
  }
87498
87498
  });
87499
87499
  // use batch link for queries and http link for mutations
87500
- const splitLink = split$1(({
87500
+ const splitLink$1 = split$1(({
87501
87501
  query
87502
87502
  }) => {
87503
87503
  const definition = getMainDefinition(query);
87504
87504
  return definition.kind === 'OperationDefinition' && definition.operation === 'query';
87505
- }, batchLink, httpLink);
87505
+ }, batchLink$1, httpLink$1);
87506
87506
  const coreClient = new ApolloClient({
87507
- link: from([authLink$2, errorLink$2, splitLink]),
87507
+ link: from([authLink$3, errorLink$3, splitLink$1]),
87508
+ cache: cache$3,
87509
+ connectToDevTools: isDevEnv$3,
87510
+ queryDeduplication: true
87511
+ });
87512
+
87513
+ const {
87514
+ networkInterface: uri$2
87515
+ } = appConfig.bot;
87516
+ const authLink$2 = setContext(handleAuth);
87517
+ const cache$2 = new InMemoryCache();
87518
+ const errorLink$2 = onError(handleHandler);
87519
+ /* eslint-disable no-process-env */
87520
+ const isDevEnv$2 = process.env['NODE_ENV'] !== 'production';
87521
+ /* eslint-enable no-process-env */
87522
+ const link_dquery = createHttpLink({
87523
+ uri: `${uri$2}/gq`,
87524
+ fetchOptions: {
87525
+ mode: 'cors'
87526
+ }
87527
+ });
87528
+ const botClient = new ApolloClient({
87529
+ link: from([authLink$2, errorLink$2, link_dquery]),
87508
87530
  cache: cache$2,
87509
87531
  connectToDevTools: isDevEnv$2,
87510
87532
  queryDeduplication: true
@@ -87512,21 +87534,21 @@ const coreClient = new ApolloClient({
87512
87534
 
87513
87535
  const {
87514
87536
  networkInterface: uri$1
87515
- } = appConfig.bot;
87537
+ } = appConfig.auth;
87516
87538
  const authLink$1 = setContext(handleAuth);
87517
87539
  const cache$1 = new InMemoryCache();
87518
87540
  const errorLink$1 = onError(handleHandler);
87519
87541
  /* eslint-disable no-process-env */
87520
87542
  const isDevEnv$1 = process.env['NODE_ENV'] !== 'production';
87521
87543
  /* eslint-enable no-process-env */
87522
- const link_dquery = createHttpLink({
87544
+ const link_auth = createHttpLink({
87523
87545
  uri: `${uri$1}/gq`,
87524
87546
  fetchOptions: {
87525
87547
  mode: 'cors'
87526
87548
  }
87527
87549
  });
87528
- const botClient = new ApolloClient({
87529
- link: from([authLink$1, errorLink$1, link_dquery]),
87550
+ const authClient = new ApolloClient({
87551
+ link: from([authLink$1, errorLink$1, link_auth]),
87530
87552
  cache: cache$1,
87531
87553
  connectToDevTools: isDevEnv$1,
87532
87554
  queryDeduplication: true
@@ -87534,21 +87556,35 @@ const botClient = new ApolloClient({
87534
87556
 
87535
87557
  const {
87536
87558
  networkInterface: uri
87537
- } = appConfig.auth;
87559
+ } = appConfig.billing;
87538
87560
  const authLink = setContext(handleAuth);
87539
87561
  const cache = new InMemoryCache();
87540
87562
  const errorLink = onError(handleHandler);
87541
87563
  /* eslint-disable no-process-env */
87542
87564
  const isDevEnv = process.env['NODE_ENV'] !== 'production';
87543
87565
  /* eslint-enable no-process-env */
87544
- const link_auth = createHttpLink({
87566
+ const httpLink = createHttpLink({
87545
87567
  uri: `${uri}/gq`,
87546
87568
  fetchOptions: {
87547
87569
  mode: 'cors'
87548
87570
  }
87549
87571
  });
87550
- const authClient = new ApolloClient({
87551
- link: from([authLink, errorLink, link_auth]),
87572
+ const batchLink = new BatchHttpLink({
87573
+ uri: `${uri}/gq`,
87574
+ batchMax: 5,
87575
+ batchInterval: 200,
87576
+ fetchOptions: {
87577
+ mode: 'cors'
87578
+ }
87579
+ });
87580
+ const splitLink = split$1(({
87581
+ query
87582
+ }) => {
87583
+ const definition = getMainDefinition(query);
87584
+ return definition.kind === 'OperationDefinition' && definition.operation === 'query';
87585
+ }, batchLink, httpLink);
87586
+ const billingClient = new ApolloClient({
87587
+ link: from([authLink, errorLink, splitLink]),
87552
87588
  cache,
87553
87589
  connectToDevTools: isDevEnv,
87554
87590
  queryDeduplication: true
@@ -87608,4 +87644,4 @@ var ModelFieldsTypes;
87608
87644
  ModelFieldsTypes["JSON"] = "JSON";
87609
87645
  })(ModelFieldsTypes || (ModelFieldsTypes = {}));
87610
87646
 
87611
- export { CreateCheckoutSessionUri, CreatePortalSessionUri, ModelFieldsTypes, ModelUtilities, VALIDATE_COMPANY_NAME, addDomain, addDomainOptions, apiBackend, apiV2Backend, appConfig, authClient, botClient, clearAuthData, companyUsersQuery, contentInstancesQuery, coreClient, createCompany, createContentInstanceMutation, createContentInstanceMutationOptions, createContentMutation, createContentMutationOptions, createFileMutation, createFolderMutation, dconfigClient, deleteFileMutation, deleteFolderMutation, dqueryClient, filesQuery, foldersTreeQuery, forgetPassword, forgetPasswordOptions, frontend, getErrorHandler, getPartner, getUserContext, getUserToken, handleAuth, handleHandler, inviteUser, inviteUserOptions, login, loginOptions, menuConfigurationQuery, portalThemeConfig, querySectionThumb, queryUsage, redirectToLogin, registeUsage, register, registerOptions, removeContentMutation, removeDomain, removeDomainOptions, removeUserFromCompany, removeUserFromCompanyOptions, resetPassword, resetPasswordOptions, setErrorHandler, showcaseClient, showcaseConfig, showcaseConfigById, showcaseConfigurationQuery, showcaseConfigurationQueryOptions, showcaseContentsQuery, showcaseContext, showcaseDomainsQuery, showcasePagesQuery, showcaseSectionQuery, showcaseSectionsQuery, showcaseTemplateSectionsThumbsMap, showcaseTemplatesQuery, showcaseTemplatesQueryOptions, subscriptionConfigurationQuery, subscriptionConfigurationQueryOptions, tokenClient, updateCompany, updateCompanyOptions, updateContentInstanceFieldValuesMutation, updateContentInstanceFieldValuesMutationOptions, updateContentsOrderingMutation, updateContentsOrderingMutationOptions, updateTemplateSectionThumb, updateUserPassword, updateUserPasswordOptions, updateUserProfile, updateUserProfileOptions, useContentInstancesQuery, useCreateCompanyMutation, useCreateContentInstanceMutation, useCreateContentMutation, useCreateFileMutation, useCreateFolderMutation, useDeleteContentMutation, useDeleteFileMutation, useDeleteFolderMutation, useDomainsQuery, useFilesQuery, useFoldersTreeQuery, useMenuConfigurationQuery, useModelChildrenQuery, useModelsQuery, usePortalThemeConfig, useQuerySectionThumb, useQueryUsage, useRegisterUsage, useShowcaseConfig, useShowcaseConfigById, useShowcaseConfigurationQuery, useShowcaseContentsQuery, useShowcaseContext, useShowcasePagesQuery, useShowcaseSectionQuery, useShowcaseSectionsQuery, useShowcaseTemplate, useShowcaseTemplateOptions, useShowcaseTemplateProgress, useShowcaseTemplateProgressQuery, useTemplateSectionsThumbsMap, useUpdateContentInstanceFieldValuesMutation, useUpdateContentsOrderingMutation, useUserCompaniesQuery, useValidateCompanyName, userCompaniesQuery, userCompaniesQueryOptions, userInfoQuery, userInfoQueryOptions, viewTypeChildrenQuery, viewTypeChildrenQueryOptions, viewTypesQuery, viewTypesQueryOptions };
87647
+ export { CreateCheckoutSessionUri, CreatePortalSessionUri, ModelFieldsTypes, ModelUtilities, VALIDATE_COMPANY_NAME, addDomain, addDomainOptions, apiBackend, apiV2Backend, appConfig, authClient, billingClient, botClient, clearAuthData, companyUsersQuery, contentInstancesQuery, coreClient, createCompany, createContentInstanceMutation, createContentInstanceMutationOptions, createContentMutation, createContentMutationOptions, createFileMutation, createFolderMutation, dconfigClient, deleteFileMutation, deleteFolderMutation, dqueryClient, filesQuery, foldersTreeQuery, forgetPassword, forgetPasswordOptions, frontend, getErrorHandler, getPartner, getUserContext, getUserToken, handleAuth, handleHandler, inviteUser, inviteUserOptions, login, loginOptions, menuConfigurationQuery, portalThemeConfig, querySectionThumb, queryUsage, redirectToLogin, registeUsage, register, registerOptions, removeContentMutation, removeDomain, removeDomainOptions, removeUserFromCompany, removeUserFromCompanyOptions, resetPassword, resetPasswordOptions, setErrorHandler, showcaseClient, showcaseConfig, showcaseConfigById, showcaseConfigurationQuery, showcaseConfigurationQueryOptions, showcaseContentsQuery, showcaseContext, showcaseDomainsQuery, showcasePagesQuery, showcaseSectionQuery, showcaseSectionsQuery, showcaseTemplateSectionsThumbsMap, showcaseTemplatesQuery, showcaseTemplatesQueryOptions, subscriptionConfigurationQuery, subscriptionConfigurationQueryOptions, tokenClient, updateCompany, updateCompanyOptions, updateContentInstanceFieldValuesMutation, updateContentInstanceFieldValuesMutationOptions, updateContentsOrderingMutation, updateContentsOrderingMutationOptions, updateTemplateSectionThumb, updateUserPassword, updateUserPasswordOptions, updateUserProfile, updateUserProfileOptions, useContentInstancesQuery, useCreateCompanyMutation, useCreateContentInstanceMutation, useCreateContentMutation, useCreateFileMutation, useCreateFolderMutation, useDeleteContentMutation, useDeleteFileMutation, useDeleteFolderMutation, useDomainsQuery, useFilesQuery, useFoldersTreeQuery, useMenuConfigurationQuery, useModelChildrenQuery, useModelsQuery, usePortalThemeConfig, useQuerySectionThumb, useQueryUsage, useRegisterUsage, useShowcaseConfig, useShowcaseConfigById, useShowcaseConfigurationQuery, useShowcaseContentsQuery, useShowcaseContext, useShowcasePagesQuery, useShowcaseSectionQuery, useShowcaseSectionsQuery, useShowcaseTemplate, useShowcaseTemplateOptions, useShowcaseTemplateProgress, useShowcaseTemplateProgressQuery, useTemplateSectionsThumbsMap, useUpdateContentInstanceFieldValuesMutation, useUpdateContentsOrderingMutation, useUserCompaniesQuery, useValidateCompanyName, userCompaniesQuery, userCompaniesQueryOptions, userInfoQuery, userInfoQueryOptions, viewTypeChildrenQuery, viewTypeChildrenQueryOptions, viewTypesQuery, viewTypesQueryOptions };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@bcrumbs.net/bc-api",
3
3
  "description": "The SDK that helps to work with Bread Crumbs APIs",
4
- "version": "0.0.45",
4
+ "version": "0.0.46",
5
5
  "keyword": [
6
6
  "bcrumbs",
7
7
  "bc-api",
package/src/index.d.ts CHANGED
@@ -14,6 +14,7 @@ export * from './lib/clients/showcaseClient';
14
14
  export * from './lib/clients/coreClient';
15
15
  export * from './lib/clients/botClient';
16
16
  export * from './lib/clients/authClient';
17
+ export * from './lib/clients/billingClient';
17
18
  export * from './lib/models/contentInstance';
18
19
  export * from './lib/models/model';
19
20
  export * from './lib/models/file';
@@ -0,0 +1,2 @@
1
+ import { ApolloClient } from '@apollo/client';
2
+ export declare const billingClient: ApolloClient<import("@apollo/client").NormalizedCacheObject>;