@juhuu/sdk-ts 1.2.28 → 1.2.30
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 +26 -1
- package/dist/index.d.ts +26 -1
- package/dist/index.js +28 -0
- package/dist/index.mjs +28 -0
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
@@ -710,6 +710,7 @@ 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>>;
|
@@ -718,6 +719,7 @@ declare class ChatsService extends Service {
|
|
718
719
|
|
719
720
|
declare class ChatMessagesService extends Service {
|
720
721
|
constructor(config: JUHUU.SetupConfig);
|
722
|
+
create(ChatMessageCreateParams: JUHUU.ChatMessage.Create.Params, ChatMessageCreateOptions?: JUHUU.ChatMessage.Create.Options): Promise<JUHUU.HttpResponse<JUHUU.ChatMessage.Create.Response>>;
|
721
723
|
list(ChatMessageListParams: JUHUU.ChatMessage.List.Params, ChatMessageListOptions?: JUHUU.ChatMessage.List.Options): Promise<JUHUU.HttpResponse<JUHUU.ChatMessage.List.Response>>;
|
722
724
|
retrieve(ChatMessageRetrieveParams: JUHUU.ChatMessage.Retrieve.Params, ChatMessageRetrieveOptions?: JUHUU.ChatMessage.Retrieve.Options): Promise<JUHUU.HttpResponse<JUHUU.ChatMessage.Retrieve.Response>>;
|
723
725
|
}
|
@@ -1218,6 +1220,15 @@ declare namespace JUHUU {
|
|
1218
1220
|
userId: string;
|
1219
1221
|
lastMessageAt: string | null;
|
1220
1222
|
};
|
1223
|
+
namespace Create {
|
1224
|
+
type Params = {
|
1225
|
+
userId: string;
|
1226
|
+
};
|
1227
|
+
type Options = JUHUU.RequestOptions;
|
1228
|
+
type Response = {
|
1229
|
+
chat: JUHUU.Chat.Object;
|
1230
|
+
};
|
1231
|
+
}
|
1221
1232
|
namespace Retrieve {
|
1222
1233
|
type Params = {
|
1223
1234
|
chatId: string;
|
@@ -1275,6 +1286,17 @@ declare namespace JUHUU {
|
|
1275
1286
|
type: "ai";
|
1276
1287
|
}
|
1277
1288
|
export type Object = AiChatMessage | UserChatMessage;
|
1289
|
+
export namespace Create {
|
1290
|
+
type Params = {
|
1291
|
+
userId: string;
|
1292
|
+
message: string;
|
1293
|
+
chatId: string;
|
1294
|
+
};
|
1295
|
+
type Options = JUHUU.RequestOptions;
|
1296
|
+
type Response = {
|
1297
|
+
chatMessage: JUHUU.ChatMessage.Object;
|
1298
|
+
};
|
1299
|
+
}
|
1278
1300
|
export namespace Retrieve {
|
1279
1301
|
type Params = {
|
1280
1302
|
chatMessageId: string;
|
@@ -1291,7 +1313,10 @@ declare namespace JUHUU {
|
|
1291
1313
|
userId?: string;
|
1292
1314
|
chatId?: string;
|
1293
1315
|
};
|
1294
|
-
type Options =
|
1316
|
+
type Options = {
|
1317
|
+
limit?: number;
|
1318
|
+
skip?: number;
|
1319
|
+
} & JUHUU.RequestOptions;
|
1295
1320
|
type Response = {
|
1296
1321
|
chatMessageArray: JUHUU.ChatMessage.Object[];
|
1297
1322
|
};
|
package/dist/index.d.ts
CHANGED
@@ -710,6 +710,7 @@ 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>>;
|
@@ -718,6 +719,7 @@ declare class ChatsService extends Service {
|
|
718
719
|
|
719
720
|
declare class ChatMessagesService extends Service {
|
720
721
|
constructor(config: JUHUU.SetupConfig);
|
722
|
+
create(ChatMessageCreateParams: JUHUU.ChatMessage.Create.Params, ChatMessageCreateOptions?: JUHUU.ChatMessage.Create.Options): Promise<JUHUU.HttpResponse<JUHUU.ChatMessage.Create.Response>>;
|
721
723
|
list(ChatMessageListParams: JUHUU.ChatMessage.List.Params, ChatMessageListOptions?: JUHUU.ChatMessage.List.Options): Promise<JUHUU.HttpResponse<JUHUU.ChatMessage.List.Response>>;
|
722
724
|
retrieve(ChatMessageRetrieveParams: JUHUU.ChatMessage.Retrieve.Params, ChatMessageRetrieveOptions?: JUHUU.ChatMessage.Retrieve.Options): Promise<JUHUU.HttpResponse<JUHUU.ChatMessage.Retrieve.Response>>;
|
723
725
|
}
|
@@ -1218,6 +1220,15 @@ declare namespace JUHUU {
|
|
1218
1220
|
userId: string;
|
1219
1221
|
lastMessageAt: string | null;
|
1220
1222
|
};
|
1223
|
+
namespace Create {
|
1224
|
+
type Params = {
|
1225
|
+
userId: string;
|
1226
|
+
};
|
1227
|
+
type Options = JUHUU.RequestOptions;
|
1228
|
+
type Response = {
|
1229
|
+
chat: JUHUU.Chat.Object;
|
1230
|
+
};
|
1231
|
+
}
|
1221
1232
|
namespace Retrieve {
|
1222
1233
|
type Params = {
|
1223
1234
|
chatId: string;
|
@@ -1275,6 +1286,17 @@ declare namespace JUHUU {
|
|
1275
1286
|
type: "ai";
|
1276
1287
|
}
|
1277
1288
|
export type Object = AiChatMessage | UserChatMessage;
|
1289
|
+
export namespace Create {
|
1290
|
+
type Params = {
|
1291
|
+
userId: string;
|
1292
|
+
message: string;
|
1293
|
+
chatId: string;
|
1294
|
+
};
|
1295
|
+
type Options = JUHUU.RequestOptions;
|
1296
|
+
type Response = {
|
1297
|
+
chatMessage: JUHUU.ChatMessage.Object;
|
1298
|
+
};
|
1299
|
+
}
|
1278
1300
|
export namespace Retrieve {
|
1279
1301
|
type Params = {
|
1280
1302
|
chatMessageId: string;
|
@@ -1291,7 +1313,10 @@ declare namespace JUHUU {
|
|
1291
1313
|
userId?: string;
|
1292
1314
|
chatId?: string;
|
1293
1315
|
};
|
1294
|
-
type Options =
|
1316
|
+
type Options = {
|
1317
|
+
limit?: number;
|
1318
|
+
skip?: number;
|
1319
|
+
} & JUHUU.RequestOptions;
|
1295
1320
|
type Response = {
|
1296
1321
|
chatMessageArray: JUHUU.ChatMessage.Object[];
|
1297
1322
|
};
|
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) {
|
@@ -1644,6 +1657,21 @@ var ChatMessagesService = class extends Service {
|
|
1644
1657
|
constructor(config) {
|
1645
1658
|
super(config);
|
1646
1659
|
}
|
1660
|
+
async create(ChatMessageCreateParams, ChatMessageCreateOptions) {
|
1661
|
+
return await super.sendRequest(
|
1662
|
+
{
|
1663
|
+
method: "POST",
|
1664
|
+
url: "chatMessages",
|
1665
|
+
body: {
|
1666
|
+
chatId: ChatMessageCreateParams.chatId,
|
1667
|
+
message: ChatMessageCreateParams.message,
|
1668
|
+
userId: ChatMessageCreateParams.userId
|
1669
|
+
},
|
1670
|
+
useAuthentication: true
|
1671
|
+
},
|
1672
|
+
ChatMessageCreateOptions
|
1673
|
+
);
|
1674
|
+
}
|
1647
1675
|
async list(ChatMessageListParams, ChatMessageListOptions) {
|
1648
1676
|
const queryArray = [];
|
1649
1677
|
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) {
|
@@ -1599,6 +1612,21 @@ var ChatMessagesService = class extends Service {
|
|
1599
1612
|
constructor(config) {
|
1600
1613
|
super(config);
|
1601
1614
|
}
|
1615
|
+
async create(ChatMessageCreateParams, ChatMessageCreateOptions) {
|
1616
|
+
return await super.sendRequest(
|
1617
|
+
{
|
1618
|
+
method: "POST",
|
1619
|
+
url: "chatMessages",
|
1620
|
+
body: {
|
1621
|
+
chatId: ChatMessageCreateParams.chatId,
|
1622
|
+
message: ChatMessageCreateParams.message,
|
1623
|
+
userId: ChatMessageCreateParams.userId
|
1624
|
+
},
|
1625
|
+
useAuthentication: true
|
1626
|
+
},
|
1627
|
+
ChatMessageCreateOptions
|
1628
|
+
);
|
1629
|
+
}
|
1602
1630
|
async list(ChatMessageListParams, ChatMessageListOptions) {
|
1603
1631
|
const queryArray = [];
|
1604
1632
|
if (ChatMessageListParams.userId !== void 0) {
|