@nivaro/sdk 0.1.24 → 0.1.26

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.js CHANGED
@@ -907,8 +907,8 @@ function cancelScheduledChange(id) {
907
907
  function executeScheduledChange(id) {
908
908
  return cmd("POST", `/scheduled-changes/${id}/execute`);
909
909
  }
910
- function readFieldConfig(collection) {
911
- return cmd("GET", `/field-config/${collection}`);
910
+ function readFieldConfig(collection, opts) {
911
+ return cmd("GET", `/field-config/${collection}`, opts);
912
912
  }
913
913
  function updateFieldConfig(collection, field, body) {
914
914
  return cmd("PATCH", `/field-config/${collection}/${field}`, void 0, body);
@@ -1216,8 +1216,8 @@ function isPageSlot(assignment) {
1216
1216
  function readCollectionLayouts(collection) {
1217
1217
  return cmd("GET", "/collection-layouts", { collection });
1218
1218
  }
1219
- function readActiveLayout(collection) {
1220
- return cmd("GET", "/collection-layouts/active", { collection });
1219
+ function readActiveLayout(collection, opts) {
1220
+ return cmd("GET", "/collection-layouts/active", { collection, ...opts });
1221
1221
  }
1222
1222
  function readLayoutGroups(collection, layoutId) {
1223
1223
  return cmd("GET", `/field-groups/${collection}`, { layout_id: layoutId });
@@ -1228,11 +1228,11 @@ function readLayoutAssignments(layoutId) {
1228
1228
  function activateLayout(layoutId) {
1229
1229
  return cmd("POST", `/collection-layouts/${layoutId}/activate`);
1230
1230
  }
1231
- function cloneLayout(layoutId, name) {
1232
- return cmd("POST", `/collection-layouts/${layoutId}/clone`, void 0, { name });
1231
+ function cloneLayout(layoutId, name, opts) {
1232
+ return cmd("POST", `/collection-layouts/${layoutId}/clone`, void 0, { name, ...opts });
1233
1233
  }
1234
- function createCollectionLayout(collection, name) {
1235
- return cmd("POST", "/collection-layouts", void 0, { collection, name });
1234
+ function createCollectionLayout(collection, name, opts) {
1235
+ return cmd("POST", "/collection-layouts", void 0, { collection, name, ...opts });
1236
1236
  }
1237
1237
  function updateCollectionLayout(layoutId, patch) {
1238
1238
  return cmd("PATCH", `/collection-layouts/${layoutId}`, void 0, patch);
@@ -1339,6 +1339,12 @@ function stopMasquerade() {
1339
1339
  function listFiles(options = {}) {
1340
1340
  return cmd("GET", "/files", options);
1341
1341
  }
1342
+ function readFilesByIds(ids) {
1343
+ return cmd("GET", "/files", {
1344
+ filter: JSON.stringify({ id: { _in: ids } }),
1345
+ limit: Math.max(1, ids.length)
1346
+ });
1347
+ }
1342
1348
  function readFileMeta(id) {
1343
1349
  return cmd("GET", `/files/${id}/meta`);
1344
1350
  }
@@ -1634,6 +1640,167 @@ function listRetentionRuns(policyId) {
1634
1640
  return cmd("GET", `/retention/${policyId}/runs`);
1635
1641
  }
1636
1642
 
1643
+ // src/commands/layout-editor.ts
1644
+ var PLACEMENT_PATCH_KEYS = [
1645
+ "label_override",
1646
+ "is_visible",
1647
+ "default_expanded",
1648
+ "col_span",
1649
+ "overrides",
1650
+ "show_row_revisions",
1651
+ "allow_revision_restore",
1652
+ "lock_conditions",
1653
+ "input_bindings",
1654
+ "widget_id",
1655
+ "show_approval_chain"
1656
+ ];
1657
+ var GROUP_PATCH_KEYS = [
1658
+ "label",
1659
+ "type",
1660
+ "icon",
1661
+ "is_collapsed",
1662
+ "tab_mode",
1663
+ "hide_when_empty",
1664
+ "visibility_mode",
1665
+ "summary_fields",
1666
+ "summary_hide_empty",
1667
+ "swap_config",
1668
+ "skip_if_filled",
1669
+ "content",
1670
+ "content_tone",
1671
+ "visible_when",
1672
+ "hidden_for_roles",
1673
+ "locked_for_roles",
1674
+ "read_width"
1675
+ ];
1676
+ var LAYOUT_PATCH_KEYS = [
1677
+ "name",
1678
+ "slug",
1679
+ "create_label",
1680
+ "create_hidden",
1681
+ "sort",
1682
+ "is_active",
1683
+ "disable_comments",
1684
+ "disable_tasks",
1685
+ "tab_mode",
1686
+ "validate_before_next",
1687
+ "summary_enabled",
1688
+ "summary_hide_empty",
1689
+ "ai_enabled",
1690
+ "accordion_mode",
1691
+ "disable_revisions",
1692
+ "disable_clone",
1693
+ "disable_delete",
1694
+ "row_order_field",
1695
+ "pdf_theme",
1696
+ "pdf_template_id",
1697
+ "pdf_cover_enabled",
1698
+ "pdf_cover_title_field",
1699
+ "pdf_cover_subtitle",
1700
+ "pdf_show_logo",
1701
+ "pdf_page_size",
1702
+ "pdf_orientation",
1703
+ "pdf_button_label",
1704
+ "conditions",
1705
+ "allow_schedule",
1706
+ "allow_disable_pickers",
1707
+ "layout_type",
1708
+ "addendum_layout_id",
1709
+ "workflow_template_id",
1710
+ "single_active_addendum",
1711
+ "addendum_default_view",
1712
+ "record_conditions",
1713
+ "default_values",
1714
+ "display_mode",
1715
+ "parent_layout_id",
1716
+ "hide_integrity_banner",
1717
+ "hide_sla_banner",
1718
+ "changes_tray",
1719
+ "dossier_enabled",
1720
+ "dossier_label",
1721
+ "quick_picker",
1722
+ "sheet_width",
1723
+ "header_fields",
1724
+ "hide_empty"
1725
+ ];
1726
+ function readLayoutOverview(collection) {
1727
+ return cmd("GET", "/collection-layouts/overview", { collection });
1728
+ }
1729
+ function explainLayout(query) {
1730
+ return cmd("GET", "/collection-layouts/explain", query);
1731
+ }
1732
+ function readLayoutBundle(layoutId) {
1733
+ return cmd("GET", `/collection-layouts/${layoutId}/bundle`);
1734
+ }
1735
+ function submitLayoutOps(layoutId, body) {
1736
+ return cmd("POST", `/collection-layouts/${layoutId}/ops`, void 0, body);
1737
+ }
1738
+ function readLayoutVersion(layoutId, versionId) {
1739
+ return cmd("GET", `/collection-layouts/${layoutId}/versions/${versionId}`);
1740
+ }
1741
+ function diffLayoutVersion(layoutId, versionId, against) {
1742
+ return cmd(
1743
+ "GET",
1744
+ `/collection-layouts/${layoutId}/versions/${versionId}/diff`,
1745
+ against !== void 0 ? { against } : void 0
1746
+ );
1747
+ }
1748
+ function readLayoutDrift() {
1749
+ return cmd("GET", "/collection-layouts/drift");
1750
+ }
1751
+ function projectFieldConfig(collection, assignments) {
1752
+ return cmd("POST", `/field-config/${collection}/project`, void 0, { assignments });
1753
+ }
1754
+ function listInternalWidgetPlacements(widgetId) {
1755
+ return cmd("GET", `/widgets-internal/${widgetId}/placements`);
1756
+ }
1757
+ function readPickerExclusion(collection, itemId) {
1758
+ return cmd("GET", `/picker-exclusions/status/${collection}/${itemId}`);
1759
+ }
1760
+ function readPickerExclusions(collection, ids) {
1761
+ return cmd("POST", "/picker-exclusions/batch-status", void 0, { collection, ids });
1762
+ }
1763
+ function excludeFromPickers(body) {
1764
+ return cmd("POST", "/picker-exclusions", void 0, body);
1765
+ }
1766
+ function includeInPickers(body) {
1767
+ return cmd("DELETE", "/picker-exclusions", void 0, body);
1768
+ }
1769
+
1770
+ // src/commands/ops.ts
1771
+ function readReadiness() {
1772
+ return cmd("GET", "/ready");
1773
+ }
1774
+ function readHealthDetailed() {
1775
+ return cmd("GET", "/health/detailed");
1776
+ }
1777
+ function readRuntimeStats() {
1778
+ return cmd("GET", "/ops-runtime/runtime");
1779
+ }
1780
+ function readInstanceRoster() {
1781
+ return cmd("GET", "/ops-runtime/roster");
1782
+ }
1783
+ function captureCpuProfile(seconds) {
1784
+ return cmd("POST", "/ops-runtime/cpu-profile", void 0, seconds ? { seconds } : {});
1785
+ }
1786
+ function readDbPool() {
1787
+ return cmd("GET", "/ops-db/pool");
1788
+ }
1789
+ function readExpensiveSql() {
1790
+ return cmd("GET", "/ops-db/expensive-sql");
1791
+ }
1792
+ function readTrafficSnapshot(window2 = 60) {
1793
+ return cmd("GET", "/traffic-map/snapshot", { window: window2 });
1794
+ }
1795
+ function readJobRegistry() {
1796
+ return cmd("GET", "/job-runs/registry");
1797
+ }
1798
+ function listJobRuns(query) {
1799
+ const params = {};
1800
+ for (const [k, v] of Object.entries(query ?? {})) if (v !== void 0 && v !== "") params[k] = v;
1801
+ return cmd("GET", "/job-runs", params);
1802
+ }
1803
+
1637
1804
  // src/commands/queues.ts
1638
1805
  function listQueues() {
1639
1806
  return cmd("GET", "/queues");
@@ -2177,6 +2344,9 @@ function getFlowRun(runId) {
2177
2344
  function listCustomQueries() {
2178
2345
  return cmd("GET", "/custom-queries");
2179
2346
  }
2347
+ function listCustomQueryCatalog() {
2348
+ return cmd("GET", "/custom-queries/catalog");
2349
+ }
2180
2350
  function executeCustomQuery(slug, params) {
2181
2351
  return cmd("POST", `/custom-queries/${slug}/execute`, void 0, { params });
2182
2352
  }
@@ -2662,6 +2832,9 @@ function submitFormItem(collection, values, options) {
2662
2832
  return cmd("POST", `/items/${collection}`, void 0, values);
2663
2833
  }
2664
2834
  export {
2835
+ GROUP_PATCH_KEYS,
2836
+ LAYOUT_PATCH_KEYS,
2837
+ PLACEMENT_PATCH_KEYS,
2665
2838
  READ_MANY_MAX,
2666
2839
  _and,
2667
2840
  _contains,
@@ -2715,6 +2888,7 @@ export {
2715
2888
  callExternalApiEndpoint,
2716
2889
  cancelScheduledChange,
2717
2890
  cancelStagedImport,
2891
+ captureCpuProfile,
2718
2892
  cascadeFieldDependencies,
2719
2893
  checkBlackoutDate,
2720
2894
  claimQueueItem,
@@ -2859,6 +3033,7 @@ export {
2859
3033
  deleteWorkspaceTemplate,
2860
3034
  deployImportProcedure,
2861
3035
  desc,
3036
+ diffLayoutVersion,
2862
3037
  disableTwoFactor,
2863
3038
  discardHelpVideoPackageImport,
2864
3039
  drillReportRow,
@@ -2871,11 +3046,13 @@ export {
2871
3046
  evaluateFieldRules,
2872
3047
  evaluateFieldVisibility,
2873
3048
  excludeFromPicker,
3049
+ excludeFromPickers,
2874
3050
  executeBulkAction,
2875
3051
  executeCustomQuery,
2876
3052
  executeImportTemplate,
2877
3053
  executeItemAction,
2878
3054
  executeScheduledChange,
3055
+ explainLayout,
2879
3056
  explainRecordAccess,
2880
3057
  explainReportTrend,
2881
3058
  exportBlueprint,
@@ -2915,6 +3092,7 @@ export {
2915
3092
  importExternalApiSpec,
2916
3093
  importSchemaSnapshot,
2917
3094
  includeInPicker,
3095
+ includeInPickers,
2918
3096
  installBlueprint,
2919
3097
  installCollectionPreset,
2920
3098
  invokeInternalWidgetAction,
@@ -2950,6 +3128,7 @@ export {
2950
3128
  listComments,
2951
3129
  listCronJobs,
2952
3130
  listCustomQueries,
3131
+ listCustomQueryCatalog,
2953
3132
  listDataQualityRules,
2954
3133
  listDataQualityRuns,
2955
3134
  listDeadLetters,
@@ -2968,10 +3147,12 @@ export {
2968
3147
  listImportDefinitions,
2969
3148
  listImportJobs,
2970
3149
  listImportTemplates,
3150
+ listInternalWidgetPlacements,
2971
3151
  listInternalWidgets,
2972
3152
  listIssues,
2973
3153
  listItemActions,
2974
3154
  listItemScheduledChanges,
3155
+ listJobRuns,
2975
3156
  listLayoutVersions,
2976
3157
  listMetricAlertRules,
2977
3158
  listMetricAlertSubscriptions,
@@ -3046,6 +3227,7 @@ export {
3046
3227
  previewHelpVideoPackageImport,
3047
3228
  previewImportJob,
3048
3229
  previewReportWidget,
3230
+ projectFieldConfig,
3049
3231
  publishHelpVideo,
3050
3232
  publishItem,
3051
3233
  queryVirtualCollection,
@@ -3078,16 +3260,20 @@ export {
3078
3260
  readConfigInventory,
3079
3261
  readCoverageGaps,
3080
3262
  readDataQualityRun,
3263
+ readDbPool,
3081
3264
  readDetailLayout,
3082
3265
  readDistinctValues,
3083
3266
  readDraftPublishConfig,
3084
3267
  readErpSubmissionHistory,
3268
+ readExpensiveSql,
3085
3269
  readFieldChangeHistory,
3086
3270
  readFieldConfig,
3087
3271
  readFieldImpact,
3088
3272
  readFieldWatch,
3089
3273
  readFileMeta,
3090
3274
  readFileUsage,
3275
+ readFilesByIds,
3276
+ readHealthDetailed,
3091
3277
  readHelpVideo,
3092
3278
  readHelpVideoAnalytics,
3093
3279
  readHelpVideoDownloadLink,
@@ -3101,6 +3287,7 @@ export {
3101
3287
  readImportJob,
3102
3288
  readImportProcedure,
3103
3289
  readInstanceOwners,
3290
+ readInstanceRoster,
3104
3291
  readIntegrationHealth,
3105
3292
  readInternalWidget,
3106
3293
  readIssue,
@@ -3109,9 +3296,14 @@ export {
3109
3296
  readItemLock,
3110
3297
  readItemLockConfig,
3111
3298
  readItems,
3299
+ readJobRegistry,
3112
3300
  readLastTouch,
3113
3301
  readLayoutAssignments,
3302
+ readLayoutBundle,
3303
+ readLayoutDrift,
3114
3304
  readLayoutGroups,
3305
+ readLayoutOverview,
3306
+ readLayoutVersion,
3115
3307
  readMany,
3116
3308
  readMe,
3117
3309
  readMetricAlertLog,
@@ -3125,6 +3317,8 @@ export {
3125
3317
  readPageWidgetData,
3126
3318
  readPdfTemplate,
3127
3319
  readPersistedQuery,
3320
+ readPickerExclusion,
3321
+ readPickerExclusions,
3128
3322
  readPipelineFlowMap,
3129
3323
  readPipelineReplay,
3130
3324
  readPipelineTemplate,
@@ -3137,6 +3331,7 @@ export {
3137
3331
  readQueueItems,
3138
3332
  readQueueTrends,
3139
3333
  readQueueWorkload,
3334
+ readReadiness,
3140
3335
  readRecordGraph,
3141
3336
  readRelationOptions,
3142
3337
  readReport,
@@ -3152,6 +3347,7 @@ export {
3152
3347
  readRevision,
3153
3348
  readRevisions,
3154
3349
  readRole,
3350
+ readRuntimeStats,
3155
3351
  readScopeDimensionCoverage,
3156
3352
  readSessionRecordingEvents,
3157
3353
  readSettings,
@@ -3169,6 +3365,7 @@ export {
3169
3365
  readThroughputReport,
3170
3366
  readTimeline,
3171
3367
  readTrace,
3368
+ readTrafficSnapshot,
3172
3369
  readTreeAncestors,
3173
3370
  readTreeChildren,
3174
3371
  readTreeConfig,
@@ -3267,6 +3464,7 @@ export {
3267
3464
  submitAddendum,
3268
3465
  submitFormItem,
3269
3466
  submitItemForReview,
3467
+ submitLayoutOps,
3270
3468
  submitToErp,
3271
3469
  subscribeFieldWatch,
3272
3470
  subscribeMetricAlert,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nivaro/sdk",
3
- "version": "0.1.24",
3
+ "version": "0.1.26",
4
4
  "description": "TypeScript SDK for Nivaro CMS — typed REST client, GraphQL, realtime subscriptions, and presence.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",