ce-storefront 0.8.2 → 0.9.0

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 (189) hide show
  1. package/README.md +53 -0
  2. package/bin/mcp-server.js +1672 -123
  3. package/bin/mcp-server.js.map +43 -13
  4. package/docs/sdks/auth/README.md +10 -10
  5. package/docs/sdks/carts/README.md +10 -0
  6. package/docs/sdks/customers/README.md +22 -22
  7. package/docs/sdks/kyc/README.md +547 -0
  8. package/esm/funcs/authGetAnonymousToken.js +1 -1
  9. package/esm/funcs/authGetAnonymousToken.js.map +1 -1
  10. package/esm/funcs/kycCreateDocument.d.ts +16 -0
  11. package/esm/funcs/kycCreateDocument.d.ts.map +1 -0
  12. package/esm/funcs/kycCreateDocument.js +106 -0
  13. package/esm/funcs/kycCreateDocument.js.map +1 -0
  14. package/esm/funcs/kycDeleteDocument.d.ts +16 -0
  15. package/esm/funcs/kycDeleteDocument.d.ts.map +1 -0
  16. package/esm/funcs/kycDeleteDocument.js +85 -0
  17. package/esm/funcs/kycDeleteDocument.js.map +1 -0
  18. package/esm/funcs/kycGetDocument.d.ts +16 -0
  19. package/esm/funcs/kycGetDocument.d.ts.map +1 -0
  20. package/esm/funcs/kycGetDocument.js +85 -0
  21. package/esm/funcs/kycGetDocument.js.map +1 -0
  22. package/esm/funcs/kycListDocumentType.d.ts +16 -0
  23. package/esm/funcs/kycListDocumentType.d.ts.map +1 -0
  24. package/esm/funcs/kycListDocumentType.js +66 -0
  25. package/esm/funcs/kycListDocumentType.js.map +1 -0
  26. package/esm/funcs/kycListDocuments.d.ts +16 -0
  27. package/esm/funcs/kycListDocuments.d.ts.map +1 -0
  28. package/esm/funcs/kycListDocuments.js +81 -0
  29. package/esm/funcs/kycListDocuments.js.map +1 -0
  30. package/esm/funcs/kycUpdateDocument.d.ts +16 -0
  31. package/esm/funcs/kycUpdateDocument.d.ts.map +1 -0
  32. package/esm/funcs/kycUpdateDocument.js +111 -0
  33. package/esm/funcs/kycUpdateDocument.js.map +1 -0
  34. package/esm/funcs/kycVerifyDocument.d.ts +16 -0
  35. package/esm/funcs/kycVerifyDocument.d.ts.map +1 -0
  36. package/esm/funcs/kycVerifyDocument.js +82 -0
  37. package/esm/funcs/kycVerifyDocument.js.map +1 -0
  38. package/esm/lib/config.d.ts +4 -4
  39. package/esm/lib/config.js +4 -4
  40. package/esm/lib/config.js.map +1 -1
  41. package/esm/mcp-server/mcp-server.js +1 -1
  42. package/esm/mcp-server/prompts.d.ts.map +1 -1
  43. package/esm/mcp-server/prompts.js +5 -1
  44. package/esm/mcp-server/prompts.js.map +1 -1
  45. package/esm/mcp-server/resources.d.ts.map +1 -1
  46. package/esm/mcp-server/resources.js +10 -2
  47. package/esm/mcp-server/resources.js.map +1 -1
  48. package/esm/mcp-server/server.d.ts.map +1 -1
  49. package/esm/mcp-server/server.js +16 -3
  50. package/esm/mcp-server/server.js.map +1 -1
  51. package/esm/mcp-server/tools/kycCreateDocument.d.ts +8 -0
  52. package/esm/mcp-server/tools/kycCreateDocument.d.ts.map +1 -0
  53. package/esm/mcp-server/tools/kycCreateDocument.js +28 -0
  54. package/esm/mcp-server/tools/kycCreateDocument.js.map +1 -0
  55. package/esm/mcp-server/tools/kycDeleteDocument.d.ts +8 -0
  56. package/esm/mcp-server/tools/kycDeleteDocument.d.ts.map +1 -0
  57. package/esm/mcp-server/tools/kycDeleteDocument.js +28 -0
  58. package/esm/mcp-server/tools/kycDeleteDocument.js.map +1 -0
  59. package/esm/mcp-server/tools/kycGetDocument.d.ts +8 -0
  60. package/esm/mcp-server/tools/kycGetDocument.d.ts.map +1 -0
  61. package/esm/mcp-server/tools/kycGetDocument.js +28 -0
  62. package/esm/mcp-server/tools/kycGetDocument.js.map +1 -0
  63. package/esm/mcp-server/tools/kycListDocumentType.d.ts +3 -0
  64. package/esm/mcp-server/tools/kycListDocumentType.d.ts.map +1 -0
  65. package/esm/mcp-server/tools/kycListDocumentType.js +23 -0
  66. package/esm/mcp-server/tools/kycListDocumentType.js.map +1 -0
  67. package/esm/mcp-server/tools/kycListDocuments.d.ts +8 -0
  68. package/esm/mcp-server/tools/kycListDocuments.d.ts.map +1 -0
  69. package/esm/mcp-server/tools/kycListDocuments.js +28 -0
  70. package/esm/mcp-server/tools/kycListDocuments.js.map +1 -0
  71. package/esm/mcp-server/tools/kycUpdateDocument.d.ts +8 -0
  72. package/esm/mcp-server/tools/kycUpdateDocument.d.ts.map +1 -0
  73. package/esm/mcp-server/tools/kycUpdateDocument.js +28 -0
  74. package/esm/mcp-server/tools/kycUpdateDocument.js.map +1 -0
  75. package/esm/mcp-server/tools/kycVerifyDocument.d.ts +8 -0
  76. package/esm/mcp-server/tools/kycVerifyDocument.d.ts.map +1 -0
  77. package/esm/mcp-server/tools/kycVerifyDocument.js +28 -0
  78. package/esm/mcp-server/tools/kycVerifyDocument.js.map +1 -0
  79. package/esm/mcp-server/tools.d.ts.map +1 -1
  80. package/esm/mcp-server/tools.js +4 -3
  81. package/esm/mcp-server/tools.js.map +1 -1
  82. package/esm/models/components/document.d.ts +159 -0
  83. package/esm/models/components/document.d.ts.map +1 -0
  84. package/esm/models/components/document.js +166 -0
  85. package/esm/models/components/document.js.map +1 -0
  86. package/esm/models/components/documentinput.d.ts +65 -0
  87. package/esm/models/components/documentinput.d.ts.map +1 -0
  88. package/esm/models/components/documentinput.js +87 -0
  89. package/esm/models/components/documentinput.js.map +1 -0
  90. package/esm/models/components/documenttype.d.ts +97 -0
  91. package/esm/models/components/documenttype.d.ts.map +1 -0
  92. package/esm/models/components/documenttype.js +99 -0
  93. package/esm/models/components/documenttype.js.map +1 -0
  94. package/esm/models/components/gstindetail.d.ts +29 -0
  95. package/esm/models/components/gstindetail.d.ts.map +1 -0
  96. package/esm/models/components/gstindetail.js +31 -0
  97. package/esm/models/components/gstindetail.js.map +1 -0
  98. package/esm/models/components/index.d.ts +6 -0
  99. package/esm/models/components/index.d.ts.map +1 -1
  100. package/esm/models/components/index.js +6 -0
  101. package/esm/models/components/index.js.map +1 -1
  102. package/esm/models/components/pandetail.d.ts +29 -0
  103. package/esm/models/components/pandetail.d.ts.map +1 -0
  104. package/esm/models/components/pandetail.js +31 -0
  105. package/esm/models/components/pandetail.js.map +1 -0
  106. package/esm/models/components/updatedocument.d.ts +67 -0
  107. package/esm/models/components/updatedocument.d.ts.map +1 -0
  108. package/esm/models/components/updatedocument.js +91 -0
  109. package/esm/models/components/updatedocument.js.map +1 -0
  110. package/esm/models/operations/createdocument.d.ts +92 -0
  111. package/esm/models/operations/createdocument.d.ts.map +1 -0
  112. package/esm/models/operations/createdocument.js +97 -0
  113. package/esm/models/operations/createdocument.js.map +1 -0
  114. package/esm/models/operations/deletedocument.d.ts +67 -0
  115. package/esm/models/operations/deletedocument.d.ts.map +1 -0
  116. package/esm/models/operations/deletedocument.js +69 -0
  117. package/esm/models/operations/deletedocument.js.map +1 -0
  118. package/esm/models/operations/getdocument.d.ts +95 -0
  119. package/esm/models/operations/getdocument.d.ts.map +1 -0
  120. package/esm/models/operations/getdocument.js +97 -0
  121. package/esm/models/operations/getdocument.js.map +1 -0
  122. package/esm/models/operations/index.d.ts +7 -0
  123. package/esm/models/operations/index.d.ts.map +1 -1
  124. package/esm/models/operations/index.js +7 -0
  125. package/esm/models/operations/index.js.map +1 -1
  126. package/esm/models/operations/listdocuments.d.ts +90 -0
  127. package/esm/models/operations/listdocuments.d.ts.map +1 -0
  128. package/esm/models/operations/listdocuments.js +86 -0
  129. package/esm/models/operations/listdocuments.js.map +1 -0
  130. package/esm/models/operations/listdocumenttype.d.ts +62 -0
  131. package/esm/models/operations/listdocumenttype.d.ts.map +1 -0
  132. package/esm/models/operations/listdocumenttype.js +70 -0
  133. package/esm/models/operations/listdocumenttype.js.map +1 -0
  134. package/esm/models/operations/updatedocument.d.ts +97 -0
  135. package/esm/models/operations/updatedocument.d.ts.map +1 -0
  136. package/esm/models/operations/updatedocument.js +101 -0
  137. package/esm/models/operations/updatedocument.js.map +1 -0
  138. package/esm/models/operations/verifydocument.d.ts +140 -0
  139. package/esm/models/operations/verifydocument.d.ts.map +1 -0
  140. package/esm/models/operations/verifydocument.js +168 -0
  141. package/esm/models/operations/verifydocument.js.map +1 -0
  142. package/esm/sdk/kyc.d.ts +54 -0
  143. package/esm/sdk/kyc.d.ts.map +1 -0
  144. package/esm/sdk/kyc.js +78 -0
  145. package/esm/sdk/kyc.js.map +1 -0
  146. package/esm/sdk/sdk.d.ts +3 -0
  147. package/esm/sdk/sdk.d.ts.map +1 -1
  148. package/esm/sdk/sdk.js +4 -0
  149. package/esm/sdk/sdk.js.map +1 -1
  150. package/jsr.json +1 -1
  151. package/package.json +1 -1
  152. package/src/funcs/authGetAnonymousToken.ts +1 -1
  153. package/src/funcs/kycCreateDocument.ts +190 -0
  154. package/src/funcs/kycDeleteDocument.ts +166 -0
  155. package/src/funcs/kycGetDocument.ts +166 -0
  156. package/src/funcs/kycListDocumentType.ts +136 -0
  157. package/src/funcs/kycListDocuments.ts +160 -0
  158. package/src/funcs/kycUpdateDocument.ts +201 -0
  159. package/src/funcs/kycVerifyDocument.ts +161 -0
  160. package/src/lib/config.ts +4 -4
  161. package/src/mcp-server/mcp-server.ts +1 -1
  162. package/src/mcp-server/prompts.ts +8 -1
  163. package/src/mcp-server/resources.ts +16 -2
  164. package/src/mcp-server/server.ts +17 -3
  165. package/src/mcp-server/tools/kycCreateDocument.ts +37 -0
  166. package/src/mcp-server/tools/kycDeleteDocument.ts +37 -0
  167. package/src/mcp-server/tools/kycGetDocument.ts +37 -0
  168. package/src/mcp-server/tools/kycListDocumentType.ts +30 -0
  169. package/src/mcp-server/tools/kycListDocuments.ts +37 -0
  170. package/src/mcp-server/tools/kycUpdateDocument.ts +37 -0
  171. package/src/mcp-server/tools/kycVerifyDocument.ts +37 -0
  172. package/src/mcp-server/tools.ts +6 -3
  173. package/src/models/components/document.ts +252 -0
  174. package/src/models/components/documentinput.ts +154 -0
  175. package/src/models/components/documenttype.ts +163 -0
  176. package/src/models/components/gstindetail.ts +62 -0
  177. package/src/models/components/index.ts +6 -0
  178. package/src/models/components/pandetail.ts +62 -0
  179. package/src/models/components/updatedocument.ts +168 -0
  180. package/src/models/operations/createdocument.ts +210 -0
  181. package/src/models/operations/deletedocument.ts +150 -0
  182. package/src/models/operations/getdocument.ts +213 -0
  183. package/src/models/operations/index.ts +7 -0
  184. package/src/models/operations/listdocuments.ts +197 -0
  185. package/src/models/operations/listdocumenttype.ts +147 -0
  186. package/src/models/operations/updatedocument.ts +219 -0
  187. package/src/models/operations/verifydocument.ts +346 -0
  188. package/src/sdk/kyc.ts +133 -0
  189. package/src/sdk/sdk.ts +6 -0
package/bin/mcp-server.js CHANGED
@@ -4020,15 +4020,15 @@ var ServerStaging = "staging", ServerProd = "prod", ServerList, SDK_METADATA;
4020
4020
  var init_config = __esm(() => {
4021
4021
  init_url();
4022
4022
  ServerList = {
4023
- [ServerStaging]: "https://staging.api.commercengine.io/api/v1/{store_id}/storefront",
4023
+ [ServerStaging]: "https://staging.api.commercengine.io/api/v1/store_id/storefront",
4024
4024
  [ServerProd]: "https://prod.api.commercengine.io/api/v1/{store_id}/storefront"
4025
4025
  };
4026
4026
  SDK_METADATA = {
4027
4027
  language: "typescript",
4028
4028
  openapiDocVersion: "1.0",
4029
- sdkVersion: "0.8.2",
4030
- genVersion: "2.563.0",
4031
- userAgent: "speakeasy-sdk/typescript 0.8.2 2.563.0 1.0 ce-storefront"
4029
+ sdkVersion: "0.9.0",
4030
+ genVersion: "2.568.2",
4031
+ userAgent: "speakeasy-sdk/typescript 0.9.0 2.568.2 1.0 ce-storefront"
4032
4032
  };
4033
4033
  });
4034
4034
 
@@ -4083,12 +4083,6 @@ var init_console_logger = __esm(() => {
4083
4083
  ];
4084
4084
  });
4085
4085
 
4086
- // src/mcp-server/scopes.ts
4087
- var mcpScopes;
4088
- var init_scopes = __esm(() => {
4089
- mcpScopes = [];
4090
- });
4091
-
4092
4086
  // node_modules/@modelcontextprotocol/sdk/dist/esm/types.js
4093
4087
  var LATEST_PROTOCOL_VERSION = "2024-11-05", SUPPORTED_PROTOCOL_VERSIONS, JSONRPC_VERSION = "2.0", ProgressTokenSchema, CursorSchema, BaseRequestParamsSchema, RequestSchema, BaseNotificationParamsSchema, NotificationSchema, ResultSchema, RequestIdSchema, JSONRPCRequestSchema, JSONRPCNotificationSchema, JSONRPCResponseSchema, ErrorCode, JSONRPCErrorSchema, JSONRPCMessageSchema, EmptyResultSchema, CancelledNotificationSchema, ImplementationSchema, ClientCapabilitiesSchema, InitializeRequestSchema, ServerCapabilitiesSchema, InitializeResultSchema, InitializedNotificationSchema, PingRequestSchema, ProgressSchema, ProgressNotificationSchema, PaginatedRequestSchema, PaginatedResultSchema, ResourceContentsSchema, TextResourceContentsSchema, BlobResourceContentsSchema, ResourceSchema, ResourceTemplateSchema, ListResourcesRequestSchema, ListResourcesResultSchema, ListResourceTemplatesRequestSchema, ListResourceTemplatesResultSchema, ReadResourceRequestSchema, ReadResourceResultSchema, ResourceListChangedNotificationSchema, SubscribeRequestSchema, UnsubscribeRequestSchema, ResourceUpdatedNotificationSchema, PromptArgumentSchema, PromptSchema, ListPromptsRequestSchema, ListPromptsResultSchema, GetPromptRequestSchema, TextContentSchema, ImageContentSchema, EmbeddedResourceSchema, PromptMessageSchema, GetPromptResultSchema, PromptListChangedNotificationSchema, ToolSchema, ListToolsRequestSchema, ListToolsResultSchema, CallToolResultSchema, CompatibilityCallToolResultSchema, CallToolRequestSchema, ToolListChangedNotificationSchema, LoggingLevelSchema, SetLevelRequestSchema, LoggingMessageNotificationSchema, ModelHintSchema, ModelPreferencesSchema, SamplingMessageSchema, CreateMessageRequestSchema, CreateMessageResultSchema, ResourceReferenceSchema, PromptReferenceSchema, CompleteRequestSchema, CompleteResultSchema, RootSchema, ListRootsRequestSchema, ListRootsResultSchema, RootsListChangedNotificationSchema, ClientRequestSchema, ClientNotificationSchema, ClientResultSchema, ServerRequestSchema, ServerNotificationSchema, ServerResultSchema, McpError;
