@juhuu/sdk-ts 1.2.31 → 1.2.33

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 CHANGED
@@ -702,6 +702,7 @@ declare class LicenseTemplatesService extends Service {
702
702
 
703
703
  declare class ArticlesService extends Service {
704
704
  constructor(config: JUHUU.SetupConfig);
705
+ create(ArticleCreateParams: JUHUU.Article.Create.Params, ArticleCreateOptions?: JUHUU.Article.Create.Options): Promise<JUHUU.HttpResponse<JUHUU.Article.Create.Response>>;
705
706
  list(ArticleListParams: JUHUU.Article.List.Params, ArticleListOptions?: JUHUU.Article.List.Options): Promise<JUHUU.HttpResponse<JUHUU.Article.List.Response>>;
706
707
  retrieve(ArticleRetrieveParams: JUHUU.Article.Retrieve.Params, ArticleRetrieveOptions?: JUHUU.Article.Retrieve.Options): Promise<JUHUU.HttpResponse<JUHUU.Article.Retrieve.Response>>;
707
708
  update(ArticleUpdateParams: JUHUU.Article.Update.Params, ArticleUpdateOptions?: JUHUU.Article.Update.Options): Promise<JUHUU.HttpResponse<JUHUU.Article.Update.Response>>;
@@ -1157,12 +1158,22 @@ declare namespace JUHUU {
1157
1158
  readonly object: "article";
1158
1159
  title: LocaleString;
1159
1160
  subtitle: LocaleString;
1160
- propertyId: string | null;
1161
- parentArticleId: string | null;
1162
- slug: string;
1161
+ propertyId: string;
1162
+ slug: string | null;
1163
1163
  markdownContent: LocaleString;
1164
1164
  status: "draft" | "published";
1165
+ lastUpdatedAt: Date;
1166
+ createdAt: Date;
1165
1167
  };
1168
+ namespace Create {
1169
+ type Params = {
1170
+ propertyId: string;
1171
+ };
1172
+ type Options = JUHUU.RequestOptions;
1173
+ type Response = {
1174
+ article: JUHUU.Article.Object;
1175
+ };
1176
+ }
1166
1177
  namespace Retrieve {
1167
1178
  type Params = {
1168
1179
  articleId: string;
@@ -1178,7 +1189,6 @@ declare namespace JUHUU {
1178
1189
  namespace List {
1179
1190
  type Params = {
1180
1191
  propertyId?: string;
1181
- parentArticleId?: string | null;
1182
1192
  statusArray?: JUHUU.Article.Object["status"][];
1183
1193
  };
1184
1194
  type Options = {
@@ -1286,8 +1296,10 @@ declare namespace JUHUU {
1286
1296
  id: string;
1287
1297
  readonly object: "chatMessage";
1288
1298
  createdAt: Date;
1289
- content: string;
1290
1299
  chatId: string;
1300
+ originalMessage: string;
1301
+ translatedMessage: string;
1302
+ languageCode: LanguageCode;
1291
1303
  };
1292
1304
  export interface UserChatMessage extends Base {
1293
1305
  type: "user";
package/dist/index.d.ts CHANGED
@@ -702,6 +702,7 @@ declare class LicenseTemplatesService extends Service {
702
702
 
703
703
  declare class ArticlesService extends Service {
704
704
  constructor(config: JUHUU.SetupConfig);
705
+ create(ArticleCreateParams: JUHUU.Article.Create.Params, ArticleCreateOptions?: JUHUU.Article.Create.Options): Promise<JUHUU.HttpResponse<JUHUU.Article.Create.Response>>;
705
706
  list(ArticleListParams: JUHUU.Article.List.Params, ArticleListOptions?: JUHUU.Article.List.Options): Promise<JUHUU.HttpResponse<JUHUU.Article.List.Response>>;
706
707
  retrieve(ArticleRetrieveParams: JUHUU.Article.Retrieve.Params, ArticleRetrieveOptions?: JUHUU.Article.Retrieve.Options): Promise<JUHUU.HttpResponse<JUHUU.Article.Retrieve.Response>>;
707
708
  update(ArticleUpdateParams: JUHUU.Article.Update.Params, ArticleUpdateOptions?: JUHUU.Article.Update.Options): Promise<JUHUU.HttpResponse<JUHUU.Article.Update.Response>>;
@@ -1157,12 +1158,22 @@ declare namespace JUHUU {
1157
1158
  readonly object: "article";
1158
1159
  title: LocaleString;
1159
1160
  subtitle: LocaleString;
1160
- propertyId: string | null;
1161
- parentArticleId: string | null;
1162
- slug: string;
1161
+ propertyId: string;
1162
+ slug: string | null;
1163
1163
  markdownContent: LocaleString;
1164
1164
  status: "draft" | "published";
1165
+ lastUpdatedAt: Date;
1166
+ createdAt: Date;
1165
1167
  };
1168
+ namespace Create {
1169
+ type Params = {
1170
+ propertyId: string;
1171
+ };
1172
+ type Options = JUHUU.RequestOptions;
1173
+ type Response = {
1174
+ article: JUHUU.Article.Object;
1175
+ };
1176
+ }
1166
1177
  namespace Retrieve {
1167
1178
  type Params = {
1168
1179
  articleId: string;
@@ -1178,7 +1189,6 @@ declare namespace JUHUU {
1178
1189
  namespace List {
1179
1190
  type Params = {
1180
1191
  propertyId?: string;
1181
- parentArticleId?: string | null;
1182
1192
  statusArray?: JUHUU.Article.Object["status"][];
1183
1193
  };
1184
1194
  type Options = {
@@ -1286,8 +1296,10 @@ declare namespace JUHUU {
1286
1296
  id: string;
1287
1297
  readonly object: "chatMessage";
1288
1298
  createdAt: Date;
1289
- content: string;
1290
1299
  chatId: string;
1300
+ originalMessage: string;
1301
+ translatedMessage: string;
1302
+ languageCode: LanguageCode;
1291
1303
  };
1292
1304
  export interface UserChatMessage extends Base {
1293
1305
  type: "user";
package/dist/index.js CHANGED
@@ -1503,6 +1503,19 @@ var ArticlesService = class extends Service {
1503
1503
  constructor(config) {
1504
1504
  super(config);
1505
1505
  }
1506
+ async create(ArticleCreateParams, ArticleCreateOptions) {
1507
+ return await super.sendRequest(
1508
+ {
1509
+ method: "POST",
1510
+ url: "articles",
1511
+ body: {
1512
+ propertyId: ArticleCreateParams.propertyId
1513
+ },
1514
+ useAuthentication: true
1515
+ },
1516
+ ArticleCreateOptions
1517
+ );
1518
+ }
1506
1519
  async list(ArticleListParams, ArticleListOptions) {
1507
1520
  const queryArray = [];
1508
1521
  if (ArticleListOptions?.limit !== void 0) {
@@ -1517,9 +1530,6 @@ var ArticlesService = class extends Service {
1517
1530
  if (ArticleListOptions?.skip !== void 0) {
1518
1531
  queryArray.push("skip=" + ArticleListOptions.skip);
1519
1532
  }
1520
- if (ArticleListParams?.parentArticleId !== void 0) {
1521
- queryArray.push("parentArticleId=" + ArticleListParams.parentArticleId);
1522
- }
1523
1533
  return await super.sendRequest(
1524
1534
  {
1525
1535
  method: "GET",
package/dist/index.mjs CHANGED
@@ -1458,6 +1458,19 @@ var ArticlesService = class extends Service {
1458
1458
  constructor(config) {
1459
1459
  super(config);
1460
1460
  }
1461
+ async create(ArticleCreateParams, ArticleCreateOptions) {
1462
+ return await super.sendRequest(
1463
+ {
1464
+ method: "POST",
1465
+ url: "articles",
1466
+ body: {
1467
+ propertyId: ArticleCreateParams.propertyId
1468
+ },
1469
+ useAuthentication: true
1470
+ },
1471
+ ArticleCreateOptions
1472
+ );
1473
+ }
1461
1474
  async list(ArticleListParams, ArticleListOptions) {
1462
1475
  const queryArray = [];
1463
1476
  if (ArticleListOptions?.limit !== void 0) {
@@ -1472,9 +1485,6 @@ var ArticlesService = class extends Service {
1472
1485
  if (ArticleListOptions?.skip !== void 0) {
1473
1486
  queryArray.push("skip=" + ArticleListOptions.skip);
1474
1487
  }
1475
- if (ArticleListParams?.parentArticleId !== void 0) {
1476
- queryArray.push("parentArticleId=" + ArticleListParams.parentArticleId);
1477
- }
1478
1488
  return await super.sendRequest(
1479
1489
  {
1480
1490
  method: "GET",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@juhuu/sdk-ts",
3
- "version": "1.2.31",
3
+ "version": "1.2.33",
4
4
  "description": "Typescript wrapper for JUHUU services",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",