@postxl/generator 0.65.0 → 0.65.2

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.
@@ -115,48 +115,24 @@ function generateModelBusinessLogicUpdate({ model, meta }) {
115
115
  result: ${m.typeName}
116
116
  }
117
117
 
118
- ${(0, jsdoc_1.toJsDocComment)([`Creates multiple new ${meta.userFriendlyNamePlural} and returns them.`])}
119
- createMany: {
120
- payload: ${m.decoders.createType}[]
121
- result: ${m.typeName}[]
122
- }
123
-
124
118
  ${(0, jsdoc_1.toJsDocComment)([`Updates a ${meta.userFriendlyName} and returns it.`])}
125
119
  update: {
126
120
  payload: ${m.decoders.updateType}
127
121
  result: ${m.typeName}
128
122
  }
129
123
 
130
- ${(0, jsdoc_1.toJsDocComment)([`Updates multiple ${meta.userFriendlyNamePlural} and returns them.`])}
131
- updateMany: {
132
- payload: ${m.decoders.updateType}[]
133
- result: ${m.typeName}[]
134
- }
135
-
136
124
  ${(0, jsdoc_1.toJsDocComment)([`Creates or updates a ${meta.userFriendlyName} and returns it.`])}
137
125
  upsert: {
138
126
  payload: ${m.decoders.upsertType}
139
127
  result: ${m.typeName}
140
128
  }
141
129
 
142
- ${(0, jsdoc_1.toJsDocComment)([`Creates or updates multiple ${meta.userFriendlyNamePlural} and returns them.`])}
143
- upsertMany: {
144
- payload: ${m.decoders.upsertType}[]
145
- result: ${m.typeName}[]
146
- }
147
-
148
130
  ${(0, jsdoc_1.toJsDocComment)([`Deletes a ${meta.userFriendlyName} and returns its id.`])}
149
131
  delete: {
150
132
  payload: ${m.brandedId}
151
133
  result: ${m.brandedId}
152
134
  }
153
135
 
154
- ${(0, jsdoc_1.toJsDocComment)([`Deletes multiple ${meta.userFriendlyNamePlural} and returns their ids.`])}
155
- deleteMany: {
156
- payload: ${m.brandedId}[]
157
- result: ${m.brandedId}[]
158
- }
159
-
160
136
  ${(0, jsdoc_1.toJsDocComment)([`Clones a ${meta.userFriendlyName} and returns the clone.`])}
161
137
  clone: {
162
138
  payload: ${m.decoders.cloneType}
@@ -233,31 +209,16 @@ function generateModelBusinessLogicUpdate({ model, meta }) {
233
209
  return this.data.create({ item: data, execution })
234
210
  }
235
211
 
236
- ${(0, jsdoc_1.toJsDocComment)([`Creates multiple new ${meta.userFriendlyNamePlural} and returns them.`])}
237
- public async createMany({ data, execution }: { data: ${m.decoders.createType}[]; execution: ${m.iExecution} }): Promise<${m.typeName}[]> {
238
- return this.data.createMany({ items: data, execution })
239
- }
240
-
241
212
  ${(0, jsdoc_1.toJsDocComment)([`Updates a ${meta.userFriendlyName} and returns it.`])}
242
213
  public async update({ data, execution }: { data: ${m.decoders.updateType}; execution: ${m.iExecution} }): Promise<${m.typeName}> {
243
214
  return this.data.update({ item: data, execution })
244
215
  }
245
216
 
246
- ${(0, jsdoc_1.toJsDocComment)([`Updates multiple ${meta.userFriendlyNamePlural} and returns them.`])}
247
- public async updateMany({ data, execution }: { data: ${m.decoders.updateType}[]; execution: ${m.iExecution} }): Promise<${m.typeName}[]> {
248
- return this.data.updateMany({ items: data, execution })
249
- }
250
-
251
217
  ${(0, jsdoc_1.toJsDocComment)([`Creates or updates a ${meta.userFriendlyName} and returns it.`])}
252
218
  public async upsert({ data, execution }: { data: ${m.decoders.upsertType}; execution: ${m.iExecution} }): Promise<${m.typeName}> {
253
219
  return this.data.upsert({ item: data, execution })
254
220
  }
255
221
 
256
- ${(0, jsdoc_1.toJsDocComment)([`Creates or updates multiple ${meta.userFriendlyNamePlural} and returns them.`])}
257
- public async upsertMany({ data, execution }: { data: ${m.decoders.upsertType}[]; execution: ${m.iExecution} }): Promise<${m.typeName}[]> {
258
- return this.data.upsertMany({ items: data, execution })
259
- }
260
-
261
222
  ${deleteFn}
262
223
 
263
224
  ${deleteManyFn}
@@ -64,34 +64,18 @@ export const ${meta.trpc.routerName} = router({
64
64
  .input(${decoders.name}.create)
65
65
  .mutation(({ input, ctx }) => ctx.dispatch({scope: "${scopeName}", type: "create", payload: input})),
66
66
 
67
- createMany: procedure
68
- .input(z.array(${decoders.name}.create))
69
- .mutation(({ input, ctx }) => ctx.dispatch({scope: "${scopeName}", type: "createMany", payload: input})),
70
-
71
67
  update: procedure
72
68
  .input(${decoders.name}.update)
73
69
  .mutation(({ input, ctx }) => ctx.dispatch({scope: "${scopeName}", type: "update", payload: input})),
74
70
 
75
- updateMany: procedure
76
- .input(z.array(${decoders.name}.update))
77
- .mutation(({ input, ctx }) => ctx.dispatch({scope: "${scopeName}", type: "updateMany", payload: input})),
78
-
79
71
  upsert: procedure
80
72
  .input(${decoders.name}.upsert)
81
73
  .mutation(({ input, ctx }) => ctx.dispatch({scope: "${scopeName}", type: "upsert", payload: input})),
82
74
 
83
- upsertMany: procedure
84
- .input(z.array(${decoders.name}.upsert))
85
- .mutation(({ input, ctx }) => ctx.dispatch({scope: "${scopeName}", type: "upsertMany", payload: input})),
86
-
87
75
  delete: procedure
88
76
  .input(${meta.types.zodDecoderFnNames.id})
89
77
  .mutation(({ input, ctx }) => ctx.dispatch({scope: "${scopeName}", type: "delete", payload: input})),
90
78
 
91
- deleteMany: procedure
92
- .input(z.array(${meta.types.zodDecoderFnNames.id}))
93
- .mutation(({ input, ctx }) => ctx.dispatch({scope: "${scopeName}", type: "deleteMany", payload: input})),
94
-
95
79
  clone: procedure
96
80
  .input(${decoders.name}.clone)
97
81
  .mutation(({ input, ctx }) => ctx.dispatch({scope: "${scopeName}", type: "clone", payload: input})),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@postxl/generator",
3
- "version": "0.65.0",
3
+ "version": "0.65.2",
4
4
  "main": "./dist/generator.js",
5
5
  "typings": "./dist/generator.d.ts",
6
6
  "bin": {