cmx-sdk 0.2.14 → 0.2.16

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/cli.js CHANGED
@@ -3372,8 +3372,12 @@ async function createDataEntry(options) {
3372
3372
  }
3373
3373
  const raw = readJsonInput(options);
3374
3374
  let input;
3375
- if (raw.dataJson && typeof raw.dataJson === "object") {
3376
- input = raw;
3375
+ if (raw.dataJson && typeof raw.dataJson === "object" && !Array.isArray(raw.dataJson)) {
3376
+ const statusFromJson = typeof raw.status === "string" && VALID_STATUSES.includes(raw.status) ? raw.status : void 0;
3377
+ input = {
3378
+ dataJson: raw.dataJson,
3379
+ ...statusFromJson ? { status: statusFromJson } : {}
3380
+ };
3377
3381
  } else {
3378
3382
  input = { dataJson: raw };
3379
3383
  }
@@ -4673,6 +4677,7 @@ async function uploadAsset(options) {
4673
4677
  formData.append("file", new Blob([fileBuffer], { type: mimeType }), basename2(options.file));
4674
4678
  if (options.alt) formData.append("alt", options.alt);
4675
4679
  if (options.description) formData.append("description", options.description);
4680
+ if (options.aiSummary) formData.append("aiSummary", options.aiSummary);
4676
4681
  if (options.group) formData.append("group", options.group);
4677
4682
  if (options.tags) formData.append("tags", options.tags);
4678
4683
  console.log(`\u30A2\u30BB\u30C3\u30C8\u3092\u30A2\u30C3\u30D7\u30ED\u30FC\u30C9\u3057\u3066\u3044\u307E\u3059: ${options.file}...`);
@@ -4795,6 +4800,7 @@ async function updateAsset(options) {
4795
4800
  };
4796
4801
  if (options.alt !== void 0) requestBody.alt = options.alt;
4797
4802
  if (options.description !== void 0) requestBody.description = options.description;
4803
+ if (options.aiSummary !== void 0) requestBody.aiSummary = options.aiSummary;
4798
4804
  if (options.clearGroup) {
4799
4805
  requestBody.groupSlug = null;
4800
4806
  } else if (options.group !== void 0) {
@@ -4963,9 +4969,9 @@ program.command("remove-collection-data-type").description("\u30B3\u30EC\u30AF\u
4963
4969
  program.command("link-collection-data-type").description("\u65E2\u5B58\u306E\u30B0\u30ED\u30FC\u30D0\u30EB\u30C7\u30FC\u30BF\u30BF\u30A4\u30D7\u3092\u30B3\u30EC\u30AF\u30B7\u30E7\u30F3\u3078\u7D10\u3065\u3051").requiredOption("--collection <slug>", "\u30B3\u30EC\u30AF\u30B7\u30E7\u30F3\u306E\u30B9\u30E9\u30C3\u30B0").requiredOption("--data-type <slug>", "\u7D10\u3065\u3051\u308B\u30B0\u30ED\u30FC\u30D0\u30EB\u30C7\u30FC\u30BF\u30BF\u30A4\u30D7\u306E\u30B9\u30E9\u30C3\u30B0").requiredOption("--field-slug <slug>", "\u53C2\u7167\u30D5\u30A3\u30FC\u30EB\u30C9\u306E\u30B9\u30E9\u30C3\u30B0").requiredOption("--label <label>", "\u53C2\u7167\u30D5\u30A3\u30FC\u30EB\u30C9\u306E\u8868\u793A\u540D").option("--reference-type <type>", "\u53C2\u7167\u30BF\u30A4\u30D7\uFF08single \u307E\u305F\u306F multiple\u3001\u65E2\u5B9A: single\uFF09", "single").action(linkCollectionDataType);
4964
4970
  program.command("list-collection-presets").description("\u30B3\u30EC\u30AF\u30B7\u30E7\u30F3\u5411\u3051\u30C7\u30FC\u30BF\u30BF\u30A4\u30D7\u30D7\u30EA\u30BB\u30C3\u30C8\u4E00\u89A7\u3092\u8868\u793A").option("--type <type>", "\u30B3\u30EC\u30AF\u30B7\u30E7\u30F3\u7A2E\u5225 (post, news, doc, page)").action(listCollectionPresets);
4965
4971
  program.command("create-data-entry").description("\u30C7\u30FC\u30BF\u30A8\u30F3\u30C8\u30EA\u30FC\u3092\u4F5C\u6210").requiredOption("--type-slug <slug>", "\u30C7\u30FC\u30BF\u30BF\u30A4\u30D7\u306E\u30B9\u30E9\u30C3\u30B0").option("--json <json>", "\u30A8\u30F3\u30C8\u30EA\u30FC\u5185\u5BB9\u306E JSON \u6587\u5B57\u5217").option("--file <file>", "\u30A8\u30F3\u30C8\u30EA\u30FC\u5185\u5BB9 JSON \u30D5\u30A1\u30A4\u30EB\u306E\u30D1\u30B9").option("--status <status>", "\u30B9\u30C6\u30FC\u30BF\u30B9\uFF08draft, review, published\uFF09").action(createDataEntry);
4966
- program.command("upload-asset").description("\u30A2\u30BB\u30C3\u30C8\u3092\u30A2\u30C3\u30D7\u30ED\u30FC\u30C9\uFF08MCP Assets API\uFF09").requiredOption("--file <path>", "\u30A2\u30C3\u30D7\u30ED\u30FC\u30C9\u3059\u308B\u30D5\u30A1\u30A4\u30EB\u30D1\u30B9").option("--alt <text>", "\u4EE3\u66FF\u30C6\u30AD\u30B9\u30C8").option("--description <text>", "\u8AAC\u660E").option("--group <slug>", "\u30A2\u30BB\u30C3\u30C8\u30B0\u30EB\u30FC\u30D7\u306E\u30B9\u30E9\u30C3\u30B0").option("--tags <tags>", "\u30BF\u30B0\uFF08\u30AB\u30F3\u30DE\u533A\u5207\u308A\uFF09").option("--mime <type>", "MIME type\uFF08\u672A\u6307\u5B9A\u6642\u306F\u62E1\u5F35\u5B50\u304B\u3089\u63A8\u5B9A\uFF09").action(uploadAsset);
4972
+ program.command("upload-asset").description("\u30A2\u30BB\u30C3\u30C8\u3092\u30A2\u30C3\u30D7\u30ED\u30FC\u30C9\uFF08MCP Assets API\uFF09").requiredOption("--file <path>", "\u30A2\u30C3\u30D7\u30ED\u30FC\u30C9\u3059\u308B\u30D5\u30A1\u30A4\u30EB\u30D1\u30B9").option("--alt <text>", "\u4EE3\u66FF\u30C6\u30AD\u30B9\u30C8").option("--description <text>", "\u8AAC\u660E").option("--ai-summary <text>", "AI\u5411\u3051\u30B5\u30DE\u30EA\uFF08\u753B\u50CF\u5185\u5BB9\u306E\u6587\u7AE0\u8AAC\u660E\uFF09").option("--group <slug>", "\u30A2\u30BB\u30C3\u30C8\u30B0\u30EB\u30FC\u30D7\u306E\u30B9\u30E9\u30C3\u30B0").option("--tags <tags>", "\u30BF\u30B0\uFF08\u30AB\u30F3\u30DE\u533A\u5207\u308A\uFF09").option("--mime <type>", "MIME type\uFF08\u672A\u6307\u5B9A\u6642\u306F\u62E1\u5F35\u5B50\u304B\u3089\u63A8\u5B9A\uFF09").action(uploadAsset);
4967
4973
  program.command("list-assets").description("\u30A2\u30BB\u30C3\u30C8\u3092\u691C\u7D22\u30FB\u4E00\u89A7\u8868\u793A\uFF08MCP Assets API\uFF09").option("--group <slug>", "\u30B0\u30EB\u30FC\u30D7\u30B9\u30E9\u30C3\u30B0\u3067\u7D5E\u308A\u8FBC\u307F").option("--tags <tags>", "\u30BF\u30B0\uFF08\u30AB\u30F3\u30DE\u533A\u5207\u308A\uFF09\u3067\u7D5E\u308A\u8FBC\u307F").option("--query <text>", "\u691C\u7D22\u30AF\u30A8\u30EA\uFF08alt/description \u3092\u691C\u7D22\uFF09").option("--mime <type>", "MIME type\uFF08\u4F8B: image, video, image/png\uFF09").option("--limit <number>", "\u53D6\u5F97\u4EF6\u6570\uFF08\u6700\u592750\uFF09").option("--offset <number>", "\u30AA\u30D5\u30BB\u30C3\u30C8").action(listAssets);
4968
- program.command("update-asset").description("\u30A2\u30BB\u30C3\u30C8\u306E\u30E1\u30BF\u30C7\u30FC\u30BF\u3092\u66F4\u65B0\uFF08MCP Assets API\uFF09").requiredOption("--id <id>", "\u30A2\u30BB\u30C3\u30C8 ID").option("--alt <text>", "\u4EE3\u66FF\u30C6\u30AD\u30B9\u30C8\uFF08\u7A7A\u6587\u5B57\u3067\u30AF\u30EA\u30A2\uFF09").option("--description <text>", "\u8AAC\u660E\uFF08\u7A7A\u6587\u5B57\u3067\u30AF\u30EA\u30A2\uFF09").option("--group <slug>", "\u30B0\u30EB\u30FC\u30D7\u30B9\u30E9\u30C3\u30B0").option("--clear-group", "\u30B0\u30EB\u30FC\u30D7\u3092\u89E3\u9664").option("--tags <tags>", "\u30BF\u30B0\uFF08\u30AB\u30F3\u30DE\u533A\u5207\u308A\uFF09").option("--clear-tags", "\u30BF\u30B0\u3092\u5168\u524A\u9664").action(updateAsset);
4974
+ program.command("update-asset").description("\u30A2\u30BB\u30C3\u30C8\u306E\u30E1\u30BF\u30C7\u30FC\u30BF\u3092\u66F4\u65B0\uFF08MCP Assets API\uFF09").requiredOption("--id <id>", "\u30A2\u30BB\u30C3\u30C8 ID").option("--alt <text>", "\u4EE3\u66FF\u30C6\u30AD\u30B9\u30C8\uFF08\u7A7A\u6587\u5B57\u3067\u30AF\u30EA\u30A2\uFF09").option("--description <text>", "\u8AAC\u660E\uFF08\u7A7A\u6587\u5B57\u3067\u30AF\u30EA\u30A2\uFF09").option("--ai-summary <text>", "AI\u5411\u3051\u30B5\u30DE\u30EA\uFF08\u753B\u50CF\u5185\u5BB9\u306E\u6587\u7AE0\u8AAC\u660E\u3002\u7A7A\u6587\u5B57\u3067\u30AF\u30EA\u30A2\uFF09").option("--group <slug>", "\u30B0\u30EB\u30FC\u30D7\u30B9\u30E9\u30C3\u30B0").option("--clear-group", "\u30B0\u30EB\u30FC\u30D7\u3092\u89E3\u9664").option("--tags <tags>", "\u30BF\u30B0\uFF08\u30AB\u30F3\u30DE\u533A\u5207\u308A\uFF09").option("--clear-tags", "\u30BF\u30B0\u3092\u5168\u524A\u9664").action(updateAsset);
4969
4975
  program.command("list-data-entries").description("\u30C7\u30FC\u30BF\u30BF\u30A4\u30D7\u3054\u3068\u306E\u30C7\u30FC\u30BF\u30A8\u30F3\u30C8\u30EA\u30FC\u4E00\u89A7\u3092\u8868\u793A").requiredOption("--type-slug <slug>", "\u30C7\u30FC\u30BF\u30BF\u30A4\u30D7\u306E\u30B9\u30E9\u30C3\u30B0").option("--sort-by <field>", "\u4E26\u3073\u66FF\u3048\u5BFE\u8C61\u30D5\u30A3\u30FC\u30EB\u30C9").option("--sort-order <order>", "\u4E26\u3073\u9806 (asc \u307E\u305F\u306F desc)").option("--limit <number>", "\u53D6\u5F97\u4EF6\u6570\u306E\u4E0A\u9650").option("--offset <number>", "\u30B9\u30AD\u30C3\u30D7\u4EF6\u6570").option("--status <status>", "\u30B9\u30C6\u30FC\u30BF\u30B9\u3067\u7D5E\u308A\u8FBC\u307F\uFF08draft, review, published\uFF09").action(listDataEntries);
4970
4976
  program.command("get-data-entry").description("\u5358\u4E00\u306E\u30C7\u30FC\u30BF\u30A8\u30F3\u30C8\u30EA\u30FC\u3092\u53D6\u5F97").requiredOption("--type-slug <slug>", "\u30C7\u30FC\u30BF\u30BF\u30A4\u30D7\u306E\u30B9\u30E9\u30C3\u30B0").requiredOption("--id <id>", "\u30C7\u30FC\u30BF\u30A8\u30F3\u30C8\u30EA\u30FC ID").action(getDataEntry);
4971
4977
  program.command("update-data-entry").description("\u30C7\u30FC\u30BF\u30A8\u30F3\u30C8\u30EA\u30FC\u3092\u66F4\u65B0").requiredOption("--type-slug <slug>", "\u30C7\u30FC\u30BF\u30BF\u30A4\u30D7\u306E\u30B9\u30E9\u30C3\u30B0").requiredOption("--id <id>", "\u30C7\u30FC\u30BF\u30A8\u30F3\u30C8\u30EA\u30FC ID").option("--json <json>", "\u66F4\u65B0\u5185\u5BB9\u306E JSON \u6587\u5B57\u5217").option("--file <file>", "\u66F4\u65B0\u5185\u5BB9 JSON \u30D5\u30A1\u30A4\u30EB\u306E\u30D1\u30B9").option("--status <status>", "\u30B9\u30C6\u30FC\u30BF\u30B9\uFF08draft, review, published\uFF09").action(updateDataEntry);
package/dist/index.d.ts CHANGED
@@ -222,6 +222,15 @@ interface PublicContentDetail {
222
222
  slug: string;
223
223
  title: string;
224
224
  description: string | null;
225
+ /**
226
+ * カバー画像URL(deprecated: coverImageAssetId を使用)
227
+ * @deprecated
228
+ */
229
+ coverImageUrl: string | null;
230
+ /** カバー画像アセットID */
231
+ coverImageAssetId: string | null;
232
+ /** カバー画像外部URL */
233
+ coverImageExternalUrl: string | null;
225
234
  publishedAt: string | null;
226
235
  updatedAt: string | null;
227
236
  mdx: string;
@@ -306,6 +315,15 @@ interface PublicContentListItem {
306
315
  slug: string;
307
316
  title: string;
308
317
  description: string | null;
318
+ /**
319
+ * カバー画像URL(deprecated: coverImageAssetId を使用)
320
+ * @deprecated
321
+ */
322
+ coverImageUrl: string | null;
323
+ /** カバー画像アセットID */
324
+ coverImageAssetId: string | null;
325
+ /** カバー画像外部URL */
326
+ coverImageExternalUrl: string | null;
309
327
  publishedAt: string | null;
310
328
  updatedAt: string | null;
311
329
  }
@@ -453,8 +471,15 @@ interface CreateContentRequest {
453
471
  * @maxLength 1000
454
472
  */
455
473
  summary?: string;
456
- /** カバー画像URL */
474
+ /**
475
+ * カバー画像URL(deprecated: coverImageAssetId を使用)
476
+ * @deprecated
477
+ */
457
478
  coverImageUrl?: string;
479
+ /** カバー画像アセットID */
480
+ coverImageAssetId?: string | null;
481
+ /** カバー画像外部URL(アセットシステム外の画像) */
482
+ coverImageExternalUrl?: string | null;
458
483
  /** 作成と同時に公開する */
459
484
  autoPublish?: boolean;
460
485
  }
@@ -753,6 +778,21 @@ interface FormDefinitionResponse {
753
778
  updatedAt: Date;
754
779
  }
755
780
 
781
+ /**
782
+ * Generated by orval v8.4.0 🍺
783
+ * Do not edit manually.
784
+ * CMX SDK API
785
+ * CMX SDK API(コンテンツ配信+管理)
786
+ * OpenAPI spec version: 1.0.0
787
+ */
788
+ type GetAnalyticsDailyParams = {
789
+ provider?: string;
790
+ dateFrom?: string;
791
+ dateTo?: string;
792
+ path?: string;
793
+ limit?: string;
794
+ };
795
+
756
796
  /**
757
797
  * Generated by orval v8.4.0 🍺
758
798
  * Do not edit manually.
@@ -941,7 +981,7 @@ type GetManageCollectionPresetsParams = {
941
981
  */
942
982
  type GetManageContentsIdParams = {
943
983
  /**
944
- * 取得するフィールド(カンマ区切り)。指定可能: id, collectionId, slug, title, description, summary, coverImageUrl, status, parentId, sortOrder, locale, publishedAt, createdAt, updatedAt, mdx, frontmatterJson, seoJson
984
+ * 取得するフィールド(カンマ区切り)。指定可能: id, collectionId, slug, title, description, summary, coverImageUrl, coverImageAssetId, coverImageExternalUrl, status, parentId, sortOrder, locale, publishedAt, createdAt, updatedAt, mdx, frontmatterJson, seoJson
945
985
  */
946
986
  fields?: string;
947
987
  };
@@ -975,7 +1015,7 @@ type GetManageContentsParams = {
975
1015
  */
976
1016
  offset?: number | null;
977
1017
  /**
978
- * 取得するフィールド(カンマ区切り)。指定可能: id, collectionId, slug, title, description, summary, coverImageUrl, status, parentId, sortOrder, locale, publishedAt, createdAt, updatedAt
1018
+ * 取得するフィールド(カンマ区切り)。指定可能: id, collectionId, slug, title, description, summary, coverImageUrl, coverImageAssetId, coverImageExternalUrl, status, parentId, sortOrder, locale, publishedAt, createdAt, updatedAt
979
1019
  */
980
1020
  fields?: string;
981
1021
  };
@@ -989,7 +1029,7 @@ type GetManageContentsParams = {
989
1029
  */
990
1030
  type GetManageDataTypeSlugIdParams = {
991
1031
  /**
992
- * 取得するフィールド(カンマ区切り)。指定可能: id, dataTypeId, dataJson, status, sortOrder, createdAt, updatedAt
1032
+ * 取得するフィールド(カンマ区切り)。指定可能: id, dataTypeId, dataJson, aiSummary, status, sortOrder, createdAt, updatedAt
993
1033
  */
994
1034
  fields?: string;
995
1035
  };
@@ -1068,7 +1108,7 @@ type GetManageDataTypeSlugParams = {
1068
1108
  */
1069
1109
  offset?: number | null;
1070
1110
  /**
1071
- * 取得するエントリフィールド(カンマ区切り)。指定可能: id, dataTypeId, dataJson, status, sortOrder, createdAt, updatedAt
1111
+ * 取得するエントリフィールド(カンマ区切り)。指定可能: id, dataTypeId, dataJson, aiSummary, status, sortOrder, createdAt, updatedAt
1072
1112
  */
1073
1113
  fields?: string;
1074
1114
  };
@@ -1359,6 +1399,51 @@ interface SdkAddCollectionDataTypeRequest {
1359
1399
  label?: string;
1360
1400
  }
1361
1401
 
1402
+ /**
1403
+ * Generated by orval v8.4.0 🍺
1404
+ * Do not edit manually.
1405
+ * CMX SDK API
1406
+ * CMX SDK API(コンテンツ配信+管理)
1407
+ * OpenAPI spec version: 1.0.0
1408
+ */
1409
+ type SdkAnalyticsDailyMetricRawJson = {
1410
+ [key: string]: unknown | null;
1411
+ } | null;
1412
+
1413
+ /**
1414
+ * Generated by orval v8.4.0 🍺
1415
+ * Do not edit manually.
1416
+ * CMX SDK API
1417
+ * CMX SDK API(コンテンツ配信+管理)
1418
+ * OpenAPI spec version: 1.0.0
1419
+ */
1420
+
1421
+ interface SdkAnalyticsDailyMetric {
1422
+ id: string;
1423
+ environmentId: string;
1424
+ provider: string;
1425
+ metricDate: string;
1426
+ path: string;
1427
+ pageviews: number;
1428
+ visitors: number;
1429
+ sessions: number;
1430
+ rawJson: SdkAnalyticsDailyMetricRawJson;
1431
+ createdAt: Date;
1432
+ updatedAt: Date;
1433
+ }
1434
+
1435
+ /**
1436
+ * Generated by orval v8.4.0 🍺
1437
+ * Do not edit manually.
1438
+ * CMX SDK API
1439
+ * CMX SDK API(コンテンツ配信+管理)
1440
+ * OpenAPI spec version: 1.0.0
1441
+ */
1442
+
1443
+ interface SdkAnalyticsDailyListResponse {
1444
+ metrics: SdkAnalyticsDailyMetric[];
1445
+ }
1446
+
1362
1447
  /**
1363
1448
  * Generated by orval v8.4.0 🍺
1364
1449
  * Do not edit manually.
@@ -1518,6 +1603,8 @@ interface SdkContentDetail {
1518
1603
  description: string | null;
1519
1604
  summary: string | null;
1520
1605
  coverImageUrl: string | null;
1606
+ coverImageAssetId: string | null;
1607
+ coverImageExternalUrl: string | null;
1521
1608
  frontmatterJson: SdkContentDetailFrontmatterJson;
1522
1609
  seoJson: SdkContentDetailSeoJson;
1523
1610
  status: ContentStatus;
@@ -1546,6 +1633,8 @@ interface SdkContentItem {
1546
1633
  description: string | null;
1547
1634
  summary: string | null;
1548
1635
  coverImageUrl: string | null;
1636
+ coverImageAssetId: string | null;
1637
+ coverImageExternalUrl: string | null;
1549
1638
  status: ContentStatus;
1550
1639
  parentId: string | null;
1551
1640
  sortOrder: number;
@@ -1817,6 +1906,7 @@ interface SdkDataEntryResponse {
1817
1906
  id: string;
1818
1907
  dataTypeId: string;
1819
1908
  dataJson: SdkDataEntryResponseDataJson;
1909
+ aiSummary: string | null;
1820
1910
  /** データエントリのステータス */
1821
1911
  status: SdkDataEntryResponseStatus;
1822
1912
  sortOrder: number;
@@ -2061,6 +2151,91 @@ interface SdkRequestReviewResponse {
2061
2151
  title: string;
2062
2152
  }
2063
2153
 
2154
+ /**
2155
+ * Generated by orval v8.4.0 🍺
2156
+ * Do not edit manually.
2157
+ * CMX SDK API
2158
+ * CMX SDK API(コンテンツ配信+管理)
2159
+ * OpenAPI spec version: 1.0.0
2160
+ */
2161
+ type SdkRuntimeSettingsResponseSettingsAnalyticsProvider = typeof SdkRuntimeSettingsResponseSettingsAnalyticsProvider[keyof typeof SdkRuntimeSettingsResponseSettingsAnalyticsProvider];
2162
+ declare const SdkRuntimeSettingsResponseSettingsAnalyticsProvider: {
2163
+ readonly none: "none";
2164
+ readonly ga: "ga";
2165
+ readonly plausible: "plausible";
2166
+ readonly umami: "umami";
2167
+ readonly matomo: "matomo";
2168
+ };
2169
+
2170
+ /**
2171
+ * Generated by orval v8.4.0 🍺
2172
+ * Do not edit manually.
2173
+ * CMX SDK API
2174
+ * CMX SDK API(コンテンツ配信+管理)
2175
+ * OpenAPI spec version: 1.0.0
2176
+ */
2177
+ type SdkRuntimeSettingsResponseSettingsAnalyticsTracking = {
2178
+ enabled: boolean;
2179
+ gaMeasurementId?: string;
2180
+ plausibleDomain?: string;
2181
+ plausibleScriptUrl?: string;
2182
+ umamiWebsiteId?: string;
2183
+ umamiScriptUrl?: string;
2184
+ matomoSiteId?: string;
2185
+ matomoBaseUrl?: string;
2186
+ };
2187
+
2188
+ /**
2189
+ * Generated by orval v8.4.0 🍺
2190
+ * Do not edit manually.
2191
+ * CMX SDK API
2192
+ * CMX SDK API(コンテンツ配信+管理)
2193
+ * OpenAPI spec version: 1.0.0
2194
+ */
2195
+
2196
+ type SdkRuntimeSettingsResponseSettingsAnalytics = {
2197
+ provider: SdkRuntimeSettingsResponseSettingsAnalyticsProvider;
2198
+ tracking: SdkRuntimeSettingsResponseSettingsAnalyticsTracking;
2199
+ };
2200
+
2201
+ /**
2202
+ * Generated by orval v8.4.0 🍺
2203
+ * Do not edit manually.
2204
+ * CMX SDK API
2205
+ * CMX SDK API(コンテンツ配信+管理)
2206
+ * OpenAPI spec version: 1.0.0
2207
+ */
2208
+ type SdkRuntimeSettingsResponseSettingsRevalidation = {
2209
+ enabled: boolean;
2210
+ baseUrl?: string;
2211
+ apiKey?: string;
2212
+ };
2213
+
2214
+ /**
2215
+ * Generated by orval v8.4.0 🍺
2216
+ * Do not edit manually.
2217
+ * CMX SDK API
2218
+ * CMX SDK API(コンテンツ配信+管理)
2219
+ * OpenAPI spec version: 1.0.0
2220
+ */
2221
+
2222
+ type SdkRuntimeSettingsResponseSettings = {
2223
+ analytics: SdkRuntimeSettingsResponseSettingsAnalytics;
2224
+ revalidation: SdkRuntimeSettingsResponseSettingsRevalidation;
2225
+ };
2226
+
2227
+ /**
2228
+ * Generated by orval v8.4.0 🍺
2229
+ * Do not edit manually.
2230
+ * CMX SDK API
2231
+ * CMX SDK API(コンテンツ配信+管理)
2232
+ * OpenAPI spec version: 1.0.0
2233
+ */
2234
+
2235
+ interface SdkRuntimeSettingsResponse {
2236
+ settings: SdkRuntimeSettingsResponseSettings;
2237
+ }
2238
+
2064
2239
  /**
2065
2240
  * Generated by orval v8.4.0 🍺
2066
2241
  * Do not edit manually.
@@ -2306,8 +2481,15 @@ interface UpdateContentRequest {
2306
2481
  * @maxLength 1000
2307
2482
  */
2308
2483
  summary?: string | null;
2309
- /** カバー画像URL */
2484
+ /**
2485
+ * カバー画像URL(deprecated: coverImageAssetId を使用)
2486
+ * @deprecated
2487
+ */
2310
2488
  coverImageUrl?: string | null;
2489
+ /** カバー画像アセットID */
2490
+ coverImageAssetId?: string | null;
2491
+ /** カバー画像外部URL(アセットシステム外の画像) */
2492
+ coverImageExternalUrl?: string | null;
2311
2493
  }
2312
2494
 
2313
2495
  /**
@@ -2471,6 +2653,54 @@ type getPreviewTokenResponseError = (getPreviewTokenResponse404 | getPreviewToke
2471
2653
  type getPreviewTokenResponse = (getPreviewTokenResponseSuccess | getPreviewTokenResponseError);
2472
2654
  declare const getGetPreviewTokenUrl: (token: string) => string;
2473
2655
  declare const getPreviewToken: (token: string, options?: RequestInit) => Promise<getPreviewTokenResponse>;
2656
+ /**
2657
+ * @summary スターターキット用 Runtime Settings を取得
2658
+ */
2659
+ type getRuntimeSettingsResponse200 = {
2660
+ data: SdkRuntimeSettingsResponse;
2661
+ status: 200;
2662
+ };
2663
+ type getRuntimeSettingsResponse401 = {
2664
+ data: ErrorResponse;
2665
+ status: 401;
2666
+ };
2667
+ type getRuntimeSettingsResponse404 = {
2668
+ data: ErrorResponse;
2669
+ status: 404;
2670
+ };
2671
+ type getRuntimeSettingsResponseSuccess = (getRuntimeSettingsResponse200) & {
2672
+ headers: Headers;
2673
+ };
2674
+ type getRuntimeSettingsResponseError = (getRuntimeSettingsResponse401 | getRuntimeSettingsResponse404) & {
2675
+ headers: Headers;
2676
+ };
2677
+ type getRuntimeSettingsResponse = (getRuntimeSettingsResponseSuccess | getRuntimeSettingsResponseError);
2678
+ declare const getGetRuntimeSettingsUrl: () => string;
2679
+ declare const getRuntimeSettings: (options?: RequestInit) => Promise<getRuntimeSettingsResponse>;
2680
+ /**
2681
+ * @summary 日次アナリティクスメトリクスを取得
2682
+ */
2683
+ type getAnalyticsDailyResponse200 = {
2684
+ data: SdkAnalyticsDailyListResponse;
2685
+ status: 200;
2686
+ };
2687
+ type getAnalyticsDailyResponse401 = {
2688
+ data: ErrorResponse;
2689
+ status: 401;
2690
+ };
2691
+ type getAnalyticsDailyResponse500 = {
2692
+ data: ErrorResponse;
2693
+ status: 500;
2694
+ };
2695
+ type getAnalyticsDailyResponseSuccess = (getAnalyticsDailyResponse200) & {
2696
+ headers: Headers;
2697
+ };
2698
+ type getAnalyticsDailyResponseError = (getAnalyticsDailyResponse401 | getAnalyticsDailyResponse500) & {
2699
+ headers: Headers;
2700
+ };
2701
+ type getAnalyticsDailyResponse = (getAnalyticsDailyResponseSuccess | getAnalyticsDailyResponseError);
2702
+ declare const getGetAnalyticsDailyUrl: (params?: GetAnalyticsDailyParams) => string;
2703
+ declare const getAnalyticsDaily: (params?: GetAnalyticsDailyParams, options?: RequestInit) => Promise<getAnalyticsDailyResponse>;
2474
2704
 
2475
2705
  /**
2476
2706
  * CMX SDK — Convenience API functions
@@ -2561,6 +2791,14 @@ declare function submitFormData(typeSlug: string, data: Record<string, unknown>)
2561
2791
  success: true;
2562
2792
  id: string;
2563
2793
  }>;
2794
+ /**
2795
+ * Get runtime settings for starter kit deployment/runtime behavior.
2796
+ */
2797
+ declare function fetchRuntimeSettings(): Promise<SdkRuntimeSettingsResponse>;
2798
+ /**
2799
+ * Get daily analytics metrics collected by CMX.
2800
+ */
2801
+ declare function fetchAnalyticsDailyMetrics(params?: GetAnalyticsDailyParams): Promise<SdkAnalyticsDailyListResponse>;
2564
2802
 
2565
2803
  interface CalloutProps {
2566
2804
  type?: "info" | "warning" | "error" | "success" | "tip";
@@ -3181,4 +3419,4 @@ declare function renderMdx(mdx: string, references?: References, options?: Rende
3181
3419
  */
3182
3420
  declare function renderMdxPreview(mdx: string, additionalComponents?: Record<string, React.ComponentType<any>>): Promise<React.ReactElement>;
3183
3421
 
3184
- export { type ApiResponse, type AssetReference, type AssetReferenceVariants, BlogCard, Button, CACHE_TAGS, Callout, CmxApiError, type CollectionConfig, type CollectionConfigDefaults, type CollectionContentDetailResponse, type CollectionContentsOptions, type CollectionContentsResponse, type CollectionListResponse, type CollectionResponse, CollectionType, type ComponentDefinition, type ComponentName, type ContentReference, ContentStatus, type CreateCollectionRequest, type CreateContentRequest, type CreateDataTypeRequest, type CreateFormDefinitionRequest, type DataEntriesOptions, type DataEntryDetailResponse, type DataEntryItem, type DataListResponse, type DataTypeConfig, type DataTypeResponse, type DeleteManageContentsIdParams, type DeleteManageDataTypeSlugIdParams, Embed, type ErrorResponse, type ErrorResponseDetails, type FetchOptions, type FieldDefinition, type FieldOptions, type FieldOptionsChoicesItem, FieldType, type FormDefinitionResponse, type FormDefinitionResponseConfigJson, type GetCollectionsSlugContentsParams, GetCollectionsSlugContentsSortBy, GetCollectionsSlugContentsSortOrder, type GetDataTypeSlugParams, GetDataTypeSlugSortBy, GetDataTypeSlugSortOrder, type GetManageCollectionPresets200, type GetManageCollectionPresetsParams, GetManageCollectionPresetsType, type GetManageContentsIdParams, type GetManageContentsParams, type GetManageDataTypeSlugIdParams, type GetManageDataTypeSlugParams, GetManageDataTypeSlugSortBy, GetManageDataTypeSlugSortOrder, GetManageDataTypeSlugStatus, type GetPreviewToken200, type GetPreviewToken200Collection, type GetPreviewToken200Content, type GetPreviewToken200References, type GetPreviewToken200ReferencesAssets, type GetPreviewToken200ReferencesAssetsVariants, type GetPreviewToken200ReferencesContents, Image, type PreviewResponse, type PublicCollectionInfo, type PublicContentDetail, type PublicContentListItem, type PublicContentParent, type PublicFetcherOptions, type PublicSubmissionRequest, type PublicSubmissionRequestData, type PublicSubmissionResponse, type ReferenceField, ReferenceFieldReferenceType, type References, type ReferencesAssets, type ReferencesContents, type RenderOptions, type RenderResult, type ResolvedReferences, type RevalidationConfig, type SchemaCollection, type SchemaDataType, type SchemaFieldDefinition, type SchemaFieldOption, type SchemaFieldOptionChoicesItem, type SchemaFormDefinition, type SchemaResponse, type SdkAddCollectionDataTypeRequest, SdkAddCollectionDataTypeRequestReferenceType, type SdkCollectionDataTypeResponse, type SdkComponentDefinition, type SdkComponentDefinitionPropsSchema, type SdkComponentProp, type SdkComponentSuccessResponse, type SdkComponentSyncRequest, type SdkContentDetail, type SdkContentDetailFrontmatterJson, type SdkContentDetailSeoJson, type SdkContentDetailSeoJsonStructuredData, type SdkContentItem, type SdkContentListResponse, type SdkContentReferencesResponse, type SdkContentReferencesResponseReferencesItem, type SdkContentReferencesResponseReferencesItemDataEntriesItem, type SdkContentReferencesResponseReferencesItemDataEntriesItemData, type SdkCreateContentResponse, type SdkCreateContentResponseWarningsItem, SdkCreateContentResponseWarningsItemIssueType, SdkCreateContentResponseWarningsItemTargetType, type SdkCreateEntryRequest, type SdkCreateEntryRequestDataJson, SdkCreateEntryRequestStatus, type SdkCustomComponentResponse, type SdkCustomComponentResponsePropsSchema, SdkCustomComponentResponseStatus, type SdkCustomComponentsListResponse, type SdkDataEntriesListResponse, type SdkDataEntryDeletionImpactItem, type SdkDataEntryDeletionImpactResponse, type SdkDataEntryDetailResponse, type SdkDataEntryResponse, type SdkDataEntryResponseDataJson, SdkDataEntryResponseStatus, type SdkDataTypeInfo, type SdkDeleteCollectionDataTypeResponse, type SdkDeleteCollectionResponse, type SdkDeleteContentResponse, type SdkDeleteDataEntryResponse, type SdkDeleteDataTypeResponse, type SdkDeleteFormDefinitionResponse, type SdkDocResponse, SdkDocType, type SdkLinkExistingDataTypeRequest, SdkLinkExistingDataTypeRequestReferenceType, type SdkPreset, SdkPresetReferenceType, type SdkPublishContentResponse, type SdkRequestReviewResponse, type SdkSetContentReferencesRequest, type SdkSetContentReferencesRequestReferencesItem, type SdkSetContentReferencesResponse, type SdkUpdateContentResponse, type SdkUpdateContentResponseWarningsItem, SdkUpdateContentResponseWarningsItemIssueType, SdkUpdateContentResponseWarningsItemTargetType, type SdkUpdateEntryRequest, type SdkUpdateEntryRequestDataJson, SdkUpdateEntryRequestStatus, type SdkUpsertDocBody, type SdkValidateContentResponse, type SdkValidateContentResponseIssuesItem, SdkValidateContentResponseIssuesItemIssueType, SdkValidateContentResponseIssuesItemTargetType, type UpdateCollectionRequest, type UpdateContentRequest, type UpdateDataTypeRequest, type UpdateFormDefinitionRequest, type UpdateFormDefinitionRequestConfigJson, type ValidationError, type ValidationResult, basicComponents, componentCatalog, componentSchemas, customComponents, getCatalogForAI, getCollectionContentDetail, getCollectionContentDetailOrThrow, getCollectionContents, getCollectionContentsOrThrow, getCollections, getCollectionsSlugContents, getCollectionsSlugContentsContentSlug, getComponentsByCategory, getComponentsWithReferences, getDataEntries, getDataEntriesOrThrow, getDataEntry, getDataEntryOrThrow, getDataTypeSlug, getGetCollectionsSlugContentsContentSlugUrl, getGetCollectionsSlugContentsUrl, getGetDataTypeSlugUrl, getGetPreviewTokenUrl, getPreviewByToken, getPreviewToken, getSchema, getSdkApiBaseUrl, getSdkApiToken, isValidComponent, markdownComponents, mdxComponents, quickValidateMdx, renderMdx, renderMdxPreview, sdkCustomInstance, sdkFetchWithTags, sdkFetcher, sdkPostFetcher, submitFormData, validateComponentProps, validateMdx };
3422
+ export { type ApiResponse, type AssetReference, type AssetReferenceVariants, BlogCard, Button, CACHE_TAGS, Callout, CmxApiError, type CollectionConfig, type CollectionConfigDefaults, type CollectionContentDetailResponse, type CollectionContentsOptions, type CollectionContentsResponse, type CollectionListResponse, type CollectionResponse, CollectionType, type ComponentDefinition, type ComponentName, type ContentReference, ContentStatus, type CreateCollectionRequest, type CreateContentRequest, type CreateDataTypeRequest, type CreateFormDefinitionRequest, type DataEntriesOptions, type DataEntryDetailResponse, type DataEntryItem, type DataListResponse, type DataTypeConfig, type DataTypeResponse, type DeleteManageContentsIdParams, type DeleteManageDataTypeSlugIdParams, Embed, type ErrorResponse, type ErrorResponseDetails, type FetchOptions, type FieldDefinition, type FieldOptions, type FieldOptionsChoicesItem, FieldType, type FormDefinitionResponse, type FormDefinitionResponseConfigJson, type GetAnalyticsDailyParams, type GetCollectionsSlugContentsParams, GetCollectionsSlugContentsSortBy, GetCollectionsSlugContentsSortOrder, type GetDataTypeSlugParams, GetDataTypeSlugSortBy, GetDataTypeSlugSortOrder, type GetManageCollectionPresets200, type GetManageCollectionPresetsParams, GetManageCollectionPresetsType, type GetManageContentsIdParams, type GetManageContentsParams, type GetManageDataTypeSlugIdParams, type GetManageDataTypeSlugParams, GetManageDataTypeSlugSortBy, GetManageDataTypeSlugSortOrder, GetManageDataTypeSlugStatus, type GetPreviewToken200, type GetPreviewToken200Collection, type GetPreviewToken200Content, type GetPreviewToken200References, type GetPreviewToken200ReferencesAssets, type GetPreviewToken200ReferencesAssetsVariants, type GetPreviewToken200ReferencesContents, Image, type PreviewResponse, type PublicCollectionInfo, type PublicContentDetail, type PublicContentListItem, type PublicContentParent, type PublicFetcherOptions, type PublicSubmissionRequest, type PublicSubmissionRequestData, type PublicSubmissionResponse, type ReferenceField, ReferenceFieldReferenceType, type References, type ReferencesAssets, type ReferencesContents, type RenderOptions, type RenderResult, type ResolvedReferences, type RevalidationConfig, type SchemaCollection, type SchemaDataType, type SchemaFieldDefinition, type SchemaFieldOption, type SchemaFieldOptionChoicesItem, type SchemaFormDefinition, type SchemaResponse, type SdkAddCollectionDataTypeRequest, SdkAddCollectionDataTypeRequestReferenceType, type SdkAnalyticsDailyListResponse, type SdkAnalyticsDailyMetric, type SdkAnalyticsDailyMetricRawJson, type SdkCollectionDataTypeResponse, type SdkComponentDefinition, type SdkComponentDefinitionPropsSchema, type SdkComponentProp, type SdkComponentSuccessResponse, type SdkComponentSyncRequest, type SdkContentDetail, type SdkContentDetailFrontmatterJson, type SdkContentDetailSeoJson, type SdkContentDetailSeoJsonStructuredData, type SdkContentItem, type SdkContentListResponse, type SdkContentReferencesResponse, type SdkContentReferencesResponseReferencesItem, type SdkContentReferencesResponseReferencesItemDataEntriesItem, type SdkContentReferencesResponseReferencesItemDataEntriesItemData, type SdkCreateContentResponse, type SdkCreateContentResponseWarningsItem, SdkCreateContentResponseWarningsItemIssueType, SdkCreateContentResponseWarningsItemTargetType, type SdkCreateEntryRequest, type SdkCreateEntryRequestDataJson, SdkCreateEntryRequestStatus, type SdkCustomComponentResponse, type SdkCustomComponentResponsePropsSchema, SdkCustomComponentResponseStatus, type SdkCustomComponentsListResponse, type SdkDataEntriesListResponse, type SdkDataEntryDeletionImpactItem, type SdkDataEntryDeletionImpactResponse, type SdkDataEntryDetailResponse, type SdkDataEntryResponse, type SdkDataEntryResponseDataJson, SdkDataEntryResponseStatus, type SdkDataTypeInfo, type SdkDeleteCollectionDataTypeResponse, type SdkDeleteCollectionResponse, type SdkDeleteContentResponse, type SdkDeleteDataEntryResponse, type SdkDeleteDataTypeResponse, type SdkDeleteFormDefinitionResponse, type SdkDocResponse, SdkDocType, type SdkLinkExistingDataTypeRequest, SdkLinkExistingDataTypeRequestReferenceType, type SdkPreset, SdkPresetReferenceType, type SdkPublishContentResponse, type SdkRequestReviewResponse, type SdkRuntimeSettingsResponse, type SdkRuntimeSettingsResponseSettings, type SdkRuntimeSettingsResponseSettingsAnalytics, SdkRuntimeSettingsResponseSettingsAnalyticsProvider, type SdkRuntimeSettingsResponseSettingsAnalyticsTracking, type SdkRuntimeSettingsResponseSettingsRevalidation, type SdkSetContentReferencesRequest, type SdkSetContentReferencesRequestReferencesItem, type SdkSetContentReferencesResponse, type SdkUpdateContentResponse, type SdkUpdateContentResponseWarningsItem, SdkUpdateContentResponseWarningsItemIssueType, SdkUpdateContentResponseWarningsItemTargetType, type SdkUpdateEntryRequest, type SdkUpdateEntryRequestDataJson, SdkUpdateEntryRequestStatus, type SdkUpsertDocBody, type SdkValidateContentResponse, type SdkValidateContentResponseIssuesItem, SdkValidateContentResponseIssuesItemIssueType, SdkValidateContentResponseIssuesItemTargetType, type UpdateCollectionRequest, type UpdateContentRequest, type UpdateDataTypeRequest, type UpdateFormDefinitionRequest, type UpdateFormDefinitionRequestConfigJson, type ValidationError, type ValidationResult, basicComponents, componentCatalog, componentSchemas, customComponents, fetchAnalyticsDailyMetrics, fetchRuntimeSettings, getAnalyticsDaily, getCatalogForAI, getCollectionContentDetail, getCollectionContentDetailOrThrow, getCollectionContents, getCollectionContentsOrThrow, getCollections, getCollectionsSlugContents, getCollectionsSlugContentsContentSlug, getComponentsByCategory, getComponentsWithReferences, getDataEntries, getDataEntriesOrThrow, getDataEntry, getDataEntryOrThrow, getDataTypeSlug, getGetAnalyticsDailyUrl, getGetCollectionsSlugContentsContentSlugUrl, getGetCollectionsSlugContentsUrl, getGetDataTypeSlugUrl, getGetPreviewTokenUrl, getGetRuntimeSettingsUrl, getPreviewByToken, getPreviewToken, getRuntimeSettings, getSchema, getSdkApiBaseUrl, getSdkApiToken, isValidComponent, markdownComponents, mdxComponents, quickValidateMdx, renderMdx, renderMdxPreview, sdkCustomInstance, sdkFetchWithTags, sdkFetcher, sdkPostFetcher, submitFormData, validateComponentProps, validateMdx };
package/dist/index.js CHANGED
@@ -249,6 +249,43 @@ var getPreviewToken = async (token, options) => {
249
249
  const data = body ? JSON.parse(body, dateReviver) : {};
250
250
  return { data, status: res.status, headers: res.headers };
251
251
  };
252
+ var getGetRuntimeSettingsUrl = () => {
253
+ return `/api/v1/sdk/runtime/settings`;
254
+ };
255
+ var getRuntimeSettings = async (options) => {
256
+ const res = await fetch(
257
+ getGetRuntimeSettingsUrl(),
258
+ {
259
+ ...options,
260
+ method: "GET"
261
+ }
262
+ );
263
+ const body = [204, 205, 304].includes(res.status) ? null : await res.text();
264
+ const data = body ? JSON.parse(body, dateReviver) : {};
265
+ return { data, status: res.status, headers: res.headers };
266
+ };
267
+ var getGetAnalyticsDailyUrl = (params) => {
268
+ const normalizedParams = new URLSearchParams();
269
+ Object.entries(params || {}).forEach(([key, value]) => {
270
+ if (value !== void 0) {
271
+ normalizedParams.append(key, value === null ? "null" : value.toString());
272
+ }
273
+ });
274
+ const stringifiedParams = normalizedParams.toString();
275
+ return stringifiedParams.length > 0 ? `/api/v1/sdk/analytics/daily?${stringifiedParams}` : `/api/v1/sdk/analytics/daily`;
276
+ };
277
+ var getAnalyticsDaily = async (params, options) => {
278
+ const res = await fetch(
279
+ getGetAnalyticsDailyUrl(params),
280
+ {
281
+ ...options,
282
+ method: "GET"
283
+ }
284
+ );
285
+ const body = [204, 205, 304].includes(res.status) ? null : await res.text();
286
+ const data = body ? JSON.parse(body, dateReviver) : {};
287
+ return { data, status: res.status, headers: res.headers };
288
+ };
252
289
 
253
290
  // src/api.ts
254
291
  async function getCollectionContents(slug, options) {
@@ -353,6 +390,20 @@ async function submitFormData(typeSlug, data) {
353
390
  { data }
354
391
  );
355
392
  }
393
+ async function fetchRuntimeSettings() {
394
+ const response = await getRuntimeSettings();
395
+ if (response.status !== 200) {
396
+ throw new Error(`Failed to fetch runtime settings: ${response.status}`);
397
+ }
398
+ return response.data;
399
+ }
400
+ async function fetchAnalyticsDailyMetrics(params) {
401
+ const response = await getAnalyticsDaily(params);
402
+ if (response.status !== 200) {
403
+ throw new Error(`Failed to fetch analytics daily metrics: ${response.status}`);
404
+ }
405
+ return response.data;
406
+ }
356
407
 
357
408
  // src/mdx/components/basic/Callout.tsx
358
409
  import { AlertCircle, AlertTriangle, CheckCircle, Info, Lightbulb } from "lucide-react";
@@ -2116,6 +2167,9 @@ export {
2116
2167
  componentCatalog,
2117
2168
  componentSchemas,
2118
2169
  customComponents,
2170
+ fetchAnalyticsDailyMetrics,
2171
+ fetchRuntimeSettings,
2172
+ getAnalyticsDaily,
2119
2173
  getCatalogForAI,
2120
2174
  getCollectionContentDetail,
2121
2175
  getCollectionContentDetailOrThrow,
@@ -2131,12 +2185,15 @@ export {
2131
2185
  getDataEntry,
2132
2186
  getDataEntryOrThrow,
2133
2187
  getDataTypeSlug,
2188
+ getGetAnalyticsDailyUrl,
2134
2189
  getGetCollectionsSlugContentsContentSlugUrl,
2135
2190
  getGetCollectionsSlugContentsUrl,
2136
2191
  getGetDataTypeSlugUrl,
2137
2192
  getGetPreviewTokenUrl,
2193
+ getGetRuntimeSettingsUrl,
2138
2194
  getPreviewByToken,
2139
2195
  getPreviewToken,
2196
+ getRuntimeSettings,
2140
2197
  getSchema,
2141
2198
  getSdkApiBaseUrl,
2142
2199
  getSdkApiToken,