@ptkl/sdk 1.5.2 → 1.5.3

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ptkl/sdk",
3
- "version": "1.5.2",
3
+ "version": "1.5.3",
4
4
  "scripts": {
5
5
  "build": "rollup -c",
6
6
  "build:monaco": "npm run build && node scripts/generate-monaco-types.cjs",
@@ -120,13 +120,15 @@ type UpdateOperators = {
120
120
  *
121
121
  * @example
122
122
  * ```ts
123
- * const elem: UpdateAggregateElement = {
123
+ * const update: UpdateAggregate = [
124
+ * {
124
125
  * avg_rating: { $avg: "$ratings" },
125
126
  * tier: { $cond: { if: { $gte: ["$avg_rating", 4.5] }, then: "platinum", else: "standard" } }
126
- * }
127
+ * }
128
+ * ]
127
129
  * ```
128
130
  */
129
- type UpdateAggregateElement = Record<string, any>;
131
+ type UpdateAggregate = Record<string, any>[];
130
132
  /**
131
133
  * Aggregation-expression update (v4 only). An array of field→expression objects.
132
134
  * Each element is automatically applied as a `$set` stage, so you can compute
@@ -155,7 +157,6 @@ type UpdateAggregateElement = Record<string, any>;
155
157
  * })
156
158
  * ```
157
159
  */
158
- type UpdateAggregatePipeline = UpdateAggregateElement[];
159
160
  /**
160
161
  * Model data payload that supports inline update operators.
161
162
  * Regular fields are applied via `$set`, operator keys are applied with their
@@ -166,7 +167,7 @@ type UpdateAggregatePipeline = UpdateAggregateElement[];
166
167
  */
167
168
  type ModelUpdateData = Record<string, any> & UpdateOperators & {
168
169
  /** Aggregation-expression update (v4 only). Mutually exclusive with operator keys. */
169
- $aggregate?: UpdateAggregatePipeline;
170
+ $aggregate?: UpdateAggregate;
170
171
  };
171
172
  type ComponentOptions = {
172
173
  version?: string;
@@ -413,4 +414,4 @@ type SetupData = {
413
414
  integrator?: string;
414
415
  };
415
416
  type ComponentCreateResponse = ComponentListItem;
416
- export { FindParams, FindOptions, FindResponse, FindAdvancedParams, FindAggregateParams, Model, UpdateOptions, ModifyOptions, UpdateOperators, UpdateAggregatePipelineStage, UpdateAggregatePipeline, ModelUpdateData, ComponentOptions, ComponentListResponse, ComponentListItem, ComponentLabel, ComponentWorkspace, StreamCallback, StreamHandler, AggregateChainable, UpdateManyOptions, CreateManyOptions, Settings, SettingsField, FieldRoles, FieldConstraints, Context, Preset, PresetContext, Filters, Function, Extension, Policy, FieldAccessConfig, TemplatesDist, SetupData, ComponentCreateResponse, };
417
+ export { FindParams, FindOptions, FindResponse, FindAdvancedParams, FindAggregateParams, Model, UpdateOptions, ModifyOptions, UpdateOperators, UpdateAggregate, ModelUpdateData, ComponentOptions, ComponentListResponse, ComponentListItem, ComponentLabel, ComponentWorkspace, StreamCallback, StreamHandler, AggregateChainable, UpdateManyOptions, CreateManyOptions, Settings, SettingsField, FieldRoles, FieldConstraints, Context, Preset, PresetContext, Filters, Function, Extension, Policy, FieldAccessConfig, TemplatesDist, SetupData, ComponentCreateResponse, };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ptkl/sdk",
3
- "version": "1.5.2",
3
+ "version": "1.5.3",
4
4
  "scripts": {
5
5
  "build": "rollup -c",
6
6
  "build:monaco": "npm run build && node scripts/generate-monaco-types.cjs",