@vtex/api 6.48.0 → 6.48.1-beta

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.
Files changed (402) hide show
  1. package/gen/manifest.schema +0 -3
  2. package/lib/{clients/apps → HttpClient}/AppClient.d.ts +3 -3
  3. package/lib/{clients/apps → HttpClient}/AppClient.js +5 -10
  4. package/lib/{clients/apps → HttpClient}/AppGraphQLClient.d.ts +3 -3
  5. package/lib/{clients/apps → HttpClient}/AppGraphQLClient.js +5 -10
  6. package/lib/{clients/external → HttpClient}/ExternalClient.d.ts +3 -3
  7. package/lib/{clients/external → HttpClient}/ExternalClient.js +2 -9
  8. package/lib/HttpClient/GraphQLClient.d.ts +1 -2
  9. package/lib/HttpClient/GraphQLClient.js +1 -4
  10. package/lib/HttpClient/HttpClient.d.ts +5 -6
  11. package/lib/HttpClient/HttpClient.js +21 -63
  12. package/lib/{clients → HttpClient}/IOClient.d.ts +4 -4
  13. package/lib/HttpClient/IOClient.js +14 -0
  14. package/lib/{clients → HttpClient}/IOGraphQLClient.d.ts +4 -4
  15. package/lib/{clients → HttpClient}/IOGraphQLClient.js +2 -2
  16. package/lib/{clients/infra → HttpClient}/InfraClient.d.ts +3 -3
  17. package/lib/{clients/infra → HttpClient}/InfraClient.js +4 -9
  18. package/lib/{clients/janus → HttpClient}/JanusClient.d.ts +3 -3
  19. package/lib/{clients/janus → HttpClient}/JanusClient.js +3 -7
  20. package/lib/HttpClient/factories/index.d.ts +8 -0
  21. package/lib/HttpClient/factories/index.js +31 -0
  22. package/lib/HttpClient/index.d.ts +7 -1
  23. package/lib/HttpClient/index.js +7 -1
  24. package/lib/HttpClient/middlewares/cache.d.ts +2 -8
  25. package/lib/HttpClient/middlewares/cache.js +31 -120
  26. package/lib/HttpClient/middlewares/cancellationToken.d.ts +1 -1
  27. package/lib/HttpClient/middlewares/cancellationToken.js +1 -2
  28. package/lib/HttpClient/middlewares/memoization.js +1 -8
  29. package/lib/HttpClient/middlewares/metrics.js +31 -12
  30. package/lib/HttpClient/middlewares/recorder.d.ts +1 -1
  31. package/lib/HttpClient/middlewares/recorder.js +13 -16
  32. package/lib/HttpClient/middlewares/request.d.ts +10 -0
  33. package/lib/HttpClient/middlewares/request.js +87 -0
  34. package/lib/HttpClient/typings.d.ts +9 -43
  35. package/lib/IODataSource.d.ts +27 -0
  36. package/lib/IODataSource.js +46 -0
  37. package/lib/caches/LRUCache.js +1 -5
  38. package/lib/caches/LRUDiskCache.js +1 -5
  39. package/lib/clients/Apps.d.ts +84 -0
  40. package/lib/clients/Apps.js +326 -0
  41. package/lib/clients/Assets.d.ts +21 -0
  42. package/lib/clients/{infra/Assets.js → Assets.js} +19 -74
  43. package/lib/clients/Billing.d.ts +11 -0
  44. package/lib/clients/{apps/Billing.js → Billing.js} +3 -8
  45. package/lib/clients/BillingMetrics.d.ts +12 -0
  46. package/lib/clients/BillingMetrics.js +10 -0
  47. package/lib/clients/{apps/Builder.d.ts → Builder.d.ts} +11 -12
  48. package/lib/clients/{apps/Builder.js → Builder.js} +22 -49
  49. package/lib/clients/Events.d.ts +6 -0
  50. package/lib/clients/Events.js +19 -0
  51. package/lib/clients/Housekeeper.d.ts +11 -0
  52. package/lib/clients/Housekeeper.js +24 -0
  53. package/lib/clients/ID.d.ts +22 -0
  54. package/lib/clients/ID.js +48 -0
  55. package/lib/clients/IOClients.d.ts +24 -28
  56. package/lib/clients/IOClients.js +28 -35
  57. package/lib/clients/LicenseManager.d.ts +6 -0
  58. package/lib/clients/{janus/LicenseManager.js → LicenseManager.js} +8 -23
  59. package/lib/clients/Logger.d.ts +27 -0
  60. package/lib/clients/Logger.js +32 -0
  61. package/lib/clients/Messages.d.ts +18 -0
  62. package/lib/clients/Messages.js +20 -0
  63. package/lib/clients/MessagesGraphQL.d.ts +63 -0
  64. package/lib/clients/MessagesGraphQL.js +50 -0
  65. package/lib/clients/Metadata.d.ts +25 -0
  66. package/lib/clients/Metadata.js +53 -0
  67. package/lib/clients/Registry.d.ts +61 -0
  68. package/lib/clients/{infra/Registry.js → Registry.js} +33 -93
  69. package/lib/clients/Router.d.ts +33 -0
  70. package/lib/clients/Router.js +50 -0
  71. package/lib/clients/{janus/Segment.d.ts → Segment.d.ts} +11 -7
  72. package/lib/clients/Segment.js +69 -0
  73. package/lib/clients/{janus/Session.d.ts → Session.d.ts} +4 -4
  74. package/lib/clients/{janus/Session.js → Session.js} +13 -24
  75. package/lib/clients/{apps/Settings.d.ts → Settings.d.ts} +4 -5
  76. package/lib/clients/{apps/Settings.js → Settings.js} +20 -14
  77. package/lib/clients/Sphinx.d.ts +12 -0
  78. package/lib/clients/Sphinx.js +19 -0
  79. package/lib/clients/{janus/Tenant.d.ts → Tenant.d.ts} +7 -6
  80. package/lib/clients/Tenant.js +13 -0
  81. package/lib/clients/VBase.d.ts +57 -0
  82. package/lib/clients/VBase.js +116 -0
  83. package/lib/clients/Workspaces.d.ts +17 -0
  84. package/lib/clients/Workspaces.js +38 -0
  85. package/lib/clients/index.d.ts +21 -9
  86. package/lib/clients/index.js +21 -12
  87. package/lib/constants.d.ts +1 -49
  88. package/lib/constants.js +1 -54
  89. package/lib/errors/ResolverError.d.ts +1 -1
  90. package/lib/errors/ResolverError.js +2 -2
  91. package/lib/errors/ResolverWarning.d.ts +1 -1
  92. package/lib/errors/ResolverWarning.js +2 -2
  93. package/lib/index.d.ts +7 -9
  94. package/lib/index.js +6 -8
  95. package/lib/metrics/MetricsAccumulator.d.ts +18 -1
  96. package/lib/metrics/MetricsAccumulator.js +22 -38
  97. package/lib/responses.d.ts +44 -3
  98. package/lib/service/Runtime.d.ts +18 -0
  99. package/lib/service/Runtime.js +57 -0
  100. package/lib/service/{worker/runtime/Service.d.ts → Service.d.ts} +5 -5
  101. package/lib/service/{worker/runtime/Service.js → Service.js} +1 -2
  102. package/lib/service/events/index.d.ts +3 -0
  103. package/lib/service/events/index.js +21 -0
  104. package/lib/service/graphql/index.d.ts +7 -0
  105. package/lib/service/graphql/index.js +33 -0
  106. package/lib/service/graphql/middlewares/error.js +107 -0
  107. package/lib/service/graphql/middlewares/formatters.d.ts +2 -0
  108. package/lib/service/graphql/middlewares/formatters.js +64 -0
  109. package/lib/service/graphql/middlewares/query.d.ts +2 -0
  110. package/lib/service/graphql/middlewares/query.js +32 -0
  111. package/lib/service/graphql/middlewares/response.js +36 -0
  112. package/lib/service/graphql/middlewares/run.d.ts +4 -0
  113. package/lib/service/graphql/middlewares/run.js +55 -0
  114. package/lib/service/graphql/middlewares/schema.d.ts +2 -0
  115. package/lib/service/graphql/middlewares/schema.js +8 -0
  116. package/lib/service/graphql/middlewares/timings.d.ts +2 -0
  117. package/lib/service/graphql/middlewares/timings.js +10 -0
  118. package/lib/service/graphql/middlewares/upload.d.ts +7 -0
  119. package/lib/service/graphql/schema/index.d.ts +3 -0
  120. package/lib/service/graphql/schema/index.js +66 -0
  121. package/lib/service/graphql/schema/messagesLoader.d.ts +4 -0
  122. package/lib/service/graphql/schema/messagesLoader.js +41 -0
  123. package/lib/service/graphql/schema/messagesLoaderV2.d.ts +5 -0
  124. package/lib/service/graphql/schema/messagesLoaderV2.js +44 -0
  125. package/lib/service/{worker/runtime/graphql → graphql}/schema/schemaDirectives/Auth.d.ts +0 -1
  126. package/lib/service/{worker/runtime/graphql → graphql}/schema/schemaDirectives/Auth.js +10 -16
  127. package/lib/service/{worker/runtime/graphql → graphql}/schema/schemaDirectives/Sanitize.d.ts +0 -1
  128. package/lib/service/{worker/runtime/graphql → graphql}/schema/schemaDirectives/Sanitize.js +0 -6
  129. package/lib/service/{worker/runtime/graphql → graphql}/schema/schemaDirectives/SmartCacheDirective.d.ts +0 -1
  130. package/lib/service/{worker/runtime/graphql → graphql}/schema/schemaDirectives/SmartCacheDirective.js +3 -8
  131. package/lib/service/{worker/runtime/graphql/schema/schemaDirectives/TranslateTo.d.ts → graphql/schema/schemaDirectives/Translatable.d.ts} +1 -2
  132. package/lib/service/graphql/schema/schemaDirectives/Translatable.js +54 -0
  133. package/lib/service/graphql/schema/schemaDirectives/TranslatableV2.d.ts +13 -0
  134. package/lib/service/graphql/schema/schemaDirectives/TranslatableV2.js +67 -0
  135. package/lib/service/graphql/schema/schemaDirectives/index.d.ts +13 -0
  136. package/lib/service/graphql/schema/schemaDirectives/index.js +17 -0
  137. package/lib/service/graphql/schema/typeDefs/index.d.ts +16 -0
  138. package/lib/service/graphql/schema/typeDefs/index.js +21 -0
  139. package/lib/service/graphql/schema/typeDefs/ioMessage.d.ts +8 -0
  140. package/lib/service/graphql/schema/typeDefs/ioMessage.js +33 -0
  141. package/lib/service/{worker/runtime/graphql → graphql}/schema/typeDefs/sanitizedString.js +1 -5
  142. package/lib/service/graphql/typings.d.ts +21 -0
  143. package/lib/service/graphql/utils/cacheControl.d.ts +6 -0
  144. package/lib/service/graphql/utils/cacheControl.js +38 -0
  145. package/lib/service/graphql/utils/maxAgeEnum.d.ts +6 -0
  146. package/lib/service/graphql/utils/maxAgeEnum.js +17 -0
  147. package/lib/service/http/index.d.ts +3 -0
  148. package/lib/service/http/index.js +18 -0
  149. package/lib/service/http/middlewares/authTokens.d.ts +3 -0
  150. package/lib/service/http/middlewares/cancellationToken.d.ts +3 -0
  151. package/lib/service/{worker/runtime/http → http}/middlewares/cancellationToken.js +1 -2
  152. package/lib/service/http/middlewares/clients.d.ts +4 -0
  153. package/lib/service/http/middlewares/error.d.ts +3 -0
  154. package/lib/service/{worker/runtime/http → http}/middlewares/error.js +10 -19
  155. package/lib/service/{worker/runtime/http → http}/middlewares/requestStats.d.ts +3 -3
  156. package/lib/service/http/middlewares/setCookie.d.ts +3 -0
  157. package/lib/service/http/middlewares/timings.d.ts +3 -0
  158. package/lib/service/{worker/runtime/http → http}/middlewares/timings.js +8 -21
  159. package/lib/service/http/middlewares/vary.d.ts +3 -0
  160. package/lib/service/{worker/runtime/http → http}/middlewares/vary.js +3 -3
  161. package/lib/service/logger/index.d.ts +28 -2
  162. package/lib/service/logger/index.js +68 -5
  163. package/lib/service/method.d.ts +9 -0
  164. package/lib/service/{worker/runtime/typings.d.ts → typings.d.ts} +36 -70
  165. package/lib/service/utils/compose.d.ts +4 -0
  166. package/lib/service/{worker/runtime/utils → utils}/compose.js +2 -2
  167. package/lib/utils/MineWinsConflictsResolver.d.ts +4 -6
  168. package/lib/utils/MineWinsConflictsResolver.js +17 -34
  169. package/lib/utils/MineWinsConflictsResolver.test.d.ts +1 -0
  170. package/lib/utils/MineWinsConflictsResolver.test.js +134 -0
  171. package/lib/utils/app.d.ts +1 -3
  172. package/lib/utils/app.js +1 -3
  173. package/lib/utils/appsStaleIfError.d.ts +1 -1
  174. package/lib/utils/appsStaleIfError.js +2 -2
  175. package/lib/utils/billingOptions.d.ts +3 -36
  176. package/lib/utils/billingOptions.js +3 -7
  177. package/lib/utils/binding.d.ts +3 -3
  178. package/lib/utils/cancel.d.ts +2 -2
  179. package/lib/utils/cancel.js +1 -2
  180. package/lib/utils/log.d.ts +3 -1
  181. package/lib/utils/log.js +2 -2
  182. package/lib/utils/message.js +1 -4
  183. package/lib/utils/tenant.d.ts +3 -3
  184. package/lib/utils/time.d.ts +2 -4
  185. package/lib/utils/time.js +2 -9
  186. package/lib/utils/unhandled.d.ts +1 -0
  187. package/lib/{service/worker/listeners.js → utils/unhandled.js} +15 -9
  188. package/package.json +2 -2
  189. package/CHANGELOG.md +0 -1858
  190. package/lib/HttpClient/agents.d.ts +0 -3
  191. package/lib/HttpClient/agents.js +0 -24
  192. package/lib/HttpClient/middlewares/request/HttpAgentSingleton.d.ts +0 -11
  193. package/lib/HttpClient/middlewares/request/HttpAgentSingleton.js +0 -30
  194. package/lib/HttpClient/middlewares/request/index.d.ts +0 -18
  195. package/lib/HttpClient/middlewares/request/index.js +0 -84
  196. package/lib/HttpClient/middlewares/request/setupAxios/index.d.ts +0 -1
  197. package/lib/HttpClient/middlewares/request/setupAxios/index.js +0 -20
  198. package/lib/HttpClient/middlewares/request/setupAxios/interceptors/exponentialBackoff.d.ts +0 -2
  199. package/lib/HttpClient/middlewares/request/setupAxios/interceptors/exponentialBackoff.js +0 -53
  200. package/lib/HttpClient/middlewares/request/setupAxios/interceptors/index.d.ts +0 -2
  201. package/lib/HttpClient/middlewares/request/setupAxios/interceptors/index.js +0 -7
  202. package/lib/HttpClient/middlewares/request/setupAxios/interceptors/tracing/index.d.ts +0 -8
  203. package/lib/HttpClient/middlewares/request/setupAxios/interceptors/tracing/index.js +0 -53
  204. package/lib/HttpClient/middlewares/request/setupAxios/interceptors/tracing/spanSetup.d.ts +0 -4
  205. package/lib/HttpClient/middlewares/request/setupAxios/interceptors/tracing/spanSetup.js +0 -29
  206. package/lib/HttpClient/middlewares/tracing.d.ts +0 -15
  207. package/lib/HttpClient/middlewares/tracing.js +0 -56
  208. package/lib/clients/IOClient.js +0 -19
  209. package/lib/clients/apps/Billing.d.ts +0 -12
  210. package/lib/clients/apps/MessagesGraphQL.d.ts +0 -61
  211. package/lib/clients/apps/MessagesGraphQL.js +0 -121
  212. package/lib/clients/apps/catalogGraphQL/brand.d.ts +0 -13
  213. package/lib/clients/apps/catalogGraphQL/brand.js +0 -18
  214. package/lib/clients/apps/catalogGraphQL/category.d.ts +0 -11
  215. package/lib/clients/apps/catalogGraphQL/category.js +0 -16
  216. package/lib/clients/apps/catalogGraphQL/index.d.ts +0 -22
  217. package/lib/clients/apps/catalogGraphQL/index.js +0 -88
  218. package/lib/clients/apps/catalogGraphQL/product.d.ts +0 -25
  219. package/lib/clients/apps/catalogGraphQL/product.js +0 -30
  220. package/lib/clients/apps/catalogGraphQL/sku.d.ts +0 -26
  221. package/lib/clients/apps/catalogGraphQL/sku.js +0 -30
  222. package/lib/clients/apps/index.d.ts +0 -7
  223. package/lib/clients/apps/index.js +0 -12
  224. package/lib/clients/external/ID.d.ts +0 -23
  225. package/lib/clients/external/ID.js +0 -60
  226. package/lib/clients/external/Masterdata.d.ts +0 -94
  227. package/lib/clients/external/Masterdata.js +0 -224
  228. package/lib/clients/external/PaymentProvider.d.ts +0 -31
  229. package/lib/clients/external/PaymentProvider.js +0 -42
  230. package/lib/clients/external/index.d.ts +0 -4
  231. package/lib/clients/external/index.js +0 -9
  232. package/lib/clients/infra/Apps.d.ts +0 -88
  233. package/lib/clients/infra/Apps.js +0 -508
  234. package/lib/clients/infra/Assets.d.ts +0 -34
  235. package/lib/clients/infra/BillingMetrics.d.ts +0 -13
  236. package/lib/clients/infra/BillingMetrics.js +0 -15
  237. package/lib/clients/infra/Events.d.ts +0 -12
  238. package/lib/clients/infra/Events.js +0 -33
  239. package/lib/clients/infra/Housekeeper.d.ts +0 -10
  240. package/lib/clients/infra/Housekeeper.js +0 -30
  241. package/lib/clients/infra/Registry.d.ts +0 -59
  242. package/lib/clients/infra/Router.d.ts +0 -34
  243. package/lib/clients/infra/Router.js +0 -81
  244. package/lib/clients/infra/Sphinx.d.ts +0 -13
  245. package/lib/clients/infra/Sphinx.js +0 -29
  246. package/lib/clients/infra/VBase.d.ts +0 -60
  247. package/lib/clients/infra/VBase.js +0 -196
  248. package/lib/clients/infra/Workspaces.d.ts +0 -18
  249. package/lib/clients/infra/Workspaces.js +0 -65
  250. package/lib/clients/infra/index.d.ts +0 -11
  251. package/lib/clients/infra/index.js +0 -16
  252. package/lib/clients/janus/LicenseManager.d.ts +0 -7
  253. package/lib/clients/janus/Segment.js +0 -88
  254. package/lib/clients/janus/Tenant.js +0 -28
  255. package/lib/clients/janus/index.d.ts +0 -5
  256. package/lib/clients/janus/index.js +0 -10
  257. package/lib/service/index.d.ts +0 -2
  258. package/lib/service/index.js +0 -30
  259. package/lib/service/loaders.d.ts +0 -8
  260. package/lib/service/loaders.js +0 -54
  261. package/lib/service/logger/console.d.ts +0 -10
  262. package/lib/service/logger/console.js +0 -36
  263. package/lib/service/logger/logger.d.ts +0 -29
  264. package/lib/service/logger/logger.js +0 -61
  265. package/lib/service/logger/metricsLogger.d.ts +0 -40
  266. package/lib/service/logger/metricsLogger.js +0 -149
  267. package/lib/service/master.d.ts +0 -2
  268. package/lib/service/master.js +0 -87
  269. package/lib/service/metrics/requestMetricsMiddleware.d.ts +0 -2
  270. package/lib/service/metrics/requestMetricsMiddleware.js +0 -44
  271. package/lib/service/tracing/TracerSingleton.d.ts +0 -7
  272. package/lib/service/tracing/TracerSingleton.js +0 -48
  273. package/lib/service/tracing/metrics/MetricNames.d.ts +0 -60
  274. package/lib/service/tracing/metrics/MetricNames.js +0 -44
  275. package/lib/service/tracing/metrics/instruments.d.ts +0 -9
  276. package/lib/service/tracing/metrics/instruments.js +0 -11
  277. package/lib/service/tracing/metrics/measurers/EventLoopLagMeasurer.d.ts +0 -9
  278. package/lib/service/tracing/metrics/measurers/EventLoopLagMeasurer.js +0 -25
  279. package/lib/service/tracing/tracingMiddlewares.d.ts +0 -5
  280. package/lib/service/tracing/tracingMiddlewares.js +0 -107
  281. package/lib/service/worker/index.d.ts +0 -11
  282. package/lib/service/worker/index.js +0 -195
  283. package/lib/service/worker/listeners.d.ts +0 -3
  284. package/lib/service/worker/runtime/builtIn/handlers.d.ts +0 -4
  285. package/lib/service/worker/runtime/builtIn/handlers.js +0 -30
  286. package/lib/service/worker/runtime/builtIn/middlewares.d.ts +0 -4
  287. package/lib/service/worker/runtime/builtIn/middlewares.js +0 -40
  288. package/lib/service/worker/runtime/events/index.d.ts +0 -4
  289. package/lib/service/worker/runtime/events/index.js +0 -46
  290. package/lib/service/worker/runtime/events/middlewares/body.d.ts +0 -3
  291. package/lib/service/worker/runtime/events/middlewares/body.js +0 -22
  292. package/lib/service/worker/runtime/events/middlewares/context.d.ts +0 -3
  293. package/lib/service/worker/runtime/events/middlewares/context.js +0 -22
  294. package/lib/service/worker/runtime/events/router.d.ts +0 -2
  295. package/lib/service/worker/runtime/events/router.js +0 -27
  296. package/lib/service/worker/runtime/graphql/index.d.ts +0 -6
  297. package/lib/service/worker/runtime/graphql/index.js +0 -27
  298. package/lib/service/worker/runtime/graphql/middlewares/context.d.ts +0 -2
  299. package/lib/service/worker/runtime/graphql/middlewares/context.js +0 -16
  300. package/lib/service/worker/runtime/graphql/middlewares/error.js +0 -93
  301. package/lib/service/worker/runtime/graphql/middlewares/query.d.ts +0 -2
  302. package/lib/service/worker/runtime/graphql/middlewares/query.js +0 -52
  303. package/lib/service/worker/runtime/graphql/middlewares/response.js +0 -38
  304. package/lib/service/worker/runtime/graphql/middlewares/run.d.ts +0 -2
  305. package/lib/service/worker/runtime/graphql/middlewares/run.js +0 -19
  306. package/lib/service/worker/runtime/graphql/middlewares/updateSchema.d.ts +0 -4
  307. package/lib/service/worker/runtime/graphql/middlewares/updateSchema.js +0 -28
  308. package/lib/service/worker/runtime/graphql/middlewares/upload.d.ts +0 -4
  309. package/lib/service/worker/runtime/graphql/schema/index.d.ts +0 -7
  310. package/lib/service/worker/runtime/graphql/schema/index.js +0 -31
  311. package/lib/service/worker/runtime/graphql/schema/messagesLoaderV2.d.ts +0 -6
  312. package/lib/service/worker/runtime/graphql/schema/messagesLoaderV2.js +0 -79
  313. package/lib/service/worker/runtime/graphql/schema/schemaDirectives/CacheControl.d.ts +0 -7
  314. package/lib/service/worker/runtime/graphql/schema/schemaDirectives/CacheControl.js +0 -37
  315. package/lib/service/worker/runtime/graphql/schema/schemaDirectives/Deprecated.d.ts +0 -11
  316. package/lib/service/worker/runtime/graphql/schema/schemaDirectives/Deprecated.js +0 -61
  317. package/lib/service/worker/runtime/graphql/schema/schemaDirectives/Metric.d.ts +0 -7
  318. package/lib/service/worker/runtime/graphql/schema/schemaDirectives/Metric.js +0 -40
  319. package/lib/service/worker/runtime/graphql/schema/schemaDirectives/Settings.d.ts +0 -6
  320. package/lib/service/worker/runtime/graphql/schema/schemaDirectives/Settings.js +0 -34
  321. package/lib/service/worker/runtime/graphql/schema/schemaDirectives/TranslatableV2.d.ts +0 -7
  322. package/lib/service/worker/runtime/graphql/schema/schemaDirectives/TranslatableV2.js +0 -39
  323. package/lib/service/worker/runtime/graphql/schema/schemaDirectives/TranslateTo.js +0 -33
  324. package/lib/service/worker/runtime/graphql/schema/schemaDirectives/index.d.ts +0 -22
  325. package/lib/service/worker/runtime/graphql/schema/schemaDirectives/index.js +0 -36
  326. package/lib/service/worker/runtime/graphql/schema/typeDefs/index.d.ts +0 -7
  327. package/lib/service/worker/runtime/graphql/schema/typeDefs/index.js +0 -12
  328. package/lib/service/worker/runtime/graphql/typings.d.ts +0 -31
  329. package/lib/service/worker/runtime/graphql/utils/cacheControl.d.ts +0 -1
  330. package/lib/service/worker/runtime/graphql/utils/cacheControl.js +0 -32
  331. package/lib/service/worker/runtime/graphql/utils/error.d.ts +0 -1
  332. package/lib/service/worker/runtime/graphql/utils/error.js +0 -76
  333. package/lib/service/worker/runtime/graphql/utils/translations.d.ts +0 -14
  334. package/lib/service/worker/runtime/graphql/utils/translations.js +0 -38
  335. package/lib/service/worker/runtime/http/index.d.ts +0 -5
  336. package/lib/service/worker/runtime/http/index.js +0 -58
  337. package/lib/service/worker/runtime/http/middlewares/authTokens.d.ts +0 -3
  338. package/lib/service/worker/runtime/http/middlewares/cancellationToken.d.ts +0 -3
  339. package/lib/service/worker/runtime/http/middlewares/clients.d.ts +0 -4
  340. package/lib/service/worker/runtime/http/middlewares/context.d.ts +0 -4
  341. package/lib/service/worker/runtime/http/middlewares/context.js +0 -36
  342. package/lib/service/worker/runtime/http/middlewares/error.d.ts +0 -2
  343. package/lib/service/worker/runtime/http/middlewares/rateLimit.d.ts +0 -6
  344. package/lib/service/worker/runtime/http/middlewares/rateLimit.js +0 -42
  345. package/lib/service/worker/runtime/http/middlewares/setCookie.d.ts +0 -3
  346. package/lib/service/worker/runtime/http/middlewares/settings.d.ts +0 -9
  347. package/lib/service/worker/runtime/http/middlewares/settings.js +0 -44
  348. package/lib/service/worker/runtime/http/middlewares/timings.d.ts +0 -3
  349. package/lib/service/worker/runtime/http/middlewares/vary.d.ts +0 -3
  350. package/lib/service/worker/runtime/http/router.d.ts +0 -2
  351. package/lib/service/worker/runtime/http/router.js +0 -23
  352. package/lib/service/worker/runtime/http/routes.d.ts +0 -19
  353. package/lib/service/worker/runtime/http/routes.js +0 -12
  354. package/lib/service/worker/runtime/method.d.ts +0 -9
  355. package/lib/service/worker/runtime/statusTrack.d.ts +0 -14
  356. package/lib/service/worker/runtime/statusTrack.js +0 -37
  357. package/lib/service/worker/runtime/utils/compose.d.ts +0 -5
  358. package/lib/service/worker/runtime/utils/context.d.ts +0 -2
  359. package/lib/service/worker/runtime/utils/context.js +0 -40
  360. package/lib/service/worker/runtime/utils/diff.d.ts +0 -12
  361. package/lib/service/worker/runtime/utils/diff.js +0 -21
  362. package/lib/service/worker/runtime/utils/recorder.d.ts +0 -8
  363. package/lib/service/worker/runtime/utils/recorder.js +0 -37
  364. package/lib/service/worker/runtime/utils/tokenBucket.d.ts +0 -2
  365. package/lib/service/worker/runtime/utils/tokenBucket.js +0 -16
  366. package/lib/tracing/LogEvents.d.ts +0 -31
  367. package/lib/tracing/LogEvents.js +0 -3
  368. package/lib/tracing/LogFields.d.ts +0 -66
  369. package/lib/tracing/LogFields.js +0 -3
  370. package/lib/tracing/Tags.d.ts +0 -81
  371. package/lib/tracing/Tags.js +0 -7
  372. package/lib/tracing/UserLandTracer.d.ts +0 -27
  373. package/lib/tracing/UserLandTracer.js +0 -56
  374. package/lib/tracing/errorReporting/ErrorReport.d.ts +0 -31
  375. package/lib/tracing/errorReporting/ErrorReport.js +0 -70
  376. package/lib/tracing/index.d.ts +0 -9
  377. package/lib/tracing/index.js +0 -19
  378. package/lib/tracing/spanReference/SpanReferenceTypes.d.ts +0 -4
  379. package/lib/tracing/spanReference/SpanReferenceTypes.js +0 -7
  380. package/lib/tracing/spanReference/createSpanReference.d.ts +0 -3
  381. package/lib/tracing/spanReference/createSpanReference.js +0 -8
  382. package/lib/tracing/utils.d.ts +0 -13
  383. package/lib/tracing/utils.js +0 -40
  384. package/lib/utils/conflicts.mock.d.ts +0 -17
  385. package/lib/utils/conflicts.mock.js +0 -27
  386. /package/lib/service/{worker/runtime/graphql → graphql}/middlewares/error.d.ts +0 -0
  387. /package/lib/service/{worker/runtime/graphql → graphql}/middlewares/response.d.ts +0 -0
  388. /package/lib/service/{worker/runtime/graphql → graphql}/middlewares/upload.js +0 -0
  389. /package/lib/service/{worker/runtime/graphql → graphql}/schema/typeDefs/ioUpload.d.ts +0 -0
  390. /package/lib/service/{worker/runtime/graphql → graphql}/schema/typeDefs/ioUpload.js +0 -0
  391. /package/lib/service/{worker/runtime/graphql → graphql}/schema/typeDefs/sanitizedString.d.ts +0 -0
  392. /package/lib/service/{worker/runtime/graphql → graphql}/typings.js +0 -0
  393. /package/lib/service/{worker/runtime/utils/toArray.d.ts → graphql/utils/array.d.ts} +0 -0
  394. /package/lib/service/{worker/runtime/utils/toArray.js → graphql/utils/array.js} +0 -0
  395. /package/lib/service/{worker/runtime/graphql → graphql}/utils/pathname.d.ts +0 -0
  396. /package/lib/service/{worker/runtime/graphql → graphql}/utils/pathname.js +0 -0
  397. /package/lib/service/{worker/runtime/http → http}/middlewares/authTokens.js +0 -0
  398. /package/lib/service/{worker/runtime/http → http}/middlewares/clients.js +0 -0
  399. /package/lib/service/{worker/runtime/http → http}/middlewares/requestStats.js +0 -0
  400. /package/lib/service/{worker/runtime/http → http}/middlewares/setCookie.js +0 -0
  401. /package/lib/service/{worker/runtime/method.js → method.js} +0 -0
  402. /package/lib/service/{worker/runtime/typings.js → typings.js} +0 -0
