@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.
- package/dist/chunk-BRNQSZ2E.mjs +931 -0
- package/dist/components.d.mts +2 -12
- package/dist/components.d.ts +2 -12
- package/dist/components.js +423 -313
- package/dist/components.mjs +3 -5
- package/dist/index.d.mts +1 -2
- package/dist/index.d.ts +1 -2
- package/dist/index.js +423 -357
- package/dist/index.mjs +2 -10
- package/package.json +1 -1
- package/dist/chunk-27KHUFCW.mjs +0 -826
- package/dist/chunk-2E7KQQED.mjs +0 -816
- package/dist/chunk-2PRXGXTN.mjs +0 -826
- package/dist/chunk-2UZJYWLD.mjs +0 -49
- package/dist/chunk-2ZNJT52V.mjs +0 -814
- package/dist/chunk-34B6VEJC.mjs +0 -677
- package/dist/chunk-35JN2QFA.mjs +0 -784
- package/dist/chunk-3FHGECHR.mjs +0 -829
- package/dist/chunk-3IU2OVAG.mjs +0 -780
- package/dist/chunk-3QKHSOJ4.mjs +0 -728
- package/dist/chunk-3XKU4RH2.mjs +0 -814
- package/dist/chunk-432NOVMD.mjs +0 -822
- package/dist/chunk-4FW2X356.mjs +0 -653
- package/dist/chunk-4KUZUKKS.mjs +0 -776
- package/dist/chunk-4UO5EJ54.mjs +0 -826
- package/dist/chunk-66DXSMQL.mjs +0 -826
- package/dist/chunk-6IIUDDOD.mjs +0 -775
- package/dist/chunk-6LVL2AO4.mjs +0 -660
- package/dist/chunk-6OMCLP7J.mjs +0 -727
- package/dist/chunk-6SYZLU5L.mjs +0 -782
- package/dist/chunk-6XLUHLNW.mjs +0 -826
- package/dist/chunk-6Z4U3TJM.mjs +0 -728
- package/dist/chunk-6ZNP2727.mjs +0 -686
- package/dist/chunk-75Q3MZEF.mjs +0 -52
- package/dist/chunk-A4YWLH3K.mjs +0 -751
- package/dist/chunk-AT5CG6CS.mjs +0 -53
- package/dist/chunk-B4CPQFKO.mjs +0 -826
- package/dist/chunk-BH52V6JW.mjs +0 -776
- package/dist/chunk-BYPRKP6J.mjs +0 -782
- package/dist/chunk-BZVP32PP.mjs +0 -826
- package/dist/chunk-C6T755JT.mjs +0 -780
- package/dist/chunk-CCFEXIKG.mjs +0 -815
- package/dist/chunk-CTYW4VK4.mjs +0 -815
- package/dist/chunk-D2UMLUGP.mjs +0 -685
- package/dist/chunk-D4DQP4GI.mjs +0 -817
- package/dist/chunk-DIBJNQPT.mjs +0 -782
- package/dist/chunk-DJQK65LJ.mjs +0 -822
- package/dist/chunk-DLQEX6QS.mjs +0 -661
- package/dist/chunk-EADN4TWS.mjs +0 -819
- package/dist/chunk-EAW7EHJI.mjs +0 -826
- package/dist/chunk-EBU5NLRJ.mjs +0 -661
- package/dist/chunk-EDBTUKCC.mjs +0 -738
- package/dist/chunk-EHQQJPCV.mjs +0 -53
- package/dist/chunk-EKELJTME.mjs +0 -674
- package/dist/chunk-ELAN3AIY.mjs +0 -784
- package/dist/chunk-EWW3DF5X.mjs +0 -814
- package/dist/chunk-EXJ5M326.mjs +0 -826
- package/dist/chunk-F3DEI4YK.mjs +0 -682
- package/dist/chunk-FBJJFSCR.mjs +0 -778
- package/dist/chunk-G7M72PUZ.mjs +0 -776
- package/dist/chunk-GFVIBK25.mjs +0 -673
- package/dist/chunk-GYZ6ICY2.mjs +0 -685
- package/dist/chunk-H733EISO.mjs +0 -826
- package/dist/chunk-H7C7VETZ.mjs +0 -776
- package/dist/chunk-HD2IHWNW.mjs +0 -776
- package/dist/chunk-HKAXD2CX.mjs +0 -776
- package/dist/chunk-HLRWI4YU.mjs +0 -778
- package/dist/chunk-HNPNRGTG.mjs +0 -686
- package/dist/chunk-HQYDHSWS.mjs +0 -678
- package/dist/chunk-HVPJAO66.mjs +0 -654
- package/dist/chunk-I36Q4NZE.mjs +0 -675
- package/dist/chunk-ICOCFEPA.mjs +0 -776
- package/dist/chunk-IMM7TFAT.mjs +0 -685
- package/dist/chunk-J5OEYYWK.mjs +0 -728
- package/dist/chunk-JDR62NUF.mjs +0 -729
- package/dist/chunk-JEOWW4D7.mjs +0 -49
- package/dist/chunk-JIAD2PHZ.mjs +0 -779
- package/dist/chunk-JMHZ4OMV.mjs +0 -814
- package/dist/chunk-JUYVQ5F6.mjs +0 -673
- package/dist/chunk-K2EPLJ4A.mjs +0 -728
- package/dist/chunk-K2WK46MB.mjs +0 -776
- package/dist/chunk-KM4P2EHL.mjs +0 -729
- package/dist/chunk-KR4PTVQ4.mjs +0 -779
- package/dist/chunk-KUHNPG4Q.mjs +0 -796
- package/dist/chunk-KXFNNAMR.mjs +0 -814
- package/dist/chunk-LEZIDZXE.mjs +0 -831
- package/dist/chunk-LMFIKGQM.mjs +0 -782
- package/dist/chunk-LT43AVHN.mjs +0 -780
- package/dist/chunk-MBHPFGVB.mjs +0 -782
- package/dist/chunk-MDMZAAPV.mjs +0 -685
- package/dist/chunk-MFFRGYEX.mjs +0 -728
- package/dist/chunk-O3U6ONKJ.mjs +0 -677
- package/dist/chunk-OEPSB4XZ.mjs +0 -686
- package/dist/chunk-OJ5M55LN.mjs +0 -660
- package/dist/chunk-OSHAWBTV.mjs +0 -800
- package/dist/chunk-OVDFBN6H.mjs +0 -800
- package/dist/chunk-OWFM4DXQ.mjs +0 -686
- package/dist/chunk-P4FEBZ5I.mjs +0 -829
- package/dist/chunk-QBXYSNTR.mjs +0 -675
- package/dist/chunk-QDS6QW7Y.mjs +0 -738
- package/dist/chunk-QN5L3XNN.mjs +0 -830
- package/dist/chunk-QOK4APM5.mjs +0 -728
- package/dist/chunk-QR37WSLB.mjs +0 -826
- package/dist/chunk-QS7TKK6W.mjs +0 -685
- package/dist/chunk-QTL5KRV3.mjs +0 -686
- package/dist/chunk-QV2LQKNI.mjs +0 -686
- package/dist/chunk-QV74GE66.mjs +0 -778
- package/dist/chunk-R3NQ7SPU.mjs +0 -780
- package/dist/chunk-R3Z7JF73.mjs +0 -673
- package/dist/chunk-S63OOCED.mjs +0 -781
- package/dist/chunk-SJJDDFKI.mjs +0 -830
- package/dist/chunk-SLS4OSOJ.mjs +0 -826
- package/dist/chunk-SRFLVMCW.mjs +0 -685
- package/dist/chunk-SUOZPZBK.mjs +0 -826
- package/dist/chunk-TBBN7SM4.mjs +0 -660
- package/dist/chunk-TLJKLZBR.mjs +0 -734
- package/dist/chunk-U4ODVQIJ.mjs +0 -728
- package/dist/chunk-UA2YL34U.mjs +0 -782
- package/dist/chunk-UOQWXJXH.mjs +0 -779
- package/dist/chunk-UYBDUWOL.mjs +0 -776
- package/dist/chunk-UZD3IED4.mjs +0 -676
- package/dist/chunk-V2YCL6RC.mjs +0 -798
- package/dist/chunk-V5ROKX6T.mjs +0 -779
- package/dist/chunk-VBZLGI7W.mjs +0 -819
- package/dist/chunk-VEAZMIG4.mjs +0 -830
- package/dist/chunk-VMG4TRFB.mjs +0 -750
- package/dist/chunk-VOLA2PFJ.mjs +0 -676
- package/dist/chunk-VTBZU2XN.mjs +0 -826
- package/dist/chunk-WC37DM4U.mjs +0 -816
- package/dist/chunk-WDLA4JJY.mjs +0 -778
- package/dist/chunk-WQ6BKSTC.mjs +0 -815
- package/dist/chunk-WXSNIINA.mjs +0 -778
- package/dist/chunk-WYBPKSFQ.mjs +0 -816
- package/dist/chunk-XFRN7OPZ.mjs +0 -686
- package/dist/chunk-XLRF64SW.mjs +0 -53
- package/dist/chunk-YLNMIJBD.mjs +0 -728
- package/dist/chunk-YUGESFKI.mjs +0 -819
- package/dist/chunk-YVDMWPWQ.mjs +0 -776
- package/dist/chunk-Z6L7TEVJ.mjs +0 -828
- package/dist/chunk-Z72DRRM6.mjs +0 -829
- package/dist/chunk-ZXF3RMZZ.mjs +0 -685
- package/dist/sdk.d.mts +0 -39
- package/dist/sdk.d.ts +0 -39
- package/dist/sdk.js +0 -121
- 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
|
-
});
|