@aizu-chat/react 0.0.7 → 0.0.9

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 (145) hide show
  1. package/dist/chunk-BRNQSZ2E.mjs +931 -0
  2. package/dist/components.d.mts +2 -12
  3. package/dist/components.d.ts +2 -12
  4. package/dist/components.js +423 -313
  5. package/dist/components.mjs +3 -5
  6. package/dist/index.d.mts +1 -2
  7. package/dist/index.d.ts +1 -2
  8. package/dist/index.js +423 -357
  9. package/dist/index.mjs +2 -10
  10. package/package.json +1 -1
  11. package/dist/chunk-27KHUFCW.mjs +0 -826
  12. package/dist/chunk-2E7KQQED.mjs +0 -816
  13. package/dist/chunk-2PRXGXTN.mjs +0 -826
  14. package/dist/chunk-2UZJYWLD.mjs +0 -49
  15. package/dist/chunk-2ZNJT52V.mjs +0 -814
  16. package/dist/chunk-34B6VEJC.mjs +0 -677
  17. package/dist/chunk-35JN2QFA.mjs +0 -784
  18. package/dist/chunk-3FHGECHR.mjs +0 -829
  19. package/dist/chunk-3IU2OVAG.mjs +0 -780
  20. package/dist/chunk-3QKHSOJ4.mjs +0 -728
  21. package/dist/chunk-3XKU4RH2.mjs +0 -814
  22. package/dist/chunk-432NOVMD.mjs +0 -822
  23. package/dist/chunk-4FW2X356.mjs +0 -653
  24. package/dist/chunk-4KUZUKKS.mjs +0 -776
  25. package/dist/chunk-4UO5EJ54.mjs +0 -826
  26. package/dist/chunk-66DXSMQL.mjs +0 -826
  27. package/dist/chunk-6IIUDDOD.mjs +0 -775
  28. package/dist/chunk-6LVL2AO4.mjs +0 -660
  29. package/dist/chunk-6OMCLP7J.mjs +0 -727
  30. package/dist/chunk-6SYZLU5L.mjs +0 -782
  31. package/dist/chunk-6XLUHLNW.mjs +0 -826
  32. package/dist/chunk-6Z4U3TJM.mjs +0 -728
  33. package/dist/chunk-6ZNP2727.mjs +0 -686
  34. package/dist/chunk-75Q3MZEF.mjs +0 -52
  35. package/dist/chunk-A4YWLH3K.mjs +0 -751
  36. package/dist/chunk-AT5CG6CS.mjs +0 -53
  37. package/dist/chunk-B4CPQFKO.mjs +0 -826
  38. package/dist/chunk-BH52V6JW.mjs +0 -776
  39. package/dist/chunk-BYPRKP6J.mjs +0 -782
  40. package/dist/chunk-BZVP32PP.mjs +0 -826
  41. package/dist/chunk-C6T755JT.mjs +0 -780
  42. package/dist/chunk-CCFEXIKG.mjs +0 -815
  43. package/dist/chunk-CTYW4VK4.mjs +0 -815
  44. package/dist/chunk-D2UMLUGP.mjs +0 -685
  45. package/dist/chunk-D4DQP4GI.mjs +0 -817
  46. package/dist/chunk-DIBJNQPT.mjs +0 -782
  47. package/dist/chunk-DJQK65LJ.mjs +0 -822
  48. package/dist/chunk-DLQEX6QS.mjs +0 -661
  49. package/dist/chunk-EADN4TWS.mjs +0 -819
  50. package/dist/chunk-EAW7EHJI.mjs +0 -826
  51. package/dist/chunk-EBU5NLRJ.mjs +0 -661
  52. package/dist/chunk-EDBTUKCC.mjs +0 -738
  53. package/dist/chunk-EHQQJPCV.mjs +0 -53
  54. package/dist/chunk-EKELJTME.mjs +0 -674
  55. package/dist/chunk-ELAN3AIY.mjs +0 -784
  56. package/dist/chunk-EWW3DF5X.mjs +0 -814
  57. package/dist/chunk-EXJ5M326.mjs +0 -826
  58. package/dist/chunk-F3DEI4YK.mjs +0 -682
  59. package/dist/chunk-FBJJFSCR.mjs +0 -778
  60. package/dist/chunk-G7M72PUZ.mjs +0 -776
  61. package/dist/chunk-GFVIBK25.mjs +0 -673
  62. package/dist/chunk-GYZ6ICY2.mjs +0 -685
  63. package/dist/chunk-H733EISO.mjs +0 -826
  64. package/dist/chunk-H7C7VETZ.mjs +0 -776
  65. package/dist/chunk-HD2IHWNW.mjs +0 -776
  66. package/dist/chunk-HKAXD2CX.mjs +0 -776
  67. package/dist/chunk-HLRWI4YU.mjs +0 -778
  68. package/dist/chunk-HNPNRGTG.mjs +0 -686
  69. package/dist/chunk-HQYDHSWS.mjs +0 -678
  70. package/dist/chunk-HVPJAO66.mjs +0 -654
  71. package/dist/chunk-I36Q4NZE.mjs +0 -675
  72. package/dist/chunk-ICOCFEPA.mjs +0 -776
  73. package/dist/chunk-IMM7TFAT.mjs +0 -685
  74. package/dist/chunk-J5OEYYWK.mjs +0 -728
  75. package/dist/chunk-JDR62NUF.mjs +0 -729
  76. package/dist/chunk-JEOWW4D7.mjs +0 -49
  77. package/dist/chunk-JIAD2PHZ.mjs +0 -779
  78. package/dist/chunk-JMHZ4OMV.mjs +0 -814
  79. package/dist/chunk-JUYVQ5F6.mjs +0 -673
  80. package/dist/chunk-K2EPLJ4A.mjs +0 -728
  81. package/dist/chunk-K2WK46MB.mjs +0 -776
  82. package/dist/chunk-KM4P2EHL.mjs +0 -729
  83. package/dist/chunk-KR4PTVQ4.mjs +0 -779
  84. package/dist/chunk-KUHNPG4Q.mjs +0 -796
  85. package/dist/chunk-KXFNNAMR.mjs +0 -814
  86. package/dist/chunk-LEZIDZXE.mjs +0 -831
  87. package/dist/chunk-LMFIKGQM.mjs +0 -782
  88. package/dist/chunk-LT43AVHN.mjs +0 -780
  89. package/dist/chunk-MBHPFGVB.mjs +0 -782
  90. package/dist/chunk-MDMZAAPV.mjs +0 -685
  91. package/dist/chunk-MFFRGYEX.mjs +0 -728
  92. package/dist/chunk-O3U6ONKJ.mjs +0 -677
  93. package/dist/chunk-OEPSB4XZ.mjs +0 -686
  94. package/dist/chunk-OJ5M55LN.mjs +0 -660
  95. package/dist/chunk-OSHAWBTV.mjs +0 -800
  96. package/dist/chunk-OVDFBN6H.mjs +0 -800
  97. package/dist/chunk-OWFM4DXQ.mjs +0 -686
  98. package/dist/chunk-P4FEBZ5I.mjs +0 -829
  99. package/dist/chunk-QBXYSNTR.mjs +0 -675
  100. package/dist/chunk-QDS6QW7Y.mjs +0 -738
  101. package/dist/chunk-QN5L3XNN.mjs +0 -830
  102. package/dist/chunk-QOK4APM5.mjs +0 -728
  103. package/dist/chunk-QR37WSLB.mjs +0 -826
  104. package/dist/chunk-QS7TKK6W.mjs +0 -685
  105. package/dist/chunk-QTL5KRV3.mjs +0 -686
  106. package/dist/chunk-QV2LQKNI.mjs +0 -686
  107. package/dist/chunk-QV74GE66.mjs +0 -778
  108. package/dist/chunk-R3NQ7SPU.mjs +0 -780
  109. package/dist/chunk-R3Z7JF73.mjs +0 -673
  110. package/dist/chunk-S63OOCED.mjs +0 -781
  111. package/dist/chunk-SJJDDFKI.mjs +0 -830
  112. package/dist/chunk-SLS4OSOJ.mjs +0 -826
  113. package/dist/chunk-SRFLVMCW.mjs +0 -685
  114. package/dist/chunk-SUOZPZBK.mjs +0 -826
  115. package/dist/chunk-TBBN7SM4.mjs +0 -660
  116. package/dist/chunk-TLJKLZBR.mjs +0 -734
  117. package/dist/chunk-U4ODVQIJ.mjs +0 -728
  118. package/dist/chunk-UA2YL34U.mjs +0 -782
  119. package/dist/chunk-UOQWXJXH.mjs +0 -779
  120. package/dist/chunk-UYBDUWOL.mjs +0 -776
  121. package/dist/chunk-UZD3IED4.mjs +0 -676
  122. package/dist/chunk-V2YCL6RC.mjs +0 -798
  123. package/dist/chunk-V5ROKX6T.mjs +0 -779
  124. package/dist/chunk-VBZLGI7W.mjs +0 -819
  125. package/dist/chunk-VEAZMIG4.mjs +0 -830
  126. package/dist/chunk-VMG4TRFB.mjs +0 -750
  127. package/dist/chunk-VOLA2PFJ.mjs +0 -676
  128. package/dist/chunk-VTBZU2XN.mjs +0 -826
  129. package/dist/chunk-WC37DM4U.mjs +0 -816
  130. package/dist/chunk-WDLA4JJY.mjs +0 -778
  131. package/dist/chunk-WQ6BKSTC.mjs +0 -815
  132. package/dist/chunk-WXSNIINA.mjs +0 -778
  133. package/dist/chunk-WYBPKSFQ.mjs +0 -816
  134. package/dist/chunk-XFRN7OPZ.mjs +0 -686
  135. package/dist/chunk-XLRF64SW.mjs +0 -53
  136. package/dist/chunk-YLNMIJBD.mjs +0 -728
  137. package/dist/chunk-YUGESFKI.mjs +0 -819
  138. package/dist/chunk-YVDMWPWQ.mjs +0 -776
  139. package/dist/chunk-Z6L7TEVJ.mjs +0 -828
  140. package/dist/chunk-Z72DRRM6.mjs +0 -829
  141. package/dist/chunk-ZXF3RMZZ.mjs +0 -685
  142. package/dist/sdk.d.mts +0 -39
  143. package/dist/sdk.d.ts +0 -39
  144. package/dist/sdk.js +0 -121
  145. package/dist/sdk.mjs +0 -10