@@ -1,121 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const ramda_1 = require("ramda");
4
- const AppGraphQLClient_1 = require("./AppGraphQLClient");
5
- const MAX_BATCH_SIZE = 500;
6
- class MessagesGraphQL extends AppGraphQLClient_1.AppGraphQLClient {
7
- constructor(vtex, options) {
8
- super('vtex.messages@1.x', vtex, options);
9
- }
10
- translateV2(args, tracingConfig) {
11
- const { indexedByFrom, ...rest } = args;
12
- const allMessages = indexedByFrom.reduce((acc, { from, messages }) => {
13
- return acc.concat(messages.map(message => ({ from, message })));
14
- }, []);
15
- const batchedMessages = ramda_1.splitEvery(MAX_BATCH_SIZE, allMessages);
16
- const metric = 'messages-translate-v2';
17
- return Promise.all(batchedMessages.map(batch => {
18
- const indexedBatch = batch.reduce((acc, { from, message }) => {
19
- if (!acc[from]) {
20
- acc[from] = {
21
- from,
22
- messages: [],
23
- };
24
- }
25
- acc[from].messages.push(message);
26
- return acc;
27
- }, {});
28
- const batchArgs = {
29
- ...rest,
30
- indexedByFrom: ramda_1.values(indexedBatch),
31
- };
32
- return this.graphql.query({
33
- query: `
34
- query Translate($args: TranslateArgs!) {
35
- translate(args: $args)
36
- }
37
- `,
38
- variables: { args: batchArgs },
39
- }, {
40
- metric,
41
- tracing: {
42
- requestSpanNameSuffix: metric,
43
- ...tracingConfig === null || tracingConfig === void 0 ? void 0 : tracingConfig.tracing,
44
- },
45
- }).then(ramda_1.path(['data', 'translate']));
46
- })).then(ramda_1.flatten);
47
- }
48
- async translate(args, tracingConfig) {
49
- const metric = 'messages-translate-v2';
50
- const response = await this.graphql.query({
51
- query: `query Translate($args: TranslateArgs!) {
52
- translate(args: $args)
53
- }`,
54
- variables: { args },
55
- }, {
56
- metric,
57
- tracing: {
58
- requestSpanNameSuffix: metric,
59
- ...tracingConfig === null || tracingConfig === void 0 ? void 0 : tracingConfig.tracing,
60
- },
61
- });
62
- return response.data.translate;
63
- }
64
- async translateWithDependencies(args, tracingConfig) {
65
- const metric = 'messages-translate-with-deps-v2';
66
- const response = await this.graphql.query({
67
- query: `query TranslateWithDeps($args: TranslateWithDependenciesArgs!) {
68
- translateWithDependencies(args: $args)
69
- }`,
70
- variables: { args },
71
- }, {
72
- metric,
73
- tracing: {
74
- requestSpanNameSuffix: metric,
75
- ...tracingConfig === null || tracingConfig === void 0 ? void 0 : tracingConfig.tracing,
76
- },
77
- });
78
- return response.data.translateWithDependencies;
79
- }
80
- async saveV2(args, tracingConfig) {
81
- const metric = 'messages-saveV2-translation';
82
- const response = await this.graphql.mutate({
83
- mutate: `mutation SaveV2($args: SaveArgsV2!) {
84
- saveV2(args: $args)
85
- }`,
86
- variables: { args },
87
- }, {
88
- metric,
89
- tracing: {
90
- requestSpanNameSuffix: metric,
91
- ...tracingConfig === null || tracingConfig === void 0 ? void 0 : tracingConfig.tracing,
92
- },
93
- });
94
- return response.data.saveV2;
95
- }
96
- async userTranslations(args, tracingConfig) {
97
- const metric = 'messages-user-translations';
98
- const response = await this.graphql.query({
99
- query: `query UserTranslations($args: IndexedMessages!){
100
- userTranslations(args: $args) {
101
- srcLang
102
- groupContext
103
- context
104
- translations {
105
- lang
106
- translation
107
- }
108
- }
109
- }`,
110
- variables: { args },
111
- }, {
112
- metric,
113
- tracing: {
114
- requestSpanNameSuffix: metric,
115
- ...tracingConfig === null || tracingConfig === void 0 ? void 0 : tracingConfig.tracing,
116
- },
117
- });
118
- return response.data.userTranslations;
119
- }
120
- }
121
- exports.MessagesGraphQL = MessagesGraphQL;
@@ -1,13 +0,0 @@
1
- export declare const query = "\nquery GetBrand($id: ID!) {\n brand (id: $id) {\n id\n name\n text\n keywords\n siteTitle\n active\n menuHome\n adWordsRemarketingCode\n lomadeeCampaignCode\n score\n }\n}\n";
2
- export interface Brand {
3
- id: string;
4
- name: string;
5
- text?: string;
6
- keywords?: string[];
7
- siteTitle?: string;
8
- active: boolean;
9
- menuHome: boolean;
10
- adWordsRemarketingCode?: string;
11
- lomadeeCampaignCode?: string;
12
- score?: number;
13
- }
@@ -1,18 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.query = `
4
- query GetBrand($id: ID!) {
5
- brand (id: $id) {
6
- id
7
- name
8
- text
9
- keywords
10
- siteTitle
11
- active
12
- menuHome
13
- adWordsRemarketingCode
14
- lomadeeCampaignCode
15
- score
16
- }
17
- }
18
- `;
@@ -1,11 +0,0 @@
1
- export declare const query = "\nquery GetCategory($id: ID!) {\n category (id: $id) {\n id\n name\n title\n parentCategoryId\n description\n isActive\n globalCategoryId\n score\n }\n}\n";
2
- export interface Category {
3
- id: string;
4
- name: string;
5
- title?: string;
6
- parentCategoryId?: string;
7
- description?: string;
8
- isActive: boolean;
9
- globalCategoryId: number;
10
- score?: number;
11
- }
@@ -1,16 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.query = `
4
- query GetCategory($id: ID!) {
5
- category (id: $id) {
6
- id
7
- name
8
- title
9
- parentCategoryId
10
- description
11
- isActive
12
- globalCategoryId
13
- score
14
- }
15
- }
16
- `;
@@ -1,22 +0,0 @@
1
- import { AppGraphQLClient } from '..';
2
- import { InstanceOptions, IOContext } from '../../..';
3
- import { RequestTracingConfig } from '../../../HttpClient';
4
- import { Brand } from './brand';
5
- import { Category } from './category';
6
- import { Product } from './product';
7
- import { SKU } from './sku';
8
- export declare class CatalogGraphQL extends AppGraphQLClient {
9
- constructor(ctx: IOContext, opts?: InstanceOptions);
10
- sku: (id: string, tracingConfig?: RequestTracingConfig | undefined) => Promise<{
11
- sku: SKU;
12
- } | undefined>;
13
- product: (id: string, tracingConfig?: RequestTracingConfig | undefined) => Promise<{
14
- product: Product;
15
- } | undefined>;
16
- category: (id: string, tracingConfig?: RequestTracingConfig | undefined) => Promise<{
17
- category: Category;
18
- } | undefined>;
19
- brand: (id: string, tracingConfig?: RequestTracingConfig | undefined) => Promise<{
20
- brand: Brand;
21
- } | undefined>;
22
- }
@@ -1,88 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const ramda_1 = require("ramda");
4
- const __1 = require("..");
5
- const brand_1 = require("./brand");
6
- const category_1 = require("./category");
7
- const product_1 = require("./product");
8
- const sku_1 = require("./sku");
9
- class CatalogGraphQL extends __1.AppGraphQLClient {
10
- constructor(ctx, opts) {
11
- super('vtex.catalog-graphql@1.x', ctx, {
12
- ...opts,
13
- headers: {
14
- ...opts && opts.headers,
15
- cookie: `VtexIdclientAutCookie=${ctx.authToken}`,
16
- }
17
- });
18
- this.sku = (id, tracingConfig) => {
19
- const variables = {
20
- identifier: {
21
- field: 'id',
22
- value: id,
23
- },
24
- };
25
- return this.graphql
26
- .query({
27
- inflight: true,
28
- query: sku_1.query,
29
- variables,
30
- }, {
31
- forceMaxAge: 5,
32
- tracing: {
33
- requestSpanNameSuffix: 'catalog-sku',
34
- ...tracingConfig === null || tracingConfig === void 0 ? void 0 : tracingConfig.tracing,
35
- },
36
- })
37
- .then(ramda_1.prop('data'));
38
- };
39
- this.product = (id, tracingConfig) => {
40
- const variables = {
41
- identifier: {
42
- field: 'id',
43
- value: id,
44
- },
45
- };
46
- return this.graphql
47
- .query({
48
- inflight: true,
49
- query: product_1.query,
50
- variables,
51
- }, {
52
- forceMaxAge: 5,
53
- tracing: {
54
- requestSpanNameSuffix: 'catalog-product',
55
- ...tracingConfig === null || tracingConfig === void 0 ? void 0 : tracingConfig.tracing,
56
- },
57
- })
58
- .then(ramda_1.prop('data'));
59
- };
60
- this.category = (id, tracingConfig) => this.graphql
61
- .query({
62
- inflight: true,
63
- query: category_1.query,
64
- variables: { id },
65
- }, {
66
- forceMaxAge: 5,
67
- tracing: {
68
- requestSpanNameSuffix: 'catalog-category',
69
- ...tracingConfig === null || tracingConfig === void 0 ? void 0 : tracingConfig.tracing,
70
- },
71
- })
72
- .then(ramda_1.prop('data'));
73
- this.brand = (id, tracingConfig) => this.graphql
74
- .query({
75
- inflight: true,
76
- query: brand_1.query,
77
- variables: { id },
78
- }, {
79
- forceMaxAge: 5,
80
- tracing: {
81
- requestSpanNameSuffix: 'catalog-brand',
82
- ...tracingConfig === null || tracingConfig === void 0 ? void 0 : tracingConfig.tracing,
83
- },
84
- })
85
- .then(ramda_1.prop('data'));
86
- }
87
- }
88
- exports.CatalogGraphQL = CatalogGraphQL;
@@ -1,25 +0,0 @@
1
- export declare const query = "\nquery GetProduct ($identifier: ProductUniqueIdentifier!) {\n product (identifier: $identifier) {\n id\n brandId\n categoryId\n departmentId\n name\n linkId\n refId\n isVisible\n description\n shortDescription\n releaseDate\n keywords\n title\n isActive\n taxCode\n metaTagDescription\n supplierId\n showWithoutStock\n score\n salesChannel {\n id\n }\n }\n}\n";
2
- export interface Product {
3
- id: string;
4
- brandId: string;
5
- categoryId: string;
6
- departmentId: string;
7
- name: string;
8
- linkId: string;
9
- refId?: string;
10
- isVisible: boolean;
11
- description?: string;
12
- shortDescription?: string;
13
- releaseDate?: string;
14
- keywords: string[];
15
- title?: string;
16
- isActive: boolean;
17
- taxCode?: string;
18
- metaTagDescription?: string;
19
- supplierId?: string;
20
- showWithoutStock: boolean;
21
- score?: number;
22
- salesChannel?: Array<{
23
- id: string;
24
- }>;
25
- }
@@ -1,30 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.query = `
4
- query GetProduct ($identifier: ProductUniqueIdentifier!) {
5
- product (identifier: $identifier) {
6
- id
7
- brandId
8
- categoryId
9
- departmentId
10
- name
11
- linkId
12
- refId
13
- isVisible
14
- description
15
- shortDescription
16
- releaseDate
17
- keywords
18
- title
19
- isActive
20
- taxCode
21
- metaTagDescription
22
- supplierId
23
- showWithoutStock
24
- score
25
- salesChannel {
26
- id
27
- }
28
- }
29
- }
30
- `;
@@ -1,26 +0,0 @@
1
- export declare const query = "\nquery GetSKU ($identifier: SKUUniqueIdentifier!) {\n sku (identifier: $identifier) {\n id\n productId\n isActive\n name\n height\n length\n width\n weightKg\n packagedHeight\n packagedWidth\n packagedLength\n packagedWeightKg\n cubicWeight\n isKit\n creationDate\n rewardValue\n manufacturerCode\n commercialConditionId\n measurementUnit\n unitMultiplier\n modalType\n kitItensSellApart\n }\n}\n";
2
- export interface SKU {
3
- id: string;
4
- productId: string;
5
- isActive: boolean;
6
- name: string;
7
- height?: number;
8
- length?: number;
9
- width?: number;
10
- weightKg?: number;
11
- packagedHeight?: number;
12
- packagedWidth?: number;
13
- packagedLength?: number;
14
- packagedWeightKg?: number;
15
- cubicWeight: number;
16
- isKit: boolean;
17
- creationDate: string;
18
- rewardValue?: number;
19
- estimatedDateArrival?: string;
20
- manufacturerCode: string;
21
- commercialConditionId: string;
22
- measurementUnit: string;
23
- unitMultiplier: number;
24
- modalType?: string;
25
- kitItensSellApart: boolean;
26
- }
@@ -1,30 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.query = `
4
- query GetSKU ($identifier: SKUUniqueIdentifier!) {
5
- sku (identifier: $identifier) {
6
- id
7
- productId
8
- isActive
9
- name
10
- height
11
- length
12
- width
13
- weightKg
14
- packagedHeight
15
- packagedWidth
16
- packagedLength
17
- packagedWeightKg
18
- cubicWeight
19
- isKit
20
- creationDate
21
- rewardValue
22
- manufacturerCode
23
- commercialConditionId
24
- measurementUnit
25
- unitMultiplier
26
- modalType
27
- kitItensSellApart
28
- }
29
- }
30
- `;
@@ -1,7 +0,0 @@
1
- export * from './AppClient';
2
- export * from './AppGraphQLClient';
3
- export * from './Billing';
4
- export * from './Builder';
5
- export * from './MessagesGraphQL';
6
- export * from './Settings';
7
- export * from './catalogGraphQL';
@@ -1,12 +0,0 @@
1
- "use strict";
2
- function __export(m) {
3
- for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];
4
- }
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- __export(require("./AppClient"));
7
- __export(require("./AppGraphQLClient"));
8
- __export(require("./Billing"));
9
- __export(require("./Builder"));
10
- __export(require("./MessagesGraphQL"));
11
- __export(require("./Settings"));
12
- __export(require("./catalogGraphQL"));
@@ -1,23 +0,0 @@
1
- import { InstanceOptions, RequestTracingConfig } from '../../HttpClient';
2
- import { IOContext } from '../../service/worker/runtime/typings';
3
- import { ExternalClient } from './ExternalClient';
4
- export declare class ID extends ExternalClient {
5
- constructor(context: IOContext, opts?: InstanceOptions);
6
- getTemporaryToken: (tracingConfig?: RequestTracingConfig | undefined) => Promise<string>;
7
- sendCodeToEmail: (token: string, email: string, tracingConfig?: RequestTracingConfig | undefined) => Promise<any>;
8
- getEmailCodeAuthenticationToken: (token: string, email: string, code: string, tracingConfig?: RequestTracingConfig | undefined) => Promise<AuthenticationResponse>;
9
- getPasswordAuthenticationToken: (token: string, email: string, password: string, tracingConfig?: RequestTracingConfig | undefined) => Promise<AuthenticationResponse>;
10
- }
11
- export interface AuthenticationResponse {
12
- promptMFA: boolean;
13
- clientToken: any;
14
- authCookie: {
15
- Name: string;
16
- Value: string;
17
- };
18
- accountAuthCookie: any;
19
- expiresIn: number;
20
- userId: string;
21
- phoneNumber: string;
22
- scope: any;
23
- }
@@ -1,60 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const ExternalClient_1 = require("./ExternalClient");
4
- const routes = {
5
- SEND: '/accesskey/send',
6
- START: '/start',
7
- VALIDATE: '/accesskey/validate',
8
- VALIDATE_CLASSIC: '/classic/validate',
9
- };
10
- const VTEXID_ENDPOINTS = {
11
- STABLE: 'https://vtexid.vtex.com.br/api/vtexid/pub/authentication',
12
- };
13
- const endpoint = (env) => {
14
- return VTEXID_ENDPOINTS[env] || env;
15
- };
16
- class ID extends ExternalClient_1.ExternalClient {
17
- constructor(context, opts) {
18
- super(endpoint(VTEXID_ENDPOINTS.STABLE), context, opts);
19
- this.getTemporaryToken = (tracingConfig) => {
20
- const metric = 'vtexid-temp-token';
21
- return this.http.get(routes.START, { metric, tracing: {
22
- requestSpanNameSuffix: metric,
23
- ...tracingConfig === null || tracingConfig === void 0 ? void 0 : tracingConfig.tracing,
24
- } }).then(({ authenticationToken }) => authenticationToken);
25
- };
26
- this.sendCodeToEmail = (token, email, tracingConfig) => {
27
- const params = { authenticationToken: token, email };
28
- const metric = 'vtexid-send-code';
29
- return this.http.get(routes.SEND, { metric, params, tracing: {
30
- requestSpanNameSuffix: metric,
31
- ...tracingConfig === null || tracingConfig === void 0 ? void 0 : tracingConfig.tracing,
32
- } });
33
- };
34
- this.getEmailCodeAuthenticationToken = (token, email, code, tracingConfig) => {
35
- const params = {
36
- accesskey: code,
37
- authenticationToken: token,
38
- login: email,
39
- };
40
- const metric = 'vtexid-email-token';
41
- return this.http.get(routes.VALIDATE, { metric, params, tracing: {
42
- requestSpanNameSuffix: metric,
43
- ...tracingConfig === null || tracingConfig === void 0 ? void 0 : tracingConfig.tracing,
44
- } });
45
- };
46
- this.getPasswordAuthenticationToken = (token, email, password, tracingConfig) => {
47
- const params = {
48
- authenticationToken: token,
49
- login: email,
50
- password,
51
- };
52
- const metric = 'vtexid-pass-token';
53
- return this.http.get(routes.VALIDATE_CLASSIC, { metric, params, tracing: {
54
- requestSpanNameSuffix: metric,
55
- ...tracingConfig === null || tracingConfig === void 0 ? void 0 : tracingConfig.tracing,
56
- } });
57
- };
58
- }
59
- }
60
- exports.ID = ID;
@@ -1,94 +0,0 @@
1
- import { InstanceOptions, IOContext, RequestTracingConfig } from '../..';
2
- import { ExternalClient } from './ExternalClient';
3
- export declare class MasterData extends ExternalClient {
4
- constructor(ctx: IOContext, options?: InstanceOptions);
5
- getSchema<T>({ dataEntity, schema }: GetSchemaInput, tracingConfig?: RequestTracingConfig): Promise<T>;
6
- createOrUpdateSchema<T>({ dataEntity, schemaName, schemaBody }: CreateSchemaInput, tracingConfig?: RequestTracingConfig): Promise<T>;
7
- getPublicSchema<T>({ dataEntity, schema }: GetSchemaInput, tracingConfig?: RequestTracingConfig): Promise<T>;
8
- getDocument<T>({ dataEntity, id, fields }: GetDocumentInput, tracingConfig?: RequestTracingConfig): Promise<T>;
9
- createDocument({ dataEntity, fields, schema }: CreateDocumentInput, tracingConfig?: RequestTracingConfig): Promise<DocumentResponse>;
10
- createOrUpdateEntireDocument({ dataEntity, fields, id, schema }: CreateOrUpdateInput, tracingConfig?: RequestTracingConfig): Promise<DocumentResponse>;
11
- createOrUpdatePartialDocument({ dataEntity, fields, id, schema }: CreateOrUpdateInput, tracingConfig?: RequestTracingConfig): Promise<DocumentResponse>;
12
- updateEntireDocument({ dataEntity, id, fields, schema }: UpdateInput, tracingConfig?: RequestTracingConfig): Promise<void>;
13
- updatePartialDocument({ dataEntity, id, fields, schema }: UpdateInput, tracingConfig?: RequestTracingConfig): Promise<void>;
14
- searchDocuments<T>({ dataEntity, fields, where, pagination, schema, sort }: SearchInput, tracingConfig?: RequestTracingConfig): Promise<T[]>;
15
- searchDocumentsWithPaginationInfo<T>({ dataEntity, fields, where, pagination, schema, sort }: SearchInput, tracingConfig?: RequestTracingConfig): Promise<{
16
- data: T[];
17
- pagination: {
18
- total: number;
19
- page: number;
20
- pageSize: number;
21
- };
22
- }>;
23
- scrollDocuments<T>({ dataEntity, fields, where, mdToken, schema, size, sort }: ScrollInput, tracingConfig?: RequestTracingConfig): Promise<{
24
- mdToken: string;
25
- data: ScrollResponse<T>;
26
- }>;
27
- deleteDocument({ dataEntity, id }: DeleteInput, tracingConfig?: RequestTracingConfig): Promise<import("../..").IOResponse<void>>;
28
- }
29
- interface PaginationArgs {
30
- page: number;
31
- pageSize: number;
32
- }
33
- interface DocumentResponse {
34
- Id: string;
35
- Href: string;
36
- DocumentId: string;
37
- }
38
- interface GetSchemaInput {
39
- dataEntity: string;
40
- schema: string;
41
- }
42
- interface CreateSchemaInput {
43
- dataEntity: string;
44
- schemaName: string;
45
- schemaBody: object;
46
- }
47
- interface GetDocumentInput {
48
- dataEntity: string;
49
- id: string;
50
- fields: string[];
51
- }
52
- interface CreateDocumentInput {
53
- dataEntity: string;
54
- fields: object;
55
- schema?: string;
56
- }
57
- interface CreateOrUpdateInput {
58
- dataEntity: string;
59
- fields: object;
60
- id?: string;
61
- schema?: string;
62
- }
63
- interface UpdateInput {
64
- dataEntity: string;
65
- id: string;
66
- fields: object;
67
- schema?: string;
68
- }
69
- interface SearchInput {
70
- dataEntity: string;
71
- fields: string[];
72
- where?: string;
73
- pagination: PaginationArgs;
74
- schema?: string;
75
- sort?: string;
76
- }
77
- interface ScrollInput {
78
- dataEntity: string;
79
- fields: string[];
80
- where?: string;
81
- schema?: string;
82
- sort?: string;
83
- size?: number;
84
- mdToken?: string;
85
- }
86
- interface DeleteInput {
87
- dataEntity: string;
88
- id: string;
89
- }
90
- interface ScrollResponse<T> {
91
- data: T[];
92
- mdToken: string;
93
- }
94
- export {};