4094
4088
  var init_types = __esm(() => {
@@ -34364,6 +34358,17 @@ function queryEncoder(f) {
34364
34358
  };
34365
34359
  return bulkEncode;
34366
34360
  }
34361
+ function appendForm(fd, key, value, fileName) {
34362
+ if (value == null) {
34363
+ return;
34364
+ } else if (value instanceof Blob && fileName) {
34365
+ fd.append(key, value, fileName);
34366
+ } else if (value instanceof Blob) {
34367
+ fd.append(key, value);
34368
+ } else {
34369
+ fd.append(key, String(value));
34370
+ }
34371
+ }
34367
34372
  var EncodingError, encodeForm, encodeSpaceDelimited, encodePipeDelimited, encodeSimple = (key, value, options) => {
34368
34373
  let out = "";
34369
34374
  const pairs = options?.explode ? explode(key, value) : [[key, value]];
@@ -34963,7 +34968,10 @@ var init_core = __esm(() => {
34963
34968
  function createRegisterPrompt(logger, server, sdk, allowedScopes) {
34964
34969
  return (prompt) => {
34965
34970
  const scopes = prompt.scopes ?? [];
34966
- if (!scopes.every((s) => allowedScopes.has(s))) {
34971
+ if (allowedScopes.size > 0 && scopes.length === 0) {
34972
+ return;
34973
+ }
34974
+ if (allowedScopes.size > 0 && !scopes.every((s) => allowedScopes.has(s))) {
34967
34975
  return;
34968
34976
  }
34969
34977
  if (prompt.args) {
@@ -35034,7 +35042,10 @@ var init_shared = __esm(() => {
35034
35042
  function createRegisterResource(logger, server, sdk, allowedScopes) {
35035
35043
  return (resource) => {
35036
35044
  const scopes = resource.scopes ?? [];
35037
- if (!scopes.every((s) => allowedScopes.has(s))) {
35045
+ if (allowedScopes.size > 0 && scopes.length === 0) {
35046
+ return;
35047
+ }
35048
+ if (allowedScopes.size > 0 && !scopes.every((s) => allowedScopes.has(s))) {
35038
35049
  return;
35039
35050
  }
35040
35051
  const metadata = {
@@ -35048,7 +35059,10 @@ function createRegisterResource(logger, server, sdk, allowedScopes) {
35048
35059
  function createRegisterResourceTemplate(logger, server, sdk, allowedScopes) {
35049
35060
  return (resource) => {
35050
35061
  const scopes = resource.scopes ?? [];
35051
- if (!scopes.every((s) => allowedScopes.has(s))) {
35062
+ if (allowedScopes.size > 0 && scopes.length === 0) {
35063
+ return;
35064
+ }
35065
+ if (allowedScopes.size > 0 && !scopes.every((s) => allowedScopes.has(s))) {
35052
35066
  return;
35053
35067
  }
35054
35068
  const metadata = {
@@ -35105,11 +35119,11 @@ function createRegisterTool(logger, server, sdk, allowedScopes, allowedTools) {
35105
35119
  if (allowedTools && !allowedTools.has(tool.name)) {
35106
35120
  return;
35107
35121
  }
35108
- const toolScopes = tool.scopes ?? [];
35109
- if (allowedScopes.size > 0 && toolScopes.length === 0) {
35122
+ const scopes = tool.scopes ?? [];
35123
+ if (allowedScopes.size > 0 && scopes.length === 0) {
35110
35124
  return;
35111
35125
  }
35112
- if (!toolScopes.every((s) => allowedScopes.has(s))) {
35126
+ if (allowedScopes.size > 0 && !scopes.every((s) => allowedScopes.has(s))) {
35113
35127
  return;
35114
35128
  }
35115
35129
  if (tool.args) {
@@ -36749,6 +36763,264 @@ var init_discountbasedpromotion = __esm(() => {
36749
36763
  })(DiscountBasedPromotion$ ||= {});
36750
36764
  });
36751
36765
 
36766
+ // src/models/components/document.ts
36767
+ var DocumentStatus, DocumentVerificationType, CreatedBy, ModifiedBy, DocumentStatus$inboundSchema, DocumentStatus$outboundSchema, DocumentStatus$, DocumentVerificationType$inboundSchema, DocumentVerificationType$outboundSchema, DocumentVerificationType$, CreatedBy$inboundSchema, CreatedBy$outboundSchema, CreatedBy$, ModifiedBy$inboundSchema, ModifiedBy$outboundSchema, ModifiedBy$, Document$inboundSchema, Document$outboundSchema, Document$;
36768
+ var init_document = __esm(() => {
36769
+ init_lib();
36770
+ init_primitives();
36771
+ DocumentStatus = {
36772
+ Submitted: "submitted",
36773
+ Approved: "approved",
36774
+ Rejected: "rejected"
36775
+ };
36776
+ DocumentVerificationType = {
36777
+ Automatic: "automatic",
36778
+ Manual: "manual"
36779
+ };
36780
+ CreatedBy = {
36781
+ Customer: "customer",
36782
+ Admin: "admin"
36783
+ };
36784
+ ModifiedBy = {
36785
+ Customer: "customer",
36786
+ Admin: "admin"
36787
+ };
36788
+ DocumentStatus$inboundSchema = nativeEnumType(DocumentStatus);
36789
+ DocumentStatus$outboundSchema = DocumentStatus$inboundSchema;
36790
+ ((DocumentStatus$) => {
36791
+ DocumentStatus$.inboundSchema = DocumentStatus$inboundSchema;
36792
+ DocumentStatus$.outboundSchema = DocumentStatus$outboundSchema;
36793
+ })(DocumentStatus$ ||= {});
36794
+ DocumentVerificationType$inboundSchema = nativeEnumType(DocumentVerificationType);
36795
+ DocumentVerificationType$outboundSchema = DocumentVerificationType$inboundSchema;
36796
+ ((DocumentVerificationType$) => {
36797
+ DocumentVerificationType$.inboundSchema = DocumentVerificationType$inboundSchema;
36798
+ DocumentVerificationType$.outboundSchema = DocumentVerificationType$outboundSchema;
36799
+ })(DocumentVerificationType$ ||= {});
36800
+ CreatedBy$inboundSchema = nativeEnumType(CreatedBy);
36801
+ CreatedBy$outboundSchema = CreatedBy$inboundSchema;
36802
+ ((CreatedBy$) => {
36803
+ CreatedBy$.inboundSchema = CreatedBy$inboundSchema;
36804
+ CreatedBy$.outboundSchema = CreatedBy$outboundSchema;
36805
+ })(CreatedBy$ ||= {});
36806
+ ModifiedBy$inboundSchema = nativeEnumType(ModifiedBy);
36807
+ ModifiedBy$outboundSchema = ModifiedBy$inboundSchema;
36808
+ ((ModifiedBy$) => {
36809
+ ModifiedBy$.inboundSchema = ModifiedBy$inboundSchema;
36810
+ ModifiedBy$.outboundSchema = ModifiedBy$outboundSchema;
36811
+ })(ModifiedBy$ ||= {});
36812
+ Document$inboundSchema = objectType({
36813
+ id: stringType().optional(),
36814
+ document_number: stringType(),
36815
+ note: stringType().optional(),
36816
+ status: DocumentStatus$inboundSchema.optional(),
36817
+ title: stringType().optional(),
36818
+ file_url: stringType().optional(),
36819
+ verification_type: DocumentVerificationType$inboundSchema.optional(),
36820
+ is_verified: booleanType().optional(),
36821
+ verified_at: stringType().datetime({ offset: true }).transform((v2) => new Date(v2)).optional(),
36822
+ created_by: CreatedBy$inboundSchema.optional(),
36823
+ created_at: stringType().datetime({ offset: true }).transform((v2) => new Date(v2)).optional(),
36824
+ modified_by: ModifiedBy$inboundSchema.optional(),
36825
+ modified_at: stringType().datetime({ offset: true }).transform((v2) => new Date(v2)).optional(),
36826
+ modified_reason: stringType().optional()
36827
+ }).transform((v2) => {
36828
+ return remap(v2, {
36829
+ document_number: "documentNumber",
36830
+ file_url: "fileUrl",
36831
+ verification_type: "verificationType",
36832
+ is_verified: "isVerified",
36833
+ verified_at: "verifiedAt",
36834
+ created_by: "createdBy",
36835
+ created_at: "createdAt",
36836
+ modified_by: "modifiedBy",
36837
+ modified_at: "modifiedAt",
36838
+ modified_reason: "modifiedReason"
36839
+ });
36840
+ });
36841
+ Document$outboundSchema = objectType({
36842
+ id: stringType().optional(),
36843
+ documentNumber: stringType(),
36844
+ note: stringType().optional(),
36845
+ status: DocumentStatus$outboundSchema.optional(),
36846
+ title: stringType().optional(),
36847
+ fileUrl: stringType().optional(),
36848
+ verificationType: DocumentVerificationType$outboundSchema.optional(),
36849
+ isVerified: booleanType().optional(),
36850
+ verifiedAt: dateType().transform((v2) => v2.toISOString()).optional(),
36851
+ createdBy: CreatedBy$outboundSchema.optional(),
36852
+ createdAt: dateType().transform((v2) => v2.toISOString()).optional(),
36853
+ modifiedBy: ModifiedBy$outboundSchema.optional(),
36854
+ modifiedAt: dateType().transform((v2) => v2.toISOString()).optional(),
36855
+ modifiedReason: stringType().optional()
36856
+ }).transform((v2) => {
36857
+ return remap(v2, {
36858
+ documentNumber: "document_number",
36859
+ fileUrl: "file_url",
36860
+ verificationType: "verification_type",
36861
+ isVerified: "is_verified",
36862
+ verifiedAt: "verified_at",
36863
+ createdBy: "created_by",
36864
+ createdAt: "created_at",
36865
+ modifiedBy: "modified_by",
36866
+ modifiedAt: "modified_at",
36867
+ modifiedReason: "modified_reason"
36868
+ });
36869
+ });
36870
+ ((Document$) => {
36871
+ Document$.inboundSchema = Document$inboundSchema;
36872
+ Document$.outboundSchema = Document$outboundSchema;
36873
+ })(Document$ ||= {});
36874
+ });
36875
+
36876
+ // src/types/blobs.ts
36877
+ function isBlobLike(val) {
36878
+ if (val instanceof Blob) {
36879
+ return true;
36880
+ }
36881
+ if (typeof val !== "object" || val == null || !(Symbol.toStringTag in val)) {
36882
+ return false;
36883
+ }
36884
+ const name = val[Symbol.toStringTag];
36885
+ if (typeof name !== "string") {
36886
+ return false;
36887
+ }
36888
+ if (name !== "Blob" && name !== "File") {
36889
+ return false;
36890
+ }
36891
+ return "stream" in val && typeof val.stream === "function";
36892
+ }
36893
+ var blobLikeSchema;
36894
+ var init_blobs = __esm(() => {
36895
+ init_lib();
36896
+ blobLikeSchema = custom(isBlobLike, {
36897
+ message: "expected a Blob, File or Blob-like object",
36898
+ fatal: true
36899
+ });
36900
+ });
36901
+
36902
+ // src/models/components/documentinput.ts
36903
+ var FileT$inboundSchema, FileT$outboundSchema, FileT$, DocumentInput$inboundSchema, DocumentInput$outboundSchema, DocumentInput$;
36904
+ var init_documentinput = __esm(() => {
36905
+ init_lib();
36906
+ init_primitives();
36907
+ init_blobs();
36908
+ FileT$inboundSchema = objectType({
36909
+ fileName: stringType(),
36910
+ content: unionType([
36911
+ instanceOfType(ReadableStream),
36912
+ instanceOfType(Blob),
36913
+ instanceOfType(ArrayBuffer),
36914
+ instanceOfType(Uint8Array)
36915
+ ])
36916
+ });
36917
+ FileT$outboundSchema = objectType({
36918
+ fileName: stringType(),
36919
+ content: unionType([
36920
+ instanceOfType(ReadableStream),
36921
+ instanceOfType(Blob),
36922
+ instanceOfType(ArrayBuffer),
36923
+ instanceOfType(Uint8Array)
36924
+ ])
36925
+ });
36926
+ ((FileT$) => {
36927
+ FileT$.inboundSchema = FileT$inboundSchema;
36928
+ FileT$.outboundSchema = FileT$outboundSchema;
36929
+ })(FileT$ ||= {});
36930
+ DocumentInput$inboundSchema = objectType({
36931
+ document_number: stringType(),
36932
+ note: stringType().optional(),
36933
+ file: lazyType(() => FileT$inboundSchema).optional(),
36934
+ document_type_id: stringType()
36935
+ }).transform((v2) => {
36936
+ return remap(v2, {
36937
+ document_number: "documentNumber",
36938
+ document_type_id: "documentTypeId"
36939
+ });
36940
+ });
36941
+ DocumentInput$outboundSchema = objectType({
36942
+ documentNumber: stringType(),
36943
+ note: stringType().optional(),
36944
+ file: lazyType(() => FileT$outboundSchema).or(blobLikeSchema).optional(),
36945
+ documentTypeId: stringType()
36946
+ }).transform((v2) => {
36947
+ return remap(v2, {
36948
+ documentNumber: "document_number",
36949
+ documentTypeId: "document_type_id"
36950
+ });
36951
+ });
36952
+ ((DocumentInput$) => {
36953
+ DocumentInput$.inboundSchema = DocumentInput$inboundSchema;
36954
+ DocumentInput$.outboundSchema = DocumentInput$outboundSchema;
36955
+ })(DocumentInput$ ||= {});
36956
+ });
36957
+
36958
+ // src/models/components/documenttype.ts
36959
+ var DocumentTypeDocumentType, VerificationType, DocumentTypeDocumentType$inboundSchema, DocumentTypeDocumentType$outboundSchema, DocumentTypeDocumentType$, VerificationType$inboundSchema, VerificationType$outboundSchema, VerificationType$, DocumentType$inboundSchema, DocumentType$outboundSchema, DocumentType$;
36960
+ var init_documenttype = __esm(() => {
36961
+ init_lib();
36962
+ init_primitives();
36963
+ DocumentTypeDocumentType = {
36964
+ Gst: "gst",
36965
+ Pan: "pan",
36966
+ Other: "other"
36967
+ };
36968
+ VerificationType = {
36969
+ Auto: "auto",
36970
+ Manual: "manual"
36971
+ };
36972
+ DocumentTypeDocumentType$inboundSchema = nativeEnumType(DocumentTypeDocumentType);
36973
+ DocumentTypeDocumentType$outboundSchema = DocumentTypeDocumentType$inboundSchema;
36974
+ ((DocumentTypeDocumentType$) => {
36975
+ DocumentTypeDocumentType$.inboundSchema = DocumentTypeDocumentType$inboundSchema;
36976
+ DocumentTypeDocumentType$.outboundSchema = DocumentTypeDocumentType$outboundSchema;
36977
+ })(DocumentTypeDocumentType$ ||= {});
36978
+ VerificationType$inboundSchema = nativeEnumType(VerificationType);
36979
+ VerificationType$outboundSchema = VerificationType$inboundSchema;
36980
+ ((VerificationType$) => {
36981
+ VerificationType$.inboundSchema = VerificationType$inboundSchema;
36982
+ VerificationType$.outboundSchema = VerificationType$outboundSchema;
36983
+ })(VerificationType$ ||= {});
36984
+ DocumentType$inboundSchema = objectType({
36985
+ id: stringType().optional(),
36986
+ document_type: DocumentTypeDocumentType$inboundSchema,
36987
+ title: stringType(),
36988
+ description: nullableType(stringType()).optional(),
36989
+ active: booleanType().default(true),
36990
+ is_mandatory: booleanType(),
36991
+ is_attachment_required: booleanType(),
36992
+ verification_type: VerificationType$inboundSchema
36993
+ }).transform((v2) => {
36994
+ return remap(v2, {
36995
+ document_type: "documentType",
36996
+ is_mandatory: "isMandatory",
36997
+ is_attachment_required: "isAttachmentRequired",
36998
+ verification_type: "verificationType"
36999
+ });
37000
+ });
37001
+ DocumentType$outboundSchema = objectType({
37002
+ id: stringType().optional(),
37003
+ documentType: DocumentTypeDocumentType$outboundSchema,
37004
+ title: stringType(),
37005
+ description: nullableType(stringType()).optional(),
37006
+ active: booleanType().default(true),
37007
+ isMandatory: booleanType(),
37008
+ isAttachmentRequired: booleanType(),
37009
+ verificationType: VerificationType$outboundSchema
37010
+ }).transform((v2) => {
37011
+ return remap(v2, {
37012
+ documentType: "document_type",
37013
+ isMandatory: "is_mandatory",
37014
+ isAttachmentRequired: "is_attachment_required",
37015
+ verificationType: "verification_type"
37016
+ });
37017
+ });
37018
+ ((DocumentType$) => {
37019
+ DocumentType$.inboundSchema = DocumentType$inboundSchema;
37020
+ DocumentType$.outboundSchema = DocumentType$outboundSchema;
37021
+ })(DocumentType$ ||= {});
37022
+ });
37023
+
36752
37024
  // src/models/components/fixedpricepromotion.ts
36753
37025
  var FixedPricePromotion$inboundSchema, FixedPricePromotion$outboundSchema, FixedPricePromotion$;
36754
37026
  var init_fixedpricepromotion = __esm(() => {
@@ -36811,6 +37083,22 @@ var init_freegoodspromotion = __esm(() => {
36811
37083
  })(FreeGoodsPromotion$ ||= {});
36812
37084
  });
36813
37085
 
37086
+ // src/models/components/gstindetail.ts
37087
+ var GstinDetail$inboundSchema, GstinDetail$outboundSchema, GstinDetail$;
37088
+ var init_gstindetail = __esm(() => {
37089
+ init_lib();
37090
+ GstinDetail$inboundSchema = objectType({
37091
+ id: stringType().optional()
37092
+ });
37093
+ GstinDetail$outboundSchema = objectType({
37094
+ id: stringType().optional()
37095
+ });
37096
+ ((GstinDetail$) => {
37097
+ GstinDetail$.inboundSchema = GstinDetail$inboundSchema;
37098
+ GstinDetail$.outboundSchema = GstinDetail$outboundSchema;
37099
+ })(GstinDetail$ ||= {});
37100
+ });
37101
+
36814
37102
  // src/models/components/multiselectattribute.ts
36815
37103
  var MultiSelectAttribute$inboundSchema, MultiSelectAttribute$outboundSchema, MultiSelectAttribute$;
36816
37104
  var init_multiselectattribute = __esm(() => {
@@ -38569,6 +38857,22 @@ var init_pagination = __esm(() => {
38569
38857
  })(Pagination$ ||= {});
38570
38858
  });
38571
38859
 
38860
+ // src/models/components/pandetail.ts
38861
+ var PanDetail$inboundSchema, PanDetail$outboundSchema, PanDetail$;
38862
+ var init_pandetail = __esm(() => {
38863
+ init_lib();
38864
+ PanDetail$inboundSchema = objectType({
38865
+ id: stringType().optional()
38866
+ });
38867
+ PanDetail$outboundSchema = objectType({
38868
+ id: stringType().optional()
38869
+ });
38870
+ ((PanDetail$) => {
38871
+ PanDetail$.inboundSchema = PanDetail$inboundSchema;
38872
+ PanDetail$.outboundSchema = PanDetail$outboundSchema;
38873
+ })(PanDetail$ ||= {});
38874
+ });
38875
+
38572
38876
  // src/models/components/payupaymentgatewayparams.ts
38573
38877
  var PayuPaymentGatewayParams$inboundSchema, PayuPaymentGatewayParams$outboundSchema, PayuPaymentGatewayParams$;
38574
38878
  var init_payupaymentgatewayparams = __esm(() => {
@@ -39619,6 +39923,66 @@ var init_updatecartitem = __esm(() => {
39619
39923
  })(UpdateCartItem$ ||= {});
39620
39924
  });
39621
39925
 
39926
+ // src/models/components/updatedocument.ts
39927
+ var UpdateDocumentFile$inboundSchema, UpdateDocumentFile$outboundSchema, UpdateDocumentFile$, UpdateDocument$inboundSchema, UpdateDocument$outboundSchema, UpdateDocument$;
39928
+ var init_updatedocument = __esm(() => {
39929
+ init_lib();
39930
+ init_primitives();
39931
+ init_blobs();
39932
+ UpdateDocumentFile$inboundSchema = objectType({
39933
+ fileName: stringType(),
39934
+ content: unionType([
39935
+ instanceOfType(ReadableStream),
39936
+ instanceOfType(Blob),
39937
+ instanceOfType(ArrayBuffer),
39938
+ instanceOfType(Uint8Array)
39939
+ ])
39940
+ });
39941
+ UpdateDocumentFile$outboundSchema = objectType({
39942
+ fileName: stringType(),
39943
+ content: unionType([
39944
+ instanceOfType(ReadableStream),
39945
+ instanceOfType(Blob),
39946
+ instanceOfType(ArrayBuffer),
39947
+ instanceOfType(Uint8Array)
39948
+ ])
39949
+ });
39950
+ ((UpdateDocumentFile$) => {
39951
+ UpdateDocumentFile$.inboundSchema = UpdateDocumentFile$inboundSchema;
39952
+ UpdateDocumentFile$.outboundSchema = UpdateDocumentFile$outboundSchema;
39953
+ })(UpdateDocumentFile$ ||= {});
39954
+ UpdateDocument$inboundSchema = objectType({
39955
+ document_number: stringType(),
39956
+ document_type_id: stringType(),
39957
+ note: stringType().optional(),
39958
+ file: lazyType(() => UpdateDocumentFile$inboundSchema).optional(),
39959
+ modified_reason: stringType()
39960
+ }).transform((v2) => {
39961
+ return remap(v2, {
39962
+ document_number: "documentNumber",
39963
+ document_type_id: "documentTypeId",
39964
+ modified_reason: "modifiedReason"
39965
+ });
39966
+ });
39967
+ UpdateDocument$outboundSchema = objectType({
39968
+ documentNumber: stringType(),
39969
+ documentTypeId: stringType(),
39970
+ note: stringType().optional(),
39971
+ file: lazyType(() => UpdateDocumentFile$outboundSchema).or(blobLikeSchema).optional(),
39972
+ modifiedReason: stringType()
39973
+ }).transform((v2) => {
39974
+ return remap(v2, {
39975
+ documentNumber: "document_number",
39976
+ documentTypeId: "document_type_id",
39977
+ modifiedReason: "modified_reason"
39978
+ });
39979
+ });
39980
+ ((UpdateDocument$) => {
39981
+ UpdateDocument$.inboundSchema = UpdateDocument$inboundSchema;
39982
+ UpdateDocument$.outboundSchema = UpdateDocument$outboundSchema;
39983
+ })(UpdateDocument$ ||= {});
39984
+ });
39985
+
39622
39986
  // src/models/components/user.ts
39623
39987
  var LoginMethods, LoginMethods$inboundSchema, LoginMethods$outboundSchema, LoginMethods$, User$inboundSchema, User$outboundSchema, User$, UserInput$inboundSchema, UserInput$outboundSchema, UserInput$;
39624
39988
  var init_user = __esm(() => {
@@ -39904,8 +40268,12 @@ var init_components = __esm(() => {
39904
40268
  init_customerreview();
39905
40269
  init_dateattribute();
39906
40270
  init_discountbasedpromotion();
40271
+ init_document();
40272
+ init_documentinput();
40273
+ init_documenttype();
39907
40274
  init_fixedpricepromotion();
39908
40275
  init_freegoodspromotion();
40276
+ init_gstindetail();
39909
40277
  init_item();
39910
40278
  init_juspaypaymentgatewayparams();
39911
40279
  init_juspaypaymentinfo();
@@ -39920,6 +40288,7 @@ var init_components = __esm(() => {
39920
40288
  init_orderpayment();
39921
40289
  init_ordershipment();
39922
40290
  init_pagination();
40291
+ init_pandetail();
39923
40292
  init_payupaymentgatewayparams();
39924
40293
  init_payupaymentinfo();
39925
40294
  init_pincode();
@@ -39943,6 +40312,7 @@ var init_components = __esm(() => {
39943
40312
  init_singleselectoption();
39944
40313
  init_textattribute();
39945
40314
  init_updatecartitem();
40315
+ init_updatedocument();
39946
40316
  init_upipayment();
39947
40317
  init_user();
39948
40318
  init_variant();
@@ -40472,6 +40842,58 @@ var init_createcartaddress = __esm(() => {
40472
40842
  })(CreateCartAddressResponseBody$ ||= {});
40473
40843
  });
40474
40844
 
40845
+ // src/models/operations/createdocument.ts
40846
+ var CreateDocumentRequest$inboundSchema, CreateDocumentRequest$outboundSchema, CreateDocumentRequest$, CreateDocumentContent$inboundSchema, CreateDocumentContent$outboundSchema, CreateDocumentContent$, CreateDocumentResponseBody$inboundSchema, CreateDocumentResponseBody$outboundSchema, CreateDocumentResponseBody$;
40847
+ var init_createdocument = __esm(() => {
40848
+ init_lib();
40849
+ init_primitives();
40850
+ init_components();
40851
+ CreateDocumentRequest$inboundSchema = objectType({
40852
+ id: stringType(),
40853
+ Document: DocumentInput$inboundSchema.optional()
40854
+ }).transform((v2) => {
40855
+ return remap(v2, {
40856
+ Document: "document"
40857
+ });
40858
+ });
40859
+ CreateDocumentRequest$outboundSchema = objectType({
40860
+ id: stringType(),
40861
+ document: DocumentInput$outboundSchema.optional()
40862
+ }).transform((v2) => {
40863
+ return remap(v2, {
40864
+ document: "Document"
40865
+ });
40866
+ });
40867
+ ((CreateDocumentRequest$) => {
40868
+ CreateDocumentRequest$.inboundSchema = CreateDocumentRequest$inboundSchema;
40869
+ CreateDocumentRequest$.outboundSchema = CreateDocumentRequest$outboundSchema;
40870
+ })(CreateDocumentRequest$ ||= {});
40871
+ CreateDocumentContent$inboundSchema = objectType({
40872
+ document: Document$inboundSchema.optional()
40873
+ });
40874
+ CreateDocumentContent$outboundSchema = objectType({
40875
+ document: Document$outboundSchema.optional()
40876
+ });
40877
+ ((CreateDocumentContent$) => {
40878
+ CreateDocumentContent$.inboundSchema = CreateDocumentContent$inboundSchema;
40879
+ CreateDocumentContent$.outboundSchema = CreateDocumentContent$outboundSchema;
40880
+ })(CreateDocumentContent$ ||= {});
40881
+ CreateDocumentResponseBody$inboundSchema = objectType({
40882
+ message: stringType().optional(),
40883
+ success: booleanType().optional(),
40884
+ content: lazyType(() => CreateDocumentContent$inboundSchema).optional()
40885
+ });
40886
+ CreateDocumentResponseBody$outboundSchema = objectType({
40887
+ message: stringType().optional(),
40888
+ success: booleanType().optional(),
40889
+ content: lazyType(() => CreateDocumentContent$outboundSchema).optional()
40890
+ });
40891
+ ((CreateDocumentResponseBody$) => {
40892
+ CreateDocumentResponseBody$.inboundSchema = CreateDocumentResponseBody$inboundSchema;
40893
+ CreateDocumentResponseBody$.outboundSchema = CreateDocumentResponseBody$outboundSchema;
40894
+ })(CreateDocumentResponseBody$ ||= {});
40895
+ });
40896
+
40475
40897
  // src/models/operations/createnotificationpreferences.ts
40476
40898
  var CreateNotificationPreferencesRequestBody$inboundSchema, CreateNotificationPreferencesRequestBody$outboundSchema, CreateNotificationPreferencesRequestBody$, CreateNotificationPreferencesRequest$inboundSchema, CreateNotificationPreferencesRequest$outboundSchema, CreateNotificationPreferencesRequest$, CreateNotificationPreferencesContent$inboundSchema, CreateNotificationPreferencesContent$outboundSchema, CreateNotificationPreferencesContent$, CreateNotificationPreferencesResponseBody$inboundSchema, CreateNotificationPreferencesResponseBody$outboundSchema, CreateNotificationPreferencesResponseBody$;
40477
40899
  var init_createnotificationpreferences = __esm(() => {
@@ -40769,6 +41191,45 @@ var init_deletecart = __esm(() => {
40769
41191
  })(DeleteCartResponseBody$ ||= {});
40770
41192
  });
40771
41193
 
41194
+ // src/models/operations/deletedocument.ts
41195
+ var DeleteDocumentRequest$inboundSchema, DeleteDocumentRequest$outboundSchema, DeleteDocumentRequest$, DeleteDocumentResponseBody$inboundSchema, DeleteDocumentResponseBody$outboundSchema, DeleteDocumentResponseBody$;
41196
+ var init_deletedocument = __esm(() => {
41197
+ init_lib();
41198
+ init_primitives();
41199
+ DeleteDocumentRequest$inboundSchema = objectType({
41200
+ id: stringType(),
41201
+ document_id: stringType()
41202
+ }).transform((v2) => {
41203
+ return remap(v2, {
41204
+ document_id: "documentId"
41205
+ });
41206
+ });
41207
+ DeleteDocumentRequest$outboundSchema = objectType({
41208
+ id: stringType(),
41209
+ documentId: stringType()
41210
+ }).transform((v2) => {
41211
+ return remap(v2, {
41212
+ documentId: "document_id"
41213
+ });
41214
+ });
41215
+ ((DeleteDocumentRequest$) => {
41216
+ DeleteDocumentRequest$.inboundSchema = DeleteDocumentRequest$inboundSchema;
41217
+ DeleteDocumentRequest$.outboundSchema = DeleteDocumentRequest$outboundSchema;
41218
+ })(DeleteDocumentRequest$ ||= {});
41219
+ DeleteDocumentResponseBody$inboundSchema = objectType({
41220
+ message: stringType().optional(),
41221
+ success: booleanType().optional()
41222
+ });
41223
+ DeleteDocumentResponseBody$outboundSchema = objectType({
41224
+ message: stringType().optional(),
41225
+ success: booleanType().optional()
41226
+ });
41227
+ ((DeleteDocumentResponseBody$) => {
41228
+ DeleteDocumentResponseBody$.inboundSchema = DeleteDocumentResponseBody$inboundSchema;
41229
+ DeleteDocumentResponseBody$.outboundSchema = DeleteDocumentResponseBody$outboundSchema;
41230
+ })(DeleteDocumentResponseBody$ ||= {});
41231
+ });
41232
+
40772
41233
  // src/models/operations/deleteusercart.ts
40773
41234
  var DeleteUserCartRequest$inboundSchema, DeleteUserCartRequest$outboundSchema, DeleteUserCartRequest$, DeleteUserCartResponseBody$inboundSchema, DeleteUserCartResponseBody$outboundSchema, DeleteUserCartResponseBody$;
40774
41235
  var init_deleteusercart = __esm(() => {
@@ -41135,6 +41596,58 @@ var init_getcart = __esm(() => {
41135
41596
  })(GetCartResponseBody$ ||= {});
41136
41597
  });
41137
41598
 
41599
+ // src/models/operations/getdocument.ts
41600
+ var GetDocumentRequest$inboundSchema, GetDocumentRequest$outboundSchema, GetDocumentRequest$, GetDocumentContent$inboundSchema, GetDocumentContent$outboundSchema, GetDocumentContent$, GetDocumentResponseBody$inboundSchema, GetDocumentResponseBody$outboundSchema, GetDocumentResponseBody$;
41601
+ var init_getdocument = __esm(() => {
41602
+ init_lib();
41603
+ init_primitives();
41604
+ init_components();
41605
+ GetDocumentRequest$inboundSchema = objectType({
41606
+ id: stringType(),
41607
+ document_id: stringType()
41608
+ }).transform((v2) => {
41609
+ return remap(v2, {
41610
+ document_id: "documentId"
41611
+ });
41612
+ });
41613
+ GetDocumentRequest$outboundSchema = objectType({
41614
+ id: stringType(),
41615
+ documentId: stringType()
41616
+ }).transform((v2) => {
41617
+ return remap(v2, {
41618
+ documentId: "document_id"
41619
+ });
41620
+ });
41621
+ ((GetDocumentRequest$) => {
41622
+ GetDocumentRequest$.inboundSchema = GetDocumentRequest$inboundSchema;
41623
+ GetDocumentRequest$.outboundSchema = GetDocumentRequest$outboundSchema;
41624
+ })(GetDocumentRequest$ ||= {});
41625
+ GetDocumentContent$inboundSchema = objectType({
41626
+ document: Document$inboundSchema.optional()
41627
+ });
41628
+ GetDocumentContent$outboundSchema = objectType({
41629
+ document: Document$outboundSchema.optional()
41630
+ });
41631
+ ((GetDocumentContent$) => {
41632
+ GetDocumentContent$.inboundSchema = GetDocumentContent$inboundSchema;
41633
+ GetDocumentContent$.outboundSchema = GetDocumentContent$outboundSchema;
41634
+ })(GetDocumentContent$ ||= {});
41635
+ GetDocumentResponseBody$inboundSchema = objectType({
41636
+ message: stringType().optional(),
41637
+ success: booleanType().optional(),
41638
+ content: lazyType(() => GetDocumentContent$inboundSchema).optional()
41639
+ });
41640
+ GetDocumentResponseBody$outboundSchema = objectType({
41641
+ message: stringType().optional(),
41642
+ success: booleanType().optional(),
41643
+ content: lazyType(() => GetDocumentContent$outboundSchema).optional()
41644
+ });
41645
+ ((GetDocumentResponseBody$) => {
41646
+ GetDocumentResponseBody$.inboundSchema = GetDocumentResponseBody$inboundSchema;
41647
+ GetDocumentResponseBody$.outboundSchema = GetDocumentResponseBody$outboundSchema;
41648
+ })(GetDocumentResponseBody$ ||= {});
41649
+ });
41650
+
41138
41651
  // src/models/operations/getnotificationpreferences.ts
41139
41652
  var GetNotificationPreferencesRequest$inboundSchema, GetNotificationPreferencesRequest$outboundSchema, GetNotificationPreferencesRequest$, GetNotificationPreferencesContent$inboundSchema, GetNotificationPreferencesContent$outboundSchema, GetNotificationPreferencesContent$, GetNotificationPreferencesResponseBody$inboundSchema, GetNotificationPreferencesResponseBody$outboundSchema, GetNotificationPreferencesResponseBody$;
41140
41653
  var init_getnotificationpreferences = __esm(() => {
@@ -41825,6 +42338,87 @@ var init_listcrosssellproducts = __esm(() => {
41825
42338
  })(ListCrosssellProductsResponseBody$ ||= {});
41826
42339
  });
41827
42340
 
42341
+ // src/models/operations/listdocuments.ts
42342
+ var ListDocumentsRequest$inboundSchema, ListDocumentsRequest$outboundSchema, ListDocumentsRequest$, ListDocumentsContent$inboundSchema, ListDocumentsContent$outboundSchema, ListDocumentsContent$, ListDocumentsResponseBody$inboundSchema, ListDocumentsResponseBody$outboundSchema, ListDocumentsResponseBody$;
42343
+ var init_listdocuments = __esm(() => {
42344
+ init_lib();
42345
+ init_components();
42346
+ ListDocumentsRequest$inboundSchema = objectType({
42347
+ id: stringType()
42348
+ });
42349
+ ListDocumentsRequest$outboundSchema = objectType({
42350
+ id: stringType()
42351
+ });
42352
+ ((ListDocumentsRequest$) => {
42353
+ ListDocumentsRequest$.inboundSchema = ListDocumentsRequest$inboundSchema;
42354
+ ListDocumentsRequest$.outboundSchema = ListDocumentsRequest$outboundSchema;
42355
+ })(ListDocumentsRequest$ ||= {});
42356
+ ListDocumentsContent$inboundSchema = objectType({
42357
+ documents: arrayType(Document$inboundSchema).optional()
42358
+ });
42359
+ ListDocumentsContent$outboundSchema = objectType({
42360
+ documents: arrayType(Document$outboundSchema).optional()
42361
+ });
42362
+ ((ListDocumentsContent$) => {
42363
+ ListDocumentsContent$.inboundSchema = ListDocumentsContent$inboundSchema;
42364
+ ListDocumentsContent$.outboundSchema = ListDocumentsContent$outboundSchema;
42365
+ })(ListDocumentsContent$ ||= {});
42366
+ ListDocumentsResponseBody$inboundSchema = objectType({
42367
+ message: stringType().optional(),
42368
+ success: booleanType().optional(),
42369
+ content: lazyType(() => ListDocumentsContent$inboundSchema).optional()
42370
+ });
42371
+ ListDocumentsResponseBody$outboundSchema = objectType({
42372
+ message: stringType().optional(),
42373
+ success: booleanType().optional(),
42374
+ content: lazyType(() => ListDocumentsContent$outboundSchema).optional()
42375
+ });
42376
+ ((ListDocumentsResponseBody$) => {
42377
+ ListDocumentsResponseBody$.inboundSchema = ListDocumentsResponseBody$inboundSchema;
42378
+ ListDocumentsResponseBody$.outboundSchema = ListDocumentsResponseBody$outboundSchema;
42379
+ })(ListDocumentsResponseBody$ ||= {});
42380
+ });
42381
+
42382
+ // src/models/operations/listdocumenttype.ts
42383
+ var ListDocumentTypeContent$inboundSchema, ListDocumentTypeContent$outboundSchema, ListDocumentTypeContent$, ListDocumentTypeResponseBody$inboundSchema, ListDocumentTypeResponseBody$outboundSchema, ListDocumentTypeResponseBody$;
42384
+ var init_listdocumenttype = __esm(() => {
42385
+ init_lib();
42386
+ init_primitives();
42387
+ init_components();
42388
+ ListDocumentTypeContent$inboundSchema = objectType({
42389
+ document_types: arrayType(DocumentType$inboundSchema).optional()
42390
+ }).transform((v2) => {
42391
+ return remap(v2, {
42392
+ document_types: "documentTypes"
42393
+ });
42394
+ });
42395
+ ListDocumentTypeContent$outboundSchema = objectType({
42396
+ documentTypes: arrayType(DocumentType$outboundSchema).optional()
42397
+ }).transform((v2) => {
42398
+ return remap(v2, {
42399
+ documentTypes: "document_types"
42400
+ });
42401
+ });
42402
+ ((ListDocumentTypeContent$) => {
42403
+ ListDocumentTypeContent$.inboundSchema = ListDocumentTypeContent$inboundSchema;
42404
+ ListDocumentTypeContent$.outboundSchema = ListDocumentTypeContent$outboundSchema;
42405
+ })(ListDocumentTypeContent$ ||= {});
42406
+ ListDocumentTypeResponseBody$inboundSchema = objectType({
42407
+ message: stringType().optional(),
42408
+ success: booleanType().optional(),
42409
+ content: lazyType(() => ListDocumentTypeContent$inboundSchema).optional()
42410
+ });
42411
+ ListDocumentTypeResponseBody$outboundSchema = objectType({
42412
+ message: stringType().optional(),
42413
+ success: booleanType().optional(),
42414
+ content: lazyType(() => ListDocumentTypeContent$outboundSchema).optional()
42415
+ });
42416
+ ((ListDocumentTypeResponseBody$) => {
42417
+ ListDocumentTypeResponseBody$.inboundSchema = ListDocumentTypeResponseBody$inboundSchema;
42418
+ ListDocumentTypeResponseBody$.outboundSchema = ListDocumentTypeResponseBody$outboundSchema;
42419
+ })(ListDocumentTypeResponseBody$ ||= {});
42420
+ });
42421
+
41828
42422
  // src/models/operations/listorders.ts
41829
42423
  var ListOrdersRequest$inboundSchema, ListOrdersRequest$outboundSchema, ListOrdersRequest$, ListOrdersContent$inboundSchema, ListOrdersContent$outboundSchema, ListOrdersContent$, ListOrdersResponseBody$inboundSchema, ListOrdersResponseBody$outboundSchema, ListOrdersResponseBody$;
41830
42424
  var init_listorders = __esm(() => {
@@ -43138,6 +43732,62 @@ var init_updatecart = __esm(() => {
43138
43732
  })(UpdateCartResponseBody$ ||= {});
43139
43733
  });
43140
43734
 
43735
+ // src/models/operations/updatedocument.ts
43736
+ var UpdateDocumentRequest$inboundSchema, UpdateDocumentRequest$outboundSchema, UpdateDocumentRequest$, UpdateDocumentContent$inboundSchema, UpdateDocumentContent$outboundSchema, UpdateDocumentContent$, UpdateDocumentResponseBody$inboundSchema, UpdateDocumentResponseBody$outboundSchema, UpdateDocumentResponseBody$;
43737
+ var init_updatedocument2 = __esm(() => {
43738
+ init_lib();
43739
+ init_primitives();
43740
+ init_components();
43741
+ UpdateDocumentRequest$inboundSchema = objectType({
43742
+ id: stringType(),
43743
+ document_id: stringType(),
43744
+ UpdateDocument: UpdateDocument$inboundSchema.optional()
43745
+ }).transform((v2) => {
43746
+ return remap(v2, {
43747
+ document_id: "documentId",
43748
+ UpdateDocument: "updateDocument"
43749
+ });
43750
+ });
43751
+ UpdateDocumentRequest$outboundSchema = objectType({
43752
+ id: stringType(),
43753
+ documentId: stringType(),
43754
+ updateDocument: UpdateDocument$outboundSchema.optional()
43755
+ }).transform((v2) => {
43756
+ return remap(v2, {
43757
+ documentId: "document_id",
43758
+ updateDocument: "UpdateDocument"
43759
+ });
43760
+ });
43761
+ ((UpdateDocumentRequest$) => {
43762
+ UpdateDocumentRequest$.inboundSchema = UpdateDocumentRequest$inboundSchema;
43763
+ UpdateDocumentRequest$.outboundSchema = UpdateDocumentRequest$outboundSchema;
43764
+ })(UpdateDocumentRequest$ ||= {});
43765
+ UpdateDocumentContent$inboundSchema = objectType({
43766
+ document: Document$inboundSchema.optional()
43767
+ });
43768
+ UpdateDocumentContent$outboundSchema = objectType({
43769
+ document: Document$outboundSchema.optional()
43770
+ });
43771
+ ((UpdateDocumentContent$) => {
43772
+ UpdateDocumentContent$.inboundSchema = UpdateDocumentContent$inboundSchema;
43773
+ UpdateDocumentContent$.outboundSchema = UpdateDocumentContent$outboundSchema;
43774
+ })(UpdateDocumentContent$ ||= {});
43775
+ UpdateDocumentResponseBody$inboundSchema = objectType({
43776
+ message: stringType().optional(),
43777
+ success: booleanType().optional(),
43778
+ content: lazyType(() => UpdateDocumentContent$inboundSchema).optional()
43779
+ });
43780
+ UpdateDocumentResponseBody$outboundSchema = objectType({
43781
+ message: stringType().optional(),
43782
+ success: booleanType().optional(),
43783
+ content: lazyType(() => UpdateDocumentContent$outboundSchema).optional()
43784
+ });
43785
+ ((UpdateDocumentResponseBody$) => {
43786
+ UpdateDocumentResponseBody$.inboundSchema = UpdateDocumentResponseBody$inboundSchema;
43787
+ UpdateDocumentResponseBody$.outboundSchema = UpdateDocumentResponseBody$outboundSchema;
43788
+ })(UpdateDocumentResponseBody$ ||= {});
43789
+ });
43790
+
43141
43791
  // src/models/operations/updatenotificationpreferences.ts
43142
43792
  var UpdateNotificationPreferencesRequestBody$inboundSchema, UpdateNotificationPreferencesRequestBody$outboundSchema, UpdateNotificationPreferencesRequestBody$, UpdateNotificationPreferencesRequest$inboundSchema, UpdateNotificationPreferencesRequest$outboundSchema, UpdateNotificationPreferencesRequest$, UpdateNotificationPreferencesContent$inboundSchema, UpdateNotificationPreferencesContent$outboundSchema, UpdateNotificationPreferencesContent$, UpdateNotificationPreferencesResponseBody$inboundSchema, UpdateNotificationPreferencesResponseBody$outboundSchema, UpdateNotificationPreferencesResponseBody$;
43143
43793
  var init_updatenotificationpreferences = __esm(() => {
@@ -43268,6 +43918,98 @@ var init_updateuser = __esm(() => {
43268
43918
  })(UpdateUserResponseBody$ ||= {});
43269
43919
  });
43270
43920
 
43921
+ // src/models/operations/verifydocument.ts
43922
+ var VerifyDocumentRequestBody$inboundSchema, VerifyDocumentRequestBody$outboundSchema, VerifyDocumentRequestBody$, VerifyDocumentRequest$inboundSchema, VerifyDocumentRequest$outboundSchema, VerifyDocumentRequest$, Document$inboundSchema2, Document$outboundSchema2, Document$2, VerifyDocumentContent$inboundSchema, VerifyDocumentContent$outboundSchema, VerifyDocumentContent$, VerifyDocumentResponseBody$inboundSchema, VerifyDocumentResponseBody$outboundSchema, VerifyDocumentResponseBody$;
43923
+ var init_verifydocument = __esm(() => {
43924
+ init_lib();
43925
+ init_primitives();
43926
+ init_components();
43927
+ VerifyDocumentRequestBody$inboundSchema = objectType({
43928
+ document_number: stringType(),
43929
+ document_type_id: stringType()
43930
+ }).transform((v2) => {
43931
+ return remap(v2, {
43932
+ document_number: "documentNumber",
43933
+ document_type_id: "documentTypeId"
43934
+ });
43935
+ });
43936
+ VerifyDocumentRequestBody$outboundSchema = objectType({
43937
+ documentNumber: stringType(),
43938
+ documentTypeId: stringType()
43939
+ }).transform((v2) => {
43940
+ return remap(v2, {
43941
+ documentNumber: "document_number",
43942
+ documentTypeId: "document_type_id"
43943
+ });
43944
+ });
43945
+ ((VerifyDocumentRequestBody$) => {
43946
+ VerifyDocumentRequestBody$.inboundSchema = VerifyDocumentRequestBody$inboundSchema;
43947
+ VerifyDocumentRequestBody$.outboundSchema = VerifyDocumentRequestBody$outboundSchema;
43948
+ })(VerifyDocumentRequestBody$ ||= {});
43949
+ VerifyDocumentRequest$inboundSchema = objectType({
43950
+ id: stringType(),
43951
+ RequestBody: lazyType(() => VerifyDocumentRequestBody$inboundSchema).optional()
43952
+ }).transform((v2) => {
43953
+ return remap(v2, {
43954
+ RequestBody: "requestBody"
43955
+ });
43956
+ });
43957
+ VerifyDocumentRequest$outboundSchema = objectType({
43958
+ id: stringType(),
43959
+ requestBody: lazyType(() => VerifyDocumentRequestBody$outboundSchema).optional()
43960
+ }).transform((v2) => {
43961
+ return remap(v2, {
43962
+ requestBody: "RequestBody"
43963
+ });
43964
+ });
43965
+ ((VerifyDocumentRequest$) => {
43966
+ VerifyDocumentRequest$.inboundSchema = VerifyDocumentRequest$inboundSchema;
43967
+ VerifyDocumentRequest$.outboundSchema = VerifyDocumentRequest$outboundSchema;
43968
+ })(VerifyDocumentRequest$ ||= {});
43969
+ Document$inboundSchema2 = unionType([
43970
+ GstinDetail$inboundSchema,
43971
+ PanDetail$inboundSchema
43972
+ ]);
43973
+ Document$outboundSchema2 = unionType([
43974
+ GstinDetail$outboundSchema,
43975
+ PanDetail$outboundSchema
43976
+ ]);
43977
+ ((Document$) => {
43978
+ Document$.inboundSchema = Document$inboundSchema2;
43979
+ Document$.outboundSchema = Document$outboundSchema2;
43980
+ })(Document$2 ||= {});
43981
+ VerifyDocumentContent$inboundSchema = objectType({
43982
+ document: unionType([
43983
+ GstinDetail$inboundSchema,
43984
+ PanDetail$inboundSchema
43985
+ ]).optional()
43986
+ });
43987
+ VerifyDocumentContent$outboundSchema = objectType({
43988
+ document: unionType([
43989
+ GstinDetail$outboundSchema,
43990
+ PanDetail$outboundSchema
43991
+ ]).optional()
43992
+ });
43993
+ ((VerifyDocumentContent$) => {
43994
+ VerifyDocumentContent$.inboundSchema = VerifyDocumentContent$inboundSchema;
43995
+ VerifyDocumentContent$.outboundSchema = VerifyDocumentContent$outboundSchema;
43996
+ })(VerifyDocumentContent$ ||= {});
43997
+ VerifyDocumentResponseBody$inboundSchema = objectType({
43998
+ message: stringType().optional(),
43999
+ success: booleanType().optional(),
44000
+ content: lazyType(() => VerifyDocumentContent$inboundSchema).optional()
44001
+ });
44002
+ VerifyDocumentResponseBody$outboundSchema = objectType({
44003
+ message: stringType().optional(),
44004
+ success: booleanType().optional(),
44005
+ content: lazyType(() => VerifyDocumentContent$outboundSchema).optional()
44006
+ });
44007
+ ((VerifyDocumentResponseBody$) => {
44008
+ VerifyDocumentResponseBody$.inboundSchema = VerifyDocumentResponseBody$inboundSchema;
44009
+ VerifyDocumentResponseBody$.outboundSchema = VerifyDocumentResponseBody$outboundSchema;
44010
+ })(VerifyDocumentResponseBody$ ||= {});
44011
+ });
44012
+
43271
44013
  // src/models/operations/verifyotp.ts
43272
44014
  var OtpAction, OtpAction$inboundSchema, OtpAction$outboundSchema, OtpAction$, VerifyOtpRequestBody$inboundSchema, VerifyOtpRequestBody$outboundSchema, VerifyOtpRequestBody$, VerifyOtpContent$inboundSchema, VerifyOtpContent$outboundSchema, VerifyOtpContent$, VerifyOtpResponseBody$inboundSchema, VerifyOtpResponseBody$outboundSchema, VerifyOtpResponseBody$;
43273
44015
  var init_verifyotp = __esm(() => {
@@ -43362,15 +44104,18 @@ var init_operations = __esm(() => {
43362
44104
  init_createaddress();
43363
44105
  init_createcart();
43364
44106
  init_createcartaddress();
44107
+ init_createdocument();
43365
44108
  init_createnotificationpreferences();
43366
44109
  init_createorder();
43367
44110
  init_deleteaddress();
43368
44111
  init_deletecart();
44112
+ init_deletedocument();
43369
44113
  init_deleteusercart();
43370
44114
  init_generateotp();
43371
44115
  init_getaddressdetail();
43372
44116
  init_getanonymoustoken();
43373
44117
  init_getcart();
44118
+ init_getdocument();
43374
44119
  init_getnotificationpreferences();
43375
44120
  init_getorderdetail();
43376
44121
  init_getpaymentstatus();
@@ -43382,6 +44127,8 @@ var init_operations = __esm(() => {
43382
44127
  init_listcategories();
43383
44128
  init_listcountrypincodes();
43384
44129
  init_listcrosssellproducts();
44130
+ init_listdocuments();
44131
+ init_listdocumenttype();
43385
44132
  init_listorders();
43386
44133
  init_listordershipments();
43387
44134
  init_listproductreviews();
@@ -43402,8 +44149,10 @@ var init_operations = __esm(() => {
43402
44149
  init_subscribenewsletter();
43403
44150
  init_updateaddressdetail();
43404
44151
  init_updatecart();
44152
+ init_updatedocument2();
43405
44153
  init_updatenotificationpreferences();
43406
44154
  init_updateuser();
44155
+ init_verifydocument();
43407
44156
  init_verifyotp();
43408
44157
  });
43409
44158
 
@@ -47674,13 +48423,594 @@ async function $do40(client, request, options) {
47674
48423
  return [doResult, { status: "request-error", request: req }];
47675
48424
  }
47676
48425
  const response = doResult.value;
47677
- const [result] = await match(json(200, ListUserReviewsResponseBody$inboundSchema), fail("4XX"), fail("5XX"))(response);
48426
+ const [result] = await match(json(200, ListUserReviewsResponseBody$inboundSchema), fail("4XX"), fail("5XX"))(response);
48427
+ if (!result.ok) {
48428
+ return [result, { status: "complete", request: req, response }];
48429
+ }
48430
+ return [result, { status: "complete", request: req, response }];
48431
+ }
48432
+ var init_customersListUserReviews = __esm(() => {
48433
+ init_encodings();
48434
+ init_matchers();
48435
+ init_primitives();
48436
+ init_schemas();
48437
+ init_security();
48438
+ init_url();
48439
+ init_operations();
48440
+ init_async();
48441
+ });
48442
+
48443
+ // src/mcp-server/tools/customersListUserReviews.ts
48444
+ var args39, tool$customersListUserReviews;
48445
+ var init_customersListUserReviews2 = __esm(() => {
48446
+ init_customersListUserReviews();
48447
+ init_operations();
48448
+ init_tools();
48449
+ args39 = {
48450
+ request: ListUserReviewsRequest$inboundSchema
48451
+ };
48452
+ tool$customersListUserReviews = {
48453
+ name: "customers-list-user-reviews",
48454
+ description: `Retrieve all reviews
48455
+
48456
+ Retrieve all reviews`,
48457
+ args: args39,
48458
+ tool: async (client, args40, ctx) => {
48459
+ const [result, apiCall] = await customersListUserReviews(client, args40.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
48460
+ if (!result.ok) {
48461
+ return {
48462
+ content: [{ type: "text", text: result.error.message }],
48463
+ isError: true
48464
+ };
48465
+ }
48466
+ const value = result.value;
48467
+ return formatResult(value, apiCall);
48468
+ }
48469
+ };
48470
+ });
48471
+
48472
+ // src/funcs/customersUpdateAddressDetail.ts
48473
+ function customersUpdateAddressDetail(client, request, options) {
48474
+ return new APIPromise($do41(client, request, options));
48475
+ }
48476
+ async function $do41(client, request, options) {
48477
+ const parsed = safeParse(request, (value) => UpdateAddressDetailRequest$outboundSchema.parse(value), "Input validation failed");
48478
+ if (!parsed.ok) {
48479
+ return [parsed, { status: "invalid" }];
48480
+ }
48481
+ const payload = parsed.value;
48482
+ const body = encodeJSON("body", payload.RequestBody, { explode: true });
48483
+ const pathParams = {
48484
+ address_id: encodeSimple("address_id", payload.address_id, {
48485
+ explode: false,
48486
+ charEncoding: "percent"
48487
+ }),
48488
+ user_id: encodeSimple("user_id", payload.user_id, {
48489
+ explode: false,
48490
+ charEncoding: "percent"
48491
+ })
48492
+ };
48493
+ const path = pathToFunc("/customers/{user_id}/addresses/{address_id}")(pathParams);
48494
+ const headers = new Headers(compactMap({
48495
+ "Content-Type": "application/json",
48496
+ Accept: "application/json"
48497
+ }));
48498
+ const secConfig = await extractSecurity(client._options.authorization);
48499
+ const securityInput = secConfig == null ? {} : { authorization: secConfig };
48500
+ const requestSecurity = resolveGlobalSecurity(securityInput);
48501
+ const context = {
48502
+ baseURL: options?.serverURL ?? client._baseURL ?? "",
48503
+ operationID: "update-address-detail",
48504
+ oAuth2Scopes: [],
48505
+ resolvedSecurity: requestSecurity,
48506
+ securitySource: client._options.authorization,
48507
+ retryConfig: options?.retries || client._options.retryConfig || { strategy: "none" },
48508
+ retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"]
48509
+ };
48510
+ const requestRes = client._createRequest(context, {
48511
+ security: requestSecurity,
48512
+ method: "PUT",
48513
+ baseURL: options?.serverURL,
48514
+ path,
48515
+ headers,
48516
+ body,
48517
+ timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1
48518
+ }, options);
48519
+ if (!requestRes.ok) {
48520
+ return [requestRes, { status: "invalid" }];
48521
+ }
48522
+ const req = requestRes.value;
48523
+ const doResult = await client._do(req, {
48524
+ context,
48525
+ errorCodes: ["400", "401", "404", "4XX", "5XX"],
48526
+ retryConfig: context.retryConfig,
48527
+ retryCodes: context.retryCodes
48528
+ });
48529
+ if (!doResult.ok) {
48530
+ return [doResult, { status: "request-error", request: req }];
48531
+ }
48532
+ const response = doResult.value;
48533
+ const responseFields = {
48534
+ HttpMeta: { Response: response, Request: req }
48535
+ };
48536
+ const [result] = await match(json(200, UpdateAddressDetailResponseBody$inboundSchema), jsonErr(400, BadRequest$inboundSchema), jsonErr(401, Unauthorized$inboundSchema), jsonErr(404, NotFound$inboundSchema), fail("4XX"), fail("5XX"))(response, { extraFields: responseFields });
48537
+ if (!result.ok) {
48538
+ return [result, { status: "complete", request: req, response }];
48539
+ }
48540
+ return [result, { status: "complete", request: req, response }];
48541
+ }
48542
+ var init_customersUpdateAddressDetail = __esm(() => {
48543
+ init_encodings();
48544
+ init_matchers();
48545
+ init_primitives();
48546
+ init_schemas();
48547
+ init_security();
48548
+ init_url();
48549
+ init_errors();
48550
+ init_operations();
48551
+ init_async();
48552
+ });
48553
+
48554
+ // src/mcp-server/tools/customersUpdateAddressDetail.ts
48555
+ var args40, tool$customersUpdateAddressDetail;
48556
+ var init_customersUpdateAddressDetail2 = __esm(() => {
48557
+ init_customersUpdateAddressDetail();
48558
+ init_operations();
48559
+ init_tools();
48560
+ args40 = {
48561
+ request: UpdateAddressDetailRequest$inboundSchema
48562
+ };
48563
+ tool$customersUpdateAddressDetail = {
48564
+ name: "customers-update-address-detail",
48565
+ description: `Update particular address
48566
+
48567
+ Update address`,
48568
+ args: args40,
48569
+ tool: async (client, args41, ctx) => {
48570
+ const [result, apiCall] = await customersUpdateAddressDetail(client, args41.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
48571
+ if (!result.ok) {
48572
+ return {
48573
+ content: [{ type: "text", text: result.error.message }],
48574
+ isError: true
48575
+ };
48576
+ }
48577
+ const value = result.value;
48578
+ return formatResult(value, apiCall);
48579
+ }
48580
+ };
48581
+ });
48582
+
48583
+ // src/lib/files.ts
48584
+ async function readableStreamToArrayBuffer(readable) {
48585
+ const reader = readable.getReader();
48586
+ const chunks = [];
48587
+ let totalLength = 0;
48588
+ let done = false;
48589
+ while (!done) {
48590
+ const { value, done: doneReading } = await reader.read();
48591
+ if (doneReading) {
48592
+ done = true;
48593
+ } else {
48594
+ chunks.push(value);
48595
+ totalLength += value.length;
48596
+ }
48597
+ }
48598
+ const concatenatedChunks = new Uint8Array(totalLength);
48599
+ let offset = 0;
48600
+ for (const chunk of chunks) {
48601
+ concatenatedChunks.set(chunk, offset);
48602
+ offset += chunk.length;
48603
+ }
48604
+ return concatenatedChunks.buffer;
48605
+ }
48606
+
48607
+ // src/types/streams.ts
48608
+ function isReadableStream(val) {
48609
+ if (typeof val !== "object" || val === null) {
48610
+ return false;
48611
+ }
48612
+ const stream = val;
48613
+ return typeof stream.getReader === "function" && typeof stream.cancel === "function" && typeof stream.tee === "function";
48614
+ }
48615
+
48616
+ // src/funcs/kycCreateDocument.ts
48617
+ function kycCreateDocument(client, request, options) {
48618
+ return new APIPromise($do42(client, request, options));
48619
+ }
48620
+ async function $do42(client, request, options) {
48621
+ const parsed = safeParse(request, (value) => CreateDocumentRequest$outboundSchema.parse(value), "Input validation failed");
48622
+ if (!parsed.ok) {
48623
+ return [parsed, { status: "invalid" }];
48624
+ }
48625
+ const payload = parsed.value;
48626
+ const body = new FormData;
48627
+ if (payload.Document != null) {
48628
+ appendForm(body, "document_number", payload.Document.document_number);
48629
+ appendForm(body, "document_type_id", payload.Document.document_type_id);
48630
+ if (payload.Document.file !== undefined) {
48631
+ if (isBlobLike(payload.Document.file)) {
48632
+ appendForm(body, "file", payload.Document.file);
48633
+ } else if (isReadableStream(payload.Document.file.content)) {
48634
+ const buffer = await readableStreamToArrayBuffer(payload.Document.file.content);
48635
+ const blob = new Blob([buffer], { type: "application/octet-stream" });
48636
+ appendForm(body, "file", blob);
48637
+ } else {
48638
+ appendForm(body, "file", new Blob([payload.Document.file.content], {
48639
+ type: "application/octet-stream"
48640
+ }), payload.Document.file.fileName);
48641
+ }
48642
+ }
48643
+ if (payload.Document.note !== undefined) {
48644
+ appendForm(body, "note", payload.Document.note);
48645
+ }
48646
+ }
48647
+ const pathParams = {
48648
+ id: encodeSimple("id", payload.id, {
48649
+ explode: false,
48650
+ charEncoding: "percent"
48651
+ })
48652
+ };
48653
+ const path = pathToFunc("/customers/{id}/documents")(pathParams);
48654
+ const headers = new Headers(compactMap({
48655
+ Accept: "application/json"
48656
+ }));
48657
+ const secConfig = await extractSecurity(client._options.authorization);
48658
+ const securityInput = secConfig == null ? {} : { authorization: secConfig };
48659
+ const requestSecurity = resolveGlobalSecurity(securityInput);
48660
+ const context = {
48661
+ baseURL: options?.serverURL ?? client._baseURL ?? "",
48662
+ operationID: "create-document",
48663
+ oAuth2Scopes: [],
48664
+ resolvedSecurity: requestSecurity,
48665
+ securitySource: client._options.authorization,
48666
+ retryConfig: options?.retries || client._options.retryConfig || { strategy: "none" },
48667
+ retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"]
48668
+ };
48669
+ const requestRes = client._createRequest(context, {
48670
+ security: requestSecurity,
48671
+ method: "POST",
48672
+ baseURL: options?.serverURL,
48673
+ path,
48674
+ headers,
48675
+ body,
48676
+ timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1
48677
+ }, options);
48678
+ if (!requestRes.ok) {
48679
+ return [requestRes, { status: "invalid" }];
48680
+ }
48681
+ const req = requestRes.value;
48682
+ const doResult = await client._do(req, {
48683
+ context,
48684
+ errorCodes: ["4XX", "5XX"],
48685
+ retryConfig: context.retryConfig,
48686
+ retryCodes: context.retryCodes
48687
+ });
48688
+ if (!doResult.ok) {
48689
+ return [doResult, { status: "request-error", request: req }];
48690
+ }
48691
+ const response = doResult.value;
48692
+ const [result] = await match(json(200, CreateDocumentResponseBody$inboundSchema), fail("4XX"), fail("5XX"))(response);
48693
+ if (!result.ok) {
48694
+ return [result, { status: "complete", request: req, response }];
48695
+ }
48696
+ return [result, { status: "complete", request: req, response }];
48697
+ }
48698
+ var init_kycCreateDocument = __esm(() => {
48699
+ init_encodings();
48700
+ init_matchers();
48701
+ init_primitives();
48702
+ init_schemas();
48703
+ init_security();
48704
+ init_url();
48705
+ init_operations();
48706
+ init_async();
48707
+ init_blobs();
48708
+ });
48709
+
48710
+ // src/mcp-server/tools/kycCreateDocument.ts
48711
+ var args41, tool$kycCreateDocument;
48712
+ var init_kycCreateDocument2 = __esm(() => {
48713
+ init_kycCreateDocument();
48714
+ init_operations();
48715
+ init_tools();
48716
+ args41 = {
48717
+ request: CreateDocumentRequest$inboundSchema
48718
+ };
48719
+ tool$kycCreateDocument = {
48720
+ name: "kyc-create-document",
48721
+ description: `Create document
48722
+
48723
+ Create document`,
48724
+ args: args41,
48725
+ tool: async (client, args42, ctx) => {
48726
+ const [result, apiCall] = await kycCreateDocument(client, args42.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
48727
+ if (!result.ok) {
48728
+ return {
48729
+ content: [{ type: "text", text: result.error.message }],
48730
+ isError: true
48731
+ };
48732
+ }
48733
+ const value = result.value;
48734
+ return formatResult(value, apiCall);
48735
+ }
48736
+ };
48737
+ });
48738
+
48739
+ // src/funcs/kycDeleteDocument.ts
48740
+ function kycDeleteDocument(client, request, options) {
48741
+ return new APIPromise($do43(client, request, options));
48742
+ }
48743
+ async function $do43(client, request, options) {
48744
+ const parsed = safeParse(request, (value) => DeleteDocumentRequest$outboundSchema.parse(value), "Input validation failed");
48745
+ if (!parsed.ok) {
48746
+ return [parsed, { status: "invalid" }];
48747
+ }
48748
+ const payload = parsed.value;
48749
+ const body = null;
48750
+ const pathParams = {
48751
+ document_id: encodeSimple("document_id", payload.document_id, {
48752
+ explode: false,
48753
+ charEncoding: "percent"
48754
+ }),
48755
+ id: encodeSimple("id", payload.id, {
48756
+ explode: false,
48757
+ charEncoding: "percent"
48758
+ })
48759
+ };
48760
+ const path = pathToFunc("/customers/{id}/documents/{document_id}")(pathParams);
48761
+ const headers = new Headers(compactMap({
48762
+ Accept: "application/json"
48763
+ }));
48764
+ const secConfig = await extractSecurity(client._options.authorization);
48765
+ const securityInput = secConfig == null ? {} : { authorization: secConfig };
48766
+ const requestSecurity = resolveGlobalSecurity(securityInput);
48767
+ const context = {
48768
+ baseURL: options?.serverURL ?? client._baseURL ?? "",
48769
+ operationID: "delete-document",
48770
+ oAuth2Scopes: [],
48771
+ resolvedSecurity: requestSecurity,
48772
+ securitySource: client._options.authorization,
48773
+ retryConfig: options?.retries || client._options.retryConfig || { strategy: "none" },
48774
+ retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"]
48775
+ };
48776
+ const requestRes = client._createRequest(context, {
48777
+ security: requestSecurity,
48778
+ method: "DELETE",
48779
+ baseURL: options?.serverURL,
48780
+ path,
48781
+ headers,
48782
+ body,
48783
+ timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1
48784
+ }, options);
48785
+ if (!requestRes.ok) {
48786
+ return [requestRes, { status: "invalid" }];
48787
+ }
48788
+ const req = requestRes.value;
48789
+ const doResult = await client._do(req, {
48790
+ context,
48791
+ errorCodes: ["4XX", "5XX"],
48792
+ retryConfig: context.retryConfig,
48793
+ retryCodes: context.retryCodes
48794
+ });
48795
+ if (!doResult.ok) {
48796
+ return [doResult, { status: "request-error", request: req }];
48797
+ }
48798
+ const response = doResult.value;
48799
+ const [result] = await match(json(200, DeleteDocumentResponseBody$inboundSchema), fail("4XX"), fail("5XX"))(response);
48800
+ if (!result.ok) {
48801
+ return [result, { status: "complete", request: req, response }];
48802
+ }
48803
+ return [result, { status: "complete", request: req, response }];
48804
+ }
48805
+ var init_kycDeleteDocument = __esm(() => {
48806
+ init_encodings();
48807
+ init_matchers();
48808
+ init_primitives();
48809
+ init_schemas();
48810
+ init_security();
48811
+ init_url();
48812
+ init_operations();
48813
+ init_async();
48814
+ });
48815
+
48816
+ // src/mcp-server/tools/kycDeleteDocument.ts
48817
+ var args42, tool$kycDeleteDocument;
48818
+ var init_kycDeleteDocument2 = __esm(() => {
48819
+ init_kycDeleteDocument();
48820
+ init_operations();
48821
+ init_tools();
48822
+ args42 = {
48823
+ request: DeleteDocumentRequest$inboundSchema
48824
+ };
48825
+ tool$kycDeleteDocument = {
48826
+ name: "kyc-delete-document",
48827
+ description: `Delete document
48828
+
48829
+ Delete document`,
48830
+ args: args42,
48831
+ tool: async (client, args43, ctx) => {
48832
+ const [result, apiCall] = await kycDeleteDocument(client, args43.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
48833
+ if (!result.ok) {
48834
+ return {
48835
+ content: [{ type: "text", text: result.error.message }],
48836
+ isError: true
48837
+ };
48838
+ }
48839
+ const value = result.value;
48840
+ return formatResult(value, apiCall);
48841
+ }
48842
+ };
48843
+ });
48844
+
48845
+ // src/funcs/kycGetDocument.ts
48846
+ function kycGetDocument(client, request, options) {
48847
+ return new APIPromise($do44(client, request, options));
48848
+ }
48849
+ async function $do44(client, request, options) {
48850
+ const parsed = safeParse(request, (value) => GetDocumentRequest$outboundSchema.parse(value), "Input validation failed");
48851
+ if (!parsed.ok) {
48852
+ return [parsed, { status: "invalid" }];
48853
+ }
48854
+ const payload = parsed.value;
48855
+ const body = null;
48856
+ const pathParams = {
48857
+ document_id: encodeSimple("document_id", payload.document_id, {
48858
+ explode: false,
48859
+ charEncoding: "percent"
48860
+ }),
48861
+ id: encodeSimple("id", payload.id, {
48862
+ explode: false,
48863
+ charEncoding: "percent"
48864
+ })
48865
+ };
48866
+ const path = pathToFunc("/customers/{id}/documents/{document_id}")(pathParams);
48867
+ const headers = new Headers(compactMap({
48868
+ Accept: "application/json"
48869
+ }));
48870
+ const secConfig = await extractSecurity(client._options.authorization);
48871
+ const securityInput = secConfig == null ? {} : { authorization: secConfig };
48872
+ const requestSecurity = resolveGlobalSecurity(securityInput);
48873
+ const context = {
48874
+ baseURL: options?.serverURL ?? client._baseURL ?? "",
48875
+ operationID: "get-document",
48876
+ oAuth2Scopes: [],
48877
+ resolvedSecurity: requestSecurity,
48878
+ securitySource: client._options.authorization,
48879
+ retryConfig: options?.retries || client._options.retryConfig || { strategy: "none" },
48880
+ retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"]
48881
+ };
48882
+ const requestRes = client._createRequest(context, {
48883
+ security: requestSecurity,
48884
+ method: "GET",
48885
+ baseURL: options?.serverURL,
48886
+ path,
48887
+ headers,
48888
+ body,
48889
+ timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1
48890
+ }, options);
48891
+ if (!requestRes.ok) {
48892
+ return [requestRes, { status: "invalid" }];
48893
+ }
48894
+ const req = requestRes.value;
48895
+ const doResult = await client._do(req, {
48896
+ context,
48897
+ errorCodes: ["4XX", "5XX"],
48898
+ retryConfig: context.retryConfig,
48899
+ retryCodes: context.retryCodes
48900
+ });
48901
+ if (!doResult.ok) {
48902
+ return [doResult, { status: "request-error", request: req }];
48903
+ }
48904
+ const response = doResult.value;
48905
+ const [result] = await match(json(200, GetDocumentResponseBody$inboundSchema), fail("4XX"), fail("5XX"))(response);
48906
+ if (!result.ok) {
48907
+ return [result, { status: "complete", request: req, response }];
48908
+ }
48909
+ return [result, { status: "complete", request: req, response }];
48910
+ }
48911
+ var init_kycGetDocument = __esm(() => {
48912
+ init_encodings();
48913
+ init_matchers();
48914
+ init_primitives();
48915
+ init_schemas();
48916
+ init_security();
48917
+ init_url();
48918
+ init_operations();
48919
+ init_async();
48920
+ });
48921
+
48922
+ // src/mcp-server/tools/kycGetDocument.ts
48923
+ var args43, tool$kycGetDocument;
48924
+ var init_kycGetDocument2 = __esm(() => {
48925
+ init_kycGetDocument();
48926
+ init_operations();
48927
+ init_tools();
48928
+ args43 = {
48929
+ request: GetDocumentRequest$inboundSchema
48930
+ };
48931
+ tool$kycGetDocument = {
48932
+ name: "kyc-get-document",
48933
+ description: `Retrieve document detail
48934
+
48935
+ Retrieve document detail`,
48936
+ args: args43,
48937
+ tool: async (client, args44, ctx) => {
48938
+ const [result, apiCall] = await kycGetDocument(client, args44.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
48939
+ if (!result.ok) {
48940
+ return {
48941
+ content: [{ type: "text", text: result.error.message }],
48942
+ isError: true
48943
+ };
48944
+ }
48945
+ const value = result.value;
48946
+ return formatResult(value, apiCall);
48947
+ }
48948
+ };
48949
+ });
48950
+
48951
+ // src/funcs/kycListDocuments.ts
48952
+ function kycListDocuments(client, request, options) {
48953
+ return new APIPromise($do45(client, request, options));
48954
+ }
48955
+ async function $do45(client, request, options) {
48956
+ const parsed = safeParse(request, (value) => ListDocumentsRequest$outboundSchema.parse(value), "Input validation failed");
48957
+ if (!parsed.ok) {
48958
+ return [parsed, { status: "invalid" }];
48959
+ }
48960
+ const payload = parsed.value;
48961
+ const body = null;
48962
+ const pathParams = {
48963
+ id: encodeSimple("id", payload.id, {
48964
+ explode: false,
48965
+ charEncoding: "percent"
48966
+ })
48967
+ };
48968
+ const path = pathToFunc("/customers/{id}/documents")(pathParams);
48969
+ const headers = new Headers(compactMap({
48970
+ Accept: "application/json"
48971
+ }));
48972
+ const secConfig = await extractSecurity(client._options.authorization);
48973
+ const securityInput = secConfig == null ? {} : { authorization: secConfig };
48974
+ const requestSecurity = resolveGlobalSecurity(securityInput);
48975
+ const context = {
48976
+ baseURL: options?.serverURL ?? client._baseURL ?? "",
48977
+ operationID: "list-documents",
48978
+ oAuth2Scopes: [],
48979
+ resolvedSecurity: requestSecurity,
48980
+ securitySource: client._options.authorization,
48981
+ retryConfig: options?.retries || client._options.retryConfig || { strategy: "none" },
48982
+ retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"]
48983
+ };
48984
+ const requestRes = client._createRequest(context, {
48985
+ security: requestSecurity,
48986
+ method: "GET",
48987
+ baseURL: options?.serverURL,
48988
+ path,
48989
+ headers,
48990
+ body,
48991
+ timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1
48992
+ }, options);
48993
+ if (!requestRes.ok) {
48994
+ return [requestRes, { status: "invalid" }];
48995
+ }
48996
+ const req = requestRes.value;
48997
+ const doResult = await client._do(req, {
48998
+ context,
48999
+ errorCodes: ["4XX", "5XX"],
49000
+ retryConfig: context.retryConfig,
49001
+ retryCodes: context.retryCodes
49002
+ });
49003
+ if (!doResult.ok) {
49004
+ return [doResult, { status: "request-error", request: req }];
49005
+ }
49006
+ const response = doResult.value;
49007
+ const [result] = await match(json(200, ListDocumentsResponseBody$inboundSchema), fail("4XX"), fail("5XX"))(response);
47678
49008
  if (!result.ok) {
47679
49009
  return [result, { status: "complete", request: req, response }];
47680
49010
  }
47681
49011
  return [result, { status: "complete", request: req, response }];
47682
49012
  }
47683
- var init_customersListUserReviews = __esm(() => {
49013
+ var init_kycListDocuments = __esm(() => {
47684
49014
  init_encodings();
47685
49015
  init_matchers();
47686
49016
  init_primitives();
@@ -47691,23 +49021,23 @@ var init_customersListUserReviews = __esm(() => {
47691
49021
  init_async();
47692
49022
  });
47693
49023
 
47694
- // src/mcp-server/tools/customersListUserReviews.ts
47695
- var args39, tool$customersListUserReviews;
47696
- var init_customersListUserReviews2 = __esm(() => {
47697
- init_customersListUserReviews();
49024
+ // src/mcp-server/tools/kycListDocuments.ts
49025
+ var args44, tool$kycListDocuments;
49026
+ var init_kycListDocuments2 = __esm(() => {
49027
+ init_kycListDocuments();
47698
49028
  init_operations();
47699
49029
  init_tools();
47700
- args39 = {
47701
- request: ListUserReviewsRequest$inboundSchema
49030
+ args44 = {
49031
+ request: ListDocumentsRequest$inboundSchema
47702
49032
  };
47703
- tool$customersListUserReviews = {
47704
- name: "customers-list-user-reviews",
47705
- description: `Retrieve all reviews
49033
+ tool$kycListDocuments = {
49034
+ name: "kyc-list-documents",
49035
+ description: `List all documents
47706
49036
 
47707
- Retrieve all reviews`,
47708
- args: args39,
47709
- tool: async (client, args40, ctx) => {
47710
- const [result, apiCall] = await customersListUserReviews(client, args40.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
49037
+ List all documents added by a particular customer.`,
49038
+ args: args44,
49039
+ tool: async (client, args45, ctx) => {
49040
+ const [result, apiCall] = await kycListDocuments(client, args45.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
47711
49041
  if (!result.ok) {
47712
49042
  return {
47713
49043
  content: [{ type: "text", text: result.error.message }],
@@ -47720,30 +49050,132 @@ Retrieve all reviews`,
47720
49050
  };
47721
49051
  });
47722
49052
 
47723
- // src/funcs/customersUpdateAddressDetail.ts
47724
- function customersUpdateAddressDetail(client, request, options) {
47725
- return new APIPromise($do41(client, request, options));
49053
+ // src/funcs/kycListDocumentType.ts
49054
+ function kycListDocumentType(client, options) {
49055
+ return new APIPromise($do46(client, options));
47726
49056
  }
47727
- async function $do41(client, request, options) {
47728
- const parsed = safeParse(request, (value) => UpdateAddressDetailRequest$outboundSchema.parse(value), "Input validation failed");
49057
+ async function $do46(client, options) {
49058
+ const path = pathToFunc("/store/document-type")();
49059
+ const headers = new Headers(compactMap({
49060
+ Accept: "application/json"
49061
+ }));
49062
+ const secConfig = await extractSecurity(client._options.authorization);
49063
+ const securityInput = secConfig == null ? {} : { authorization: secConfig };
49064
+ const requestSecurity = resolveGlobalSecurity(securityInput);
49065
+ const context = {
49066
+ baseURL: options?.serverURL ?? client._baseURL ?? "",
49067
+ operationID: "list-document-type",
49068
+ oAuth2Scopes: [],
49069
+ resolvedSecurity: requestSecurity,
49070
+ securitySource: client._options.authorization,
49071
+ retryConfig: options?.retries || client._options.retryConfig || { strategy: "none" },
49072
+ retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"]
49073
+ };
49074
+ const requestRes = client._createRequest(context, {
49075
+ security: requestSecurity,
49076
+ method: "GET",
49077
+ baseURL: options?.serverURL,
49078
+ path,
49079
+ headers,
49080
+ timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1
49081
+ }, options);
49082
+ if (!requestRes.ok) {
49083
+ return [requestRes, { status: "invalid" }];
49084
+ }
49085
+ const req = requestRes.value;
49086
+ const doResult = await client._do(req, {
49087
+ context,
49088
+ errorCodes: ["4XX", "5XX"],
49089
+ retryConfig: context.retryConfig,
49090
+ retryCodes: context.retryCodes
49091
+ });
49092
+ if (!doResult.ok) {
49093
+ return [doResult, { status: "request-error", request: req }];
49094
+ }
49095
+ const response = doResult.value;
49096
+ const [result] = await match(json(200, ListDocumentTypeResponseBody$inboundSchema), fail("4XX"), fail("5XX"))(response);
49097
+ if (!result.ok) {
49098
+ return [result, { status: "complete", request: req, response }];
49099
+ }
49100
+ return [result, { status: "complete", request: req, response }];
49101
+ }
49102
+ var init_kycListDocumentType = __esm(() => {
49103
+ init_matchers();
49104
+ init_primitives();
49105
+ init_security();
49106
+ init_url();
49107
+ init_operations();
49108
+ init_async();
49109
+ });
49110
+
49111
+ // src/mcp-server/tools/kycListDocumentType.ts
49112
+ var tool$kycListDocumentType;
49113
+ var init_kycListDocumentType2 = __esm(() => {
49114
+ init_kycListDocumentType();
49115
+ init_tools();
49116
+ tool$kycListDocumentType = {
49117
+ name: "kyc-list-document-type",
49118
+ description: `List all document types
49119
+
49120
+ List all kyc documents types configured for a particular store.`,
49121
+ tool: async (client, ctx) => {
49122
+ const [result, apiCall] = await kycListDocumentType(client, { fetchOptions: { signal: ctx.signal } }).$inspect();
49123
+ if (!result.ok) {
49124
+ return {
49125
+ content: [{ type: "text", text: result.error.message }],
49126
+ isError: true
49127
+ };
49128
+ }
49129
+ const value = result.value;
49130
+ return formatResult(value, apiCall);
49131
+ }
49132
+ };
49133
+ });
49134
+
49135
+ // src/funcs/kycUpdateDocument.ts
49136
+ function kycUpdateDocument(client, request, options) {
49137
+ return new APIPromise($do47(client, request, options));
49138
+ }
49139
+ async function $do47(client, request, options) {
49140
+ const parsed = safeParse(request, (value) => UpdateDocumentRequest$outboundSchema.parse(value), "Input validation failed");
47729
49141
  if (!parsed.ok) {
47730
49142
  return [parsed, { status: "invalid" }];
47731
49143
  }
47732
49144
  const payload = parsed.value;
47733
- const body = encodeJSON("body", payload.RequestBody, { explode: true });
49145
+ const body = new FormData;
49146
+ if (payload.UpdateDocument != null) {
49147
+ appendForm(body, "document_number", payload.UpdateDocument.document_number);
49148
+ appendForm(body, "document_type_id", payload.UpdateDocument.document_type_id);
49149
+ appendForm(body, "modified_reason", payload.UpdateDocument.modified_reason);
49150
+ if (payload.UpdateDocument.file !== undefined) {
49151
+ if (isBlobLike(payload.UpdateDocument.file)) {
49152
+ appendForm(body, "file", payload.UpdateDocument.file);
49153
+ } else if (isReadableStream(payload.UpdateDocument.file.content)) {
49154
+ const buffer = await readableStreamToArrayBuffer(payload.UpdateDocument.file.content);
49155
+ const blob = new Blob([buffer], { type: "application/octet-stream" });
49156
+ appendForm(body, "file", blob);
49157
+ } else {
49158
+ appendForm(body, "file", new Blob([payload.UpdateDocument.file.content], {
49159
+ type: "application/octet-stream"
49160
+ }), payload.UpdateDocument.file.fileName);
49161
+ }
49162
+ }
49163
+ if (payload.UpdateDocument.note !== undefined) {
49164
+ appendForm(body, "note", payload.UpdateDocument.note);
49165
+ }
49166
+ }
47734
49167
  const pathParams = {
47735
- address_id: encodeSimple("address_id", payload.address_id, {
49168
+ document_id: encodeSimple("document_id", payload.document_id, {
47736
49169
  explode: false,
47737
49170
  charEncoding: "percent"
47738
49171
  }),
47739
- user_id: encodeSimple("user_id", payload.user_id, {
49172
+ id: encodeSimple("id", payload.id, {
47740
49173
  explode: false,
47741
49174
  charEncoding: "percent"
47742
49175
  })
47743
49176
  };
47744
- const path = pathToFunc("/customers/{user_id}/addresses/{address_id}")(pathParams);
49177
+ const path = pathToFunc("/customers/{id}/documents/{document_id}")(pathParams);
47745
49178
  const headers = new Headers(compactMap({
47746
- "Content-Type": "application/json",
47747
49179
  Accept: "application/json"
47748
49180
  }));
47749
49181
  const secConfig = await extractSecurity(client._options.authorization);
@@ -47751,7 +49183,7 @@ async function $do41(client, request, options) {
47751
49183
  const requestSecurity = resolveGlobalSecurity(securityInput);
47752
49184
  const context = {
47753
49185
  baseURL: options?.serverURL ?? client._baseURL ?? "",
47754
- operationID: "update-address-detail",
49186
+ operationID: "update-document",
47755
49187
  oAuth2Scopes: [],
47756
49188
  resolvedSecurity: requestSecurity,
47757
49189
  securitySource: client._options.authorization,
@@ -47773,7 +49205,7 @@ async function $do41(client, request, options) {
47773
49205
  const req = requestRes.value;
47774
49206
  const doResult = await client._do(req, {
47775
49207
  context,
47776
- errorCodes: ["400", "401", "404", "4XX", "5XX"],
49208
+ errorCodes: ["4XX", "5XX"],
47777
49209
  retryConfig: context.retryConfig,
47778
49210
  retryCodes: context.retryCodes
47779
49211
  });
@@ -47781,44 +49213,144 @@ async function $do41(client, request, options) {
47781
49213
  return [doResult, { status: "request-error", request: req }];
47782
49214
  }
47783
49215
  const response = doResult.value;
47784
- const responseFields = {
47785
- HttpMeta: { Response: response, Request: req }
49216
+ const [result] = await match(json(200, UpdateDocumentResponseBody$inboundSchema), fail("4XX"), fail("5XX"))(response);
49217
+ if (!result.ok) {
49218
+ return [result, { status: "complete", request: req, response }];
49219
+ }
49220
+ return [result, { status: "complete", request: req, response }];
49221
+ }
49222
+ var init_kycUpdateDocument = __esm(() => {
49223
+ init_encodings();
49224
+ init_matchers();
49225
+ init_primitives();
49226
+ init_schemas();
49227
+ init_security();
49228
+ init_url();
49229
+ init_operations();
49230
+ init_async();
49231
+ init_blobs();
49232
+ });
49233
+
49234
+ // src/mcp-server/tools/kycUpdateDocument.ts
49235
+ var args45, tool$kycUpdateDocument;
49236
+ var init_kycUpdateDocument2 = __esm(() => {
49237
+ init_kycUpdateDocument();
49238
+ init_operations();
49239
+ init_tools();
49240
+ args45 = {
49241
+ request: UpdateDocumentRequest$inboundSchema
47786
49242
  };
47787
- const [result] = await match(json(200, UpdateAddressDetailResponseBody$inboundSchema), jsonErr(400, BadRequest$inboundSchema), jsonErr(401, Unauthorized$inboundSchema), jsonErr(404, NotFound$inboundSchema), fail("4XX"), fail("5XX"))(response, { extraFields: responseFields });
49243
+ tool$kycUpdateDocument = {
49244
+ name: "kyc-update-document",
49245
+ description: `Update document detail
49246
+
49247
+ Update document detail`,
49248
+ args: args45,
49249
+ tool: async (client, args46, ctx) => {
49250
+ const [result, apiCall] = await kycUpdateDocument(client, args46.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
49251
+ if (!result.ok) {
49252
+ return {
49253
+ content: [{ type: "text", text: result.error.message }],
49254
+ isError: true
49255
+ };
49256
+ }
49257
+ const value = result.value;
49258
+ return formatResult(value, apiCall);
49259
+ }
49260
+ };
49261
+ });
49262
+
49263
+ // src/funcs/kycVerifyDocument.ts
49264
+ function kycVerifyDocument(client, request, options) {
49265
+ return new APIPromise($do48(client, request, options));
49266
+ }
49267
+ async function $do48(client, request, options) {
49268
+ const parsed = safeParse(request, (value) => VerifyDocumentRequest$outboundSchema.parse(value), "Input validation failed");
49269
+ if (!parsed.ok) {
49270
+ return [parsed, { status: "invalid" }];
49271
+ }
49272
+ const payload = parsed.value;
49273
+ const body = encodeJSON("body", payload.RequestBody, { explode: true });
49274
+ const pathParams = {
49275
+ id: encodeSimple("id", payload.id, {
49276
+ explode: false,
49277
+ charEncoding: "percent"
49278
+ })
49279
+ };
49280
+ const path = pathToFunc("/customers/{id}/documents/verify")(pathParams);
49281
+ const headers = new Headers(compactMap({
49282
+ "Content-Type": "application/json",
49283
+ Accept: "application/json"
49284
+ }));
49285
+ const secConfig = await extractSecurity(client._options.authorization);
49286
+ const securityInput = secConfig == null ? {} : { authorization: secConfig };
49287
+ const requestSecurity = resolveGlobalSecurity(securityInput);
49288
+ const context = {
49289
+ baseURL: options?.serverURL ?? client._baseURL ?? "",
49290
+ operationID: "verify-document",
49291
+ oAuth2Scopes: [],
49292
+ resolvedSecurity: requestSecurity,
49293
+ securitySource: client._options.authorization,
49294
+ retryConfig: options?.retries || client._options.retryConfig || { strategy: "none" },
49295
+ retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"]
49296
+ };
49297
+ const requestRes = client._createRequest(context, {
49298
+ security: requestSecurity,
49299
+ method: "POST",
49300
+ baseURL: options?.serverURL,
49301
+ path,
49302
+ headers,
49303
+ body,
49304
+ timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1
49305
+ }, options);
49306
+ if (!requestRes.ok) {
49307
+ return [requestRes, { status: "invalid" }];
49308
+ }
49309
+ const req = requestRes.value;
49310
+ const doResult = await client._do(req, {
49311
+ context,
49312
+ errorCodes: ["4XX", "5XX"],
49313
+ retryConfig: context.retryConfig,
49314
+ retryCodes: context.retryCodes
49315
+ });
49316
+ if (!doResult.ok) {
49317
+ return [doResult, { status: "request-error", request: req }];
49318
+ }
49319
+ const response = doResult.value;
49320
+ const [result] = await match(json(200, VerifyDocumentResponseBody$inboundSchema), fail("4XX"), fail("5XX"))(response);
47788
49321
  if (!result.ok) {
47789
49322
  return [result, { status: "complete", request: req, response }];
47790
49323
  }
47791
49324
  return [result, { status: "complete", request: req, response }];
47792
49325
  }
47793
- var init_customersUpdateAddressDetail = __esm(() => {
49326
+ var init_kycVerifyDocument = __esm(() => {
47794
49327
  init_encodings();
47795
49328
  init_matchers();
47796
49329
  init_primitives();
47797
49330
  init_schemas();
47798
49331
  init_security();
47799
49332
  init_url();
47800
- init_errors();
47801
49333
  init_operations();
47802
49334
  init_async();
47803
49335
  });
47804
49336
 
47805
- // src/mcp-server/tools/customersUpdateAddressDetail.ts
47806
- var args40, tool$customersUpdateAddressDetail;
47807
- var init_customersUpdateAddressDetail2 = __esm(() => {
47808
- init_customersUpdateAddressDetail();
49337
+ // src/mcp-server/tools/kycVerifyDocument.ts
49338
+ var args46, tool$kycVerifyDocument;
49339
+ var init_kycVerifyDocument2 = __esm(() => {
49340
+ init_kycVerifyDocument();
47809
49341
  init_operations();
47810
49342
  init_tools();
47811
- args40 = {
47812
- request: UpdateAddressDetailRequest$inboundSchema
49343
+ args46 = {
49344
+ request: VerifyDocumentRequest$inboundSchema
47813
49345
  };
47814
- tool$customersUpdateAddressDetail = {
47815
- name: "customers-update-address-detail",
47816
- description: `Update particular address
49346
+ tool$kycVerifyDocument = {
49347
+ name: "kyc-verify-document",
49348
+ description: `Verify document
47817
49349
 
47818
- Update address`,
47819
- args: args40,
47820
- tool: async (client, args41, ctx) => {
47821
- const [result, apiCall] = await customersUpdateAddressDetail(client, args41.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
49350
+ Verify document number before saving.`,
49351
+ args: args46,
49352
+ tool: async (client, args47, ctx) => {
49353
+ const [result, apiCall] = await kycVerifyDocument(client, args47.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
47822
49354
  if (!result.ok) {
47823
49355
  return {
47824
49356
  content: [{ type: "text", text: result.error.message }],
@@ -47833,9 +49365,9 @@ Update address`,
47833
49365
 
47834
49366
  // src/funcs/ordersCancelOrder.ts
47835
49367
  function ordersCancelOrder(client, request, options) {
47836
- return new APIPromise($do42(client, request, options));
49368
+ return new APIPromise($do49(client, request, options));
47837
49369
  }
47838
- async function $do42(client, request, options) {
49370
+ async function $do49(client, request, options) {
47839
49371
  const parsed = safeParse(request, (value) => CancelOrderRequest$outboundSchema.parse(value), "Input validation failed");
47840
49372
  if (!parsed.ok) {
47841
49373
  return [parsed, { status: "invalid" }];
@@ -47910,12 +49442,12 @@ var init_ordersCancelOrder = __esm(() => {
47910
49442
  });
47911
49443
 
47912
49444
  // src/mcp-server/tools/ordersCancelOrder.ts
47913
- var args41, tool$ordersCancelOrder;
49445
+ var args47, tool$ordersCancelOrder;
47914
49446
  var init_ordersCancelOrder2 = __esm(() => {
47915
49447
  init_ordersCancelOrder();
47916
49448
  init_operations();
47917
49449
  init_tools();
47918
- args41 = {
49450
+ args47 = {
47919
49451
  request: CancelOrderRequest$inboundSchema
47920
49452
  };
47921
49453
  tool$ordersCancelOrder = {
@@ -47923,9 +49455,9 @@ var init_ordersCancelOrder2 = __esm(() => {
47923
49455
  description: `Cancel order
47924
49456
 
47925
49457
  Order cancellation`,
47926
- args: args41,
47927
- tool: async (client, args42, ctx) => {
47928
- const [result, apiCall] = await ordersCancelOrder(client, args42.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
49458
+ args: args47,
49459
+ tool: async (client, args48, ctx) => {
49460
+ const [result, apiCall] = await ordersCancelOrder(client, args48.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
47929
49461
  if (!result.ok) {
47930
49462
  return {
47931
49463
  content: [{ type: "text", text: result.error.message }],
@@ -47940,9 +49472,9 @@ Order cancellation`,
47940
49472
 
47941
49473
  // src/funcs/ordersCreateOrder.ts
47942
49474
  function ordersCreateOrder(client, request, options) {
47943
- return new APIPromise($do43(client, request, options));
49475
+ return new APIPromise($do50(client, request, options));
47944
49476
  }
47945
- async function $do43(client, request, options) {
49477
+ async function $do50(client, request, options) {
47946
49478
  const parsed = safeParse(request, (value) => CreateOrderRequestBody$outboundSchema.parse(value), "Input validation failed");
47947
49479
  if (!parsed.ok) {
47948
49480
  return [parsed, { status: "invalid" }];
@@ -48011,12 +49543,12 @@ var init_ordersCreateOrder = __esm(() => {
48011
49543
  });
48012
49544
 
48013
49545
  // src/mcp-server/tools/ordersCreateOrder.ts
48014
- var args42, tool$ordersCreateOrder;
49546
+ var args48, tool$ordersCreateOrder;
48015
49547
  var init_ordersCreateOrder2 = __esm(() => {
48016
49548
  init_ordersCreateOrder();
48017
49549
  init_operations();
48018
49550
  init_tools();
48019
- args42 = {
49551
+ args48 = {
48020
49552
  request: CreateOrderRequestBody$inboundSchema
48021
49553
  };
48022
49554
  tool$ordersCreateOrder = {
@@ -48024,9 +49556,9 @@ var init_ordersCreateOrder2 = __esm(() => {
48024
49556
  description: `Create order
48025
49557
 
48026
49558
  Create new order`,
48027
- args: args42,
48028
- tool: async (client, args43, ctx) => {
48029
- const [result, apiCall] = await ordersCreateOrder(client, args43.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
49559
+ args: args48,
49560
+ tool: async (client, args49, ctx) => {
49561
+ const [result, apiCall] = await ordersCreateOrder(client, args49.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
48030
49562
  if (!result.ok) {
48031
49563
  return {
48032
49564
  content: [{ type: "text", text: result.error.message }],
@@ -48041,9 +49573,9 @@ Create new order`,
48041
49573
 
48042
49574
  // src/funcs/ordersGetOrderDetail.ts
48043
49575
  function ordersGetOrderDetail(client, request, options) {
48044
- return new APIPromise($do44(client, request, options));
49576
+ return new APIPromise($do51(client, request, options));
48045
49577
  }
48046
- async function $do44(client, request, options) {
49578
+ async function $do51(client, request, options) {
48047
49579
  const parsed = safeParse(request, (value) => GetOrderDetailRequest$outboundSchema.parse(value), "Input validation failed");
48048
49580
  if (!parsed.ok) {
48049
49581
  return [parsed, { status: "invalid" }];
@@ -48117,12 +49649,12 @@ var init_ordersGetOrderDetail = __esm(() => {
48117
49649
  });
48118
49650
 
48119
49651
  // src/mcp-server/tools/ordersGetOrderDetail.ts
48120
- var args43, tool$ordersGetOrderDetail;
49652
+ var args49, tool$ordersGetOrderDetail;
48121
49653
  var init_ordersGetOrderDetail2 = __esm(() => {
48122
49654
  init_ordersGetOrderDetail();
48123
49655
  init_operations();
48124
49656
  init_tools();
48125
- args43 = {
49657
+ args49 = {
48126
49658
  request: GetOrderDetailRequest$inboundSchema
48127
49659
  };
48128
49660
  tool$ordersGetOrderDetail = {
@@ -48130,9 +49662,9 @@ var init_ordersGetOrderDetail2 = __esm(() => {
48130
49662
  description: `Retrieve order detail
48131
49663
 
48132
49664
  view particular order details`,
48133
- args: args43,
48134
- tool: async (client, args44, ctx) => {
48135
- const [result, apiCall] = await ordersGetOrderDetail(client, args44.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
49665
+ args: args49,
49666
+ tool: async (client, args50, ctx) => {
49667
+ const [result, apiCall] = await ordersGetOrderDetail(client, args50.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
48136
49668
  if (!result.ok) {
48137
49669
  return {
48138
49670
  content: [{ type: "text", text: result.error.message }],
@@ -48147,9 +49679,9 @@ view particular order details`,
48147
49679
 
48148
49680
  // src/funcs/ordersGetPaymentStatus.ts
48149
49681
  function ordersGetPaymentStatus(client, request, options) {
48150
- return new APIPromise($do45(client, request, options));
49682
+ return new APIPromise($do52(client, request, options));
48151
49683
  }
48152
- async function $do45(client, request, options) {
49684
+ async function $do52(client, request, options) {
48153
49685
  const parsed = safeParse(request, (value) => GetPaymentStatusRequest$outboundSchema.parse(value), "Input validation failed");
48154
49686
  if (!parsed.ok) {
48155
49687
  return [parsed, { status: "invalid" }];
@@ -48219,12 +49751,12 @@ var init_ordersGetPaymentStatus = __esm(() => {
48219
49751
  });
48220
49752
 
48221
49753
  // src/mcp-server/tools/ordersGetPaymentStatus.ts
48222
- var args44, tool$ordersGetPaymentStatus;
49754
+ var args50, tool$ordersGetPaymentStatus;
48223
49755
  var init_ordersGetPaymentStatus2 = __esm(() => {
48224
49756
  init_ordersGetPaymentStatus();
48225
49757
  init_operations();
48226
49758
  init_tools();
48227
- args44 = {
49759
+ args50 = {
48228
49760
  request: GetPaymentStatusRequest$inboundSchema
48229
49761
  };
48230
49762
  tool$ordersGetPaymentStatus = {
@@ -48232,9 +49764,9 @@ var init_ordersGetPaymentStatus2 = __esm(() => {
48232
49764
  description: `Retrieve payment status
48233
49765
 
48234
49766
  Retrieve payment status of a paricular order.`,
48235
- args: args44,
48236
- tool: async (client, args45, ctx) => {
48237
- const [result, apiCall] = await ordersGetPaymentStatus(client, args45.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
49767
+ args: args50,
49768
+ tool: async (client, args51, ctx) => {
49769
+ const [result, apiCall] = await ordersGetPaymentStatus(client, args51.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
48238
49770
  if (!result.ok) {
48239
49771
  return {
48240
49772
  content: [{ type: "text", text: result.error.message }],
@@ -48249,9 +49781,9 @@ Retrieve payment status of a paricular order.`,
48249
49781
 
48250
49782
  // src/funcs/ordersListOrders.ts
48251
49783
  function ordersListOrders(client, request, options) {
48252
- return new APIPromise($do46(client, request, options));
49784
+ return new APIPromise($do53(client, request, options));
48253
49785
  }
48254
- async function $do46(client, request, options) {
49786
+ async function $do53(client, request, options) {
48255
49787
  const parsed = safeParse(request, (value) => ListOrdersRequest$outboundSchema.parse(value), "Input validation failed");
48256
49788
  if (!parsed.ok) {
48257
49789
  return [parsed, { status: "invalid" }];
@@ -48323,12 +49855,12 @@ var init_ordersListOrders = __esm(() => {
48323
49855
  });
48324
49856
 
48325
49857
  // src/mcp-server/tools/ordersListOrders.ts
48326
- var args45, tool$ordersListOrders;
49858
+ var args51, tool$ordersListOrders;
48327
49859
  var init_ordersListOrders2 = __esm(() => {
48328
49860
  init_ordersListOrders();
48329
49861
  init_operations();
48330
49862
  init_tools();
48331
- args45 = {
49863
+ args51 = {
48332
49864
  request: ListOrdersRequest$inboundSchema
48333
49865
  };
48334
49866
  tool$ordersListOrders = {
@@ -48336,9 +49868,9 @@ var init_ordersListOrders2 = __esm(() => {
48336
49868
  description: `Retrieve all orders
48337
49869
 
48338
49870
  list customers all orders`,
48339
- args: args45,
48340
- tool: async (client, args46, ctx) => {
48341
- const [result, apiCall] = await ordersListOrders(client, args46.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
49871
+ args: args51,
49872
+ tool: async (client, args52, ctx) => {
49873
+ const [result, apiCall] = await ordersListOrders(client, args52.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
48342
49874
  if (!result.ok) {
48343
49875
  return {
48344
49876
  content: [{ type: "text", text: result.error.message }],
@@ -48353,9 +49885,9 @@ list customers all orders`,
48353
49885
 
48354
49886
  // src/funcs/ordersListOrderShipments.ts
48355
49887
  function ordersListOrderShipments(client, request, options) {
48356
- return new APIPromise($do47(client, request, options));
49888
+ return new APIPromise($do54(client, request, options));
48357
49889
  }
48358
- async function $do47(client, request, options) {
49890
+ async function $do54(client, request, options) {
48359
49891
  const parsed = safeParse(request, (value) => ListOrderShipmentsRequest$outboundSchema.parse(value), "Input validation failed");
48360
49892
  if (!parsed.ok) {
48361
49893
  return [parsed, { status: "invalid" }];
@@ -48429,12 +49961,12 @@ var init_ordersListOrderShipments = __esm(() => {
48429
49961
  });
48430
49962
 
48431
49963
  // src/mcp-server/tools/ordersListOrderShipments.ts
48432
- var args46, tool$ordersListOrderShipments;
49964
+ var args52, tool$ordersListOrderShipments;
48433
49965
  var init_ordersListOrderShipments2 = __esm(() => {
48434
49966
  init_ordersListOrderShipments();
48435
49967
  init_operations();
48436
49968
  init_tools();
48437
- args46 = {
49969
+ args52 = {
48438
49970
  request: ListOrderShipmentsRequest$inboundSchema
48439
49971
  };
48440
49972
  tool$ordersListOrderShipments = {
@@ -48442,9 +49974,9 @@ var init_ordersListOrderShipments2 = __esm(() => {
48442
49974
  description: `Retrieve order shipments
48443
49975
 
48444
49976
  Retrieve order shipments`,
48445
- args: args46,
48446
- tool: async (client, args47, ctx) => {
48447
- const [result, apiCall] = await ordersListOrderShipments(client, args47.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
49977
+ args: args52,
49978
+ tool: async (client, args53, ctx) => {
49979
+ const [result, apiCall] = await ordersListOrderShipments(client, args53.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
48448
49980
  if (!result.ok) {
48449
49981
  return {
48450
49982
  content: [{ type: "text", text: result.error.message }],
@@ -48459,9 +49991,9 @@ Retrieve order shipments`,
48459
49991
 
48460
49992
  // src/funcs/ordersRetryOrderPayment.ts
48461
49993
  function ordersRetryOrderPayment(client, request, options) {
48462
- return new APIPromise($do48(client, request, options));
49994
+ return new APIPromise($do55(client, request, options));
48463
49995
  }
48464
- async function $do48(client, request, options) {
49996
+ async function $do55(client, request, options) {
48465
49997
  const parsed = safeParse(request, (value) => RetryOrderPaymentRequest$outboundSchema.parse(value), "Input validation failed");
48466
49998
  if (!parsed.ok) {
48467
49999
  return [parsed, { status: "invalid" }];
@@ -48536,12 +50068,12 @@ var init_ordersRetryOrderPayment = __esm(() => {
48536
50068
  });
48537
50069
 
48538
50070
  // src/mcp-server/tools/ordersRetryOrderPayment.ts
48539
- var args47, tool$ordersRetryOrderPayment;
50071
+ var args53, tool$ordersRetryOrderPayment;
48540
50072
  var init_ordersRetryOrderPayment2 = __esm(() => {
48541
50073
  init_ordersRetryOrderPayment();
48542
50074
  init_operations();
48543
50075
  init_tools();
48544
- args47 = {
50076
+ args53 = {
48545
50077
  request: RetryOrderPaymentRequest$inboundSchema
48546
50078
  };
48547
50079
  tool$ordersRetryOrderPayment = {
@@ -48549,9 +50081,9 @@ var init_ordersRetryOrderPayment2 = __esm(() => {
48549
50081
  description: `Retry payment
48550
50082
 
48551
50083
  To generate new payment request if first payment request is failed or expired. Retry payment request can be made after 15 mins of last request or immediately after last payment request is marked as failed.`,
48552
- args: args47,
48553
- tool: async (client, args48, ctx) => {
48554
- const [result, apiCall] = await ordersRetryOrderPayment(client, args48.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
50084
+ args: args53,
50085
+ tool: async (client, args54, ctx) => {
50086
+ const [result, apiCall] = await ordersRetryOrderPayment(client, args54.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
48555
50087
  if (!result.ok) {
48556
50088
  return {
48557
50089
  content: [{ type: "text", text: result.error.message }],
@@ -48566,9 +50098,9 @@ To generate new payment request if first payment request is failed or expired. R
48566
50098
 
48567
50099
  // src/funcs/shippingCheckDeliveryAvailability.ts
48568
50100
  function shippingCheckDeliveryAvailability(client, request, options) {
48569
- return new APIPromise($do49(client, request, options));
50101
+ return new APIPromise($do56(client, request, options));
48570
50102
  }
48571
- async function $do49(client, request, options) {
50103
+ async function $do56(client, request, options) {
48572
50104
  const parsed = safeParse(request, (value) => CheckDeliveryAvailabilityRequest$outboundSchema.parse(value), "Input validation failed");
48573
50105
  if (!parsed.ok) {
48574
50106
  return [parsed, { status: "invalid" }];
@@ -48642,12 +50174,12 @@ var init_shippingCheckDeliveryAvailability = __esm(() => {
48642
50174
  });
48643
50175
 
48644
50176
  // src/mcp-server/tools/shippingCheckDeliveryAvailability.ts
48645
- var args48, tool$shippingCheckDeliveryAvailability;
50177
+ var args54, tool$shippingCheckDeliveryAvailability;
48646
50178
  var init_shippingCheckDeliveryAvailability2 = __esm(() => {
48647
50179
  init_shippingCheckDeliveryAvailability();
48648
50180
  init_operations();
48649
50181
  init_tools();
48650
- args48 = {
50182
+ args54 = {
48651
50183
  request: CheckDeliveryAvailabilityRequest$inboundSchema
48652
50184
  };
48653
50185
  tool$shippingCheckDeliveryAvailability = {
@@ -48655,9 +50187,9 @@ var init_shippingCheckDeliveryAvailability2 = __esm(() => {
48655
50187
  description: `Check pincode deliverability
48656
50188
 
48657
50189
  Check shipment delivery availability in an area by pincode`,
48658
- args: args48,
48659
- tool: async (client, args49, ctx) => {
48660
- const [result, apiCall] = await shippingCheckDeliveryAvailability(client, args49.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
50190
+ args: args54,
50191
+ tool: async (client, args55, ctx) => {
50192
+ const [result, apiCall] = await shippingCheckDeliveryAvailability(client, args55.request, { fetchOptions: { signal: ctx.signal } }).$inspect();
48661
50193
  if (!result.ok) {
48662
50194
  return {
48663
50195
  content: [{ type: "text", text: result.error.message }],
@@ -48674,7 +50206,7 @@ Check shipment delivery availability in an area by pincode`,
48674
50206
  function createMCPServer(deps) {
48675
50207
  const server = new McpServer({
48676
50208
  name: "CeStorefront",
48677
- version: "0.8.2"
50209
+ version: "0.9.0"
48678
50210
  });
48679
50211
  const client = new CeStorefrontCore({
48680
50212
  authorization: deps.authorization,
@@ -48682,7 +50214,7 @@ function createMCPServer(deps) {
48682
50214
  server: deps.server,
48683
50215
  storeId: deps.storeId
48684
50216
  });
48685
- const scopes = new Set(deps.scopes ?? mcpScopes);
50217
+ const scopes = new Set(deps.scopes);
48686
50218
  const allowedTools = deps.allowedTools && new Set(deps.allowedTools);
48687
50219
  const tool = createRegisterTool(deps.logger, server, client, scopes, allowedTools);
48688
50220
  const resource = createRegisterResource(deps.logger, server, client, scopes);
@@ -48715,6 +50247,13 @@ function createMCPServer(deps) {
48715
50247
  tool(tool$customersUpdateAddressDetail);
48716
50248
  tool(tool$customersDeleteAddress);
48717
50249
  tool(tool$customersListUserReviews);
50250
+ tool(tool$kycListDocumentType);
50251
+ tool(tool$kycListDocuments);
50252
+ tool(tool$kycCreateDocument);
50253
+ tool(tool$kycGetDocument);
50254
+ tool(tool$kycUpdateDocument);
50255
+ tool(tool$kycDeleteDocument);
50256
+ tool(tool$kycVerifyDocument);
48718
50257
  tool(tool$ordersCreateOrder);
48719
50258
  tool(tool$ordersListOrders);
48720
50259
  tool(tool$ordersGetOrderDetail);
@@ -48744,7 +50283,6 @@ var init_server2 = __esm(() => {
48744
50283
  init_mcp();
48745
50284
  init_core();
48746
50285
  init_resources();
48747
- init_scopes();
48748
50286
  init_tools();
48749
50287
  init_authCheckVerificationStatus2();
48750
50288
  init_authCreateNotificationPreferences2();
@@ -48787,6 +50325,13 @@ var init_server2 = __esm(() => {
48787
50325
  init_customersListAddresses2();
48788
50326
  init_customersListUserReviews2();
48789
50327
  init_customersUpdateAddressDetail2();
50328
+ init_kycCreateDocument2();
50329
+ init_kycDeleteDocument2();
50330
+ init_kycGetDocument2();
50331
+ init_kycListDocuments2();
50332
+ init_kycListDocumentType2();
50333
+ init_kycUpdateDocument2();
50334
+ init_kycVerifyDocument2();
48790
50335
  init_ordersCancelOrder2();
48791
50336
  init_ordersCreateOrder2();
48792
50337
  init_ordersGetOrderDetail2();
@@ -49882,7 +51427,11 @@ function buildContext(process2) {
49882
51427
  init_lib();
49883
51428
  init_config();
49884
51429
  init_console_logger();
49885
- init_scopes();
51430
+
51431
+ // src/mcp-server/scopes.ts
51432
+ var mcpScopes = [];
51433
+
51434
+ // src/mcp-server/cli/start/command.ts
49886
51435
  var startCommand = tn({
49887
51436
  loader: async () => {
49888
51437
  const { main: main2 } = await Promise.resolve().then(() => (init_impl(), exports_impl));
@@ -49993,7 +51542,7 @@ var routes = rn({
49993
51542
  var app = Ve(routes, {
49994
51543
  name: "mcp",
49995
51544
  versionInfo: {
49996
- currentVersion: "0.8.2"
51545
+ currentVersion: "0.9.0"
49997
51546
  }
49998
51547
  });
49999
51548
  _t(app, process3.argv.slice(2), buildContext(process3));
@@ -50001,5 +51550,5 @@ export {
50001
51550
  app
50002
51551
  };
50003
51552
 
50004
- //# debugId=7426CEEAC186C2CF64756E2164756E21
51553
+ //# debugId=AC10C35A5BE8F71464756E2164756E21
50005
51554
  //# sourceMappingURL=mcp-server.js.map