package/dist/sdk.d.mts DELETED
@@ -1,39 +0,0 @@
1
- interface AizuClientConfig {
2
- hostUrl: string;
3
- apiKey: string;
4
- }
5
- interface ChatRequest {
6
- query: string;
7
- thread_id?: string;
8
- resource_id?: string;
9
- }
10
- interface ChatResponse {
11
- thread_id: string;
12
- resource_id: string;
13
- response: string;
14
- products: Product[];
15
- }
16
- interface Product {
17
- productId: string;
18
- sku: string;
19
- title: string;
20
- description: string;
21
- price: number;
22
- stock: number;
23
- thumbnail: string;
24
- }
25
-
26
- declare class AizuClient {
27
- private hostUrl;
28
- private apiKey;
29
- constructor(config: AizuClientConfig);
30
- private request;
31
- chat(params: ChatRequest): Promise<ChatResponse>;
32
- }
33
- declare const createAizuClient: ({ hostUrl, apiKey, options, }: {
34
- hostUrl: string;
35
- apiKey: string;
36
- options?: Partial<AizuClientConfig>;
37
- }) => AizuClient;
38
-
39
- export { AizuClient, type AizuClientConfig, type ChatRequest, type ChatResponse, type Product, createAizuClient };
package/dist/sdk.d.ts DELETED
@@ -1,39 +0,0 @@
1
- interface AizuClientConfig {
2
- hostUrl: string;
3
- apiKey: string;
4
- }
5
- interface ChatRequest {
6
- query: string;
7
- thread_id?: string;
8
- resource_id?: string;
9
- }
10
- interface ChatResponse {
11
- thread_id: string;
12
- resource_id: string;
13
- response: string;
14
- products: Product[];
15
- }
16
- interface Product {
17
- productId: string;
18
- sku: string;
19
- title: string;
20
- description: string;
21
- price: number;
22
- stock: number;
23
- thumbnail: string;
24
- }
25
-
26
- declare class AizuClient {
27
- private hostUrl;
28
- private apiKey;
29
- constructor(config: AizuClientConfig);
30
- private request;
31
- chat(params: ChatRequest): Promise<ChatResponse>;
32
- }
33
- declare const createAizuClient: ({ hostUrl, apiKey, options, }: {
34
- hostUrl: string;
35
- apiKey: string;
36
- options?: Partial<AizuClientConfig>;
37
- }) => AizuClient;
38
-
39
- export { AizuClient, type AizuClientConfig, type ChatRequest, type ChatResponse, type Product, createAizuClient };
package/dist/sdk.js DELETED
@@ -1,121 +0,0 @@
1
- 'use client'
2
- "use strict";
3
- var __defProp = Object.defineProperty;
4
- var __defProps = Object.defineProperties;
5
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
- var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
7
- var __getOwnPropNames = Object.getOwnPropertyNames;
8
- var __getOwnPropSymbols = Object.getOwnPropertySymbols;
9
- var __hasOwnProp = Object.prototype.hasOwnProperty;
10
- var __propIsEnum = Object.prototype.propertyIsEnumerable;
11
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
12
- var __spreadValues = (a, b) => {
13
- for (var prop in b || (b = {}))
14
- if (__hasOwnProp.call(b, prop))
15
- __defNormalProp(a, prop, b[prop]);
16
- if (__getOwnPropSymbols)
17
- for (var prop of __getOwnPropSymbols(b)) {
18
- if (__propIsEnum.call(b, prop))
19
- __defNormalProp(a, prop, b[prop]);
20
- }
21
- return a;
22
- };
23
- var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
24
- var __objRest = (source, exclude) => {
25
- var target = {};
26
- for (var prop in source)
27
- if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
28
- target[prop] = source[prop];
29
- if (source != null && __getOwnPropSymbols)
30
- for (var prop of __getOwnPropSymbols(source)) {
31
- if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
32
- target[prop] = source[prop];
33
- }
34
- return target;
35
- };
36
- var __export = (target, all) => {
37
- for (var name in all)
38
- __defProp(target, name, { get: all[name], enumerable: true });
39
- };
40
- var __copyProps = (to, from, except, desc) => {
41
- if (from && typeof from === "object" || typeof from === "function") {
42
- for (let key of __getOwnPropNames(from))
43
- if (!__hasOwnProp.call(to, key) && key !== except)
44
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
45
- }
46
- return to;
47
- };
48
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
49
- var __async = (__this, __arguments, generator) => {
50
- return new Promise((resolve, reject) => {
51
- var fulfilled = (value) => {
52
- try {
53
- step(generator.next(value));
54
- } catch (e) {
55
- reject(e);
56
- }
57
- };
58
- var rejected = (value) => {
59
- try {
60
- step(generator.throw(value));
61
- } catch (e) {
62
- reject(e);
63
- }
64
- };
65
- var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
66
- step((generator = generator.apply(__this, __arguments)).next());
67
- });
68
- };
69
-
70
- // src/sdk/index.ts
71
- var sdk_exports = {};
72
- __export(sdk_exports, {
73
- AizuClient: () => AizuClient,
74
- createAizuClient: () => createAizuClient
75
- });
76
- module.exports = __toCommonJS(sdk_exports);
77
-
78
- // src/sdk/client.ts
79
- var AizuClient = class {
80
- constructor(config) {
81
- this.hostUrl = config.hostUrl;
82
- this.apiKey = config.apiKey;
83
- }
84
- request(_0) {
85
- return __async(this, arguments, function* (path, options = {}) {
86
- const url = `${this.hostUrl}${path}`;
87
- const _a = options, { body } = _a, restOptions = __objRest(_a, ["body"]);
88
- const response = yield fetch(url, __spreadProps(__spreadValues({}, restOptions), {
89
- headers: __spreadValues({
90
- "Content-Type": "application/json",
91
- "x-api-key": this.apiKey
92
- }, options.headers),
93
- body: body ? JSON.stringify(body) : void 0
94
- }));
95
- if (!response.ok) {
96
- throw new Error(`API Error: ${response.statusText}`);
97
- }
98
- return yield response.json();
99
- });
100
- }
101
- chat(params) {
102
- return __async(this, null, function* () {
103
- return this.request("/chat/query", {
104
- method: "POST",
105
- body: params
106
- });
107
- });
108
- }
109
- };
110
- var createAizuClient = ({
111
- hostUrl,
112
- apiKey,
113
- options
114
- }) => {
115
- return new AizuClient(__spreadValues({ hostUrl, apiKey }, options));
116
- };
117
- // Annotate the CommonJS export names for ESM import in node:
118
- 0 && (module.exports = {
119
- AizuClient,
120
- createAizuClient
121
- });
package/dist/sdk.mjs DELETED
@@ -1,10 +0,0 @@
1
- 'use client'
2
- import {
3
- AizuClient,
4
- createAizuClient
5
- } from "./chunk-75Q3MZEF.mjs";
6
- import "./chunk-33CPD3DF.mjs";
7
- export {
8
- AizuClient,
9
- createAizuClient
10
- };