@juhuu/sdk-ts 1.2.29 → 1.2.31
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/index.d.mts +34 -1
- package/dist/index.d.ts +34 -1
- package/dist/index.js +39 -0
- package/dist/index.mjs +39 -0
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
@@ -710,14 +710,17 @@ declare class ArticlesService extends Service {
|
|
710
710
|
|
711
711
|
declare class ChatsService extends Service {
|
712
712
|
constructor(config: JUHUU.SetupConfig);
|
713
|
+
create(ChatCreateParams: JUHUU.Chat.Create.Params, ChatCreateOptions?: JUHUU.Chat.Create.Options): Promise<JUHUU.HttpResponse<JUHUU.Chat.Create.Response>>;
|
713
714
|
list(ChatListParams: JUHUU.Chat.List.Params, ChatListOptions?: JUHUU.Chat.List.Options): Promise<JUHUU.HttpResponse<JUHUU.Chat.List.Response>>;
|
714
715
|
retrieve(ChatRetrieveParams: JUHUU.Chat.Retrieve.Params, ChatRetrieveOptions?: JUHUU.Chat.Retrieve.Options): Promise<JUHUU.HttpResponse<JUHUU.Chat.Retrieve.Response>>;
|
715
716
|
update(ChatUpdateParams: JUHUU.Chat.Update.Params, ChatUpdateOptions?: JUHUU.Chat.Update.Options): Promise<JUHUU.HttpResponse<JUHUU.Chat.Update.Response>>;
|
716
717
|
delete(ChatDeleteParams: JUHUU.Chat.Delete.Params, ChatDeleteOptions?: JUHUU.Chat.Delete.Options): Promise<JUHUU.HttpResponse<JUHUU.Chat.Delete.Response>>;
|
718
|
+
complete(ChatUpdateParams: JUHUU.Chat.Complete.Params, ChatUpdateOptions?: JUHUU.Chat.Complete.Options): Promise<JUHUU.HttpResponse<JUHUU.Chat.Complete.Response>>;
|
717
719
|
}
|
718
720
|
|
719
721
|
declare class ChatMessagesService extends Service {
|
720
722
|
constructor(config: JUHUU.SetupConfig);
|
723
|
+
create(ChatMessageCreateParams: JUHUU.ChatMessage.Create.Params, ChatMessageCreateOptions?: JUHUU.ChatMessage.Create.Options): Promise<JUHUU.HttpResponse<JUHUU.ChatMessage.Create.Response>>;
|
721
724
|
list(ChatMessageListParams: JUHUU.ChatMessage.List.Params, ChatMessageListOptions?: JUHUU.ChatMessage.List.Options): Promise<JUHUU.HttpResponse<JUHUU.ChatMessage.List.Response>>;
|
722
725
|
retrieve(ChatMessageRetrieveParams: JUHUU.ChatMessage.Retrieve.Params, ChatMessageRetrieveOptions?: JUHUU.ChatMessage.Retrieve.Options): Promise<JUHUU.HttpResponse<JUHUU.ChatMessage.Retrieve.Response>>;
|
723
726
|
}
|
@@ -1216,8 +1219,17 @@ declare namespace JUHUU {
|
|
1216
1219
|
readonly object: "chat";
|
1217
1220
|
title: string | null;
|
1218
1221
|
userId: string;
|
1219
|
-
lastMessageAt:
|
1222
|
+
lastMessageAt: Date | null;
|
1220
1223
|
};
|
1224
|
+
namespace Create {
|
1225
|
+
type Params = {
|
1226
|
+
userId: string;
|
1227
|
+
};
|
1228
|
+
type Options = JUHUU.RequestOptions;
|
1229
|
+
type Response = {
|
1230
|
+
chat: JUHUU.Chat.Object;
|
1231
|
+
};
|
1232
|
+
}
|
1221
1233
|
namespace Retrieve {
|
1222
1234
|
type Params = {
|
1223
1235
|
chatId: string;
|
@@ -1258,6 +1270,16 @@ declare namespace JUHUU {
|
|
1258
1270
|
type Options = JUHUU.RequestOptions;
|
1259
1271
|
type Response = JUHUU.Chat.Object[];
|
1260
1272
|
}
|
1273
|
+
namespace Complete {
|
1274
|
+
type Params = {
|
1275
|
+
chatId: string;
|
1276
|
+
};
|
1277
|
+
type Options = JUHUU.RequestOptions;
|
1278
|
+
type Response = {
|
1279
|
+
chat: JUHUU.Chat.Object;
|
1280
|
+
chatMessageArray: JUHUU.ChatMessage.Object[];
|
1281
|
+
};
|
1282
|
+
}
|
1261
1283
|
}
|
1262
1284
|
namespace ChatMessage {
|
1263
1285
|
type Base = {
|
@@ -1275,6 +1297,17 @@ declare namespace JUHUU {
|
|
1275
1297
|
type: "ai";
|
1276
1298
|
}
|
1277
1299
|
export type Object = AiChatMessage | UserChatMessage;
|
1300
|
+
export namespace Create {
|
1301
|
+
type Params = {
|
1302
|
+
userId: string;
|
1303
|
+
message: string;
|
1304
|
+
chatId: string;
|
1305
|
+
};
|
1306
|
+
type Options = JUHUU.RequestOptions;
|
1307
|
+
type Response = {
|
1308
|
+
chatMessage: JUHUU.ChatMessage.Object;
|
1309
|
+
};
|
1310
|
+
}
|
1278
1311
|
export namespace Retrieve {
|
1279
1312
|
type Params = {
|
1280
1313
|
chatMessageId: string;
|
package/dist/index.d.ts
CHANGED
@@ -710,14 +710,17 @@ declare class ArticlesService extends Service {
|
|
710
710
|
|
711
711
|
declare class ChatsService extends Service {
|
712
712
|
constructor(config: JUHUU.SetupConfig);
|
713
|
+
create(ChatCreateParams: JUHUU.Chat.Create.Params, ChatCreateOptions?: JUHUU.Chat.Create.Options): Promise<JUHUU.HttpResponse<JUHUU.Chat.Create.Response>>;
|
713
714
|
list(ChatListParams: JUHUU.Chat.List.Params, ChatListOptions?: JUHUU.Chat.List.Options): Promise<JUHUU.HttpResponse<JUHUU.Chat.List.Response>>;
|
714
715
|
retrieve(ChatRetrieveParams: JUHUU.Chat.Retrieve.Params, ChatRetrieveOptions?: JUHUU.Chat.Retrieve.Options): Promise<JUHUU.HttpResponse<JUHUU.Chat.Retrieve.Response>>;
|
715
716
|
update(ChatUpdateParams: JUHUU.Chat.Update.Params, ChatUpdateOptions?: JUHUU.Chat.Update.Options): Promise<JUHUU.HttpResponse<JUHUU.Chat.Update.Response>>;
|
716
717
|
delete(ChatDeleteParams: JUHUU.Chat.Delete.Params, ChatDeleteOptions?: JUHUU.Chat.Delete.Options): Promise<JUHUU.HttpResponse<JUHUU.Chat.Delete.Response>>;
|
718
|
+
complete(ChatUpdateParams: JUHUU.Chat.Complete.Params, ChatUpdateOptions?: JUHUU.Chat.Complete.Options): Promise<JUHUU.HttpResponse<JUHUU.Chat.Complete.Response>>;
|
717
719
|
}
|
718
720
|
|
719
721
|
declare class ChatMessagesService extends Service {
|
720
722
|
constructor(config: JUHUU.SetupConfig);
|
723
|
+
create(ChatMessageCreateParams: JUHUU.ChatMessage.Create.Params, ChatMessageCreateOptions?: JUHUU.ChatMessage.Create.Options): Promise<JUHUU.HttpResponse<JUHUU.ChatMessage.Create.Response>>;
|
721
724
|
list(ChatMessageListParams: JUHUU.ChatMessage.List.Params, ChatMessageListOptions?: JUHUU.ChatMessage.List.Options): Promise<JUHUU.HttpResponse<JUHUU.ChatMessage.List.Response>>;
|
722
725
|
retrieve(ChatMessageRetrieveParams: JUHUU.ChatMessage.Retrieve.Params, ChatMessageRetrieveOptions?: JUHUU.ChatMessage.Retrieve.Options): Promise<JUHUU.HttpResponse<JUHUU.ChatMessage.Retrieve.Response>>;
|
723
726
|
}
|
@@ -1216,8 +1219,17 @@ declare namespace JUHUU {
|
|
1216
1219
|
readonly object: "chat";
|
1217
1220
|
title: string | null;
|
1218
1221
|
userId: string;
|
1219
|
-
lastMessageAt:
|
1222
|
+
lastMessageAt: Date | null;
|
1220
1223
|
};
|
1224
|
+
namespace Create {
|
1225
|
+
type Params = {
|
1226
|
+
userId: string;
|
1227
|
+
};
|
1228
|
+
type Options = JUHUU.RequestOptions;
|
1229
|
+
type Response = {
|
1230
|
+
chat: JUHUU.Chat.Object;
|
1231
|
+
};
|
1232
|
+
}
|
1221
1233
|
namespace Retrieve {
|
1222
1234
|
type Params = {
|
1223
1235
|
chatId: string;
|
@@ -1258,6 +1270,16 @@ declare namespace JUHUU {
|
|
1258
1270
|
type Options = JUHUU.RequestOptions;
|
1259
1271
|
type Response = JUHUU.Chat.Object[];
|
1260
1272
|
}
|
1273
|
+
namespace Complete {
|
1274
|
+
type Params = {
|
1275
|
+
chatId: string;
|
1276
|
+
};
|
1277
|
+
type Options = JUHUU.RequestOptions;
|
1278
|
+
type Response = {
|
1279
|
+
chat: JUHUU.Chat.Object;
|
1280
|
+
chatMessageArray: JUHUU.ChatMessage.Object[];
|
1281
|
+
};
|
1282
|
+
}
|
1261
1283
|
}
|
1262
1284
|
namespace ChatMessage {
|
1263
1285
|
type Base = {
|
@@ -1275,6 +1297,17 @@ declare namespace JUHUU {
|
|
1275
1297
|
type: "ai";
|
1276
1298
|
}
|
1277
1299
|
export type Object = AiChatMessage | UserChatMessage;
|
1300
|
+
export namespace Create {
|
1301
|
+
type Params = {
|
1302
|
+
userId: string;
|
1303
|
+
message: string;
|
1304
|
+
chatId: string;
|
1305
|
+
};
|
1306
|
+
type Options = JUHUU.RequestOptions;
|
1307
|
+
type Response = {
|
1308
|
+
chatMessage: JUHUU.ChatMessage.Object;
|
1309
|
+
};
|
1310
|
+
}
|
1278
1311
|
export namespace Retrieve {
|
1279
1312
|
type Params = {
|
1280
1313
|
chatMessageId: string;
|
package/dist/index.js
CHANGED
@@ -1580,6 +1580,19 @@ var ChatsService = class extends Service {
|
|
1580
1580
|
constructor(config) {
|
1581
1581
|
super(config);
|
1582
1582
|
}
|
1583
|
+
async create(ChatCreateParams, ChatCreateOptions) {
|
1584
|
+
return await super.sendRequest(
|
1585
|
+
{
|
1586
|
+
method: "POST",
|
1587
|
+
url: "chats",
|
1588
|
+
body: {
|
1589
|
+
userId: ChatCreateParams.userId
|
1590
|
+
},
|
1591
|
+
useAuthentication: true
|
1592
|
+
},
|
1593
|
+
ChatCreateOptions
|
1594
|
+
);
|
1595
|
+
}
|
1583
1596
|
async list(ChatListParams, ChatListOptions) {
|
1584
1597
|
const queryArray = [];
|
1585
1598
|
if (ChatListOptions?.limit !== void 0) {
|
@@ -1637,6 +1650,17 @@ var ChatsService = class extends Service {
|
|
1637
1650
|
ChatDeleteOptions
|
1638
1651
|
);
|
1639
1652
|
}
|
1653
|
+
async complete(ChatUpdateParams, ChatUpdateOptions) {
|
1654
|
+
return await super.sendRequest(
|
1655
|
+
{
|
1656
|
+
method: "PATCH",
|
1657
|
+
url: "chats/" + ChatUpdateParams.chatId + "/complete",
|
1658
|
+
body: void 0,
|
1659
|
+
useAuthentication: true
|
1660
|
+
},
|
1661
|
+
ChatUpdateOptions
|
1662
|
+
);
|
1663
|
+
}
|
1640
1664
|
};
|
1641
1665
|
|
1642
1666
|
// src/chatMessages/chatMessages.service.ts
|
@@ -1644,6 +1668,21 @@ var ChatMessagesService = class extends Service {
|
|
1644
1668
|
constructor(config) {
|
1645
1669
|
super(config);
|
1646
1670
|
}
|
1671
|
+
async create(ChatMessageCreateParams, ChatMessageCreateOptions) {
|
1672
|
+
return await super.sendRequest(
|
1673
|
+
{
|
1674
|
+
method: "POST",
|
1675
|
+
url: "chatMessages",
|
1676
|
+
body: {
|
1677
|
+
chatId: ChatMessageCreateParams.chatId,
|
1678
|
+
message: ChatMessageCreateParams.message,
|
1679
|
+
userId: ChatMessageCreateParams.userId
|
1680
|
+
},
|
1681
|
+
useAuthentication: true
|
1682
|
+
},
|
1683
|
+
ChatMessageCreateOptions
|
1684
|
+
);
|
1685
|
+
}
|
1647
1686
|
async list(ChatMessageListParams, ChatMessageListOptions) {
|
1648
1687
|
const queryArray = [];
|
1649
1688
|
if (ChatMessageListParams.userId !== void 0) {
|
package/dist/index.mjs
CHANGED
@@ -1535,6 +1535,19 @@ var ChatsService = class extends Service {
|
|
1535
1535
|
constructor(config) {
|
1536
1536
|
super(config);
|
1537
1537
|
}
|
1538
|
+
async create(ChatCreateParams, ChatCreateOptions) {
|
1539
|
+
return await super.sendRequest(
|
1540
|
+
{
|
1541
|
+
method: "POST",
|
1542
|
+
url: "chats",
|
1543
|
+
body: {
|
1544
|
+
userId: ChatCreateParams.userId
|
1545
|
+
},
|
1546
|
+
useAuthentication: true
|
1547
|
+
},
|
1548
|
+
ChatCreateOptions
|
1549
|
+
);
|
1550
|
+
}
|
1538
1551
|
async list(ChatListParams, ChatListOptions) {
|
1539
1552
|
const queryArray = [];
|
1540
1553
|
if (ChatListOptions?.limit !== void 0) {
|
@@ -1592,6 +1605,17 @@ var ChatsService = class extends Service {
|
|
1592
1605
|
ChatDeleteOptions
|
1593
1606
|
);
|
1594
1607
|
}
|
1608
|
+
async complete(ChatUpdateParams, ChatUpdateOptions) {
|
1609
|
+
return await super.sendRequest(
|
1610
|
+
{
|
1611
|
+
method: "PATCH",
|
1612
|
+
url: "chats/" + ChatUpdateParams.chatId + "/complete",
|
1613
|
+
body: void 0,
|
1614
|
+
useAuthentication: true
|
1615
|
+
},
|
1616
|
+
ChatUpdateOptions
|
1617
|
+
);
|
1618
|
+
}
|
1595
1619
|
};
|
1596
1620
|
|
1597
1621
|
// src/chatMessages/chatMessages.service.ts
|
@@ -1599,6 +1623,21 @@ var ChatMessagesService = class extends Service {
|
|
1599
1623
|
constructor(config) {
|
1600
1624
|
super(config);
|
1601
1625
|
}
|
1626
|
+
async create(ChatMessageCreateParams, ChatMessageCreateOptions) {
|
1627
|
+
return await super.sendRequest(
|
1628
|
+
{
|
1629
|
+
method: "POST",
|
1630
|
+
url: "chatMessages",
|
1631
|
+
body: {
|
1632
|
+
chatId: ChatMessageCreateParams.chatId,
|
1633
|
+
message: ChatMessageCreateParams.message,
|
1634
|
+
userId: ChatMessageCreateParams.userId
|
1635
|
+
},
|
1636
|
+
useAuthentication: true
|
1637
|
+
},
|
1638
|
+
ChatMessageCreateOptions
|
1639
|
+
);
|
1640
|
+
}
|
1602
1641
|
async list(ChatMessageListParams, ChatMessageListOptions) {
|
1603
1642
|
const queryArray = [];
|
1604
1643
|
if (ChatMessageListParams.userId !== void 0) {
|