@mj-biz-apps/orders-server 5.1.0 → 5.2.0
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/README.md +7 -0
- package/dist/CheckoutServerExtension.d.ts +96 -0
- package/dist/CheckoutServerExtension.d.ts.map +1 -0
- package/dist/CheckoutServerExtension.js +554 -0
- package/dist/CheckoutServerExtension.js.map +1 -0
- package/dist/__tests__/CheckoutServerExtension.test.d.ts +2 -0
- package/dist/__tests__/CheckoutServerExtension.test.d.ts.map +1 -0
- package/dist/__tests__/CheckoutServerExtension.test.js +257 -0
- package/dist/__tests__/CheckoutServerExtension.test.js.map +1 -0
- package/dist/__tests__/checkout-edge-policy.test.d.ts +2 -0
- package/dist/__tests__/checkout-edge-policy.test.d.ts.map +1 -0
- package/dist/__tests__/checkout-edge-policy.test.js +70 -0
- package/dist/__tests__/checkout-edge-policy.test.js.map +1 -0
- package/dist/__tests__/checkout-host-page.test.d.ts +2 -0
- package/dist/__tests__/checkout-host-page.test.d.ts.map +1 -0
- package/dist/__tests__/checkout-host-page.test.js +86 -0
- package/dist/__tests__/checkout-host-page.test.js.map +1 -0
- package/dist/__tests__/server-extensions-manifest.test.d.ts +2 -0
- package/dist/__tests__/server-extensions-manifest.test.d.ts.map +1 -0
- package/dist/__tests__/server-extensions-manifest.test.js +29 -0
- package/dist/__tests__/server-extensions-manifest.test.js.map +1 -0
- package/dist/checkout-edge-policy.d.ts +44 -0
- package/dist/checkout-edge-policy.d.ts.map +1 -0
- package/dist/checkout-edge-policy.js +84 -0
- package/dist/checkout-edge-policy.js.map +1 -0
- package/dist/checkout-host-page.d.ts +43 -0
- package/dist/checkout-host-page.d.ts.map +1 -0
- package/dist/checkout-host-page.js +445 -0
- package/dist/checkout-host-page.js.map +1 -0
- package/dist/generated/generated.d.ts +189 -173
- package/dist/generated/generated.d.ts.map +1 -1
- package/dist/generated/generated.js +1152 -1947
- package/dist/generated/generated.js.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +13 -1
- package/dist/index.js.map +1 -1
- package/dist/server-extensions-manifest.d.ts +14 -0
- package/dist/server-extensions-manifest.d.ts.map +1 -0
- package/dist/server-extensions-manifest.js +15 -0
- package/dist/server-extensions-manifest.js.map +1 -0
- package/package.json +30 -13
|
@@ -19,7 +19,7 @@ var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
|
19
19
|
* >>> THE NEXT TIME THIS FILE IS GENERATED
|
|
20
20
|
*
|
|
21
21
|
**********************************************************************************/
|
|
22
|
-
import { Arg, Ctx, Int, Query, Resolver, Field, Float, ObjectType,
|
|
22
|
+
import { Arg, Ctx, Int, Query, Resolver, Field, Float, ObjectType, InputType, Mutation, PubSub, PubSubEngine, ResolverBase, RunViewByIDInput, RunViewByNameInput, RunDynamicViewInput, KeyValuePairInput, DeleteOptionsInput, GetReadOnlyProvider, GetReadWriteProvider, RestoreContextInput } from '@memberjunction/server';
|
|
23
23
|
import { EntityPermissionType, CompositeKey } from '@memberjunction/core';
|
|
24
24
|
import { MaxLength } from 'class-validator';
|
|
25
25
|
//****************************************************************************
|
|
@@ -76,10 +76,6 @@ __decorate([
|
|
|
76
76
|
Field(),
|
|
77
77
|
__metadata("design:type", Date)
|
|
78
78
|
], mjBizAppsOrdersChargeType_.prototype, "_mj__UpdatedAt", void 0);
|
|
79
|
-
__decorate([
|
|
80
|
-
Field(() => [mjBizAppsOrdersOrderCharge_]),
|
|
81
|
-
__metadata("design:type", Array)
|
|
82
|
-
], mjBizAppsOrdersChargeType_.prototype, "mjBizAppsOrdersOrderCharges_ChargeTypeIDArray", void 0);
|
|
83
79
|
mjBizAppsOrdersChargeType_ = __decorate([
|
|
84
80
|
ObjectType({ description: `A kind of charge and how it computes. Shipping, handling, surcharges AND TAX are all charges - modelling tax this way means multi-layer tax (state, county, city) is several charges rather than a special case, so ordering, allocation, GL treatment and overrides are written once and apply to all of them.` })
|
|
85
81
|
], mjBizAppsOrdersChargeType_);
|
|
@@ -96,242 +92,1167 @@ __decorate([
|
|
|
96
92
|
__decorate([
|
|
97
93
|
Field({ nullable: true }),
|
|
98
94
|
__metadata("design:type", String)
|
|
99
|
-
], CreatemjBizAppsOrdersChargeTypeInput.prototype, "Code", void 0);
|
|
95
|
+
], CreatemjBizAppsOrdersChargeTypeInput.prototype, "Code", void 0);
|
|
96
|
+
__decorate([
|
|
97
|
+
Field({ nullable: true }),
|
|
98
|
+
__metadata("design:type", String)
|
|
99
|
+
], CreatemjBizAppsOrdersChargeTypeInput.prototype, "Name", void 0);
|
|
100
|
+
__decorate([
|
|
101
|
+
Field({ nullable: true }),
|
|
102
|
+
__metadata("design:type", String)
|
|
103
|
+
], CreatemjBizAppsOrdersChargeTypeInput.prototype, "Description", void 0);
|
|
104
|
+
__decorate([
|
|
105
|
+
Field({ nullable: true }),
|
|
106
|
+
__metadata("design:type", String)
|
|
107
|
+
], CreatemjBizAppsOrdersChargeTypeInput.prototype, "Category", void 0);
|
|
108
|
+
__decorate([
|
|
109
|
+
Field({ nullable: true }),
|
|
110
|
+
__metadata("design:type", String)
|
|
111
|
+
], CreatemjBizAppsOrdersChargeTypeInput.prototype, "Basis", void 0);
|
|
112
|
+
__decorate([
|
|
113
|
+
Field(() => Int, { nullable: true }),
|
|
114
|
+
__metadata("design:type", Number)
|
|
115
|
+
], CreatemjBizAppsOrdersChargeTypeInput.prototype, "Sequence", void 0);
|
|
116
|
+
__decorate([
|
|
117
|
+
Field(() => Boolean, { nullable: true }),
|
|
118
|
+
__metadata("design:type", Boolean)
|
|
119
|
+
], CreatemjBizAppsOrdersChargeTypeInput.prototype, "AllowsOverride", void 0);
|
|
120
|
+
__decorate([
|
|
121
|
+
Field(() => Boolean, { nullable: true }),
|
|
122
|
+
__metadata("design:type", Boolean)
|
|
123
|
+
], CreatemjBizAppsOrdersChargeTypeInput.prototype, "IsActive", void 0);
|
|
124
|
+
__decorate([
|
|
125
|
+
Field(() => RestoreContextInput, { nullable: true }),
|
|
126
|
+
__metadata("design:type", RestoreContextInput)
|
|
127
|
+
], CreatemjBizAppsOrdersChargeTypeInput.prototype, "RestoreContext___", void 0);
|
|
128
|
+
CreatemjBizAppsOrdersChargeTypeInput = __decorate([
|
|
129
|
+
InputType()
|
|
130
|
+
], CreatemjBizAppsOrdersChargeTypeInput);
|
|
131
|
+
export { CreatemjBizAppsOrdersChargeTypeInput };
|
|
132
|
+
//****************************************************************************
|
|
133
|
+
// INPUT TYPE for MJ_BizApps_Orders: Charge Types
|
|
134
|
+
//****************************************************************************
|
|
135
|
+
let UpdatemjBizAppsOrdersChargeTypeInput = class UpdatemjBizAppsOrdersChargeTypeInput {
|
|
136
|
+
};
|
|
137
|
+
__decorate([
|
|
138
|
+
Field(),
|
|
139
|
+
__metadata("design:type", String)
|
|
140
|
+
], UpdatemjBizAppsOrdersChargeTypeInput.prototype, "ID", void 0);
|
|
141
|
+
__decorate([
|
|
142
|
+
Field({ nullable: true }),
|
|
143
|
+
__metadata("design:type", String)
|
|
144
|
+
], UpdatemjBizAppsOrdersChargeTypeInput.prototype, "Code", void 0);
|
|
145
|
+
__decorate([
|
|
146
|
+
Field({ nullable: true }),
|
|
147
|
+
__metadata("design:type", String)
|
|
148
|
+
], UpdatemjBizAppsOrdersChargeTypeInput.prototype, "Name", void 0);
|
|
149
|
+
__decorate([
|
|
150
|
+
Field({ nullable: true }),
|
|
151
|
+
__metadata("design:type", String)
|
|
152
|
+
], UpdatemjBizAppsOrdersChargeTypeInput.prototype, "Description", void 0);
|
|
153
|
+
__decorate([
|
|
154
|
+
Field({ nullable: true }),
|
|
155
|
+
__metadata("design:type", String)
|
|
156
|
+
], UpdatemjBizAppsOrdersChargeTypeInput.prototype, "Category", void 0);
|
|
157
|
+
__decorate([
|
|
158
|
+
Field({ nullable: true }),
|
|
159
|
+
__metadata("design:type", String)
|
|
160
|
+
], UpdatemjBizAppsOrdersChargeTypeInput.prototype, "Basis", void 0);
|
|
161
|
+
__decorate([
|
|
162
|
+
Field(() => Int, { nullable: true }),
|
|
163
|
+
__metadata("design:type", Number)
|
|
164
|
+
], UpdatemjBizAppsOrdersChargeTypeInput.prototype, "Sequence", void 0);
|
|
165
|
+
__decorate([
|
|
166
|
+
Field(() => Boolean, { nullable: true }),
|
|
167
|
+
__metadata("design:type", Boolean)
|
|
168
|
+
], UpdatemjBizAppsOrdersChargeTypeInput.prototype, "AllowsOverride", void 0);
|
|
169
|
+
__decorate([
|
|
170
|
+
Field(() => Boolean, { nullable: true }),
|
|
171
|
+
__metadata("design:type", Boolean)
|
|
172
|
+
], UpdatemjBizAppsOrdersChargeTypeInput.prototype, "IsActive", void 0);
|
|
173
|
+
__decorate([
|
|
174
|
+
Field(() => [KeyValuePairInput], { nullable: true }),
|
|
175
|
+
__metadata("design:type", Array)
|
|
176
|
+
], UpdatemjBizAppsOrdersChargeTypeInput.prototype, "OldValues___", void 0);
|
|
177
|
+
__decorate([
|
|
178
|
+
Field(() => RestoreContextInput, { nullable: true }),
|
|
179
|
+
__metadata("design:type", RestoreContextInput)
|
|
180
|
+
], UpdatemjBizAppsOrdersChargeTypeInput.prototype, "RestoreContext___", void 0);
|
|
181
|
+
UpdatemjBizAppsOrdersChargeTypeInput = __decorate([
|
|
182
|
+
InputType()
|
|
183
|
+
], UpdatemjBizAppsOrdersChargeTypeInput);
|
|
184
|
+
export { UpdatemjBizAppsOrdersChargeTypeInput };
|
|
185
|
+
//****************************************************************************
|
|
186
|
+
// RESOLVER for MJ_BizApps_Orders: Charge Types
|
|
187
|
+
//****************************************************************************
|
|
188
|
+
let RunmjBizAppsOrdersChargeTypeViewResult = class RunmjBizAppsOrdersChargeTypeViewResult {
|
|
189
|
+
};
|
|
190
|
+
__decorate([
|
|
191
|
+
Field(() => [mjBizAppsOrdersChargeType_]),
|
|
192
|
+
__metadata("design:type", Array)
|
|
193
|
+
], RunmjBizAppsOrdersChargeTypeViewResult.prototype, "Results", void 0);
|
|
194
|
+
__decorate([
|
|
195
|
+
Field(() => String, { nullable: true }),
|
|
196
|
+
__metadata("design:type", String)
|
|
197
|
+
], RunmjBizAppsOrdersChargeTypeViewResult.prototype, "UserViewRunID", void 0);
|
|
198
|
+
__decorate([
|
|
199
|
+
Field(() => Int, { nullable: true }),
|
|
200
|
+
__metadata("design:type", Number)
|
|
201
|
+
], RunmjBizAppsOrdersChargeTypeViewResult.prototype, "RowCount", void 0);
|
|
202
|
+
__decorate([
|
|
203
|
+
Field(() => Int, { nullable: true }),
|
|
204
|
+
__metadata("design:type", Number)
|
|
205
|
+
], RunmjBizAppsOrdersChargeTypeViewResult.prototype, "TotalRowCount", void 0);
|
|
206
|
+
__decorate([
|
|
207
|
+
Field(() => Int, { nullable: true }),
|
|
208
|
+
__metadata("design:type", Number)
|
|
209
|
+
], RunmjBizAppsOrdersChargeTypeViewResult.prototype, "ExecutionTime", void 0);
|
|
210
|
+
__decorate([
|
|
211
|
+
Field({ nullable: true }),
|
|
212
|
+
__metadata("design:type", String)
|
|
213
|
+
], RunmjBizAppsOrdersChargeTypeViewResult.prototype, "ErrorMessage", void 0);
|
|
214
|
+
__decorate([
|
|
215
|
+
Field(() => Boolean, { nullable: false }),
|
|
216
|
+
__metadata("design:type", Boolean)
|
|
217
|
+
], RunmjBizAppsOrdersChargeTypeViewResult.prototype, "Success", void 0);
|
|
218
|
+
RunmjBizAppsOrdersChargeTypeViewResult = __decorate([
|
|
219
|
+
ObjectType()
|
|
220
|
+
], RunmjBizAppsOrdersChargeTypeViewResult);
|
|
221
|
+
export { RunmjBizAppsOrdersChargeTypeViewResult };
|
|
222
|
+
let mjBizAppsOrdersChargeTypeResolver = class mjBizAppsOrdersChargeTypeResolver extends ResolverBase {
|
|
223
|
+
async RunmjBizAppsOrdersChargeTypeViewByID(input, { providers, userPayload }, pubSub) {
|
|
224
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
225
|
+
return super.RunViewByIDGeneric(input, provider, userPayload, pubSub);
|
|
226
|
+
}
|
|
227
|
+
async RunmjBizAppsOrdersChargeTypeViewByName(input, { providers, userPayload }, pubSub) {
|
|
228
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
229
|
+
return super.RunViewByNameGeneric(input, provider, userPayload, pubSub);
|
|
230
|
+
}
|
|
231
|
+
async RunmjBizAppsOrdersChargeTypeDynamicView(input, { providers, userPayload }, pubSub) {
|
|
232
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
233
|
+
input.EntityName = 'MJ_BizApps_Orders: Charge Types';
|
|
234
|
+
return super.RunDynamicViewGeneric(input, provider, userPayload, pubSub);
|
|
235
|
+
}
|
|
236
|
+
async mjBizAppsOrdersChargeType(ID, { userPayload, providers }, pubSub) {
|
|
237
|
+
this.CheckUserReadPermissions('MJ_BizApps_Orders: Charge Types', userPayload);
|
|
238
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
239
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView('__mj_BizAppsOrders', 'vwChargeTypes')} WHERE ${provider.QuoteIdentifier('ID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ_BizApps_Orders: Charge Types', userPayload, EntityPermissionType.Read, 'AND');
|
|
240
|
+
const rows = await provider.ExecuteSQL(sSQL, [ID], undefined, this.GetUserFromPayload(userPayload));
|
|
241
|
+
const result = await this.MapFieldNamesToCodeNames('MJ_BizApps_Orders: Charge Types', rows && rows.length > 0 ? rows[0] : null, this.GetUserFromPayload(userPayload));
|
|
242
|
+
return result;
|
|
243
|
+
}
|
|
244
|
+
async CreatemjBizAppsOrdersChargeType(input, { providers, userPayload }, pubSub) {
|
|
245
|
+
const provider = GetReadWriteProvider(providers);
|
|
246
|
+
return this.CreateRecord('MJ_BizApps_Orders: Charge Types', input, provider, userPayload, pubSub);
|
|
247
|
+
}
|
|
248
|
+
async UpdatemjBizAppsOrdersChargeType(input, { providers, userPayload }, pubSub) {
|
|
249
|
+
const provider = GetReadWriteProvider(providers);
|
|
250
|
+
return this.UpdateRecord('MJ_BizApps_Orders: Charge Types', input, provider, userPayload, pubSub);
|
|
251
|
+
}
|
|
252
|
+
async DeletemjBizAppsOrdersChargeType(ID, options, { providers, userPayload }, pubSub) {
|
|
253
|
+
const provider = GetReadWriteProvider(providers);
|
|
254
|
+
const key = new CompositeKey([{ FieldName: 'ID', Value: ID }]);
|
|
255
|
+
return this.DeleteRecord('MJ_BizApps_Orders: Charge Types', key, options, provider, userPayload, pubSub);
|
|
256
|
+
}
|
|
257
|
+
};
|
|
258
|
+
__decorate([
|
|
259
|
+
Query(() => RunmjBizAppsOrdersChargeTypeViewResult),
|
|
260
|
+
__param(0, Arg('input', () => RunViewByIDInput)),
|
|
261
|
+
__param(1, Ctx()),
|
|
262
|
+
__param(2, PubSub()),
|
|
263
|
+
__metadata("design:type", Function),
|
|
264
|
+
__metadata("design:paramtypes", [RunViewByIDInput, Object, PubSubEngine]),
|
|
265
|
+
__metadata("design:returntype", Promise)
|
|
266
|
+
], mjBizAppsOrdersChargeTypeResolver.prototype, "RunmjBizAppsOrdersChargeTypeViewByID", null);
|
|
267
|
+
__decorate([
|
|
268
|
+
Query(() => RunmjBizAppsOrdersChargeTypeViewResult),
|
|
269
|
+
__param(0, Arg('input', () => RunViewByNameInput)),
|
|
270
|
+
__param(1, Ctx()),
|
|
271
|
+
__param(2, PubSub()),
|
|
272
|
+
__metadata("design:type", Function),
|
|
273
|
+
__metadata("design:paramtypes", [RunViewByNameInput, Object, PubSubEngine]),
|
|
274
|
+
__metadata("design:returntype", Promise)
|
|
275
|
+
], mjBizAppsOrdersChargeTypeResolver.prototype, "RunmjBizAppsOrdersChargeTypeViewByName", null);
|
|
276
|
+
__decorate([
|
|
277
|
+
Query(() => RunmjBizAppsOrdersChargeTypeViewResult),
|
|
278
|
+
__param(0, Arg('input', () => RunDynamicViewInput)),
|
|
279
|
+
__param(1, Ctx()),
|
|
280
|
+
__param(2, PubSub()),
|
|
281
|
+
__metadata("design:type", Function),
|
|
282
|
+
__metadata("design:paramtypes", [RunDynamicViewInput, Object, PubSubEngine]),
|
|
283
|
+
__metadata("design:returntype", Promise)
|
|
284
|
+
], mjBizAppsOrdersChargeTypeResolver.prototype, "RunmjBizAppsOrdersChargeTypeDynamicView", null);
|
|
285
|
+
__decorate([
|
|
286
|
+
Query(() => mjBizAppsOrdersChargeType_, { nullable: true }),
|
|
287
|
+
__param(0, Arg('ID', () => String)),
|
|
288
|
+
__param(1, Ctx()),
|
|
289
|
+
__param(2, PubSub()),
|
|
290
|
+
__metadata("design:type", Function),
|
|
291
|
+
__metadata("design:paramtypes", [String, Object, PubSubEngine]),
|
|
292
|
+
__metadata("design:returntype", Promise)
|
|
293
|
+
], mjBizAppsOrdersChargeTypeResolver.prototype, "mjBizAppsOrdersChargeType", null);
|
|
294
|
+
__decorate([
|
|
295
|
+
Mutation(() => mjBizAppsOrdersChargeType_),
|
|
296
|
+
__param(0, Arg('input', () => CreatemjBizAppsOrdersChargeTypeInput)),
|
|
297
|
+
__param(1, Ctx()),
|
|
298
|
+
__param(2, PubSub()),
|
|
299
|
+
__metadata("design:type", Function),
|
|
300
|
+
__metadata("design:paramtypes", [CreatemjBizAppsOrdersChargeTypeInput, Object, PubSubEngine]),
|
|
301
|
+
__metadata("design:returntype", Promise)
|
|
302
|
+
], mjBizAppsOrdersChargeTypeResolver.prototype, "CreatemjBizAppsOrdersChargeType", null);
|
|
303
|
+
__decorate([
|
|
304
|
+
Mutation(() => mjBizAppsOrdersChargeType_),
|
|
305
|
+
__param(0, Arg('input', () => UpdatemjBizAppsOrdersChargeTypeInput)),
|
|
306
|
+
__param(1, Ctx()),
|
|
307
|
+
__param(2, PubSub()),
|
|
308
|
+
__metadata("design:type", Function),
|
|
309
|
+
__metadata("design:paramtypes", [UpdatemjBizAppsOrdersChargeTypeInput, Object, PubSubEngine]),
|
|
310
|
+
__metadata("design:returntype", Promise)
|
|
311
|
+
], mjBizAppsOrdersChargeTypeResolver.prototype, "UpdatemjBizAppsOrdersChargeType", null);
|
|
312
|
+
__decorate([
|
|
313
|
+
Mutation(() => mjBizAppsOrdersChargeType_),
|
|
314
|
+
__param(0, Arg('ID', () => String)),
|
|
315
|
+
__param(1, Arg('options___', () => DeleteOptionsInput)),
|
|
316
|
+
__param(2, Ctx()),
|
|
317
|
+
__param(3, PubSub()),
|
|
318
|
+
__metadata("design:type", Function),
|
|
319
|
+
__metadata("design:paramtypes", [String, DeleteOptionsInput, Object, PubSubEngine]),
|
|
320
|
+
__metadata("design:returntype", Promise)
|
|
321
|
+
], mjBizAppsOrdersChargeTypeResolver.prototype, "DeletemjBizAppsOrdersChargeType", null);
|
|
322
|
+
mjBizAppsOrdersChargeTypeResolver = __decorate([
|
|
323
|
+
Resolver(mjBizAppsOrdersChargeType_)
|
|
324
|
+
], mjBizAppsOrdersChargeTypeResolver);
|
|
325
|
+
export { mjBizAppsOrdersChargeTypeResolver };
|
|
326
|
+
//****************************************************************************
|
|
327
|
+
// ENTITY CLASS for MJ_BizApps_Orders: Checkout Sessions
|
|
328
|
+
//****************************************************************************
|
|
329
|
+
let mjBizAppsOrdersCheckoutSession_ = class mjBizAppsOrdersCheckoutSession_ {
|
|
330
|
+
};
|
|
331
|
+
__decorate([
|
|
332
|
+
Field(),
|
|
333
|
+
MaxLength(36),
|
|
334
|
+
__metadata("design:type", String)
|
|
335
|
+
], mjBizAppsOrdersCheckoutSession_.prototype, "ID", void 0);
|
|
336
|
+
__decorate([
|
|
337
|
+
Field(),
|
|
338
|
+
MaxLength(36),
|
|
339
|
+
__metadata("design:type", String)
|
|
340
|
+
], mjBizAppsOrdersCheckoutSession_.prototype, "CheckoutWidgetID", void 0);
|
|
341
|
+
__decorate([
|
|
342
|
+
Field({ nullable: true }),
|
|
343
|
+
MaxLength(36),
|
|
344
|
+
__metadata("design:type", String)
|
|
345
|
+
], mjBizAppsOrdersCheckoutSession_.prototype, "DistributionID", void 0);
|
|
346
|
+
__decorate([
|
|
347
|
+
Field(),
|
|
348
|
+
MaxLength(100),
|
|
349
|
+
__metadata("design:type", String)
|
|
350
|
+
], mjBizAppsOrdersCheckoutSession_.prototype, "ClientSessionKey", void 0);
|
|
351
|
+
__decorate([
|
|
352
|
+
Field({ nullable: true }),
|
|
353
|
+
MaxLength(255),
|
|
354
|
+
__metadata("design:type", String)
|
|
355
|
+
], mjBizAppsOrdersCheckoutSession_.prototype, "Email", void 0);
|
|
356
|
+
__decorate([
|
|
357
|
+
Field({ nullable: true }),
|
|
358
|
+
MaxLength(36),
|
|
359
|
+
__metadata("design:type", String)
|
|
360
|
+
], mjBizAppsOrdersCheckoutSession_.prototype, "PersonID", void 0);
|
|
361
|
+
__decorate([
|
|
362
|
+
Field({ nullable: true }),
|
|
363
|
+
MaxLength(36),
|
|
364
|
+
__metadata("design:type", String)
|
|
365
|
+
], mjBizAppsOrdersCheckoutSession_.prototype, "DraftOrderID", void 0);
|
|
366
|
+
__decorate([
|
|
367
|
+
Field({ nullable: true }),
|
|
368
|
+
MaxLength(36),
|
|
369
|
+
__metadata("design:type", String)
|
|
370
|
+
], mjBizAppsOrdersCheckoutSession_.prototype, "PaymentIntentID", void 0);
|
|
371
|
+
__decorate([
|
|
372
|
+
Field(),
|
|
373
|
+
MaxLength(20),
|
|
374
|
+
__metadata("design:type", String)
|
|
375
|
+
], mjBizAppsOrdersCheckoutSession_.prototype, "Status", void 0);
|
|
376
|
+
__decorate([
|
|
377
|
+
Field(),
|
|
378
|
+
__metadata("design:type", Date)
|
|
379
|
+
], mjBizAppsOrdersCheckoutSession_.prototype, "ExpiresAt", void 0);
|
|
380
|
+
__decorate([
|
|
381
|
+
Field({ nullable: true }),
|
|
382
|
+
__metadata("design:type", String)
|
|
383
|
+
], mjBizAppsOrdersCheckoutSession_.prototype, "MetadataJSON", void 0);
|
|
384
|
+
__decorate([
|
|
385
|
+
Field(),
|
|
386
|
+
__metadata("design:type", Date)
|
|
387
|
+
], mjBizAppsOrdersCheckoutSession_.prototype, "_mj__CreatedAt", void 0);
|
|
388
|
+
__decorate([
|
|
389
|
+
Field(),
|
|
390
|
+
__metadata("design:type", Date)
|
|
391
|
+
], mjBizAppsOrdersCheckoutSession_.prototype, "_mj__UpdatedAt", void 0);
|
|
392
|
+
__decorate([
|
|
393
|
+
Field(),
|
|
394
|
+
MaxLength(100),
|
|
395
|
+
__metadata("design:type", String)
|
|
396
|
+
], mjBizAppsOrdersCheckoutSession_.prototype, "CheckoutWidget", void 0);
|
|
397
|
+
__decorate([
|
|
398
|
+
Field({ nullable: true }),
|
|
399
|
+
MaxLength(255),
|
|
400
|
+
__metadata("design:type", String)
|
|
401
|
+
], mjBizAppsOrdersCheckoutSession_.prototype, "Distribution", void 0);
|
|
402
|
+
__decorate([
|
|
403
|
+
Field({ nullable: true }),
|
|
404
|
+
MaxLength(201),
|
|
405
|
+
__metadata("design:type", String)
|
|
406
|
+
], mjBizAppsOrdersCheckoutSession_.prototype, "Person", void 0);
|
|
407
|
+
__decorate([
|
|
408
|
+
Field({ nullable: true }),
|
|
409
|
+
MaxLength(40),
|
|
410
|
+
__metadata("design:type", String)
|
|
411
|
+
], mjBizAppsOrdersCheckoutSession_.prototype, "DraftOrder", void 0);
|
|
412
|
+
__decorate([
|
|
413
|
+
Field({ nullable: true }),
|
|
414
|
+
MaxLength(100),
|
|
415
|
+
__metadata("design:type", String)
|
|
416
|
+
], mjBizAppsOrdersCheckoutSession_.prototype, "PaymentIntent", void 0);
|
|
417
|
+
mjBizAppsOrdersCheckoutSession_ = __decorate([
|
|
418
|
+
ObjectType({ description: `Server-side state tracking for an anonymous or authenticated checkout attempt, linking client session key to draft orders and payment intents.` })
|
|
419
|
+
], mjBizAppsOrdersCheckoutSession_);
|
|
420
|
+
export { mjBizAppsOrdersCheckoutSession_ };
|
|
421
|
+
//****************************************************************************
|
|
422
|
+
// INPUT TYPE for MJ_BizApps_Orders: Checkout Sessions
|
|
423
|
+
//****************************************************************************
|
|
424
|
+
let CreatemjBizAppsOrdersCheckoutSessionInput = class CreatemjBizAppsOrdersCheckoutSessionInput {
|
|
425
|
+
};
|
|
426
|
+
__decorate([
|
|
427
|
+
Field({ nullable: true }),
|
|
428
|
+
__metadata("design:type", String)
|
|
429
|
+
], CreatemjBizAppsOrdersCheckoutSessionInput.prototype, "ID", void 0);
|
|
430
|
+
__decorate([
|
|
431
|
+
Field({ nullable: true }),
|
|
432
|
+
__metadata("design:type", String)
|
|
433
|
+
], CreatemjBizAppsOrdersCheckoutSessionInput.prototype, "CheckoutWidgetID", void 0);
|
|
434
|
+
__decorate([
|
|
435
|
+
Field({ nullable: true }),
|
|
436
|
+
__metadata("design:type", String)
|
|
437
|
+
], CreatemjBizAppsOrdersCheckoutSessionInput.prototype, "DistributionID", void 0);
|
|
438
|
+
__decorate([
|
|
439
|
+
Field({ nullable: true }),
|
|
440
|
+
__metadata("design:type", String)
|
|
441
|
+
], CreatemjBizAppsOrdersCheckoutSessionInput.prototype, "ClientSessionKey", void 0);
|
|
442
|
+
__decorate([
|
|
443
|
+
Field({ nullable: true }),
|
|
444
|
+
__metadata("design:type", String)
|
|
445
|
+
], CreatemjBizAppsOrdersCheckoutSessionInput.prototype, "Email", void 0);
|
|
446
|
+
__decorate([
|
|
447
|
+
Field({ nullable: true }),
|
|
448
|
+
__metadata("design:type", String)
|
|
449
|
+
], CreatemjBizAppsOrdersCheckoutSessionInput.prototype, "PersonID", void 0);
|
|
450
|
+
__decorate([
|
|
451
|
+
Field({ nullable: true }),
|
|
452
|
+
__metadata("design:type", String)
|
|
453
|
+
], CreatemjBizAppsOrdersCheckoutSessionInput.prototype, "DraftOrderID", void 0);
|
|
454
|
+
__decorate([
|
|
455
|
+
Field({ nullable: true }),
|
|
456
|
+
__metadata("design:type", String)
|
|
457
|
+
], CreatemjBizAppsOrdersCheckoutSessionInput.prototype, "PaymentIntentID", void 0);
|
|
458
|
+
__decorate([
|
|
459
|
+
Field({ nullable: true }),
|
|
460
|
+
__metadata("design:type", String)
|
|
461
|
+
], CreatemjBizAppsOrdersCheckoutSessionInput.prototype, "Status", void 0);
|
|
462
|
+
__decorate([
|
|
463
|
+
Field({ nullable: true }),
|
|
464
|
+
__metadata("design:type", Date)
|
|
465
|
+
], CreatemjBizAppsOrdersCheckoutSessionInput.prototype, "ExpiresAt", void 0);
|
|
466
|
+
__decorate([
|
|
467
|
+
Field({ nullable: true }),
|
|
468
|
+
__metadata("design:type", String)
|
|
469
|
+
], CreatemjBizAppsOrdersCheckoutSessionInput.prototype, "MetadataJSON", void 0);
|
|
470
|
+
__decorate([
|
|
471
|
+
Field(() => RestoreContextInput, { nullable: true }),
|
|
472
|
+
__metadata("design:type", RestoreContextInput)
|
|
473
|
+
], CreatemjBizAppsOrdersCheckoutSessionInput.prototype, "RestoreContext___", void 0);
|
|
474
|
+
CreatemjBizAppsOrdersCheckoutSessionInput = __decorate([
|
|
475
|
+
InputType()
|
|
476
|
+
], CreatemjBizAppsOrdersCheckoutSessionInput);
|
|
477
|
+
export { CreatemjBizAppsOrdersCheckoutSessionInput };
|
|
478
|
+
//****************************************************************************
|
|
479
|
+
// INPUT TYPE for MJ_BizApps_Orders: Checkout Sessions
|
|
480
|
+
//****************************************************************************
|
|
481
|
+
let UpdatemjBizAppsOrdersCheckoutSessionInput = class UpdatemjBizAppsOrdersCheckoutSessionInput {
|
|
482
|
+
};
|
|
483
|
+
__decorate([
|
|
484
|
+
Field(),
|
|
485
|
+
__metadata("design:type", String)
|
|
486
|
+
], UpdatemjBizAppsOrdersCheckoutSessionInput.prototype, "ID", void 0);
|
|
487
|
+
__decorate([
|
|
488
|
+
Field({ nullable: true }),
|
|
489
|
+
__metadata("design:type", String)
|
|
490
|
+
], UpdatemjBizAppsOrdersCheckoutSessionInput.prototype, "CheckoutWidgetID", void 0);
|
|
491
|
+
__decorate([
|
|
492
|
+
Field({ nullable: true }),
|
|
493
|
+
__metadata("design:type", String)
|
|
494
|
+
], UpdatemjBizAppsOrdersCheckoutSessionInput.prototype, "DistributionID", void 0);
|
|
495
|
+
__decorate([
|
|
496
|
+
Field({ nullable: true }),
|
|
497
|
+
__metadata("design:type", String)
|
|
498
|
+
], UpdatemjBizAppsOrdersCheckoutSessionInput.prototype, "ClientSessionKey", void 0);
|
|
499
|
+
__decorate([
|
|
500
|
+
Field({ nullable: true }),
|
|
501
|
+
__metadata("design:type", String)
|
|
502
|
+
], UpdatemjBizAppsOrdersCheckoutSessionInput.prototype, "Email", void 0);
|
|
503
|
+
__decorate([
|
|
504
|
+
Field({ nullable: true }),
|
|
505
|
+
__metadata("design:type", String)
|
|
506
|
+
], UpdatemjBizAppsOrdersCheckoutSessionInput.prototype, "PersonID", void 0);
|
|
507
|
+
__decorate([
|
|
508
|
+
Field({ nullable: true }),
|
|
509
|
+
__metadata("design:type", String)
|
|
510
|
+
], UpdatemjBizAppsOrdersCheckoutSessionInput.prototype, "DraftOrderID", void 0);
|
|
511
|
+
__decorate([
|
|
512
|
+
Field({ nullable: true }),
|
|
513
|
+
__metadata("design:type", String)
|
|
514
|
+
], UpdatemjBizAppsOrdersCheckoutSessionInput.prototype, "PaymentIntentID", void 0);
|
|
515
|
+
__decorate([
|
|
516
|
+
Field({ nullable: true }),
|
|
517
|
+
__metadata("design:type", String)
|
|
518
|
+
], UpdatemjBizAppsOrdersCheckoutSessionInput.prototype, "Status", void 0);
|
|
519
|
+
__decorate([
|
|
520
|
+
Field({ nullable: true }),
|
|
521
|
+
__metadata("design:type", Date)
|
|
522
|
+
], UpdatemjBizAppsOrdersCheckoutSessionInput.prototype, "ExpiresAt", void 0);
|
|
523
|
+
__decorate([
|
|
524
|
+
Field({ nullable: true }),
|
|
525
|
+
__metadata("design:type", String)
|
|
526
|
+
], UpdatemjBizAppsOrdersCheckoutSessionInput.prototype, "MetadataJSON", void 0);
|
|
527
|
+
__decorate([
|
|
528
|
+
Field(() => [KeyValuePairInput], { nullable: true }),
|
|
529
|
+
__metadata("design:type", Array)
|
|
530
|
+
], UpdatemjBizAppsOrdersCheckoutSessionInput.prototype, "OldValues___", void 0);
|
|
531
|
+
__decorate([
|
|
532
|
+
Field(() => RestoreContextInput, { nullable: true }),
|
|
533
|
+
__metadata("design:type", RestoreContextInput)
|
|
534
|
+
], UpdatemjBizAppsOrdersCheckoutSessionInput.prototype, "RestoreContext___", void 0);
|
|
535
|
+
UpdatemjBizAppsOrdersCheckoutSessionInput = __decorate([
|
|
536
|
+
InputType()
|
|
537
|
+
], UpdatemjBizAppsOrdersCheckoutSessionInput);
|
|
538
|
+
export { UpdatemjBizAppsOrdersCheckoutSessionInput };
|
|
539
|
+
//****************************************************************************
|
|
540
|
+
// RESOLVER for MJ_BizApps_Orders: Checkout Sessions
|
|
541
|
+
//****************************************************************************
|
|
542
|
+
let RunmjBizAppsOrdersCheckoutSessionViewResult = class RunmjBizAppsOrdersCheckoutSessionViewResult {
|
|
543
|
+
};
|
|
544
|
+
__decorate([
|
|
545
|
+
Field(() => [mjBizAppsOrdersCheckoutSession_]),
|
|
546
|
+
__metadata("design:type", Array)
|
|
547
|
+
], RunmjBizAppsOrdersCheckoutSessionViewResult.prototype, "Results", void 0);
|
|
548
|
+
__decorate([
|
|
549
|
+
Field(() => String, { nullable: true }),
|
|
550
|
+
__metadata("design:type", String)
|
|
551
|
+
], RunmjBizAppsOrdersCheckoutSessionViewResult.prototype, "UserViewRunID", void 0);
|
|
552
|
+
__decorate([
|
|
553
|
+
Field(() => Int, { nullable: true }),
|
|
554
|
+
__metadata("design:type", Number)
|
|
555
|
+
], RunmjBizAppsOrdersCheckoutSessionViewResult.prototype, "RowCount", void 0);
|
|
556
|
+
__decorate([
|
|
557
|
+
Field(() => Int, { nullable: true }),
|
|
558
|
+
__metadata("design:type", Number)
|
|
559
|
+
], RunmjBizAppsOrdersCheckoutSessionViewResult.prototype, "TotalRowCount", void 0);
|
|
560
|
+
__decorate([
|
|
561
|
+
Field(() => Int, { nullable: true }),
|
|
562
|
+
__metadata("design:type", Number)
|
|
563
|
+
], RunmjBizAppsOrdersCheckoutSessionViewResult.prototype, "ExecutionTime", void 0);
|
|
564
|
+
__decorate([
|
|
565
|
+
Field({ nullable: true }),
|
|
566
|
+
__metadata("design:type", String)
|
|
567
|
+
], RunmjBizAppsOrdersCheckoutSessionViewResult.prototype, "ErrorMessage", void 0);
|
|
568
|
+
__decorate([
|
|
569
|
+
Field(() => Boolean, { nullable: false }),
|
|
570
|
+
__metadata("design:type", Boolean)
|
|
571
|
+
], RunmjBizAppsOrdersCheckoutSessionViewResult.prototype, "Success", void 0);
|
|
572
|
+
RunmjBizAppsOrdersCheckoutSessionViewResult = __decorate([
|
|
573
|
+
ObjectType()
|
|
574
|
+
], RunmjBizAppsOrdersCheckoutSessionViewResult);
|
|
575
|
+
export { RunmjBizAppsOrdersCheckoutSessionViewResult };
|
|
576
|
+
let mjBizAppsOrdersCheckoutSessionResolver = class mjBizAppsOrdersCheckoutSessionResolver extends ResolverBase {
|
|
577
|
+
async RunmjBizAppsOrdersCheckoutSessionViewByID(input, { providers, userPayload }, pubSub) {
|
|
578
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
579
|
+
return super.RunViewByIDGeneric(input, provider, userPayload, pubSub);
|
|
580
|
+
}
|
|
581
|
+
async RunmjBizAppsOrdersCheckoutSessionViewByName(input, { providers, userPayload }, pubSub) {
|
|
582
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
583
|
+
return super.RunViewByNameGeneric(input, provider, userPayload, pubSub);
|
|
584
|
+
}
|
|
585
|
+
async RunmjBizAppsOrdersCheckoutSessionDynamicView(input, { providers, userPayload }, pubSub) {
|
|
586
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
587
|
+
input.EntityName = 'MJ_BizApps_Orders: Checkout Sessions';
|
|
588
|
+
return super.RunDynamicViewGeneric(input, provider, userPayload, pubSub);
|
|
589
|
+
}
|
|
590
|
+
async mjBizAppsOrdersCheckoutSession(ID, { userPayload, providers }, pubSub) {
|
|
591
|
+
this.CheckUserReadPermissions('MJ_BizApps_Orders: Checkout Sessions', userPayload);
|
|
592
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
593
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView('__mj_BizAppsOrders', 'vwCheckoutSessions')} WHERE ${provider.QuoteIdentifier('ID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ_BizApps_Orders: Checkout Sessions', userPayload, EntityPermissionType.Read, 'AND');
|
|
594
|
+
const rows = await provider.ExecuteSQL(sSQL, [ID], undefined, this.GetUserFromPayload(userPayload));
|
|
595
|
+
const result = await this.MapFieldNamesToCodeNames('MJ_BizApps_Orders: Checkout Sessions', rows && rows.length > 0 ? rows[0] : null, this.GetUserFromPayload(userPayload));
|
|
596
|
+
return result;
|
|
597
|
+
}
|
|
598
|
+
async CreatemjBizAppsOrdersCheckoutSession(input, { providers, userPayload }, pubSub) {
|
|
599
|
+
const provider = GetReadWriteProvider(providers);
|
|
600
|
+
return this.CreateRecord('MJ_BizApps_Orders: Checkout Sessions', input, provider, userPayload, pubSub);
|
|
601
|
+
}
|
|
602
|
+
async UpdatemjBizAppsOrdersCheckoutSession(input, { providers, userPayload }, pubSub) {
|
|
603
|
+
const provider = GetReadWriteProvider(providers);
|
|
604
|
+
return this.UpdateRecord('MJ_BizApps_Orders: Checkout Sessions', input, provider, userPayload, pubSub);
|
|
605
|
+
}
|
|
606
|
+
async DeletemjBizAppsOrdersCheckoutSession(ID, options, { providers, userPayload }, pubSub) {
|
|
607
|
+
const provider = GetReadWriteProvider(providers);
|
|
608
|
+
const key = new CompositeKey([{ FieldName: 'ID', Value: ID }]);
|
|
609
|
+
return this.DeleteRecord('MJ_BizApps_Orders: Checkout Sessions', key, options, provider, userPayload, pubSub);
|
|
610
|
+
}
|
|
611
|
+
};
|
|
612
|
+
__decorate([
|
|
613
|
+
Query(() => RunmjBizAppsOrdersCheckoutSessionViewResult),
|
|
614
|
+
__param(0, Arg('input', () => RunViewByIDInput)),
|
|
615
|
+
__param(1, Ctx()),
|
|
616
|
+
__param(2, PubSub()),
|
|
617
|
+
__metadata("design:type", Function),
|
|
618
|
+
__metadata("design:paramtypes", [RunViewByIDInput, Object, PubSubEngine]),
|
|
619
|
+
__metadata("design:returntype", Promise)
|
|
620
|
+
], mjBizAppsOrdersCheckoutSessionResolver.prototype, "RunmjBizAppsOrdersCheckoutSessionViewByID", null);
|
|
621
|
+
__decorate([
|
|
622
|
+
Query(() => RunmjBizAppsOrdersCheckoutSessionViewResult),
|
|
623
|
+
__param(0, Arg('input', () => RunViewByNameInput)),
|
|
624
|
+
__param(1, Ctx()),
|
|
625
|
+
__param(2, PubSub()),
|
|
626
|
+
__metadata("design:type", Function),
|
|
627
|
+
__metadata("design:paramtypes", [RunViewByNameInput, Object, PubSubEngine]),
|
|
628
|
+
__metadata("design:returntype", Promise)
|
|
629
|
+
], mjBizAppsOrdersCheckoutSessionResolver.prototype, "RunmjBizAppsOrdersCheckoutSessionViewByName", null);
|
|
630
|
+
__decorate([
|
|
631
|
+
Query(() => RunmjBizAppsOrdersCheckoutSessionViewResult),
|
|
632
|
+
__param(0, Arg('input', () => RunDynamicViewInput)),
|
|
633
|
+
__param(1, Ctx()),
|
|
634
|
+
__param(2, PubSub()),
|
|
635
|
+
__metadata("design:type", Function),
|
|
636
|
+
__metadata("design:paramtypes", [RunDynamicViewInput, Object, PubSubEngine]),
|
|
637
|
+
__metadata("design:returntype", Promise)
|
|
638
|
+
], mjBizAppsOrdersCheckoutSessionResolver.prototype, "RunmjBizAppsOrdersCheckoutSessionDynamicView", null);
|
|
639
|
+
__decorate([
|
|
640
|
+
Query(() => mjBizAppsOrdersCheckoutSession_, { nullable: true }),
|
|
641
|
+
__param(0, Arg('ID', () => String)),
|
|
642
|
+
__param(1, Ctx()),
|
|
643
|
+
__param(2, PubSub()),
|
|
644
|
+
__metadata("design:type", Function),
|
|
645
|
+
__metadata("design:paramtypes", [String, Object, PubSubEngine]),
|
|
646
|
+
__metadata("design:returntype", Promise)
|
|
647
|
+
], mjBizAppsOrdersCheckoutSessionResolver.prototype, "mjBizAppsOrdersCheckoutSession", null);
|
|
648
|
+
__decorate([
|
|
649
|
+
Mutation(() => mjBizAppsOrdersCheckoutSession_),
|
|
650
|
+
__param(0, Arg('input', () => CreatemjBizAppsOrdersCheckoutSessionInput)),
|
|
651
|
+
__param(1, Ctx()),
|
|
652
|
+
__param(2, PubSub()),
|
|
653
|
+
__metadata("design:type", Function),
|
|
654
|
+
__metadata("design:paramtypes", [CreatemjBizAppsOrdersCheckoutSessionInput, Object, PubSubEngine]),
|
|
655
|
+
__metadata("design:returntype", Promise)
|
|
656
|
+
], mjBizAppsOrdersCheckoutSessionResolver.prototype, "CreatemjBizAppsOrdersCheckoutSession", null);
|
|
657
|
+
__decorate([
|
|
658
|
+
Mutation(() => mjBizAppsOrdersCheckoutSession_),
|
|
659
|
+
__param(0, Arg('input', () => UpdatemjBizAppsOrdersCheckoutSessionInput)),
|
|
660
|
+
__param(1, Ctx()),
|
|
661
|
+
__param(2, PubSub()),
|
|
662
|
+
__metadata("design:type", Function),
|
|
663
|
+
__metadata("design:paramtypes", [UpdatemjBizAppsOrdersCheckoutSessionInput, Object, PubSubEngine]),
|
|
664
|
+
__metadata("design:returntype", Promise)
|
|
665
|
+
], mjBizAppsOrdersCheckoutSessionResolver.prototype, "UpdatemjBizAppsOrdersCheckoutSession", null);
|
|
666
|
+
__decorate([
|
|
667
|
+
Mutation(() => mjBizAppsOrdersCheckoutSession_),
|
|
668
|
+
__param(0, Arg('ID', () => String)),
|
|
669
|
+
__param(1, Arg('options___', () => DeleteOptionsInput)),
|
|
670
|
+
__param(2, Ctx()),
|
|
671
|
+
__param(3, PubSub()),
|
|
672
|
+
__metadata("design:type", Function),
|
|
673
|
+
__metadata("design:paramtypes", [String, DeleteOptionsInput, Object, PubSubEngine]),
|
|
674
|
+
__metadata("design:returntype", Promise)
|
|
675
|
+
], mjBizAppsOrdersCheckoutSessionResolver.prototype, "DeletemjBizAppsOrdersCheckoutSession", null);
|
|
676
|
+
mjBizAppsOrdersCheckoutSessionResolver = __decorate([
|
|
677
|
+
Resolver(mjBizAppsOrdersCheckoutSession_)
|
|
678
|
+
], mjBizAppsOrdersCheckoutSessionResolver);
|
|
679
|
+
export { mjBizAppsOrdersCheckoutSessionResolver };
|
|
680
|
+
//****************************************************************************
|
|
681
|
+
// ENTITY CLASS for MJ_BizApps_Orders: Checkout Widget Distributions
|
|
682
|
+
//****************************************************************************
|
|
683
|
+
let mjBizAppsOrdersCheckoutWidgetDistribution_ = class mjBizAppsOrdersCheckoutWidgetDistribution_ {
|
|
684
|
+
};
|
|
685
|
+
__decorate([
|
|
686
|
+
Field(),
|
|
687
|
+
MaxLength(36),
|
|
688
|
+
__metadata("design:type", String)
|
|
689
|
+
], mjBizAppsOrdersCheckoutWidgetDistribution_.prototype, "ID", void 0);
|
|
690
|
+
__decorate([
|
|
691
|
+
Field(),
|
|
692
|
+
MaxLength(36),
|
|
693
|
+
__metadata("design:type", String)
|
|
694
|
+
], mjBizAppsOrdersCheckoutWidgetDistribution_.prototype, "CheckoutWidgetID", void 0);
|
|
695
|
+
__decorate([
|
|
696
|
+
Field(),
|
|
697
|
+
MaxLength(255),
|
|
698
|
+
__metadata("design:type", String)
|
|
699
|
+
], mjBizAppsOrdersCheckoutWidgetDistribution_.prototype, "Slug", void 0);
|
|
700
|
+
__decorate([
|
|
701
|
+
Field({ nullable: true }),
|
|
702
|
+
MaxLength(36),
|
|
703
|
+
__metadata("design:type", String)
|
|
704
|
+
], mjBizAppsOrdersCheckoutWidgetDistribution_.prototype, "MagicLinkInviteID", void 0);
|
|
705
|
+
__decorate([
|
|
706
|
+
Field(),
|
|
707
|
+
MaxLength(20),
|
|
708
|
+
__metadata("design:type", String)
|
|
709
|
+
], mjBizAppsOrdersCheckoutWidgetDistribution_.prototype, "Status", void 0);
|
|
710
|
+
__decorate([
|
|
711
|
+
Field({ nullable: true }),
|
|
712
|
+
__metadata("design:type", Date)
|
|
713
|
+
], mjBizAppsOrdersCheckoutWidgetDistribution_.prototype, "RevokedAt", void 0);
|
|
714
|
+
__decorate([
|
|
715
|
+
Field({ nullable: true }),
|
|
716
|
+
MaxLength(500),
|
|
717
|
+
__metadata("design:type", String)
|
|
718
|
+
], mjBizAppsOrdersCheckoutWidgetDistribution_.prototype, "RevocationReason", void 0);
|
|
719
|
+
__decorate([
|
|
720
|
+
Field({ nullable: true }),
|
|
721
|
+
__metadata("design:type", String)
|
|
722
|
+
], mjBizAppsOrdersCheckoutWidgetDistribution_.prototype, "EmbedSnippet", void 0);
|
|
723
|
+
__decorate([
|
|
724
|
+
Field(),
|
|
725
|
+
__metadata("design:type", Date)
|
|
726
|
+
], mjBizAppsOrdersCheckoutWidgetDistribution_.prototype, "_mj__CreatedAt", void 0);
|
|
727
|
+
__decorate([
|
|
728
|
+
Field(),
|
|
729
|
+
__metadata("design:type", Date)
|
|
730
|
+
], mjBizAppsOrdersCheckoutWidgetDistribution_.prototype, "_mj__UpdatedAt", void 0);
|
|
731
|
+
__decorate([
|
|
732
|
+
Field(),
|
|
733
|
+
MaxLength(100),
|
|
734
|
+
__metadata("design:type", String)
|
|
735
|
+
], mjBizAppsOrdersCheckoutWidgetDistribution_.prototype, "CheckoutWidget", void 0);
|
|
736
|
+
mjBizAppsOrdersCheckoutWidgetDistribution_ = __decorate([
|
|
737
|
+
ObjectType({ description: `Public distribution endpoint for a CheckoutWidget, wrapping an anonymous scoped magic link invite and vanity slug with instant revocation capability.` })
|
|
738
|
+
], mjBizAppsOrdersCheckoutWidgetDistribution_);
|
|
739
|
+
export { mjBizAppsOrdersCheckoutWidgetDistribution_ };
|
|
740
|
+
//****************************************************************************
|
|
741
|
+
// INPUT TYPE for MJ_BizApps_Orders: Checkout Widget Distributions
|
|
742
|
+
//****************************************************************************
|
|
743
|
+
let CreatemjBizAppsOrdersCheckoutWidgetDistributionInput = class CreatemjBizAppsOrdersCheckoutWidgetDistributionInput {
|
|
744
|
+
};
|
|
745
|
+
__decorate([
|
|
746
|
+
Field({ nullable: true }),
|
|
747
|
+
__metadata("design:type", String)
|
|
748
|
+
], CreatemjBizAppsOrdersCheckoutWidgetDistributionInput.prototype, "ID", void 0);
|
|
749
|
+
__decorate([
|
|
750
|
+
Field({ nullable: true }),
|
|
751
|
+
__metadata("design:type", String)
|
|
752
|
+
], CreatemjBizAppsOrdersCheckoutWidgetDistributionInput.prototype, "CheckoutWidgetID", void 0);
|
|
753
|
+
__decorate([
|
|
754
|
+
Field({ nullable: true }),
|
|
755
|
+
__metadata("design:type", String)
|
|
756
|
+
], CreatemjBizAppsOrdersCheckoutWidgetDistributionInput.prototype, "Slug", void 0);
|
|
757
|
+
__decorate([
|
|
758
|
+
Field({ nullable: true }),
|
|
759
|
+
__metadata("design:type", String)
|
|
760
|
+
], CreatemjBizAppsOrdersCheckoutWidgetDistributionInput.prototype, "MagicLinkInviteID", void 0);
|
|
761
|
+
__decorate([
|
|
762
|
+
Field({ nullable: true }),
|
|
763
|
+
__metadata("design:type", String)
|
|
764
|
+
], CreatemjBizAppsOrdersCheckoutWidgetDistributionInput.prototype, "Status", void 0);
|
|
765
|
+
__decorate([
|
|
766
|
+
Field({ nullable: true }),
|
|
767
|
+
__metadata("design:type", Date)
|
|
768
|
+
], CreatemjBizAppsOrdersCheckoutWidgetDistributionInput.prototype, "RevokedAt", void 0);
|
|
769
|
+
__decorate([
|
|
770
|
+
Field({ nullable: true }),
|
|
771
|
+
__metadata("design:type", String)
|
|
772
|
+
], CreatemjBizAppsOrdersCheckoutWidgetDistributionInput.prototype, "RevocationReason", void 0);
|
|
773
|
+
__decorate([
|
|
774
|
+
Field({ nullable: true }),
|
|
775
|
+
__metadata("design:type", String)
|
|
776
|
+
], CreatemjBizAppsOrdersCheckoutWidgetDistributionInput.prototype, "EmbedSnippet", void 0);
|
|
777
|
+
__decorate([
|
|
778
|
+
Field(() => RestoreContextInput, { nullable: true }),
|
|
779
|
+
__metadata("design:type", RestoreContextInput)
|
|
780
|
+
], CreatemjBizAppsOrdersCheckoutWidgetDistributionInput.prototype, "RestoreContext___", void 0);
|
|
781
|
+
CreatemjBizAppsOrdersCheckoutWidgetDistributionInput = __decorate([
|
|
782
|
+
InputType()
|
|
783
|
+
], CreatemjBizAppsOrdersCheckoutWidgetDistributionInput);
|
|
784
|
+
export { CreatemjBizAppsOrdersCheckoutWidgetDistributionInput };
|
|
785
|
+
//****************************************************************************
|
|
786
|
+
// INPUT TYPE for MJ_BizApps_Orders: Checkout Widget Distributions
|
|
787
|
+
//****************************************************************************
|
|
788
|
+
let UpdatemjBizAppsOrdersCheckoutWidgetDistributionInput = class UpdatemjBizAppsOrdersCheckoutWidgetDistributionInput {
|
|
789
|
+
};
|
|
790
|
+
__decorate([
|
|
791
|
+
Field(),
|
|
792
|
+
__metadata("design:type", String)
|
|
793
|
+
], UpdatemjBizAppsOrdersCheckoutWidgetDistributionInput.prototype, "ID", void 0);
|
|
794
|
+
__decorate([
|
|
795
|
+
Field({ nullable: true }),
|
|
796
|
+
__metadata("design:type", String)
|
|
797
|
+
], UpdatemjBizAppsOrdersCheckoutWidgetDistributionInput.prototype, "CheckoutWidgetID", void 0);
|
|
798
|
+
__decorate([
|
|
799
|
+
Field({ nullable: true }),
|
|
800
|
+
__metadata("design:type", String)
|
|
801
|
+
], UpdatemjBizAppsOrdersCheckoutWidgetDistributionInput.prototype, "Slug", void 0);
|
|
802
|
+
__decorate([
|
|
803
|
+
Field({ nullable: true }),
|
|
804
|
+
__metadata("design:type", String)
|
|
805
|
+
], UpdatemjBizAppsOrdersCheckoutWidgetDistributionInput.prototype, "MagicLinkInviteID", void 0);
|
|
806
|
+
__decorate([
|
|
807
|
+
Field({ nullable: true }),
|
|
808
|
+
__metadata("design:type", String)
|
|
809
|
+
], UpdatemjBizAppsOrdersCheckoutWidgetDistributionInput.prototype, "Status", void 0);
|
|
810
|
+
__decorate([
|
|
811
|
+
Field({ nullable: true }),
|
|
812
|
+
__metadata("design:type", Date)
|
|
813
|
+
], UpdatemjBizAppsOrdersCheckoutWidgetDistributionInput.prototype, "RevokedAt", void 0);
|
|
814
|
+
__decorate([
|
|
815
|
+
Field({ nullable: true }),
|
|
816
|
+
__metadata("design:type", String)
|
|
817
|
+
], UpdatemjBizAppsOrdersCheckoutWidgetDistributionInput.prototype, "RevocationReason", void 0);
|
|
818
|
+
__decorate([
|
|
819
|
+
Field({ nullable: true }),
|
|
820
|
+
__metadata("design:type", String)
|
|
821
|
+
], UpdatemjBizAppsOrdersCheckoutWidgetDistributionInput.prototype, "EmbedSnippet", void 0);
|
|
822
|
+
__decorate([
|
|
823
|
+
Field(() => [KeyValuePairInput], { nullable: true }),
|
|
824
|
+
__metadata("design:type", Array)
|
|
825
|
+
], UpdatemjBizAppsOrdersCheckoutWidgetDistributionInput.prototype, "OldValues___", void 0);
|
|
826
|
+
__decorate([
|
|
827
|
+
Field(() => RestoreContextInput, { nullable: true }),
|
|
828
|
+
__metadata("design:type", RestoreContextInput)
|
|
829
|
+
], UpdatemjBizAppsOrdersCheckoutWidgetDistributionInput.prototype, "RestoreContext___", void 0);
|
|
830
|
+
UpdatemjBizAppsOrdersCheckoutWidgetDistributionInput = __decorate([
|
|
831
|
+
InputType()
|
|
832
|
+
], UpdatemjBizAppsOrdersCheckoutWidgetDistributionInput);
|
|
833
|
+
export { UpdatemjBizAppsOrdersCheckoutWidgetDistributionInput };
|
|
834
|
+
//****************************************************************************
|
|
835
|
+
// RESOLVER for MJ_BizApps_Orders: Checkout Widget Distributions
|
|
836
|
+
//****************************************************************************
|
|
837
|
+
let RunmjBizAppsOrdersCheckoutWidgetDistributionViewResult = class RunmjBizAppsOrdersCheckoutWidgetDistributionViewResult {
|
|
838
|
+
};
|
|
839
|
+
__decorate([
|
|
840
|
+
Field(() => [mjBizAppsOrdersCheckoutWidgetDistribution_]),
|
|
841
|
+
__metadata("design:type", Array)
|
|
842
|
+
], RunmjBizAppsOrdersCheckoutWidgetDistributionViewResult.prototype, "Results", void 0);
|
|
843
|
+
__decorate([
|
|
844
|
+
Field(() => String, { nullable: true }),
|
|
845
|
+
__metadata("design:type", String)
|
|
846
|
+
], RunmjBizAppsOrdersCheckoutWidgetDistributionViewResult.prototype, "UserViewRunID", void 0);
|
|
847
|
+
__decorate([
|
|
848
|
+
Field(() => Int, { nullable: true }),
|
|
849
|
+
__metadata("design:type", Number)
|
|
850
|
+
], RunmjBizAppsOrdersCheckoutWidgetDistributionViewResult.prototype, "RowCount", void 0);
|
|
851
|
+
__decorate([
|
|
852
|
+
Field(() => Int, { nullable: true }),
|
|
853
|
+
__metadata("design:type", Number)
|
|
854
|
+
], RunmjBizAppsOrdersCheckoutWidgetDistributionViewResult.prototype, "TotalRowCount", void 0);
|
|
855
|
+
__decorate([
|
|
856
|
+
Field(() => Int, { nullable: true }),
|
|
857
|
+
__metadata("design:type", Number)
|
|
858
|
+
], RunmjBizAppsOrdersCheckoutWidgetDistributionViewResult.prototype, "ExecutionTime", void 0);
|
|
859
|
+
__decorate([
|
|
860
|
+
Field({ nullable: true }),
|
|
861
|
+
__metadata("design:type", String)
|
|
862
|
+
], RunmjBizAppsOrdersCheckoutWidgetDistributionViewResult.prototype, "ErrorMessage", void 0);
|
|
863
|
+
__decorate([
|
|
864
|
+
Field(() => Boolean, { nullable: false }),
|
|
865
|
+
__metadata("design:type", Boolean)
|
|
866
|
+
], RunmjBizAppsOrdersCheckoutWidgetDistributionViewResult.prototype, "Success", void 0);
|
|
867
|
+
RunmjBizAppsOrdersCheckoutWidgetDistributionViewResult = __decorate([
|
|
868
|
+
ObjectType()
|
|
869
|
+
], RunmjBizAppsOrdersCheckoutWidgetDistributionViewResult);
|
|
870
|
+
export { RunmjBizAppsOrdersCheckoutWidgetDistributionViewResult };
|
|
871
|
+
let mjBizAppsOrdersCheckoutWidgetDistributionResolver = class mjBizAppsOrdersCheckoutWidgetDistributionResolver extends ResolverBase {
|
|
872
|
+
async RunmjBizAppsOrdersCheckoutWidgetDistributionViewByID(input, { providers, userPayload }, pubSub) {
|
|
873
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
874
|
+
return super.RunViewByIDGeneric(input, provider, userPayload, pubSub);
|
|
875
|
+
}
|
|
876
|
+
async RunmjBizAppsOrdersCheckoutWidgetDistributionViewByName(input, { providers, userPayload }, pubSub) {
|
|
877
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
878
|
+
return super.RunViewByNameGeneric(input, provider, userPayload, pubSub);
|
|
879
|
+
}
|
|
880
|
+
async RunmjBizAppsOrdersCheckoutWidgetDistributionDynamicView(input, { providers, userPayload }, pubSub) {
|
|
881
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
882
|
+
input.EntityName = 'MJ_BizApps_Orders: Checkout Widget Distributions';
|
|
883
|
+
return super.RunDynamicViewGeneric(input, provider, userPayload, pubSub);
|
|
884
|
+
}
|
|
885
|
+
async mjBizAppsOrdersCheckoutWidgetDistribution(ID, { userPayload, providers }, pubSub) {
|
|
886
|
+
this.CheckUserReadPermissions('MJ_BizApps_Orders: Checkout Widget Distributions', userPayload);
|
|
887
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
888
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView('__mj_BizAppsOrders', 'vwCheckoutWidgetDistributions')} WHERE ${provider.QuoteIdentifier('ID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ_BizApps_Orders: Checkout Widget Distributions', userPayload, EntityPermissionType.Read, 'AND');
|
|
889
|
+
const rows = await provider.ExecuteSQL(sSQL, [ID], undefined, this.GetUserFromPayload(userPayload));
|
|
890
|
+
const result = await this.MapFieldNamesToCodeNames('MJ_BizApps_Orders: Checkout Widget Distributions', rows && rows.length > 0 ? rows[0] : null, this.GetUserFromPayload(userPayload));
|
|
891
|
+
return result;
|
|
892
|
+
}
|
|
893
|
+
async CreatemjBizAppsOrdersCheckoutWidgetDistribution(input, { providers, userPayload }, pubSub) {
|
|
894
|
+
const provider = GetReadWriteProvider(providers);
|
|
895
|
+
return this.CreateRecord('MJ_BizApps_Orders: Checkout Widget Distributions', input, provider, userPayload, pubSub);
|
|
896
|
+
}
|
|
897
|
+
async UpdatemjBizAppsOrdersCheckoutWidgetDistribution(input, { providers, userPayload }, pubSub) {
|
|
898
|
+
const provider = GetReadWriteProvider(providers);
|
|
899
|
+
return this.UpdateRecord('MJ_BizApps_Orders: Checkout Widget Distributions', input, provider, userPayload, pubSub);
|
|
900
|
+
}
|
|
901
|
+
async DeletemjBizAppsOrdersCheckoutWidgetDistribution(ID, options, { providers, userPayload }, pubSub) {
|
|
902
|
+
const provider = GetReadWriteProvider(providers);
|
|
903
|
+
const key = new CompositeKey([{ FieldName: 'ID', Value: ID }]);
|
|
904
|
+
return this.DeleteRecord('MJ_BizApps_Orders: Checkout Widget Distributions', key, options, provider, userPayload, pubSub);
|
|
905
|
+
}
|
|
906
|
+
};
|
|
907
|
+
__decorate([
|
|
908
|
+
Query(() => RunmjBizAppsOrdersCheckoutWidgetDistributionViewResult),
|
|
909
|
+
__param(0, Arg('input', () => RunViewByIDInput)),
|
|
910
|
+
__param(1, Ctx()),
|
|
911
|
+
__param(2, PubSub()),
|
|
912
|
+
__metadata("design:type", Function),
|
|
913
|
+
__metadata("design:paramtypes", [RunViewByIDInput, Object, PubSubEngine]),
|
|
914
|
+
__metadata("design:returntype", Promise)
|
|
915
|
+
], mjBizAppsOrdersCheckoutWidgetDistributionResolver.prototype, "RunmjBizAppsOrdersCheckoutWidgetDistributionViewByID", null);
|
|
916
|
+
__decorate([
|
|
917
|
+
Query(() => RunmjBizAppsOrdersCheckoutWidgetDistributionViewResult),
|
|
918
|
+
__param(0, Arg('input', () => RunViewByNameInput)),
|
|
919
|
+
__param(1, Ctx()),
|
|
920
|
+
__param(2, PubSub()),
|
|
921
|
+
__metadata("design:type", Function),
|
|
922
|
+
__metadata("design:paramtypes", [RunViewByNameInput, Object, PubSubEngine]),
|
|
923
|
+
__metadata("design:returntype", Promise)
|
|
924
|
+
], mjBizAppsOrdersCheckoutWidgetDistributionResolver.prototype, "RunmjBizAppsOrdersCheckoutWidgetDistributionViewByName", null);
|
|
925
|
+
__decorate([
|
|
926
|
+
Query(() => RunmjBizAppsOrdersCheckoutWidgetDistributionViewResult),
|
|
927
|
+
__param(0, Arg('input', () => RunDynamicViewInput)),
|
|
928
|
+
__param(1, Ctx()),
|
|
929
|
+
__param(2, PubSub()),
|
|
930
|
+
__metadata("design:type", Function),
|
|
931
|
+
__metadata("design:paramtypes", [RunDynamicViewInput, Object, PubSubEngine]),
|
|
932
|
+
__metadata("design:returntype", Promise)
|
|
933
|
+
], mjBizAppsOrdersCheckoutWidgetDistributionResolver.prototype, "RunmjBizAppsOrdersCheckoutWidgetDistributionDynamicView", null);
|
|
934
|
+
__decorate([
|
|
935
|
+
Query(() => mjBizAppsOrdersCheckoutWidgetDistribution_, { nullable: true }),
|
|
936
|
+
__param(0, Arg('ID', () => String)),
|
|
937
|
+
__param(1, Ctx()),
|
|
938
|
+
__param(2, PubSub()),
|
|
939
|
+
__metadata("design:type", Function),
|
|
940
|
+
__metadata("design:paramtypes", [String, Object, PubSubEngine]),
|
|
941
|
+
__metadata("design:returntype", Promise)
|
|
942
|
+
], mjBizAppsOrdersCheckoutWidgetDistributionResolver.prototype, "mjBizAppsOrdersCheckoutWidgetDistribution", null);
|
|
943
|
+
__decorate([
|
|
944
|
+
Mutation(() => mjBizAppsOrdersCheckoutWidgetDistribution_),
|
|
945
|
+
__param(0, Arg('input', () => CreatemjBizAppsOrdersCheckoutWidgetDistributionInput)),
|
|
946
|
+
__param(1, Ctx()),
|
|
947
|
+
__param(2, PubSub()),
|
|
948
|
+
__metadata("design:type", Function),
|
|
949
|
+
__metadata("design:paramtypes", [CreatemjBizAppsOrdersCheckoutWidgetDistributionInput, Object, PubSubEngine]),
|
|
950
|
+
__metadata("design:returntype", Promise)
|
|
951
|
+
], mjBizAppsOrdersCheckoutWidgetDistributionResolver.prototype, "CreatemjBizAppsOrdersCheckoutWidgetDistribution", null);
|
|
952
|
+
__decorate([
|
|
953
|
+
Mutation(() => mjBizAppsOrdersCheckoutWidgetDistribution_),
|
|
954
|
+
__param(0, Arg('input', () => UpdatemjBizAppsOrdersCheckoutWidgetDistributionInput)),
|
|
955
|
+
__param(1, Ctx()),
|
|
956
|
+
__param(2, PubSub()),
|
|
957
|
+
__metadata("design:type", Function),
|
|
958
|
+
__metadata("design:paramtypes", [UpdatemjBizAppsOrdersCheckoutWidgetDistributionInput, Object, PubSubEngine]),
|
|
959
|
+
__metadata("design:returntype", Promise)
|
|
960
|
+
], mjBizAppsOrdersCheckoutWidgetDistributionResolver.prototype, "UpdatemjBizAppsOrdersCheckoutWidgetDistribution", null);
|
|
961
|
+
__decorate([
|
|
962
|
+
Mutation(() => mjBizAppsOrdersCheckoutWidgetDistribution_),
|
|
963
|
+
__param(0, Arg('ID', () => String)),
|
|
964
|
+
__param(1, Arg('options___', () => DeleteOptionsInput)),
|
|
965
|
+
__param(2, Ctx()),
|
|
966
|
+
__param(3, PubSub()),
|
|
967
|
+
__metadata("design:type", Function),
|
|
968
|
+
__metadata("design:paramtypes", [String, DeleteOptionsInput, Object, PubSubEngine]),
|
|
969
|
+
__metadata("design:returntype", Promise)
|
|
970
|
+
], mjBizAppsOrdersCheckoutWidgetDistributionResolver.prototype, "DeletemjBizAppsOrdersCheckoutWidgetDistribution", null);
|
|
971
|
+
mjBizAppsOrdersCheckoutWidgetDistributionResolver = __decorate([
|
|
972
|
+
Resolver(mjBizAppsOrdersCheckoutWidgetDistribution_)
|
|
973
|
+
], mjBizAppsOrdersCheckoutWidgetDistributionResolver);
|
|
974
|
+
export { mjBizAppsOrdersCheckoutWidgetDistributionResolver };
|
|
975
|
+
//****************************************************************************
|
|
976
|
+
// ENTITY CLASS for MJ_BizApps_Orders: Checkout Widgets
|
|
977
|
+
//****************************************************************************
|
|
978
|
+
let mjBizAppsOrdersCheckoutWidget_ = class mjBizAppsOrdersCheckoutWidget_ {
|
|
979
|
+
};
|
|
980
|
+
__decorate([
|
|
981
|
+
Field(),
|
|
982
|
+
MaxLength(36),
|
|
983
|
+
__metadata("design:type", String)
|
|
984
|
+
], mjBizAppsOrdersCheckoutWidget_.prototype, "ID", void 0);
|
|
985
|
+
__decorate([
|
|
986
|
+
Field(),
|
|
987
|
+
MaxLength(100),
|
|
988
|
+
__metadata("design:type", String)
|
|
989
|
+
], mjBizAppsOrdersCheckoutWidget_.prototype, "Name", void 0);
|
|
990
|
+
__decorate([
|
|
991
|
+
Field({ nullable: true }),
|
|
992
|
+
__metadata("design:type", String)
|
|
993
|
+
], mjBizAppsOrdersCheckoutWidget_.prototype, "Description", void 0);
|
|
994
|
+
__decorate([
|
|
995
|
+
Field(),
|
|
996
|
+
MaxLength(36),
|
|
997
|
+
__metadata("design:type", String)
|
|
998
|
+
], mjBizAppsOrdersCheckoutWidget_.prototype, "CompanyID", void 0);
|
|
999
|
+
__decorate([
|
|
1000
|
+
Field(),
|
|
1001
|
+
MaxLength(20),
|
|
1002
|
+
__metadata("design:type", String)
|
|
1003
|
+
], mjBizAppsOrdersCheckoutWidget_.prototype, "Status", void 0);
|
|
1004
|
+
__decorate([
|
|
1005
|
+
Field({ nullable: true }),
|
|
1006
|
+
__metadata("design:type", String)
|
|
1007
|
+
], mjBizAppsOrdersCheckoutWidget_.prototype, "Configuration", void 0);
|
|
1008
|
+
__decorate([
|
|
1009
|
+
Field({ nullable: true }),
|
|
1010
|
+
__metadata("design:type", String)
|
|
1011
|
+
], mjBizAppsOrdersCheckoutWidget_.prototype, "CustomCSS", void 0);
|
|
1012
|
+
__decorate([
|
|
1013
|
+
Field({ nullable: true }),
|
|
1014
|
+
__metadata("design:type", String)
|
|
1015
|
+
], mjBizAppsOrdersCheckoutWidget_.prototype, "CustomJS", void 0);
|
|
1016
|
+
__decorate([
|
|
1017
|
+
Field(),
|
|
1018
|
+
__metadata("design:type", Date)
|
|
1019
|
+
], mjBizAppsOrdersCheckoutWidget_.prototype, "_mj__CreatedAt", void 0);
|
|
1020
|
+
__decorate([
|
|
1021
|
+
Field(),
|
|
1022
|
+
__metadata("design:type", Date)
|
|
1023
|
+
], mjBizAppsOrdersCheckoutWidget_.prototype, "_mj__UpdatedAt", void 0);
|
|
1024
|
+
__decorate([
|
|
1025
|
+
Field(),
|
|
1026
|
+
MaxLength(50),
|
|
1027
|
+
__metadata("design:type", String)
|
|
1028
|
+
], mjBizAppsOrdersCheckoutWidget_.prototype, "Company", void 0);
|
|
1029
|
+
mjBizAppsOrdersCheckoutWidget_ = __decorate([
|
|
1030
|
+
ObjectType({ description: `Metadata configuration for an embeddable checkout widget instance. Specifies selling company, product lines, layout rules, theme variables, and security policies.` })
|
|
1031
|
+
], mjBizAppsOrdersCheckoutWidget_);
|
|
1032
|
+
export { mjBizAppsOrdersCheckoutWidget_ };
|
|
1033
|
+
//****************************************************************************
|
|
1034
|
+
// INPUT TYPE for MJ_BizApps_Orders: Checkout Widgets
|
|
1035
|
+
//****************************************************************************
|
|
1036
|
+
let CreatemjBizAppsOrdersCheckoutWidgetInput = class CreatemjBizAppsOrdersCheckoutWidgetInput {
|
|
1037
|
+
};
|
|
1038
|
+
__decorate([
|
|
1039
|
+
Field({ nullable: true }),
|
|
1040
|
+
__metadata("design:type", String)
|
|
1041
|
+
], CreatemjBizAppsOrdersCheckoutWidgetInput.prototype, "ID", void 0);
|
|
1042
|
+
__decorate([
|
|
1043
|
+
Field({ nullable: true }),
|
|
1044
|
+
__metadata("design:type", String)
|
|
1045
|
+
], CreatemjBizAppsOrdersCheckoutWidgetInput.prototype, "Name", void 0);
|
|
1046
|
+
__decorate([
|
|
1047
|
+
Field({ nullable: true }),
|
|
1048
|
+
__metadata("design:type", String)
|
|
1049
|
+
], CreatemjBizAppsOrdersCheckoutWidgetInput.prototype, "Description", void 0);
|
|
1050
|
+
__decorate([
|
|
1051
|
+
Field({ nullable: true }),
|
|
1052
|
+
__metadata("design:type", String)
|
|
1053
|
+
], CreatemjBizAppsOrdersCheckoutWidgetInput.prototype, "CompanyID", void 0);
|
|
100
1054
|
__decorate([
|
|
101
1055
|
Field({ nullable: true }),
|
|
102
1056
|
__metadata("design:type", String)
|
|
103
|
-
],
|
|
1057
|
+
], CreatemjBizAppsOrdersCheckoutWidgetInput.prototype, "Status", void 0);
|
|
104
1058
|
__decorate([
|
|
105
1059
|
Field({ nullable: true }),
|
|
106
1060
|
__metadata("design:type", String)
|
|
107
|
-
],
|
|
1061
|
+
], CreatemjBizAppsOrdersCheckoutWidgetInput.prototype, "Configuration", void 0);
|
|
108
1062
|
__decorate([
|
|
109
1063
|
Field({ nullable: true }),
|
|
110
1064
|
__metadata("design:type", String)
|
|
111
|
-
],
|
|
1065
|
+
], CreatemjBizAppsOrdersCheckoutWidgetInput.prototype, "CustomCSS", void 0);
|
|
112
1066
|
__decorate([
|
|
113
1067
|
Field({ nullable: true }),
|
|
114
1068
|
__metadata("design:type", String)
|
|
115
|
-
],
|
|
116
|
-
__decorate([
|
|
117
|
-
Field(() => Int, { nullable: true }),
|
|
118
|
-
__metadata("design:type", Number)
|
|
119
|
-
], CreatemjBizAppsOrdersChargeTypeInput.prototype, "Sequence", void 0);
|
|
120
|
-
__decorate([
|
|
121
|
-
Field(() => Boolean, { nullable: true }),
|
|
122
|
-
__metadata("design:type", Boolean)
|
|
123
|
-
], CreatemjBizAppsOrdersChargeTypeInput.prototype, "AllowsOverride", void 0);
|
|
124
|
-
__decorate([
|
|
125
|
-
Field(() => Boolean, { nullable: true }),
|
|
126
|
-
__metadata("design:type", Boolean)
|
|
127
|
-
], CreatemjBizAppsOrdersChargeTypeInput.prototype, "IsActive", void 0);
|
|
1069
|
+
], CreatemjBizAppsOrdersCheckoutWidgetInput.prototype, "CustomJS", void 0);
|
|
128
1070
|
__decorate([
|
|
129
1071
|
Field(() => RestoreContextInput, { nullable: true }),
|
|
130
1072
|
__metadata("design:type", RestoreContextInput)
|
|
131
|
-
],
|
|
132
|
-
|
|
1073
|
+
], CreatemjBizAppsOrdersCheckoutWidgetInput.prototype, "RestoreContext___", void 0);
|
|
1074
|
+
CreatemjBizAppsOrdersCheckoutWidgetInput = __decorate([
|
|
133
1075
|
InputType()
|
|
134
|
-
],
|
|
135
|
-
export {
|
|
1076
|
+
], CreatemjBizAppsOrdersCheckoutWidgetInput);
|
|
1077
|
+
export { CreatemjBizAppsOrdersCheckoutWidgetInput };
|
|
136
1078
|
//****************************************************************************
|
|
137
|
-
// INPUT TYPE for MJ_BizApps_Orders:
|
|
1079
|
+
// INPUT TYPE for MJ_BizApps_Orders: Checkout Widgets
|
|
138
1080
|
//****************************************************************************
|
|
139
|
-
let
|
|
1081
|
+
let UpdatemjBizAppsOrdersCheckoutWidgetInput = class UpdatemjBizAppsOrdersCheckoutWidgetInput {
|
|
140
1082
|
};
|
|
141
1083
|
__decorate([
|
|
142
1084
|
Field(),
|
|
143
1085
|
__metadata("design:type", String)
|
|
144
|
-
],
|
|
1086
|
+
], UpdatemjBizAppsOrdersCheckoutWidgetInput.prototype, "ID", void 0);
|
|
145
1087
|
__decorate([
|
|
146
1088
|
Field({ nullable: true }),
|
|
147
1089
|
__metadata("design:type", String)
|
|
148
|
-
],
|
|
1090
|
+
], UpdatemjBizAppsOrdersCheckoutWidgetInput.prototype, "Name", void 0);
|
|
149
1091
|
__decorate([
|
|
150
1092
|
Field({ nullable: true }),
|
|
151
1093
|
__metadata("design:type", String)
|
|
152
|
-
],
|
|
1094
|
+
], UpdatemjBizAppsOrdersCheckoutWidgetInput.prototype, "Description", void 0);
|
|
153
1095
|
__decorate([
|
|
154
1096
|
Field({ nullable: true }),
|
|
155
1097
|
__metadata("design:type", String)
|
|
156
|
-
],
|
|
1098
|
+
], UpdatemjBizAppsOrdersCheckoutWidgetInput.prototype, "CompanyID", void 0);
|
|
157
1099
|
__decorate([
|
|
158
1100
|
Field({ nullable: true }),
|
|
159
1101
|
__metadata("design:type", String)
|
|
160
|
-
],
|
|
1102
|
+
], UpdatemjBizAppsOrdersCheckoutWidgetInput.prototype, "Status", void 0);
|
|
161
1103
|
__decorate([
|
|
162
1104
|
Field({ nullable: true }),
|
|
163
1105
|
__metadata("design:type", String)
|
|
164
|
-
],
|
|
165
|
-
__decorate([
|
|
166
|
-
Field(() => Int, { nullable: true }),
|
|
167
|
-
__metadata("design:type", Number)
|
|
168
|
-
], UpdatemjBizAppsOrdersChargeTypeInput.prototype, "Sequence", void 0);
|
|
1106
|
+
], UpdatemjBizAppsOrdersCheckoutWidgetInput.prototype, "Configuration", void 0);
|
|
169
1107
|
__decorate([
|
|
170
|
-
Field(
|
|
171
|
-
__metadata("design:type",
|
|
172
|
-
],
|
|
1108
|
+
Field({ nullable: true }),
|
|
1109
|
+
__metadata("design:type", String)
|
|
1110
|
+
], UpdatemjBizAppsOrdersCheckoutWidgetInput.prototype, "CustomCSS", void 0);
|
|
173
1111
|
__decorate([
|
|
174
|
-
Field(
|
|
175
|
-
__metadata("design:type",
|
|
176
|
-
],
|
|
1112
|
+
Field({ nullable: true }),
|
|
1113
|
+
__metadata("design:type", String)
|
|
1114
|
+
], UpdatemjBizAppsOrdersCheckoutWidgetInput.prototype, "CustomJS", void 0);
|
|
177
1115
|
__decorate([
|
|
178
1116
|
Field(() => [KeyValuePairInput], { nullable: true }),
|
|
179
1117
|
__metadata("design:type", Array)
|
|
180
|
-
],
|
|
1118
|
+
], UpdatemjBizAppsOrdersCheckoutWidgetInput.prototype, "OldValues___", void 0);
|
|
181
1119
|
__decorate([
|
|
182
1120
|
Field(() => RestoreContextInput, { nullable: true }),
|
|
183
1121
|
__metadata("design:type", RestoreContextInput)
|
|
184
|
-
],
|
|
185
|
-
|
|
1122
|
+
], UpdatemjBizAppsOrdersCheckoutWidgetInput.prototype, "RestoreContext___", void 0);
|
|
1123
|
+
UpdatemjBizAppsOrdersCheckoutWidgetInput = __decorate([
|
|
186
1124
|
InputType()
|
|
187
|
-
],
|
|
188
|
-
export {
|
|
1125
|
+
], UpdatemjBizAppsOrdersCheckoutWidgetInput);
|
|
1126
|
+
export { UpdatemjBizAppsOrdersCheckoutWidgetInput };
|
|
189
1127
|
//****************************************************************************
|
|
190
|
-
// RESOLVER for MJ_BizApps_Orders:
|
|
1128
|
+
// RESOLVER for MJ_BizApps_Orders: Checkout Widgets
|
|
191
1129
|
//****************************************************************************
|
|
192
|
-
let
|
|
1130
|
+
let RunmjBizAppsOrdersCheckoutWidgetViewResult = class RunmjBizAppsOrdersCheckoutWidgetViewResult {
|
|
193
1131
|
};
|
|
194
1132
|
__decorate([
|
|
195
|
-
Field(() => [
|
|
1133
|
+
Field(() => [mjBizAppsOrdersCheckoutWidget_]),
|
|
196
1134
|
__metadata("design:type", Array)
|
|
197
|
-
],
|
|
1135
|
+
], RunmjBizAppsOrdersCheckoutWidgetViewResult.prototype, "Results", void 0);
|
|
198
1136
|
__decorate([
|
|
199
1137
|
Field(() => String, { nullable: true }),
|
|
200
1138
|
__metadata("design:type", String)
|
|
201
|
-
],
|
|
1139
|
+
], RunmjBizAppsOrdersCheckoutWidgetViewResult.prototype, "UserViewRunID", void 0);
|
|
202
1140
|
__decorate([
|
|
203
1141
|
Field(() => Int, { nullable: true }),
|
|
204
1142
|
__metadata("design:type", Number)
|
|
205
|
-
],
|
|
1143
|
+
], RunmjBizAppsOrdersCheckoutWidgetViewResult.prototype, "RowCount", void 0);
|
|
206
1144
|
__decorate([
|
|
207
1145
|
Field(() => Int, { nullable: true }),
|
|
208
1146
|
__metadata("design:type", Number)
|
|
209
|
-
],
|
|
1147
|
+
], RunmjBizAppsOrdersCheckoutWidgetViewResult.prototype, "TotalRowCount", void 0);
|
|
210
1148
|
__decorate([
|
|
211
1149
|
Field(() => Int, { nullable: true }),
|
|
212
1150
|
__metadata("design:type", Number)
|
|
213
|
-
],
|
|
1151
|
+
], RunmjBizAppsOrdersCheckoutWidgetViewResult.prototype, "ExecutionTime", void 0);
|
|
214
1152
|
__decorate([
|
|
215
1153
|
Field({ nullable: true }),
|
|
216
1154
|
__metadata("design:type", String)
|
|
217
|
-
],
|
|
1155
|
+
], RunmjBizAppsOrdersCheckoutWidgetViewResult.prototype, "ErrorMessage", void 0);
|
|
218
1156
|
__decorate([
|
|
219
1157
|
Field(() => Boolean, { nullable: false }),
|
|
220
1158
|
__metadata("design:type", Boolean)
|
|
221
|
-
],
|
|
222
|
-
|
|
1159
|
+
], RunmjBizAppsOrdersCheckoutWidgetViewResult.prototype, "Success", void 0);
|
|
1160
|
+
RunmjBizAppsOrdersCheckoutWidgetViewResult = __decorate([
|
|
223
1161
|
ObjectType()
|
|
224
|
-
],
|
|
225
|
-
export {
|
|
226
|
-
let
|
|
227
|
-
async
|
|
1162
|
+
], RunmjBizAppsOrdersCheckoutWidgetViewResult);
|
|
1163
|
+
export { RunmjBizAppsOrdersCheckoutWidgetViewResult };
|
|
1164
|
+
let mjBizAppsOrdersCheckoutWidgetResolver = class mjBizAppsOrdersCheckoutWidgetResolver extends ResolverBase {
|
|
1165
|
+
async RunmjBizAppsOrdersCheckoutWidgetViewByID(input, { providers, userPayload }, pubSub) {
|
|
228
1166
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
229
1167
|
return super.RunViewByIDGeneric(input, provider, userPayload, pubSub);
|
|
230
1168
|
}
|
|
231
|
-
async
|
|
1169
|
+
async RunmjBizAppsOrdersCheckoutWidgetViewByName(input, { providers, userPayload }, pubSub) {
|
|
232
1170
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
233
1171
|
return super.RunViewByNameGeneric(input, provider, userPayload, pubSub);
|
|
234
1172
|
}
|
|
235
|
-
async
|
|
1173
|
+
async RunmjBizAppsOrdersCheckoutWidgetDynamicView(input, { providers, userPayload }, pubSub) {
|
|
236
1174
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
237
|
-
input.EntityName = 'MJ_BizApps_Orders:
|
|
1175
|
+
input.EntityName = 'MJ_BizApps_Orders: Checkout Widgets';
|
|
238
1176
|
return super.RunDynamicViewGeneric(input, provider, userPayload, pubSub);
|
|
239
1177
|
}
|
|
240
|
-
async
|
|
241
|
-
this.CheckUserReadPermissions('MJ_BizApps_Orders:
|
|
1178
|
+
async mjBizAppsOrdersCheckoutWidget(ID, { userPayload, providers }, pubSub) {
|
|
1179
|
+
this.CheckUserReadPermissions('MJ_BizApps_Orders: Checkout Widgets', userPayload);
|
|
242
1180
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
243
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView('__mj_BizAppsOrders', '
|
|
1181
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView('__mj_BizAppsOrders', 'vwCheckoutWidgets')} WHERE ${provider.QuoteIdentifier('ID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ_BizApps_Orders: Checkout Widgets', userPayload, EntityPermissionType.Read, 'AND');
|
|
244
1182
|
const rows = await provider.ExecuteSQL(sSQL, [ID], undefined, this.GetUserFromPayload(userPayload));
|
|
245
|
-
const result = await this.MapFieldNamesToCodeNames('MJ_BizApps_Orders:
|
|
246
|
-
return result;
|
|
247
|
-
}
|
|
248
|
-
async mjBizAppsOrdersOrderCharges_ChargeTypeIDArray(mjbizappsorderschargetype_, { userPayload, providers }, pubSub) {
|
|
249
|
-
this.CheckUserReadPermissions('MJ_BizApps_Orders: Order Charges', userPayload);
|
|
250
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
251
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView('__mj_BizAppsOrders', 'vwOrderCharges')} WHERE ${provider.QuoteIdentifier('ChargeTypeID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ_BizApps_Orders: Order Charges', userPayload, EntityPermissionType.Read, 'AND');
|
|
252
|
-
const rows = await provider.ExecuteSQL(sSQL, [mjbizappsorderschargetype_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
253
|
-
const result = await this.ArrayMapFieldNamesToCodeNames('MJ_BizApps_Orders: Order Charges', rows, this.GetUserFromPayload(userPayload));
|
|
1183
|
+
const result = await this.MapFieldNamesToCodeNames('MJ_BizApps_Orders: Checkout Widgets', rows && rows.length > 0 ? rows[0] : null, this.GetUserFromPayload(userPayload));
|
|
254
1184
|
return result;
|
|
255
1185
|
}
|
|
256
|
-
async
|
|
1186
|
+
async CreatemjBizAppsOrdersCheckoutWidget(input, { providers, userPayload }, pubSub) {
|
|
257
1187
|
const provider = GetReadWriteProvider(providers);
|
|
258
|
-
return this.CreateRecord('MJ_BizApps_Orders:
|
|
1188
|
+
return this.CreateRecord('MJ_BizApps_Orders: Checkout Widgets', input, provider, userPayload, pubSub);
|
|
259
1189
|
}
|
|
260
|
-
async
|
|
1190
|
+
async UpdatemjBizAppsOrdersCheckoutWidget(input, { providers, userPayload }, pubSub) {
|
|
261
1191
|
const provider = GetReadWriteProvider(providers);
|
|
262
|
-
return this.UpdateRecord('MJ_BizApps_Orders:
|
|
1192
|
+
return this.UpdateRecord('MJ_BizApps_Orders: Checkout Widgets', input, provider, userPayload, pubSub);
|
|
263
1193
|
}
|
|
264
|
-
async
|
|
1194
|
+
async DeletemjBizAppsOrdersCheckoutWidget(ID, options, { providers, userPayload }, pubSub) {
|
|
265
1195
|
const provider = GetReadWriteProvider(providers);
|
|
266
1196
|
const key = new CompositeKey([{ FieldName: 'ID', Value: ID }]);
|
|
267
|
-
return this.DeleteRecord('MJ_BizApps_Orders:
|
|
1197
|
+
return this.DeleteRecord('MJ_BizApps_Orders: Checkout Widgets', key, options, provider, userPayload, pubSub);
|
|
268
1198
|
}
|
|
269
1199
|
};
|
|
270
1200
|
__decorate([
|
|
271
|
-
Query(() =>
|
|
1201
|
+
Query(() => RunmjBizAppsOrdersCheckoutWidgetViewResult),
|
|
272
1202
|
__param(0, Arg('input', () => RunViewByIDInput)),
|
|
273
1203
|
__param(1, Ctx()),
|
|
274
1204
|
__param(2, PubSub()),
|
|
275
1205
|
__metadata("design:type", Function),
|
|
276
1206
|
__metadata("design:paramtypes", [RunViewByIDInput, Object, PubSubEngine]),
|
|
277
1207
|
__metadata("design:returntype", Promise)
|
|
278
|
-
],
|
|
1208
|
+
], mjBizAppsOrdersCheckoutWidgetResolver.prototype, "RunmjBizAppsOrdersCheckoutWidgetViewByID", null);
|
|
279
1209
|
__decorate([
|
|
280
|
-
Query(() =>
|
|
1210
|
+
Query(() => RunmjBizAppsOrdersCheckoutWidgetViewResult),
|
|
281
1211
|
__param(0, Arg('input', () => RunViewByNameInput)),
|
|
282
1212
|
__param(1, Ctx()),
|
|
283
1213
|
__param(2, PubSub()),
|
|
284
1214
|
__metadata("design:type", Function),
|
|
285
1215
|
__metadata("design:paramtypes", [RunViewByNameInput, Object, PubSubEngine]),
|
|
286
1216
|
__metadata("design:returntype", Promise)
|
|
287
|
-
],
|
|
1217
|
+
], mjBizAppsOrdersCheckoutWidgetResolver.prototype, "RunmjBizAppsOrdersCheckoutWidgetViewByName", null);
|
|
288
1218
|
__decorate([
|
|
289
|
-
Query(() =>
|
|
1219
|
+
Query(() => RunmjBizAppsOrdersCheckoutWidgetViewResult),
|
|
290
1220
|
__param(0, Arg('input', () => RunDynamicViewInput)),
|
|
291
1221
|
__param(1, Ctx()),
|
|
292
1222
|
__param(2, PubSub()),
|
|
293
1223
|
__metadata("design:type", Function),
|
|
294
1224
|
__metadata("design:paramtypes", [RunDynamicViewInput, Object, PubSubEngine]),
|
|
295
1225
|
__metadata("design:returntype", Promise)
|
|
296
|
-
],
|
|
1226
|
+
], mjBizAppsOrdersCheckoutWidgetResolver.prototype, "RunmjBizAppsOrdersCheckoutWidgetDynamicView", null);
|
|
297
1227
|
__decorate([
|
|
298
|
-
Query(() =>
|
|
1228
|
+
Query(() => mjBizAppsOrdersCheckoutWidget_, { nullable: true }),
|
|
299
1229
|
__param(0, Arg('ID', () => String)),
|
|
300
1230
|
__param(1, Ctx()),
|
|
301
1231
|
__param(2, PubSub()),
|
|
302
1232
|
__metadata("design:type", Function),
|
|
303
1233
|
__metadata("design:paramtypes", [String, Object, PubSubEngine]),
|
|
304
1234
|
__metadata("design:returntype", Promise)
|
|
305
|
-
],
|
|
306
|
-
__decorate([
|
|
307
|
-
FieldResolver(() => [mjBizAppsOrdersOrderCharge_]),
|
|
308
|
-
__param(0, Root()),
|
|
309
|
-
__param(1, Ctx()),
|
|
310
|
-
__param(2, PubSub()),
|
|
311
|
-
__metadata("design:type", Function),
|
|
312
|
-
__metadata("design:paramtypes", [mjBizAppsOrdersChargeType_, Object, PubSubEngine]),
|
|
313
|
-
__metadata("design:returntype", Promise)
|
|
314
|
-
], mjBizAppsOrdersChargeTypeResolver.prototype, "mjBizAppsOrdersOrderCharges_ChargeTypeIDArray", null);
|
|
1235
|
+
], mjBizAppsOrdersCheckoutWidgetResolver.prototype, "mjBizAppsOrdersCheckoutWidget", null);
|
|
315
1236
|
__decorate([
|
|
316
|
-
Mutation(() =>
|
|
317
|
-
__param(0, Arg('input', () =>
|
|
1237
|
+
Mutation(() => mjBizAppsOrdersCheckoutWidget_),
|
|
1238
|
+
__param(0, Arg('input', () => CreatemjBizAppsOrdersCheckoutWidgetInput)),
|
|
318
1239
|
__param(1, Ctx()),
|
|
319
1240
|
__param(2, PubSub()),
|
|
320
1241
|
__metadata("design:type", Function),
|
|
321
|
-
__metadata("design:paramtypes", [
|
|
1242
|
+
__metadata("design:paramtypes", [CreatemjBizAppsOrdersCheckoutWidgetInput, Object, PubSubEngine]),
|
|
322
1243
|
__metadata("design:returntype", Promise)
|
|
323
|
-
],
|
|
1244
|
+
], mjBizAppsOrdersCheckoutWidgetResolver.prototype, "CreatemjBizAppsOrdersCheckoutWidget", null);
|
|
324
1245
|
__decorate([
|
|
325
|
-
Mutation(() =>
|
|
326
|
-
__param(0, Arg('input', () =>
|
|
1246
|
+
Mutation(() => mjBizAppsOrdersCheckoutWidget_),
|
|
1247
|
+
__param(0, Arg('input', () => UpdatemjBizAppsOrdersCheckoutWidgetInput)),
|
|
327
1248
|
__param(1, Ctx()),
|
|
328
1249
|
__param(2, PubSub()),
|
|
329
1250
|
__metadata("design:type", Function),
|
|
330
|
-
__metadata("design:paramtypes", [
|
|
1251
|
+
__metadata("design:paramtypes", [UpdatemjBizAppsOrdersCheckoutWidgetInput, Object, PubSubEngine]),
|
|
331
1252
|
__metadata("design:returntype", Promise)
|
|
332
|
-
],
|
|
1253
|
+
], mjBizAppsOrdersCheckoutWidgetResolver.prototype, "UpdatemjBizAppsOrdersCheckoutWidget", null);
|
|
333
1254
|
__decorate([
|
|
334
|
-
Mutation(() =>
|
|
1255
|
+
Mutation(() => mjBizAppsOrdersCheckoutWidget_),
|
|
335
1256
|
__param(0, Arg('ID', () => String)),
|
|
336
1257
|
__param(1, Arg('options___', () => DeleteOptionsInput)),
|
|
337
1258
|
__param(2, Ctx()),
|
|
@@ -339,11 +1260,11 @@ __decorate([
|
|
|
339
1260
|
__metadata("design:type", Function),
|
|
340
1261
|
__metadata("design:paramtypes", [String, DeleteOptionsInput, Object, PubSubEngine]),
|
|
341
1262
|
__metadata("design:returntype", Promise)
|
|
342
|
-
],
|
|
343
|
-
|
|
344
|
-
Resolver(
|
|
345
|
-
],
|
|
346
|
-
export {
|
|
1263
|
+
], mjBizAppsOrdersCheckoutWidgetResolver.prototype, "DeletemjBizAppsOrdersCheckoutWidget", null);
|
|
1264
|
+
mjBizAppsOrdersCheckoutWidgetResolver = __decorate([
|
|
1265
|
+
Resolver(mjBizAppsOrdersCheckoutWidget_)
|
|
1266
|
+
], mjBizAppsOrdersCheckoutWidgetResolver);
|
|
1267
|
+
export { mjBizAppsOrdersCheckoutWidgetResolver };
|
|
347
1268
|
//****************************************************************************
|
|
348
1269
|
// ENTITY CLASS for MJ_BizApps_Orders: Customer Payment Methods
|
|
349
1270
|
//****************************************************************************
|
|
@@ -405,10 +1326,6 @@ __decorate([
|
|
|
405
1326
|
MaxLength(4),
|
|
406
1327
|
__metadata("design:type", String)
|
|
407
1328
|
], mjBizAppsOrdersCustomerPaymentMethod_.prototype, "PaymentDetail", void 0);
|
|
408
|
-
__decorate([
|
|
409
|
-
Field(() => [mjBizAppsOrdersPaymentDetail_]),
|
|
410
|
-
__metadata("design:type", Array)
|
|
411
|
-
], mjBizAppsOrdersCustomerPaymentMethod_.prototype, "mjBizAppsOrdersPaymentDetails_SourceCustomerPaymentMethodIDArray", void 0);
|
|
412
1329
|
mjBizAppsOrdersCustomerPaymentMethod_ = __decorate([
|
|
413
1330
|
ObjectType({ description: `A stored payment method token for a customer (BO-D46). Provider token references only — never card data.` })
|
|
414
1331
|
], mjBizAppsOrdersCustomerPaymentMethod_);
|
|
@@ -558,14 +1475,6 @@ let mjBizAppsOrdersCustomerPaymentMethodResolver = class mjBizAppsOrdersCustomer
|
|
|
558
1475
|
const result = await this.MapFieldNamesToCodeNames('MJ_BizApps_Orders: Customer Payment Methods', rows && rows.length > 0 ? rows[0] : null, this.GetUserFromPayload(userPayload));
|
|
559
1476
|
return result;
|
|
560
1477
|
}
|
|
561
|
-
async mjBizAppsOrdersPaymentDetails_SourceCustomerPaymentMethodIDArray(mjbizappsorderscustomerpaymentmethod_, { userPayload, providers }, pubSub) {
|
|
562
|
-
this.CheckUserReadPermissions('MJ_BizApps_Orders: Payment Details', userPayload);
|
|
563
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
564
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView('__mj_BizAppsOrders', 'vwPaymentDetails')} WHERE ${provider.QuoteIdentifier('SourceCustomerPaymentMethodID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ_BizApps_Orders: Payment Details', userPayload, EntityPermissionType.Read, 'AND');
|
|
565
|
-
const rows = await provider.ExecuteSQL(sSQL, [mjbizappsorderscustomerpaymentmethod_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
566
|
-
const result = await this.ArrayMapFieldNamesToCodeNames('MJ_BizApps_Orders: Payment Details', rows, this.GetUserFromPayload(userPayload));
|
|
567
|
-
return result;
|
|
568
|
-
}
|
|
569
1478
|
async CreatemjBizAppsOrdersCustomerPaymentMethod(input, { providers, userPayload }, pubSub) {
|
|
570
1479
|
const provider = GetReadWriteProvider(providers);
|
|
571
1480
|
return this.CreateRecord('MJ_BizApps_Orders: Customer Payment Methods', input, provider, userPayload, pubSub);
|
|
@@ -616,15 +1525,6 @@ __decorate([
|
|
|
616
1525
|
__metadata("design:paramtypes", [String, Object, PubSubEngine]),
|
|
617
1526
|
__metadata("design:returntype", Promise)
|
|
618
1527
|
], mjBizAppsOrdersCustomerPaymentMethodResolver.prototype, "mjBizAppsOrdersCustomerPaymentMethod", null);
|
|
619
|
-
__decorate([
|
|
620
|
-
FieldResolver(() => [mjBizAppsOrdersPaymentDetail_]),
|
|
621
|
-
__param(0, Root()),
|
|
622
|
-
__param(1, Ctx()),
|
|
623
|
-
__param(2, PubSub()),
|
|
624
|
-
__metadata("design:type", Function),
|
|
625
|
-
__metadata("design:paramtypes", [mjBizAppsOrdersCustomerPaymentMethod_, Object, PubSubEngine]),
|
|
626
|
-
__metadata("design:returntype", Promise)
|
|
627
|
-
], mjBizAppsOrdersCustomerPaymentMethodResolver.prototype, "mjBizAppsOrdersPaymentDetails_SourceCustomerPaymentMethodIDArray", null);
|
|
628
1528
|
__decorate([
|
|
629
1529
|
Mutation(() => mjBizAppsOrdersCustomerPaymentMethod_),
|
|
630
1530
|
__param(0, Arg('input', () => CreatemjBizAppsOrdersCustomerPaymentMethodInput)),
|
|
@@ -3214,10 +4114,6 @@ __decorate([
|
|
|
3214
4114
|
MaxLength(60),
|
|
3215
4115
|
__metadata("design:type", String)
|
|
3216
4116
|
], mjBizAppsOrdersOrderAdjustment_.prototype, "PromotionCode", void 0);
|
|
3217
|
-
__decorate([
|
|
3218
|
-
Field(() => [mjBizAppsOrdersOrderAdjustmentAllocation_]),
|
|
3219
|
-
__metadata("design:type", Array)
|
|
3220
|
-
], mjBizAppsOrdersOrderAdjustment_.prototype, "mjBizAppsOrdersOrderAdjustmentAllocations_OrderAdjustmentIDArray", void 0);
|
|
3221
4117
|
mjBizAppsOrdersOrderAdjustment_ = __decorate([
|
|
3222
4118
|
ObjectType({ description: `An applied reduction. Serves as BOTH the applied discount and the redemption ledger - one concept, not two. Manual discounts (no promotion) ride the same table and must carry a Reason, enforced by CHECK, so an unexplained discount is unstorable rather than merely discouraged.` })
|
|
3223
4119
|
], mjBizAppsOrdersOrderAdjustment_);
|
|
@@ -3415,14 +4311,6 @@ let mjBizAppsOrdersOrderAdjustmentResolver = class mjBizAppsOrdersOrderAdjustmen
|
|
|
3415
4311
|
const result = await this.MapFieldNamesToCodeNames('MJ_BizApps_Orders: Order Adjustments', rows && rows.length > 0 ? rows[0] : null, this.GetUserFromPayload(userPayload));
|
|
3416
4312
|
return result;
|
|
3417
4313
|
}
|
|
3418
|
-
async mjBizAppsOrdersOrderAdjustmentAllocations_OrderAdjustmentIDArray(mjbizappsordersorderadjustment_, { userPayload, providers }, pubSub) {
|
|
3419
|
-
this.CheckUserReadPermissions('MJ_BizApps_Orders: Order Adjustment Allocations', userPayload);
|
|
3420
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
3421
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView('__mj_BizAppsOrders', 'vwOrderAdjustmentAllocations')} WHERE ${provider.QuoteIdentifier('OrderAdjustmentID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ_BizApps_Orders: Order Adjustment Allocations', userPayload, EntityPermissionType.Read, 'AND');
|
|
3422
|
-
const rows = await provider.ExecuteSQL(sSQL, [mjbizappsordersorderadjustment_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
3423
|
-
const result = await this.ArrayMapFieldNamesToCodeNames('MJ_BizApps_Orders: Order Adjustment Allocations', rows, this.GetUserFromPayload(userPayload));
|
|
3424
|
-
return result;
|
|
3425
|
-
}
|
|
3426
4314
|
async CreatemjBizAppsOrdersOrderAdjustment(input, { providers, userPayload }, pubSub) {
|
|
3427
4315
|
const provider = GetReadWriteProvider(providers);
|
|
3428
4316
|
return this.CreateRecord('MJ_BizApps_Orders: Order Adjustments', input, provider, userPayload, pubSub);
|
|
@@ -3473,15 +4361,6 @@ __decorate([
|
|
|
3473
4361
|
__metadata("design:paramtypes", [String, Object, PubSubEngine]),
|
|
3474
4362
|
__metadata("design:returntype", Promise)
|
|
3475
4363
|
], mjBizAppsOrdersOrderAdjustmentResolver.prototype, "mjBizAppsOrdersOrderAdjustment", null);
|
|
3476
|
-
__decorate([
|
|
3477
|
-
FieldResolver(() => [mjBizAppsOrdersOrderAdjustmentAllocation_]),
|
|
3478
|
-
__param(0, Root()),
|
|
3479
|
-
__param(1, Ctx()),
|
|
3480
|
-
__param(2, PubSub()),
|
|
3481
|
-
__metadata("design:type", Function),
|
|
3482
|
-
__metadata("design:paramtypes", [mjBizAppsOrdersOrderAdjustment_, Object, PubSubEngine]),
|
|
3483
|
-
__metadata("design:returntype", Promise)
|
|
3484
|
-
], mjBizAppsOrdersOrderAdjustmentResolver.prototype, "mjBizAppsOrdersOrderAdjustmentAllocations_OrderAdjustmentIDArray", null);
|
|
3485
4364
|
__decorate([
|
|
3486
4365
|
Mutation(() => mjBizAppsOrdersOrderAdjustment_),
|
|
3487
4366
|
__param(0, Arg('input', () => CreatemjBizAppsOrdersOrderAdjustmentInput)),
|
|
@@ -3843,10 +4722,6 @@ __decorate([
|
|
|
3843
4722
|
MaxLength(200),
|
|
3844
4723
|
__metadata("design:type", String)
|
|
3845
4724
|
], mjBizAppsOrdersOrderCharge_.prototype, "ChargeType", void 0);
|
|
3846
|
-
__decorate([
|
|
3847
|
-
Field(() => [mjBizAppsOrdersOrderChargeAllocation_]),
|
|
3848
|
-
__metadata("design:type", Array)
|
|
3849
|
-
], mjBizAppsOrdersOrderCharge_.prototype, "mjBizAppsOrdersOrderChargeAllocations_OrderChargeIDArray", void 0);
|
|
3850
4725
|
mjBizAppsOrdersOrderCharge_ = __decorate([
|
|
3851
4726
|
ObjectType({ description: `An amount added to an order - shipping, handling, a tax layer. Computed, never hand-typed, but overridable ON THE RECORD: forbidding overrides outright is what gets worked around with a fake discount line, which is worse than the thing it prevents. A CHECK makes \'waived without saying why\' unstorable.` })
|
|
3852
4727
|
], mjBizAppsOrdersOrderCharge_);
|
|
@@ -4060,14 +4935,6 @@ let mjBizAppsOrdersOrderChargeResolver = class mjBizAppsOrdersOrderChargeResolve
|
|
|
4060
4935
|
const result = await this.MapFieldNamesToCodeNames('MJ_BizApps_Orders: Order Charges', rows && rows.length > 0 ? rows[0] : null, this.GetUserFromPayload(userPayload));
|
|
4061
4936
|
return result;
|
|
4062
4937
|
}
|
|
4063
|
-
async mjBizAppsOrdersOrderChargeAllocations_OrderChargeIDArray(mjbizappsordersordercharge_, { userPayload, providers }, pubSub) {
|
|
4064
|
-
this.CheckUserReadPermissions('MJ_BizApps_Orders: Order Charge Allocations', userPayload);
|
|
4065
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
4066
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView('__mj_BizAppsOrders', 'vwOrderChargeAllocations')} WHERE ${provider.QuoteIdentifier('OrderChargeID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ_BizApps_Orders: Order Charge Allocations', userPayload, EntityPermissionType.Read, 'AND');
|
|
4067
|
-
const rows = await provider.ExecuteSQL(sSQL, [mjbizappsordersordercharge_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
4068
|
-
const result = await this.ArrayMapFieldNamesToCodeNames('MJ_BizApps_Orders: Order Charge Allocations', rows, this.GetUserFromPayload(userPayload));
|
|
4069
|
-
return result;
|
|
4070
|
-
}
|
|
4071
4938
|
async CreatemjBizAppsOrdersOrderCharge(input, { providers, userPayload }, pubSub) {
|
|
4072
4939
|
const provider = GetReadWriteProvider(providers);
|
|
4073
4940
|
return this.CreateRecord('MJ_BizApps_Orders: Order Charges', input, provider, userPayload, pubSub);
|
|
@@ -4118,15 +4985,6 @@ __decorate([
|
|
|
4118
4985
|
__metadata("design:paramtypes", [String, Object, PubSubEngine]),
|
|
4119
4986
|
__metadata("design:returntype", Promise)
|
|
4120
4987
|
], mjBizAppsOrdersOrderChargeResolver.prototype, "mjBizAppsOrdersOrderCharge", null);
|
|
4121
|
-
__decorate([
|
|
4122
|
-
FieldResolver(() => [mjBizAppsOrdersOrderChargeAllocation_]),
|
|
4123
|
-
__param(0, Root()),
|
|
4124
|
-
__param(1, Ctx()),
|
|
4125
|
-
__param(2, PubSub()),
|
|
4126
|
-
__metadata("design:type", Function),
|
|
4127
|
-
__metadata("design:paramtypes", [mjBizAppsOrdersOrderCharge_, Object, PubSubEngine]),
|
|
4128
|
-
__metadata("design:returntype", Promise)
|
|
4129
|
-
], mjBizAppsOrdersOrderChargeResolver.prototype, "mjBizAppsOrdersOrderChargeAllocations_OrderChargeIDArray", null);
|
|
4130
4988
|
__decorate([
|
|
4131
4989
|
Mutation(() => mjBizAppsOrdersOrderCharge_),
|
|
4132
4990
|
__param(0, Arg('input', () => CreatemjBizAppsOrdersOrderChargeInput)),
|
|
@@ -4531,11 +5389,6 @@ __decorate([
|
|
|
4531
5389
|
Field({ nullable: true, description: `Payment due date, derived at Confirm/Post from PaymentTermsType.NetDays (posting date + net days) when not manually supplied. Editable override.` }),
|
|
4532
5390
|
__metadata("design:type", Date)
|
|
4533
5391
|
], mjBizAppsOrdersOrderHeader_.prototype, "DueDate", void 0);
|
|
4534
|
-
__decorate([
|
|
4535
|
-
Field({ description: `Unpaid | PartiallyPaid | Paid | Overdue | WrittenOff. Engine-derived from AmountPaid vs TotalGross; Overdue is time-derived in views/UI, WrittenOff is an explicit action.` }),
|
|
4536
|
-
MaxLength(20),
|
|
4537
|
-
__metadata("design:type", String)
|
|
4538
|
-
], mjBizAppsOrdersOrderHeader_.prototype, "PaymentStatus", void 0);
|
|
4539
5392
|
__decorate([
|
|
4540
5393
|
Field({ nullable: true, description: `External document/invoice number for downstream systems (e.g. bill.com sync, UPD-1). Free-form; may equal OrderNumber. Not unique pending the dual-numbering decision.` }),
|
|
4541
5394
|
MaxLength(80),
|
|
@@ -4602,6 +5455,21 @@ __decorate([
|
|
|
4602
5455
|
Field(),
|
|
4603
5456
|
__metadata("design:type", Date)
|
|
4604
5457
|
], mjBizAppsOrdersOrderHeader_.prototype, "_mj__UpdatedAt", void 0);
|
|
5458
|
+
__decorate([
|
|
5459
|
+
Field(),
|
|
5460
|
+
MaxLength(50),
|
|
5461
|
+
__metadata("design:type", String)
|
|
5462
|
+
], mjBizAppsOrdersOrderHeader_.prototype, "Origin", void 0);
|
|
5463
|
+
__decorate([
|
|
5464
|
+
Field({ nullable: true }),
|
|
5465
|
+
MaxLength(36),
|
|
5466
|
+
__metadata("design:type", String)
|
|
5467
|
+
], mjBizAppsOrdersOrderHeader_.prototype, "SourceCheckoutWidgetID", void 0);
|
|
5468
|
+
__decorate([
|
|
5469
|
+
Field({ description: `Operational fulfillment progress rolled up across order lines: Pending, PartiallyFulfilled, Fulfilled, NotApplicable (no physical goods), or Returned.` }),
|
|
5470
|
+
MaxLength(20),
|
|
5471
|
+
__metadata("design:type", String)
|
|
5472
|
+
], mjBizAppsOrdersOrderHeader_.prototype, "FulfillmentStatus", void 0);
|
|
4605
5473
|
__decorate([
|
|
4606
5474
|
Field(),
|
|
4607
5475
|
MaxLength(50),
|
|
@@ -4667,6 +5535,11 @@ __decorate([
|
|
|
4667
5535
|
MaxLength(40),
|
|
4668
5536
|
__metadata("design:type", String)
|
|
4669
5537
|
], mjBizAppsOrdersOrderHeader_.prototype, "ReversesOrderHeader", void 0);
|
|
5538
|
+
__decorate([
|
|
5539
|
+
Field({ nullable: true }),
|
|
5540
|
+
MaxLength(100),
|
|
5541
|
+
__metadata("design:type", String)
|
|
5542
|
+
], mjBizAppsOrdersOrderHeader_.prototype, "SourceCheckoutWidget", void 0);
|
|
4670
5543
|
__decorate([
|
|
4671
5544
|
Field(() => Float, { nullable: true }),
|
|
4672
5545
|
__metadata("design:type", Number)
|
|
@@ -4680,41 +5553,10 @@ __decorate([
|
|
|
4680
5553
|
__metadata("design:type", Number)
|
|
4681
5554
|
], mjBizAppsOrdersOrderHeader_.prototype, "IsOverdue", void 0);
|
|
4682
5555
|
__decorate([
|
|
4683
|
-
Field(
|
|
4684
|
-
|
|
4685
|
-
|
|
4686
|
-
|
|
4687
|
-
Field(() => [mjBizAppsOrdersPaymentDetail_]),
|
|
4688
|
-
__metadata("design:type", Array)
|
|
4689
|
-
], mjBizAppsOrdersOrderHeader_.prototype, "mjBizAppsOrdersPaymentDetails_SourceOrderHeaderIDArray", void 0);
|
|
4690
|
-
__decorate([
|
|
4691
|
-
Field(() => [mjBizAppsOrdersOrderHeader_]),
|
|
4692
|
-
__metadata("design:type", Array)
|
|
4693
|
-
], mjBizAppsOrdersOrderHeader_.prototype, "mjBizAppsOrdersOrderHeaders_ReversesOrderHeaderIDArray", void 0);
|
|
4694
|
-
__decorate([
|
|
4695
|
-
Field(() => [mjBizAppsOrdersStoredValueTransaction_]),
|
|
4696
|
-
__metadata("design:type", Array)
|
|
4697
|
-
], mjBizAppsOrdersOrderHeader_.prototype, "mjBizAppsOrdersStoredValueTransactions_RelatedOrderHeaderIDArray", void 0);
|
|
4698
|
-
__decorate([
|
|
4699
|
-
Field(() => [mjBizAppsOrdersPaymentLine_]),
|
|
4700
|
-
__metadata("design:type", Array)
|
|
4701
|
-
], mjBizAppsOrdersOrderHeader_.prototype, "mjBizAppsOrdersPaymentLines_OrderHeaderIDArray", void 0);
|
|
4702
|
-
__decorate([
|
|
4703
|
-
Field(() => [mjBizAppsOrdersOrderAdjustment_]),
|
|
4704
|
-
__metadata("design:type", Array)
|
|
4705
|
-
], mjBizAppsOrdersOrderHeader_.prototype, "mjBizAppsOrdersOrderAdjustments_OrderHeaderIDArray", void 0);
|
|
4706
|
-
__decorate([
|
|
4707
|
-
Field(() => [mjBizAppsOrdersSubscriptionEvent_]),
|
|
4708
|
-
__metadata("design:type", Array)
|
|
4709
|
-
], mjBizAppsOrdersOrderHeader_.prototype, "mjBizAppsOrdersSubscriptionEvents_RelatedOrderHeaderIDArray", void 0);
|
|
4710
|
-
__decorate([
|
|
4711
|
-
Field(() => [mjBizAppsOrdersPaymentIntent_]),
|
|
4712
|
-
__metadata("design:type", Array)
|
|
4713
|
-
], mjBizAppsOrdersOrderHeader_.prototype, "mjBizAppsOrdersPaymentIntents_OrderHeaderIDArray", void 0);
|
|
4714
|
-
__decorate([
|
|
4715
|
-
Field(() => [mjBizAppsOrdersOrderCharge_]),
|
|
4716
|
-
__metadata("design:type", Array)
|
|
4717
|
-
], mjBizAppsOrdersOrderHeader_.prototype, "mjBizAppsOrdersOrderCharges_OrderHeaderIDArray", void 0);
|
|
5556
|
+
Field(),
|
|
5557
|
+
MaxLength(13),
|
|
5558
|
+
__metadata("design:type", String)
|
|
5559
|
+
], mjBizAppsOrdersOrderHeader_.prototype, "PaymentStatus", void 0);
|
|
4718
5560
|
mjBizAppsOrdersOrderHeader_ = __decorate([
|
|
4719
5561
|
ObjectType({ description: `An order header — the customer\'s commitment AND the receivable (D2). On the FIRST transition to Confirmed, one balanced journal entry per line is booked into BizApps Accounting (D10). CompanyID is the originating/owning company — a document/visibility anchor, never GL resolution. No currency columns (FX deferred, D24).` })
|
|
4720
5562
|
], mjBizAppsOrdersOrderHeader_);
|
|
@@ -4796,10 +5638,6 @@ __decorate([
|
|
|
4796
5638
|
Field({ nullable: true }),
|
|
4797
5639
|
__metadata("design:type", Date)
|
|
4798
5640
|
], CreatemjBizAppsOrdersOrderHeaderInput.prototype, "DueDate", void 0);
|
|
4799
|
-
__decorate([
|
|
4800
|
-
Field({ nullable: true }),
|
|
4801
|
-
__metadata("design:type", String)
|
|
4802
|
-
], CreatemjBizAppsOrdersOrderHeaderInput.prototype, "PaymentStatus", void 0);
|
|
4803
5641
|
__decorate([
|
|
4804
5642
|
Field({ nullable: true }),
|
|
4805
5643
|
__metadata("design:type", String)
|
|
@@ -4852,6 +5690,18 @@ __decorate([
|
|
|
4852
5690
|
Field({ nullable: true }),
|
|
4853
5691
|
__metadata("design:type", Date)
|
|
4854
5692
|
], CreatemjBizAppsOrdersOrderHeaderInput.prototype, "ConfirmedAt", void 0);
|
|
5693
|
+
__decorate([
|
|
5694
|
+
Field({ nullable: true }),
|
|
5695
|
+
__metadata("design:type", String)
|
|
5696
|
+
], CreatemjBizAppsOrdersOrderHeaderInput.prototype, "Origin", void 0);
|
|
5697
|
+
__decorate([
|
|
5698
|
+
Field({ nullable: true }),
|
|
5699
|
+
__metadata("design:type", String)
|
|
5700
|
+
], CreatemjBizAppsOrdersOrderHeaderInput.prototype, "SourceCheckoutWidgetID", void 0);
|
|
5701
|
+
__decorate([
|
|
5702
|
+
Field({ nullable: true }),
|
|
5703
|
+
__metadata("design:type", String)
|
|
5704
|
+
], CreatemjBizAppsOrdersOrderHeaderInput.prototype, "FulfillmentStatus", void 0);
|
|
4855
5705
|
__decorate([
|
|
4856
5706
|
Field(() => RestoreContextInput, { nullable: true }),
|
|
4857
5707
|
__metadata("design:type", RestoreContextInput)
|
|
@@ -4937,10 +5787,6 @@ __decorate([
|
|
|
4937
5787
|
Field({ nullable: true }),
|
|
4938
5788
|
__metadata("design:type", Date)
|
|
4939
5789
|
], UpdatemjBizAppsOrdersOrderHeaderInput.prototype, "DueDate", void 0);
|
|
4940
|
-
__decorate([
|
|
4941
|
-
Field({ nullable: true }),
|
|
4942
|
-
__metadata("design:type", String)
|
|
4943
|
-
], UpdatemjBizAppsOrdersOrderHeaderInput.prototype, "PaymentStatus", void 0);
|
|
4944
5790
|
__decorate([
|
|
4945
5791
|
Field({ nullable: true }),
|
|
4946
5792
|
__metadata("design:type", String)
|
|
@@ -4993,6 +5839,18 @@ __decorate([
|
|
|
4993
5839
|
Field({ nullable: true }),
|
|
4994
5840
|
__metadata("design:type", Date)
|
|
4995
5841
|
], UpdatemjBizAppsOrdersOrderHeaderInput.prototype, "ConfirmedAt", void 0);
|
|
5842
|
+
__decorate([
|
|
5843
|
+
Field({ nullable: true }),
|
|
5844
|
+
__metadata("design:type", String)
|
|
5845
|
+
], UpdatemjBizAppsOrdersOrderHeaderInput.prototype, "Origin", void 0);
|
|
5846
|
+
__decorate([
|
|
5847
|
+
Field({ nullable: true }),
|
|
5848
|
+
__metadata("design:type", String)
|
|
5849
|
+
], UpdatemjBizAppsOrdersOrderHeaderInput.prototype, "SourceCheckoutWidgetID", void 0);
|
|
5850
|
+
__decorate([
|
|
5851
|
+
Field({ nullable: true }),
|
|
5852
|
+
__metadata("design:type", String)
|
|
5853
|
+
], UpdatemjBizAppsOrdersOrderHeaderInput.prototype, "FulfillmentStatus", void 0);
|
|
4996
5854
|
__decorate([
|
|
4997
5855
|
Field(() => [KeyValuePairInput], { nullable: true }),
|
|
4998
5856
|
__metadata("design:type", Array)
|
|
@@ -5045,95 +5903,23 @@ export { RunmjBizAppsOrdersOrderHeaderViewResult };
|
|
|
5045
5903
|
let mjBizAppsOrdersOrderHeaderResolver = class mjBizAppsOrdersOrderHeaderResolver extends ResolverBase {
|
|
5046
5904
|
async RunmjBizAppsOrdersOrderHeaderViewByID(input, { providers, userPayload }, pubSub) {
|
|
5047
5905
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
5048
|
-
return super.RunViewByIDGeneric(input, provider, userPayload, pubSub);
|
|
5049
|
-
}
|
|
5050
|
-
async RunmjBizAppsOrdersOrderHeaderViewByName(input, { providers, userPayload }, pubSub) {
|
|
5051
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
5052
|
-
return super.RunViewByNameGeneric(input, provider, userPayload, pubSub);
|
|
5053
|
-
}
|
|
5054
|
-
async RunmjBizAppsOrdersOrderHeaderDynamicView(input, { providers, userPayload }, pubSub) {
|
|
5055
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
5056
|
-
input.EntityName = 'MJ_BizApps_Orders: Order Headers';
|
|
5057
|
-
return super.RunDynamicViewGeneric(input, provider, userPayload, pubSub);
|
|
5058
|
-
}
|
|
5059
|
-
async mjBizAppsOrdersOrderHeader(ID, { userPayload, providers }, pubSub) {
|
|
5060
|
-
this.CheckUserReadPermissions('MJ_BizApps_Orders: Order Headers', userPayload);
|
|
5061
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
5062
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView('__mj_BizAppsOrders', 'vwOrderHeaders')} WHERE ${provider.QuoteIdentifier('ID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ_BizApps_Orders: Order Headers', userPayload, EntityPermissionType.Read, 'AND');
|
|
5063
|
-
const rows = await provider.ExecuteSQL(sSQL, [ID], undefined, this.GetUserFromPayload(userPayload));
|
|
5064
|
-
const result = await this.MapFieldNamesToCodeNames('MJ_BizApps_Orders: Order Headers', rows && rows.length > 0 ? rows[0] : null, this.GetUserFromPayload(userPayload));
|
|
5065
|
-
return result;
|
|
5066
|
-
}
|
|
5067
|
-
async mjBizAppsOrdersOrderLines_OrderHeaderIDArray(mjbizappsordersorderheader_, { userPayload, providers }, pubSub) {
|
|
5068
|
-
this.CheckUserReadPermissions('MJ_BizApps_Orders: Order Lines', userPayload);
|
|
5069
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
5070
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView('__mj_BizAppsOrders', 'vwOrderLines')} WHERE ${provider.QuoteIdentifier('OrderHeaderID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ_BizApps_Orders: Order Lines', userPayload, EntityPermissionType.Read, 'AND');
|
|
5071
|
-
const rows = await provider.ExecuteSQL(sSQL, [mjbizappsordersorderheader_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
5072
|
-
const result = await this.ArrayMapFieldNamesToCodeNames('MJ_BizApps_Orders: Order Lines', rows, this.GetUserFromPayload(userPayload));
|
|
5073
|
-
return result;
|
|
5074
|
-
}
|
|
5075
|
-
async mjBizAppsOrdersPaymentDetails_SourceOrderHeaderIDArray(mjbizappsordersorderheader_, { userPayload, providers }, pubSub) {
|
|
5076
|
-
this.CheckUserReadPermissions('MJ_BizApps_Orders: Payment Details', userPayload);
|
|
5077
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
5078
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView('__mj_BizAppsOrders', 'vwPaymentDetails')} WHERE ${provider.QuoteIdentifier('SourceOrderHeaderID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ_BizApps_Orders: Payment Details', userPayload, EntityPermissionType.Read, 'AND');
|
|
5079
|
-
const rows = await provider.ExecuteSQL(sSQL, [mjbizappsordersorderheader_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
5080
|
-
const result = await this.ArrayMapFieldNamesToCodeNames('MJ_BizApps_Orders: Payment Details', rows, this.GetUserFromPayload(userPayload));
|
|
5081
|
-
return result;
|
|
5082
|
-
}
|
|
5083
|
-
async mjBizAppsOrdersOrderHeaders_ReversesOrderHeaderIDArray(mjbizappsordersorderheader_, { userPayload, providers }, pubSub) {
|
|
5084
|
-
this.CheckUserReadPermissions('MJ_BizApps_Orders: Order Headers', userPayload);
|
|
5085
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
5086
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView('__mj_BizAppsOrders', 'vwOrderHeaders')} WHERE ${provider.QuoteIdentifier('ReversesOrderHeaderID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ_BizApps_Orders: Order Headers', userPayload, EntityPermissionType.Read, 'AND');
|
|
5087
|
-
const rows = await provider.ExecuteSQL(sSQL, [mjbizappsordersorderheader_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
5088
|
-
const result = await this.ArrayMapFieldNamesToCodeNames('MJ_BizApps_Orders: Order Headers', rows, this.GetUserFromPayload(userPayload));
|
|
5089
|
-
return result;
|
|
5090
|
-
}
|
|
5091
|
-
async mjBizAppsOrdersStoredValueTransactions_RelatedOrderHeaderIDArray(mjbizappsordersorderheader_, { userPayload, providers }, pubSub) {
|
|
5092
|
-
this.CheckUserReadPermissions('MJ_BizApps_Orders: Stored Value Transactions', userPayload);
|
|
5093
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
5094
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView('__mj_BizAppsOrders', 'vwStoredValueTransactions')} WHERE ${provider.QuoteIdentifier('RelatedOrderHeaderID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ_BizApps_Orders: Stored Value Transactions', userPayload, EntityPermissionType.Read, 'AND');
|
|
5095
|
-
const rows = await provider.ExecuteSQL(sSQL, [mjbizappsordersorderheader_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
5096
|
-
const result = await this.ArrayMapFieldNamesToCodeNames('MJ_BizApps_Orders: Stored Value Transactions', rows, this.GetUserFromPayload(userPayload));
|
|
5097
|
-
return result;
|
|
5098
|
-
}
|
|
5099
|
-
async mjBizAppsOrdersPaymentLines_OrderHeaderIDArray(mjbizappsordersorderheader_, { userPayload, providers }, pubSub) {
|
|
5100
|
-
this.CheckUserReadPermissions('MJ_BizApps_Orders: Payment Lines', userPayload);
|
|
5101
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
5102
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView('__mj_BizAppsOrders', 'vwPaymentLines')} WHERE ${provider.QuoteIdentifier('OrderHeaderID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ_BizApps_Orders: Payment Lines', userPayload, EntityPermissionType.Read, 'AND');
|
|
5103
|
-
const rows = await provider.ExecuteSQL(sSQL, [mjbizappsordersorderheader_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
5104
|
-
const result = await this.ArrayMapFieldNamesToCodeNames('MJ_BizApps_Orders: Payment Lines', rows, this.GetUserFromPayload(userPayload));
|
|
5105
|
-
return result;
|
|
5106
|
-
}
|
|
5107
|
-
async mjBizAppsOrdersOrderAdjustments_OrderHeaderIDArray(mjbizappsordersorderheader_, { userPayload, providers }, pubSub) {
|
|
5108
|
-
this.CheckUserReadPermissions('MJ_BizApps_Orders: Order Adjustments', userPayload);
|
|
5109
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
5110
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView('__mj_BizAppsOrders', 'vwOrderAdjustments')} WHERE ${provider.QuoteIdentifier('OrderHeaderID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ_BizApps_Orders: Order Adjustments', userPayload, EntityPermissionType.Read, 'AND');
|
|
5111
|
-
const rows = await provider.ExecuteSQL(sSQL, [mjbizappsordersorderheader_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
5112
|
-
const result = await this.ArrayMapFieldNamesToCodeNames('MJ_BizApps_Orders: Order Adjustments', rows, this.GetUserFromPayload(userPayload));
|
|
5113
|
-
return result;
|
|
5906
|
+
return super.RunViewByIDGeneric(input, provider, userPayload, pubSub);
|
|
5114
5907
|
}
|
|
5115
|
-
async
|
|
5116
|
-
this.CheckUserReadPermissions('MJ_BizApps_Orders: Subscription Events', userPayload);
|
|
5908
|
+
async RunmjBizAppsOrdersOrderHeaderViewByName(input, { providers, userPayload }, pubSub) {
|
|
5117
5909
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
5118
|
-
|
|
5119
|
-
const rows = await provider.ExecuteSQL(sSQL, [mjbizappsordersorderheader_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
5120
|
-
const result = await this.ArrayMapFieldNamesToCodeNames('MJ_BizApps_Orders: Subscription Events', rows, this.GetUserFromPayload(userPayload));
|
|
5121
|
-
return result;
|
|
5910
|
+
return super.RunViewByNameGeneric(input, provider, userPayload, pubSub);
|
|
5122
5911
|
}
|
|
5123
|
-
async
|
|
5124
|
-
this.CheckUserReadPermissions('MJ_BizApps_Orders: Payment Intents', userPayload);
|
|
5912
|
+
async RunmjBizAppsOrdersOrderHeaderDynamicView(input, { providers, userPayload }, pubSub) {
|
|
5125
5913
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
5126
|
-
|
|
5127
|
-
|
|
5128
|
-
const result = await this.ArrayMapFieldNamesToCodeNames('MJ_BizApps_Orders: Payment Intents', rows, this.GetUserFromPayload(userPayload));
|
|
5129
|
-
return result;
|
|
5914
|
+
input.EntityName = 'MJ_BizApps_Orders: Order Headers';
|
|
5915
|
+
return super.RunDynamicViewGeneric(input, provider, userPayload, pubSub);
|
|
5130
5916
|
}
|
|
5131
|
-
async
|
|
5132
|
-
this.CheckUserReadPermissions('MJ_BizApps_Orders: Order
|
|
5917
|
+
async mjBizAppsOrdersOrderHeader(ID, { userPayload, providers }, pubSub) {
|
|
5918
|
+
this.CheckUserReadPermissions('MJ_BizApps_Orders: Order Headers', userPayload);
|
|
5133
5919
|
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
5134
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView('__mj_BizAppsOrders', '
|
|
5135
|
-
const rows = await provider.ExecuteSQL(sSQL, [
|
|
5136
|
-
const result = await this.
|
|
5920
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView('__mj_BizAppsOrders', 'vwOrderHeaders')} WHERE ${provider.QuoteIdentifier('ID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ_BizApps_Orders: Order Headers', userPayload, EntityPermissionType.Read, 'AND');
|
|
5921
|
+
const rows = await provider.ExecuteSQL(sSQL, [ID], undefined, this.GetUserFromPayload(userPayload));
|
|
5922
|
+
const result = await this.MapFieldNamesToCodeNames('MJ_BizApps_Orders: Order Headers', rows && rows.length > 0 ? rows[0] : null, this.GetUserFromPayload(userPayload));
|
|
5137
5923
|
return result;
|
|
5138
5924
|
}
|
|
5139
5925
|
async CreatemjBizAppsOrdersOrderHeader(input, { providers, userPayload }, pubSub) {
|
|
@@ -5186,87 +5972,6 @@ __decorate([
|
|
|
5186
5972
|
__metadata("design:paramtypes", [String, Object, PubSubEngine]),
|
|
5187
5973
|
__metadata("design:returntype", Promise)
|
|
5188
5974
|
], mjBizAppsOrdersOrderHeaderResolver.prototype, "mjBizAppsOrdersOrderHeader", null);
|
|
5189
|
-
__decorate([
|
|
5190
|
-
FieldResolver(() => [mjBizAppsOrdersOrderLine_]),
|
|
5191
|
-
__param(0, Root()),
|
|
5192
|
-
__param(1, Ctx()),
|
|
5193
|
-
__param(2, PubSub()),
|
|
5194
|
-
__metadata("design:type", Function),
|
|
5195
|
-
__metadata("design:paramtypes", [mjBizAppsOrdersOrderHeader_, Object, PubSubEngine]),
|
|
5196
|
-
__metadata("design:returntype", Promise)
|
|
5197
|
-
], mjBizAppsOrdersOrderHeaderResolver.prototype, "mjBizAppsOrdersOrderLines_OrderHeaderIDArray", null);
|
|
5198
|
-
__decorate([
|
|
5199
|
-
FieldResolver(() => [mjBizAppsOrdersPaymentDetail_]),
|
|
5200
|
-
__param(0, Root()),
|
|
5201
|
-
__param(1, Ctx()),
|
|
5202
|
-
__param(2, PubSub()),
|
|
5203
|
-
__metadata("design:type", Function),
|
|
5204
|
-
__metadata("design:paramtypes", [mjBizAppsOrdersOrderHeader_, Object, PubSubEngine]),
|
|
5205
|
-
__metadata("design:returntype", Promise)
|
|
5206
|
-
], mjBizAppsOrdersOrderHeaderResolver.prototype, "mjBizAppsOrdersPaymentDetails_SourceOrderHeaderIDArray", null);
|
|
5207
|
-
__decorate([
|
|
5208
|
-
FieldResolver(() => [mjBizAppsOrdersOrderHeader_]),
|
|
5209
|
-
__param(0, Root()),
|
|
5210
|
-
__param(1, Ctx()),
|
|
5211
|
-
__param(2, PubSub()),
|
|
5212
|
-
__metadata("design:type", Function),
|
|
5213
|
-
__metadata("design:paramtypes", [mjBizAppsOrdersOrderHeader_, Object, PubSubEngine]),
|
|
5214
|
-
__metadata("design:returntype", Promise)
|
|
5215
|
-
], mjBizAppsOrdersOrderHeaderResolver.prototype, "mjBizAppsOrdersOrderHeaders_ReversesOrderHeaderIDArray", null);
|
|
5216
|
-
__decorate([
|
|
5217
|
-
FieldResolver(() => [mjBizAppsOrdersStoredValueTransaction_]),
|
|
5218
|
-
__param(0, Root()),
|
|
5219
|
-
__param(1, Ctx()),
|
|
5220
|
-
__param(2, PubSub()),
|
|
5221
|
-
__metadata("design:type", Function),
|
|
5222
|
-
__metadata("design:paramtypes", [mjBizAppsOrdersOrderHeader_, Object, PubSubEngine]),
|
|
5223
|
-
__metadata("design:returntype", Promise)
|
|
5224
|
-
], mjBizAppsOrdersOrderHeaderResolver.prototype, "mjBizAppsOrdersStoredValueTransactions_RelatedOrderHeaderIDArray", null);
|
|
5225
|
-
__decorate([
|
|
5226
|
-
FieldResolver(() => [mjBizAppsOrdersPaymentLine_]),
|
|
5227
|
-
__param(0, Root()),
|
|
5228
|
-
__param(1, Ctx()),
|
|
5229
|
-
__param(2, PubSub()),
|
|
5230
|
-
__metadata("design:type", Function),
|
|
5231
|
-
__metadata("design:paramtypes", [mjBizAppsOrdersOrderHeader_, Object, PubSubEngine]),
|
|
5232
|
-
__metadata("design:returntype", Promise)
|
|
5233
|
-
], mjBizAppsOrdersOrderHeaderResolver.prototype, "mjBizAppsOrdersPaymentLines_OrderHeaderIDArray", null);
|
|
5234
|
-
__decorate([
|
|
5235
|
-
FieldResolver(() => [mjBizAppsOrdersOrderAdjustment_]),
|
|
5236
|
-
__param(0, Root()),
|
|
5237
|
-
__param(1, Ctx()),
|
|
5238
|
-
__param(2, PubSub()),
|
|
5239
|
-
__metadata("design:type", Function),
|
|
5240
|
-
__metadata("design:paramtypes", [mjBizAppsOrdersOrderHeader_, Object, PubSubEngine]),
|
|
5241
|
-
__metadata("design:returntype", Promise)
|
|
5242
|
-
], mjBizAppsOrdersOrderHeaderResolver.prototype, "mjBizAppsOrdersOrderAdjustments_OrderHeaderIDArray", null);
|
|
5243
|
-
__decorate([
|
|
5244
|
-
FieldResolver(() => [mjBizAppsOrdersSubscriptionEvent_]),
|
|
5245
|
-
__param(0, Root()),
|
|
5246
|
-
__param(1, Ctx()),
|
|
5247
|
-
__param(2, PubSub()),
|
|
5248
|
-
__metadata("design:type", Function),
|
|
5249
|
-
__metadata("design:paramtypes", [mjBizAppsOrdersOrderHeader_, Object, PubSubEngine]),
|
|
5250
|
-
__metadata("design:returntype", Promise)
|
|
5251
|
-
], mjBizAppsOrdersOrderHeaderResolver.prototype, "mjBizAppsOrdersSubscriptionEvents_RelatedOrderHeaderIDArray", null);
|
|
5252
|
-
__decorate([
|
|
5253
|
-
FieldResolver(() => [mjBizAppsOrdersPaymentIntent_]),
|
|
5254
|
-
__param(0, Root()),
|
|
5255
|
-
__param(1, Ctx()),
|
|
5256
|
-
__param(2, PubSub()),
|
|
5257
|
-
__metadata("design:type", Function),
|
|
5258
|
-
__metadata("design:paramtypes", [mjBizAppsOrdersOrderHeader_, Object, PubSubEngine]),
|
|
5259
|
-
__metadata("design:returntype", Promise)
|
|
5260
|
-
], mjBizAppsOrdersOrderHeaderResolver.prototype, "mjBizAppsOrdersPaymentIntents_OrderHeaderIDArray", null);
|
|
5261
|
-
__decorate([
|
|
5262
|
-
FieldResolver(() => [mjBizAppsOrdersOrderCharge_]),
|
|
5263
|
-
__param(0, Root()),
|
|
5264
|
-
__param(1, Ctx()),
|
|
5265
|
-
__param(2, PubSub()),
|
|
5266
|
-
__metadata("design:type", Function),
|
|
5267
|
-
__metadata("design:paramtypes", [mjBizAppsOrdersOrderHeader_, Object, PubSubEngine]),
|
|
5268
|
-
__metadata("design:returntype", Promise)
|
|
5269
|
-
], mjBizAppsOrdersOrderHeaderResolver.prototype, "mjBizAppsOrdersOrderCharges_OrderHeaderIDArray", null);
|
|
5270
5975
|
__decorate([
|
|
5271
5976
|
Mutation(() => mjBizAppsOrdersOrderHeader_),
|
|
5272
5977
|
__param(0, Arg('input', () => CreatemjBizAppsOrdersOrderHeaderInput)),
|
|
@@ -6070,58 +6775,6 @@ __decorate([
|
|
|
6070
6775
|
Field(() => Int, { nullable: true }),
|
|
6071
6776
|
__metadata("design:type", Number)
|
|
6072
6777
|
], mjBizAppsOrdersOrderLine_.prototype, "ParentOrderLineIDChildCount", void 0);
|
|
6073
|
-
__decorate([
|
|
6074
|
-
Field(() => [mjBizAppsOrdersOrderLinePriceComponent_]),
|
|
6075
|
-
__metadata("design:type", Array)
|
|
6076
|
-
], mjBizAppsOrdersOrderLine_.prototype, "mjBizAppsOrdersOrderLinePriceComponents_OrderLineIDArray", void 0);
|
|
6077
|
-
__decorate([
|
|
6078
|
-
Field(() => [mjBizAppsOrdersEntitlementGrant_]),
|
|
6079
|
-
__metadata("design:type", Array)
|
|
6080
|
-
], mjBizAppsOrdersOrderLine_.prototype, "mjBizAppsOrdersEntitlementGrants_OrderLineIDArray", void 0);
|
|
6081
|
-
__decorate([
|
|
6082
|
-
Field(() => [mjBizAppsOrdersOrderLine_]),
|
|
6083
|
-
__metadata("design:type", Array)
|
|
6084
|
-
], mjBizAppsOrdersOrderLine_.prototype, "mjBizAppsOrdersOrderLines_ParentOrderLineIDArray", void 0);
|
|
6085
|
-
__decorate([
|
|
6086
|
-
Field(() => [mjBizAppsOrdersOrderLine_]),
|
|
6087
|
-
__metadata("design:type", Array)
|
|
6088
|
-
], mjBizAppsOrdersOrderLine_.prototype, "mjBizAppsOrdersOrderLines_ReversesOrderLineIDArray", void 0);
|
|
6089
|
-
__decorate([
|
|
6090
|
-
Field(() => [mjBizAppsOrdersOrderLineDimension_]),
|
|
6091
|
-
__metadata("design:type", Array)
|
|
6092
|
-
], mjBizAppsOrdersOrderLine_.prototype, "mjBizAppsOrdersOrderLineDimensions_OrderLineIDArray", void 0);
|
|
6093
|
-
__decorate([
|
|
6094
|
-
Field(() => [mjBizAppsOrdersSubscriptionTerm_]),
|
|
6095
|
-
__metadata("design:type", Array)
|
|
6096
|
-
], mjBizAppsOrdersOrderLine_.prototype, "mjBizAppsOrdersSubscriptionTerms_OrderLineIDArray", void 0);
|
|
6097
|
-
__decorate([
|
|
6098
|
-
Field(() => [mjBizAppsOrdersEventOrderLine_]),
|
|
6099
|
-
__metadata("design:type", Array)
|
|
6100
|
-
], mjBizAppsOrdersOrderLine_.prototype, "mjBizAppsOrdersEventOrderLines_IDArray", void 0);
|
|
6101
|
-
__decorate([
|
|
6102
|
-
Field(() => [mjBizAppsOrdersSubscription_]),
|
|
6103
|
-
__metadata("design:type", Array)
|
|
6104
|
-
], mjBizAppsOrdersOrderLine_.prototype, "mjBizAppsOrdersSubscriptions_OrderLineIDArray", void 0);
|
|
6105
|
-
__decorate([
|
|
6106
|
-
Field(() => [mjBizAppsOrdersOrderAdjustment_]),
|
|
6107
|
-
__metadata("design:type", Array)
|
|
6108
|
-
], mjBizAppsOrdersOrderLine_.prototype, "mjBizAppsOrdersOrderAdjustments_OrderLineIDArray", void 0);
|
|
6109
|
-
__decorate([
|
|
6110
|
-
Field(() => [mjBizAppsOrdersOrderAdjustmentAllocation_]),
|
|
6111
|
-
__metadata("design:type", Array)
|
|
6112
|
-
], mjBizAppsOrdersOrderLine_.prototype, "mjBizAppsOrdersOrderAdjustmentAllocations_OrderLineIDArray", void 0);
|
|
6113
|
-
__decorate([
|
|
6114
|
-
Field(() => [mjBizAppsOrdersStoredValueAccount_]),
|
|
6115
|
-
__metadata("design:type", Array)
|
|
6116
|
-
], mjBizAppsOrdersOrderLine_.prototype, "mjBizAppsOrdersStoredValueAccounts_IssuedFromOrderLineIDArray", void 0);
|
|
6117
|
-
__decorate([
|
|
6118
|
-
Field(() => [mjBizAppsOrdersOrderChargeAllocation_]),
|
|
6119
|
-
__metadata("design:type", Array)
|
|
6120
|
-
], mjBizAppsOrdersOrderLine_.prototype, "mjBizAppsOrdersOrderChargeAllocations_OrderLineIDArray", void 0);
|
|
6121
|
-
__decorate([
|
|
6122
|
-
Field(() => [mjBizAppsOrdersPaymentLine_]),
|
|
6123
|
-
__metadata("design:type", Array)
|
|
6124
|
-
], mjBizAppsOrdersOrderLine_.prototype, "mjBizAppsOrdersPaymentLines_OrderLineIDArray", void 0);
|
|
6125
6778
|
mjBizAppsOrdersOrderLine_ = __decorate([
|
|
6126
6779
|
ObjectType({ description: `A line item on an order. Line amount = Quantity * UnitPrice. Each line books its OWN journal entry at Confirm (D10) in the line\'s company.` })
|
|
6127
6780
|
], mjBizAppsOrdersOrderLine_);
|
|
@@ -6440,284 +7093,63 @@ let mjBizAppsOrdersOrderLineResolver = class mjBizAppsOrdersOrderLineResolver ex
|
|
|
6440
7093
|
return super.RunDynamicViewGeneric(input, provider, userPayload, pubSub);
|
|
6441
7094
|
}
|
|
6442
7095
|
async mjBizAppsOrdersOrderLine(ID, { userPayload, providers }, pubSub) {
|
|
6443
|
-
this.CheckUserReadPermissions('MJ_BizApps_Orders: Order Lines', userPayload);
|
|
6444
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
6445
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView('__mj_BizAppsOrders', 'vwOrderLines')} WHERE ${provider.QuoteIdentifier('ID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ_BizApps_Orders: Order Lines', userPayload, EntityPermissionType.Read, 'AND');
|
|
6446
|
-
const rows = await provider.ExecuteSQL(sSQL, [ID], undefined, this.GetUserFromPayload(userPayload));
|
|
6447
|
-
const result = await this.MapFieldNamesToCodeNames('MJ_BizApps_Orders: Order Lines', rows && rows.length > 0 ? rows[0] : null, this.GetUserFromPayload(userPayload));
|
|
6448
|
-
return result;
|
|
6449
|
-
}
|
|
6450
|
-
async
|
|
6451
|
-
|
|
6452
|
-
|
|
6453
|
-
|
|
6454
|
-
|
|
6455
|
-
const
|
|
6456
|
-
return
|
|
6457
|
-
}
|
|
6458
|
-
async
|
|
6459
|
-
|
|
6460
|
-
const
|
|
6461
|
-
|
|
6462
|
-
|
|
6463
|
-
|
|
6464
|
-
return result;
|
|
6465
|
-
}
|
|
6466
|
-
async mjBizAppsOrdersOrderLines_ParentOrderLineIDArray(mjbizappsordersorderline_, { userPayload, providers }, pubSub) {
|
|
6467
|
-
this.CheckUserReadPermissions('MJ_BizApps_Orders: Order Lines', userPayload);
|
|
6468
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
6469
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView('__mj_BizAppsOrders', 'vwOrderLines')} WHERE ${provider.QuoteIdentifier('ParentOrderLineID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ_BizApps_Orders: Order Lines', userPayload, EntityPermissionType.Read, 'AND');
|
|
6470
|
-
const rows = await provider.ExecuteSQL(sSQL, [mjbizappsordersorderline_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
6471
|
-
const result = await this.ArrayMapFieldNamesToCodeNames('MJ_BizApps_Orders: Order Lines', rows, this.GetUserFromPayload(userPayload));
|
|
6472
|
-
return result;
|
|
6473
|
-
}
|
|
6474
|
-
async mjBizAppsOrdersOrderLines_ReversesOrderLineIDArray(mjbizappsordersorderline_, { userPayload, providers }, pubSub) {
|
|
6475
|
-
this.CheckUserReadPermissions('MJ_BizApps_Orders: Order Lines', userPayload);
|
|
6476
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
6477
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView('__mj_BizAppsOrders', 'vwOrderLines')} WHERE ${provider.QuoteIdentifier('ReversesOrderLineID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ_BizApps_Orders: Order Lines', userPayload, EntityPermissionType.Read, 'AND');
|
|
6478
|
-
const rows = await provider.ExecuteSQL(sSQL, [mjbizappsordersorderline_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
6479
|
-
const result = await this.ArrayMapFieldNamesToCodeNames('MJ_BizApps_Orders: Order Lines', rows, this.GetUserFromPayload(userPayload));
|
|
6480
|
-
return result;
|
|
6481
|
-
}
|
|
6482
|
-
async mjBizAppsOrdersOrderLineDimensions_OrderLineIDArray(mjbizappsordersorderline_, { userPayload, providers }, pubSub) {
|
|
6483
|
-
this.CheckUserReadPermissions('MJ_BizApps_Orders: Order Line Dimensions', userPayload);
|
|
6484
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
6485
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView('__mj_BizAppsOrders', 'vwOrderLineDimensions')} WHERE ${provider.QuoteIdentifier('OrderLineID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ_BizApps_Orders: Order Line Dimensions', userPayload, EntityPermissionType.Read, 'AND');
|
|
6486
|
-
const rows = await provider.ExecuteSQL(sSQL, [mjbizappsordersorderline_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
6487
|
-
const result = await this.ArrayMapFieldNamesToCodeNames('MJ_BizApps_Orders: Order Line Dimensions', rows, this.GetUserFromPayload(userPayload));
|
|
6488
|
-
return result;
|
|
6489
|
-
}
|
|
6490
|
-
async mjBizAppsOrdersSubscriptionTerms_OrderLineIDArray(mjbizappsordersorderline_, { userPayload, providers }, pubSub) {
|
|
6491
|
-
this.CheckUserReadPermissions('MJ_BizApps_Orders: Subscription Terms', userPayload);
|
|
6492
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
6493
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView('__mj_BizAppsOrders', 'vwSubscriptionTerms')} WHERE ${provider.QuoteIdentifier('OrderLineID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ_BizApps_Orders: Subscription Terms', userPayload, EntityPermissionType.Read, 'AND');
|
|
6494
|
-
const rows = await provider.ExecuteSQL(sSQL, [mjbizappsordersorderline_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
6495
|
-
const result = await this.ArrayMapFieldNamesToCodeNames('MJ_BizApps_Orders: Subscription Terms', rows, this.GetUserFromPayload(userPayload));
|
|
6496
|
-
return result;
|
|
6497
|
-
}
|
|
6498
|
-
async mjBizAppsOrdersEventOrderLines_IDArray(mjbizappsordersorderline_, { userPayload, providers }, pubSub) {
|
|
6499
|
-
this.CheckUserReadPermissions('MJ_BizApps_Orders: Event Order Lines', userPayload);
|
|
6500
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
6501
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView('__mj_BizAppsOrders', 'vwEventOrderLines')} WHERE ${provider.QuoteIdentifier('ID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ_BizApps_Orders: Event Order Lines', userPayload, EntityPermissionType.Read, 'AND');
|
|
6502
|
-
const rows = await provider.ExecuteSQL(sSQL, [mjbizappsordersorderline_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
6503
|
-
const result = await this.ArrayMapFieldNamesToCodeNames('MJ_BizApps_Orders: Event Order Lines', rows, this.GetUserFromPayload(userPayload));
|
|
6504
|
-
return result;
|
|
6505
|
-
}
|
|
6506
|
-
async mjBizAppsOrdersSubscriptions_OrderLineIDArray(mjbizappsordersorderline_, { userPayload, providers }, pubSub) {
|
|
6507
|
-
this.CheckUserReadPermissions('MJ_BizApps_Orders: Subscriptions', userPayload);
|
|
6508
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
6509
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView('__mj_BizAppsOrders', 'vwSubscriptions')} WHERE ${provider.QuoteIdentifier('OrderLineID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ_BizApps_Orders: Subscriptions', userPayload, EntityPermissionType.Read, 'AND');
|
|
6510
|
-
const rows = await provider.ExecuteSQL(sSQL, [mjbizappsordersorderline_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
6511
|
-
const result = await this.ArrayMapFieldNamesToCodeNames('MJ_BizApps_Orders: Subscriptions', rows, this.GetUserFromPayload(userPayload));
|
|
6512
|
-
return result;
|
|
6513
|
-
}
|
|
6514
|
-
async mjBizAppsOrdersOrderAdjustments_OrderLineIDArray(mjbizappsordersorderline_, { userPayload, providers }, pubSub) {
|
|
6515
|
-
this.CheckUserReadPermissions('MJ_BizApps_Orders: Order Adjustments', userPayload);
|
|
6516
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
6517
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView('__mj_BizAppsOrders', 'vwOrderAdjustments')} WHERE ${provider.QuoteIdentifier('OrderLineID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ_BizApps_Orders: Order Adjustments', userPayload, EntityPermissionType.Read, 'AND');
|
|
6518
|
-
const rows = await provider.ExecuteSQL(sSQL, [mjbizappsordersorderline_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
6519
|
-
const result = await this.ArrayMapFieldNamesToCodeNames('MJ_BizApps_Orders: Order Adjustments', rows, this.GetUserFromPayload(userPayload));
|
|
6520
|
-
return result;
|
|
6521
|
-
}
|
|
6522
|
-
async mjBizAppsOrdersOrderAdjustmentAllocations_OrderLineIDArray(mjbizappsordersorderline_, { userPayload, providers }, pubSub) {
|
|
6523
|
-
this.CheckUserReadPermissions('MJ_BizApps_Orders: Order Adjustment Allocations', userPayload);
|
|
6524
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
6525
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView('__mj_BizAppsOrders', 'vwOrderAdjustmentAllocations')} WHERE ${provider.QuoteIdentifier('OrderLineID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ_BizApps_Orders: Order Adjustment Allocations', userPayload, EntityPermissionType.Read, 'AND');
|
|
6526
|
-
const rows = await provider.ExecuteSQL(sSQL, [mjbizappsordersorderline_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
6527
|
-
const result = await this.ArrayMapFieldNamesToCodeNames('MJ_BizApps_Orders: Order Adjustment Allocations', rows, this.GetUserFromPayload(userPayload));
|
|
6528
|
-
return result;
|
|
6529
|
-
}
|
|
6530
|
-
async mjBizAppsOrdersStoredValueAccounts_IssuedFromOrderLineIDArray(mjbizappsordersorderline_, { userPayload, providers }, pubSub) {
|
|
6531
|
-
this.CheckUserReadPermissions('MJ_BizApps_Orders: Stored Value Accounts', userPayload);
|
|
6532
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
6533
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView('__mj_BizAppsOrders', 'vwStoredValueAccounts')} WHERE ${provider.QuoteIdentifier('IssuedFromOrderLineID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ_BizApps_Orders: Stored Value Accounts', userPayload, EntityPermissionType.Read, 'AND');
|
|
6534
|
-
const rows = await provider.ExecuteSQL(sSQL, [mjbizappsordersorderline_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
6535
|
-
const result = await this.ArrayMapFieldNamesToCodeNames('MJ_BizApps_Orders: Stored Value Accounts', rows, this.GetUserFromPayload(userPayload));
|
|
6536
|
-
return result;
|
|
6537
|
-
}
|
|
6538
|
-
async mjBizAppsOrdersOrderChargeAllocations_OrderLineIDArray(mjbizappsordersorderline_, { userPayload, providers }, pubSub) {
|
|
6539
|
-
this.CheckUserReadPermissions('MJ_BizApps_Orders: Order Charge Allocations', userPayload);
|
|
6540
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
6541
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView('__mj_BizAppsOrders', 'vwOrderChargeAllocations')} WHERE ${provider.QuoteIdentifier('OrderLineID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ_BizApps_Orders: Order Charge Allocations', userPayload, EntityPermissionType.Read, 'AND');
|
|
6542
|
-
const rows = await provider.ExecuteSQL(sSQL, [mjbizappsordersorderline_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
6543
|
-
const result = await this.ArrayMapFieldNamesToCodeNames('MJ_BizApps_Orders: Order Charge Allocations', rows, this.GetUserFromPayload(userPayload));
|
|
6544
|
-
return result;
|
|
6545
|
-
}
|
|
6546
|
-
async mjBizAppsOrdersPaymentLines_OrderLineIDArray(mjbizappsordersorderline_, { userPayload, providers }, pubSub) {
|
|
6547
|
-
this.CheckUserReadPermissions('MJ_BizApps_Orders: Payment Lines', userPayload);
|
|
6548
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
6549
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView('__mj_BizAppsOrders', 'vwPaymentLines')} WHERE ${provider.QuoteIdentifier('OrderLineID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ_BizApps_Orders: Payment Lines', userPayload, EntityPermissionType.Read, 'AND');
|
|
6550
|
-
const rows = await provider.ExecuteSQL(sSQL, [mjbizappsordersorderline_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
6551
|
-
const result = await this.ArrayMapFieldNamesToCodeNames('MJ_BizApps_Orders: Payment Lines', rows, this.GetUserFromPayload(userPayload));
|
|
6552
|
-
return result;
|
|
6553
|
-
}
|
|
6554
|
-
async CreatemjBizAppsOrdersOrderLine(input, { providers, userPayload }, pubSub) {
|
|
6555
|
-
const provider = GetReadWriteProvider(providers);
|
|
6556
|
-
return this.CreateRecord('MJ_BizApps_Orders: Order Lines', input, provider, userPayload, pubSub);
|
|
6557
|
-
}
|
|
6558
|
-
async UpdatemjBizAppsOrdersOrderLine(input, { providers, userPayload }, pubSub) {
|
|
6559
|
-
const provider = GetReadWriteProvider(providers);
|
|
6560
|
-
return this.UpdateRecord('MJ_BizApps_Orders: Order Lines', input, provider, userPayload, pubSub);
|
|
6561
|
-
}
|
|
6562
|
-
async DeletemjBizAppsOrdersOrderLine(ID, options, { providers, userPayload }, pubSub) {
|
|
6563
|
-
const provider = GetReadWriteProvider(providers);
|
|
6564
|
-
const key = new CompositeKey([{ FieldName: 'ID', Value: ID }]);
|
|
6565
|
-
return this.DeleteRecord('MJ_BizApps_Orders: Order Lines', key, options, provider, userPayload, pubSub);
|
|
6566
|
-
}
|
|
6567
|
-
};
|
|
6568
|
-
__decorate([
|
|
6569
|
-
Query(() => RunmjBizAppsOrdersOrderLineViewResult),
|
|
6570
|
-
__param(0, Arg('input', () => RunViewByIDInput)),
|
|
6571
|
-
__param(1, Ctx()),
|
|
6572
|
-
__param(2, PubSub()),
|
|
6573
|
-
__metadata("design:type", Function),
|
|
6574
|
-
__metadata("design:paramtypes", [RunViewByIDInput, Object, PubSubEngine]),
|
|
6575
|
-
__metadata("design:returntype", Promise)
|
|
6576
|
-
], mjBizAppsOrdersOrderLineResolver.prototype, "RunmjBizAppsOrdersOrderLineViewByID", null);
|
|
6577
|
-
__decorate([
|
|
6578
|
-
Query(() => RunmjBizAppsOrdersOrderLineViewResult),
|
|
6579
|
-
__param(0, Arg('input', () => RunViewByNameInput)),
|
|
6580
|
-
__param(1, Ctx()),
|
|
6581
|
-
__param(2, PubSub()),
|
|
6582
|
-
__metadata("design:type", Function),
|
|
6583
|
-
__metadata("design:paramtypes", [RunViewByNameInput, Object, PubSubEngine]),
|
|
6584
|
-
__metadata("design:returntype", Promise)
|
|
6585
|
-
], mjBizAppsOrdersOrderLineResolver.prototype, "RunmjBizAppsOrdersOrderLineViewByName", null);
|
|
6586
|
-
__decorate([
|
|
6587
|
-
Query(() => RunmjBizAppsOrdersOrderLineViewResult),
|
|
6588
|
-
__param(0, Arg('input', () => RunDynamicViewInput)),
|
|
6589
|
-
__param(1, Ctx()),
|
|
6590
|
-
__param(2, PubSub()),
|
|
6591
|
-
__metadata("design:type", Function),
|
|
6592
|
-
__metadata("design:paramtypes", [RunDynamicViewInput, Object, PubSubEngine]),
|
|
6593
|
-
__metadata("design:returntype", Promise)
|
|
6594
|
-
], mjBizAppsOrdersOrderLineResolver.prototype, "RunmjBizAppsOrdersOrderLineDynamicView", null);
|
|
6595
|
-
__decorate([
|
|
6596
|
-
Query(() => mjBizAppsOrdersOrderLine_, { nullable: true }),
|
|
6597
|
-
__param(0, Arg('ID', () => String)),
|
|
6598
|
-
__param(1, Ctx()),
|
|
6599
|
-
__param(2, PubSub()),
|
|
6600
|
-
__metadata("design:type", Function),
|
|
6601
|
-
__metadata("design:paramtypes", [String, Object, PubSubEngine]),
|
|
6602
|
-
__metadata("design:returntype", Promise)
|
|
6603
|
-
], mjBizAppsOrdersOrderLineResolver.prototype, "mjBizAppsOrdersOrderLine", null);
|
|
6604
|
-
__decorate([
|
|
6605
|
-
FieldResolver(() => [mjBizAppsOrdersOrderLinePriceComponent_]),
|
|
6606
|
-
__param(0, Root()),
|
|
6607
|
-
__param(1, Ctx()),
|
|
6608
|
-
__param(2, PubSub()),
|
|
6609
|
-
__metadata("design:type", Function),
|
|
6610
|
-
__metadata("design:paramtypes", [mjBizAppsOrdersOrderLine_, Object, PubSubEngine]),
|
|
6611
|
-
__metadata("design:returntype", Promise)
|
|
6612
|
-
], mjBizAppsOrdersOrderLineResolver.prototype, "mjBizAppsOrdersOrderLinePriceComponents_OrderLineIDArray", null);
|
|
6613
|
-
__decorate([
|
|
6614
|
-
FieldResolver(() => [mjBizAppsOrdersEntitlementGrant_]),
|
|
6615
|
-
__param(0, Root()),
|
|
6616
|
-
__param(1, Ctx()),
|
|
6617
|
-
__param(2, PubSub()),
|
|
6618
|
-
__metadata("design:type", Function),
|
|
6619
|
-
__metadata("design:paramtypes", [mjBizAppsOrdersOrderLine_, Object, PubSubEngine]),
|
|
6620
|
-
__metadata("design:returntype", Promise)
|
|
6621
|
-
], mjBizAppsOrdersOrderLineResolver.prototype, "mjBizAppsOrdersEntitlementGrants_OrderLineIDArray", null);
|
|
6622
|
-
__decorate([
|
|
6623
|
-
FieldResolver(() => [mjBizAppsOrdersOrderLine_]),
|
|
6624
|
-
__param(0, Root()),
|
|
6625
|
-
__param(1, Ctx()),
|
|
6626
|
-
__param(2, PubSub()),
|
|
6627
|
-
__metadata("design:type", Function),
|
|
6628
|
-
__metadata("design:paramtypes", [mjBizAppsOrdersOrderLine_, Object, PubSubEngine]),
|
|
6629
|
-
__metadata("design:returntype", Promise)
|
|
6630
|
-
], mjBizAppsOrdersOrderLineResolver.prototype, "mjBizAppsOrdersOrderLines_ParentOrderLineIDArray", null);
|
|
6631
|
-
__decorate([
|
|
6632
|
-
FieldResolver(() => [mjBizAppsOrdersOrderLine_]),
|
|
6633
|
-
__param(0, Root()),
|
|
6634
|
-
__param(1, Ctx()),
|
|
6635
|
-
__param(2, PubSub()),
|
|
6636
|
-
__metadata("design:type", Function),
|
|
6637
|
-
__metadata("design:paramtypes", [mjBizAppsOrdersOrderLine_, Object, PubSubEngine]),
|
|
6638
|
-
__metadata("design:returntype", Promise)
|
|
6639
|
-
], mjBizAppsOrdersOrderLineResolver.prototype, "mjBizAppsOrdersOrderLines_ReversesOrderLineIDArray", null);
|
|
6640
|
-
__decorate([
|
|
6641
|
-
FieldResolver(() => [mjBizAppsOrdersOrderLineDimension_]),
|
|
6642
|
-
__param(0, Root()),
|
|
6643
|
-
__param(1, Ctx()),
|
|
6644
|
-
__param(2, PubSub()),
|
|
6645
|
-
__metadata("design:type", Function),
|
|
6646
|
-
__metadata("design:paramtypes", [mjBizAppsOrdersOrderLine_, Object, PubSubEngine]),
|
|
6647
|
-
__metadata("design:returntype", Promise)
|
|
6648
|
-
], mjBizAppsOrdersOrderLineResolver.prototype, "mjBizAppsOrdersOrderLineDimensions_OrderLineIDArray", null);
|
|
6649
|
-
__decorate([
|
|
6650
|
-
FieldResolver(() => [mjBizAppsOrdersSubscriptionTerm_]),
|
|
6651
|
-
__param(0, Root()),
|
|
6652
|
-
__param(1, Ctx()),
|
|
6653
|
-
__param(2, PubSub()),
|
|
6654
|
-
__metadata("design:type", Function),
|
|
6655
|
-
__metadata("design:paramtypes", [mjBizAppsOrdersOrderLine_, Object, PubSubEngine]),
|
|
6656
|
-
__metadata("design:returntype", Promise)
|
|
6657
|
-
], mjBizAppsOrdersOrderLineResolver.prototype, "mjBizAppsOrdersSubscriptionTerms_OrderLineIDArray", null);
|
|
6658
|
-
__decorate([
|
|
6659
|
-
FieldResolver(() => [mjBizAppsOrdersEventOrderLine_]),
|
|
6660
|
-
__param(0, Root()),
|
|
6661
|
-
__param(1, Ctx()),
|
|
6662
|
-
__param(2, PubSub()),
|
|
6663
|
-
__metadata("design:type", Function),
|
|
6664
|
-
__metadata("design:paramtypes", [mjBizAppsOrdersOrderLine_, Object, PubSubEngine]),
|
|
6665
|
-
__metadata("design:returntype", Promise)
|
|
6666
|
-
], mjBizAppsOrdersOrderLineResolver.prototype, "mjBizAppsOrdersEventOrderLines_IDArray", null);
|
|
6667
|
-
__decorate([
|
|
6668
|
-
FieldResolver(() => [mjBizAppsOrdersSubscription_]),
|
|
6669
|
-
__param(0, Root()),
|
|
6670
|
-
__param(1, Ctx()),
|
|
6671
|
-
__param(2, PubSub()),
|
|
6672
|
-
__metadata("design:type", Function),
|
|
6673
|
-
__metadata("design:paramtypes", [mjBizAppsOrdersOrderLine_, Object, PubSubEngine]),
|
|
6674
|
-
__metadata("design:returntype", Promise)
|
|
6675
|
-
], mjBizAppsOrdersOrderLineResolver.prototype, "mjBizAppsOrdersSubscriptions_OrderLineIDArray", null);
|
|
6676
|
-
__decorate([
|
|
6677
|
-
FieldResolver(() => [mjBizAppsOrdersOrderAdjustment_]),
|
|
6678
|
-
__param(0, Root()),
|
|
6679
|
-
__param(1, Ctx()),
|
|
6680
|
-
__param(2, PubSub()),
|
|
6681
|
-
__metadata("design:type", Function),
|
|
6682
|
-
__metadata("design:paramtypes", [mjBizAppsOrdersOrderLine_, Object, PubSubEngine]),
|
|
6683
|
-
__metadata("design:returntype", Promise)
|
|
6684
|
-
], mjBizAppsOrdersOrderLineResolver.prototype, "mjBizAppsOrdersOrderAdjustments_OrderLineIDArray", null);
|
|
7096
|
+
this.CheckUserReadPermissions('MJ_BizApps_Orders: Order Lines', userPayload);
|
|
7097
|
+
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
7098
|
+
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView('__mj_BizAppsOrders', 'vwOrderLines')} WHERE ${provider.QuoteIdentifier('ID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ_BizApps_Orders: Order Lines', userPayload, EntityPermissionType.Read, 'AND');
|
|
7099
|
+
const rows = await provider.ExecuteSQL(sSQL, [ID], undefined, this.GetUserFromPayload(userPayload));
|
|
7100
|
+
const result = await this.MapFieldNamesToCodeNames('MJ_BizApps_Orders: Order Lines', rows && rows.length > 0 ? rows[0] : null, this.GetUserFromPayload(userPayload));
|
|
7101
|
+
return result;
|
|
7102
|
+
}
|
|
7103
|
+
async CreatemjBizAppsOrdersOrderLine(input, { providers, userPayload }, pubSub) {
|
|
7104
|
+
const provider = GetReadWriteProvider(providers);
|
|
7105
|
+
return this.CreateRecord('MJ_BizApps_Orders: Order Lines', input, provider, userPayload, pubSub);
|
|
7106
|
+
}
|
|
7107
|
+
async UpdatemjBizAppsOrdersOrderLine(input, { providers, userPayload }, pubSub) {
|
|
7108
|
+
const provider = GetReadWriteProvider(providers);
|
|
7109
|
+
return this.UpdateRecord('MJ_BizApps_Orders: Order Lines', input, provider, userPayload, pubSub);
|
|
7110
|
+
}
|
|
7111
|
+
async DeletemjBizAppsOrdersOrderLine(ID, options, { providers, userPayload }, pubSub) {
|
|
7112
|
+
const provider = GetReadWriteProvider(providers);
|
|
7113
|
+
const key = new CompositeKey([{ FieldName: 'ID', Value: ID }]);
|
|
7114
|
+
return this.DeleteRecord('MJ_BizApps_Orders: Order Lines', key, options, provider, userPayload, pubSub);
|
|
7115
|
+
}
|
|
7116
|
+
};
|
|
6685
7117
|
__decorate([
|
|
6686
|
-
|
|
6687
|
-
__param(0,
|
|
7118
|
+
Query(() => RunmjBizAppsOrdersOrderLineViewResult),
|
|
7119
|
+
__param(0, Arg('input', () => RunViewByIDInput)),
|
|
6688
7120
|
__param(1, Ctx()),
|
|
6689
7121
|
__param(2, PubSub()),
|
|
6690
7122
|
__metadata("design:type", Function),
|
|
6691
|
-
__metadata("design:paramtypes", [
|
|
7123
|
+
__metadata("design:paramtypes", [RunViewByIDInput, Object, PubSubEngine]),
|
|
6692
7124
|
__metadata("design:returntype", Promise)
|
|
6693
|
-
], mjBizAppsOrdersOrderLineResolver.prototype, "
|
|
7125
|
+
], mjBizAppsOrdersOrderLineResolver.prototype, "RunmjBizAppsOrdersOrderLineViewByID", null);
|
|
6694
7126
|
__decorate([
|
|
6695
|
-
|
|
6696
|
-
__param(0,
|
|
7127
|
+
Query(() => RunmjBizAppsOrdersOrderLineViewResult),
|
|
7128
|
+
__param(0, Arg('input', () => RunViewByNameInput)),
|
|
6697
7129
|
__param(1, Ctx()),
|
|
6698
7130
|
__param(2, PubSub()),
|
|
6699
7131
|
__metadata("design:type", Function),
|
|
6700
|
-
__metadata("design:paramtypes", [
|
|
7132
|
+
__metadata("design:paramtypes", [RunViewByNameInput, Object, PubSubEngine]),
|
|
6701
7133
|
__metadata("design:returntype", Promise)
|
|
6702
|
-
], mjBizAppsOrdersOrderLineResolver.prototype, "
|
|
7134
|
+
], mjBizAppsOrdersOrderLineResolver.prototype, "RunmjBizAppsOrdersOrderLineViewByName", null);
|
|
6703
7135
|
__decorate([
|
|
6704
|
-
|
|
6705
|
-
__param(0,
|
|
7136
|
+
Query(() => RunmjBizAppsOrdersOrderLineViewResult),
|
|
7137
|
+
__param(0, Arg('input', () => RunDynamicViewInput)),
|
|
6706
7138
|
__param(1, Ctx()),
|
|
6707
7139
|
__param(2, PubSub()),
|
|
6708
7140
|
__metadata("design:type", Function),
|
|
6709
|
-
__metadata("design:paramtypes", [
|
|
7141
|
+
__metadata("design:paramtypes", [RunDynamicViewInput, Object, PubSubEngine]),
|
|
6710
7142
|
__metadata("design:returntype", Promise)
|
|
6711
|
-
], mjBizAppsOrdersOrderLineResolver.prototype, "
|
|
7143
|
+
], mjBizAppsOrdersOrderLineResolver.prototype, "RunmjBizAppsOrdersOrderLineDynamicView", null);
|
|
6712
7144
|
__decorate([
|
|
6713
|
-
|
|
6714
|
-
__param(0,
|
|
7145
|
+
Query(() => mjBizAppsOrdersOrderLine_, { nullable: true }),
|
|
7146
|
+
__param(0, Arg('ID', () => String)),
|
|
6715
7147
|
__param(1, Ctx()),
|
|
6716
7148
|
__param(2, PubSub()),
|
|
6717
7149
|
__metadata("design:type", Function),
|
|
6718
|
-
__metadata("design:paramtypes", [
|
|
7150
|
+
__metadata("design:paramtypes", [String, Object, PubSubEngine]),
|
|
6719
7151
|
__metadata("design:returntype", Promise)
|
|
6720
|
-
], mjBizAppsOrdersOrderLineResolver.prototype, "
|
|
7152
|
+
], mjBizAppsOrdersOrderLineResolver.prototype, "mjBizAppsOrdersOrderLine", null);
|
|
6721
7153
|
__decorate([
|
|
6722
7154
|
Mutation(() => mjBizAppsOrdersOrderLine_),
|
|
6723
7155
|
__param(0, Arg('input', () => CreatemjBizAppsOrdersOrderLineInput)),
|
|
@@ -7106,18 +7538,6 @@ __decorate([
|
|
|
7106
7538
|
MaxLength(40),
|
|
7107
7539
|
__metadata("design:type", String)
|
|
7108
7540
|
], mjBizAppsOrdersPaymentDetail_.prototype, "SourceOrderHeader", void 0);
|
|
7109
|
-
__decorate([
|
|
7110
|
-
Field(() => [mjBizAppsOrdersOrderHeader_]),
|
|
7111
|
-
__metadata("design:type", Array)
|
|
7112
|
-
], mjBizAppsOrdersPaymentDetail_.prototype, "mjBizAppsOrdersOrderHeaders_InitialPaymentDetailIDArray", void 0);
|
|
7113
|
-
__decorate([
|
|
7114
|
-
Field(() => [mjBizAppsOrdersPaymentHeader_]),
|
|
7115
|
-
__metadata("design:type", Array)
|
|
7116
|
-
], mjBizAppsOrdersPaymentDetail_.prototype, "mjBizAppsOrdersPaymentHeaders_PaymentDetailIDArray", void 0);
|
|
7117
|
-
__decorate([
|
|
7118
|
-
Field(() => [mjBizAppsOrdersCustomerPaymentMethod_]),
|
|
7119
|
-
__metadata("design:type", Array)
|
|
7120
|
-
], mjBizAppsOrdersPaymentDetail_.prototype, "mjBizAppsOrdersCustomerPaymentMethods_PaymentDetailIDArray", void 0);
|
|
7121
7541
|
mjBizAppsOrdersPaymentDetail_ = __decorate([
|
|
7122
7542
|
ObjectType()
|
|
7123
7543
|
], mjBizAppsOrdersPaymentDetail_);
|
|
@@ -7379,30 +7799,6 @@ let mjBizAppsOrdersPaymentDetailResolver = class mjBizAppsOrdersPaymentDetailRes
|
|
|
7379
7799
|
const result = await this.MapFieldNamesToCodeNames('MJ_BizApps_Orders: Payment Details', rows && rows.length > 0 ? rows[0] : null, this.GetUserFromPayload(userPayload));
|
|
7380
7800
|
return result;
|
|
7381
7801
|
}
|
|
7382
|
-
async mjBizAppsOrdersOrderHeaders_InitialPaymentDetailIDArray(mjbizappsorderspaymentdetail_, { userPayload, providers }, pubSub) {
|
|
7383
|
-
this.CheckUserReadPermissions('MJ_BizApps_Orders: Order Headers', userPayload);
|
|
7384
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
7385
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView('__mj_BizAppsOrders', 'vwOrderHeaders')} WHERE ${provider.QuoteIdentifier('InitialPaymentDetailID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ_BizApps_Orders: Order Headers', userPayload, EntityPermissionType.Read, 'AND');
|
|
7386
|
-
const rows = await provider.ExecuteSQL(sSQL, [mjbizappsorderspaymentdetail_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
7387
|
-
const result = await this.ArrayMapFieldNamesToCodeNames('MJ_BizApps_Orders: Order Headers', rows, this.GetUserFromPayload(userPayload));
|
|
7388
|
-
return result;
|
|
7389
|
-
}
|
|
7390
|
-
async mjBizAppsOrdersPaymentHeaders_PaymentDetailIDArray(mjbizappsorderspaymentdetail_, { userPayload, providers }, pubSub) {
|
|
7391
|
-
this.CheckUserReadPermissions('MJ_BizApps_Orders: Payment Headers', userPayload);
|
|
7392
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
7393
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView('__mj_BizAppsOrders', 'vwPaymentHeaders')} WHERE ${provider.QuoteIdentifier('PaymentDetailID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ_BizApps_Orders: Payment Headers', userPayload, EntityPermissionType.Read, 'AND');
|
|
7394
|
-
const rows = await provider.ExecuteSQL(sSQL, [mjbizappsorderspaymentdetail_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
7395
|
-
const result = await this.ArrayMapFieldNamesToCodeNames('MJ_BizApps_Orders: Payment Headers', rows, this.GetUserFromPayload(userPayload));
|
|
7396
|
-
return result;
|
|
7397
|
-
}
|
|
7398
|
-
async mjBizAppsOrdersCustomerPaymentMethods_PaymentDetailIDArray(mjbizappsorderspaymentdetail_, { userPayload, providers }, pubSub) {
|
|
7399
|
-
this.CheckUserReadPermissions('MJ_BizApps_Orders: Customer Payment Methods', userPayload);
|
|
7400
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
7401
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView('__mj_BizAppsOrders', 'vwCustomerPaymentMethods')} WHERE ${provider.QuoteIdentifier('PaymentDetailID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ_BizApps_Orders: Customer Payment Methods', userPayload, EntityPermissionType.Read, 'AND');
|
|
7402
|
-
const rows = await provider.ExecuteSQL(sSQL, [mjbizappsorderspaymentdetail_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
7403
|
-
const result = await this.ArrayMapFieldNamesToCodeNames('MJ_BizApps_Orders: Customer Payment Methods', rows, this.GetUserFromPayload(userPayload));
|
|
7404
|
-
return result;
|
|
7405
|
-
}
|
|
7406
7802
|
async CreatemjBizAppsOrdersPaymentDetail(input, { providers, userPayload }, pubSub) {
|
|
7407
7803
|
const provider = GetReadWriteProvider(providers);
|
|
7408
7804
|
return this.CreateRecord('MJ_BizApps_Orders: Payment Details', input, provider, userPayload, pubSub);
|
|
@@ -7453,33 +7849,6 @@ __decorate([
|
|
|
7453
7849
|
__metadata("design:paramtypes", [String, Object, PubSubEngine]),
|
|
7454
7850
|
__metadata("design:returntype", Promise)
|
|
7455
7851
|
], mjBizAppsOrdersPaymentDetailResolver.prototype, "mjBizAppsOrdersPaymentDetail", null);
|
|
7456
|
-
__decorate([
|
|
7457
|
-
FieldResolver(() => [mjBizAppsOrdersOrderHeader_]),
|
|
7458
|
-
__param(0, Root()),
|
|
7459
|
-
__param(1, Ctx()),
|
|
7460
|
-
__param(2, PubSub()),
|
|
7461
|
-
__metadata("design:type", Function),
|
|
7462
|
-
__metadata("design:paramtypes", [mjBizAppsOrdersPaymentDetail_, Object, PubSubEngine]),
|
|
7463
|
-
__metadata("design:returntype", Promise)
|
|
7464
|
-
], mjBizAppsOrdersPaymentDetailResolver.prototype, "mjBizAppsOrdersOrderHeaders_InitialPaymentDetailIDArray", null);
|
|
7465
|
-
__decorate([
|
|
7466
|
-
FieldResolver(() => [mjBizAppsOrdersPaymentHeader_]),
|
|
7467
|
-
__param(0, Root()),
|
|
7468
|
-
__param(1, Ctx()),
|
|
7469
|
-
__param(2, PubSub()),
|
|
7470
|
-
__metadata("design:type", Function),
|
|
7471
|
-
__metadata("design:paramtypes", [mjBizAppsOrdersPaymentDetail_, Object, PubSubEngine]),
|
|
7472
|
-
__metadata("design:returntype", Promise)
|
|
7473
|
-
], mjBizAppsOrdersPaymentDetailResolver.prototype, "mjBizAppsOrdersPaymentHeaders_PaymentDetailIDArray", null);
|
|
7474
|
-
__decorate([
|
|
7475
|
-
FieldResolver(() => [mjBizAppsOrdersCustomerPaymentMethod_]),
|
|
7476
|
-
__param(0, Root()),
|
|
7477
|
-
__param(1, Ctx()),
|
|
7478
|
-
__param(2, PubSub()),
|
|
7479
|
-
__metadata("design:type", Function),
|
|
7480
|
-
__metadata("design:paramtypes", [mjBizAppsOrdersPaymentDetail_, Object, PubSubEngine]),
|
|
7481
|
-
__metadata("design:returntype", Promise)
|
|
7482
|
-
], mjBizAppsOrdersPaymentDetailResolver.prototype, "mjBizAppsOrdersCustomerPaymentMethods_PaymentDetailIDArray", null);
|
|
7483
7852
|
__decorate([
|
|
7484
7853
|
Mutation(() => mjBizAppsOrdersPaymentDetail_),
|
|
7485
7854
|
__param(0, Arg('input', () => CreatemjBizAppsOrdersPaymentDetailInput)),
|
|
@@ -7673,22 +8042,6 @@ __decorate([
|
|
|
7673
8042
|
MaxLength(40),
|
|
7674
8043
|
__metadata("design:type", String)
|
|
7675
8044
|
], mjBizAppsOrdersPaymentHeader_.prototype, "JournalEntry", void 0);
|
|
7676
|
-
__decorate([
|
|
7677
|
-
Field(() => [mjBizAppsOrdersPaymentHeader_]),
|
|
7678
|
-
__metadata("design:type", Array)
|
|
7679
|
-
], mjBizAppsOrdersPaymentHeader_.prototype, "mjBizAppsOrdersPaymentHeaders_ReversesPaymentHeaderIDArray", void 0);
|
|
7680
|
-
__decorate([
|
|
7681
|
-
Field(() => [mjBizAppsOrdersPaymentLine_]),
|
|
7682
|
-
__metadata("design:type", Array)
|
|
7683
|
-
], mjBizAppsOrdersPaymentHeader_.prototype, "mjBizAppsOrdersPaymentLines_PaymentHeaderIDArray", void 0);
|
|
7684
|
-
__decorate([
|
|
7685
|
-
Field(() => [mjBizAppsOrdersStoredValueTransaction_]),
|
|
7686
|
-
__metadata("design:type", Array)
|
|
7687
|
-
], mjBizAppsOrdersPaymentHeader_.prototype, "mjBizAppsOrdersStoredValueTransactions_RelatedPaymentIDArray", void 0);
|
|
7688
|
-
__decorate([
|
|
7689
|
-
Field(() => [mjBizAppsOrdersSubscriptionEvent_]),
|
|
7690
|
-
__metadata("design:type", Array)
|
|
7691
|
-
], mjBizAppsOrdersPaymentHeader_.prototype, "mjBizAppsOrdersSubscriptionEvents_RelatedPaymentIDArray", void 0);
|
|
7692
8045
|
mjBizAppsOrdersPaymentHeader_ = __decorate([
|
|
7693
8046
|
ObjectType({ description: `A money movement: a customer receipt or a reversal (refund/chargeback/bank return). Booked to accounting at capture; applied to orders via PaymentLine.` })
|
|
7694
8047
|
], mjBizAppsOrdersPaymentHeader_);
|
|
@@ -7958,38 +8311,6 @@ let mjBizAppsOrdersPaymentHeaderResolver = class mjBizAppsOrdersPaymentHeaderRes
|
|
|
7958
8311
|
const result = await this.MapFieldNamesToCodeNames('MJ_BizApps_Orders: Payment Headers', rows && rows.length > 0 ? rows[0] : null, this.GetUserFromPayload(userPayload));
|
|
7959
8312
|
return result;
|
|
7960
8313
|
}
|
|
7961
|
-
async mjBizAppsOrdersPaymentHeaders_ReversesPaymentHeaderIDArray(mjbizappsorderspaymentheader_, { userPayload, providers }, pubSub) {
|
|
7962
|
-
this.CheckUserReadPermissions('MJ_BizApps_Orders: Payment Headers', userPayload);
|
|
7963
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
7964
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView('__mj_BizAppsOrders', 'vwPaymentHeaders')} WHERE ${provider.QuoteIdentifier('ReversesPaymentHeaderID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ_BizApps_Orders: Payment Headers', userPayload, EntityPermissionType.Read, 'AND');
|
|
7965
|
-
const rows = await provider.ExecuteSQL(sSQL, [mjbizappsorderspaymentheader_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
7966
|
-
const result = await this.ArrayMapFieldNamesToCodeNames('MJ_BizApps_Orders: Payment Headers', rows, this.GetUserFromPayload(userPayload));
|
|
7967
|
-
return result;
|
|
7968
|
-
}
|
|
7969
|
-
async mjBizAppsOrdersPaymentLines_PaymentHeaderIDArray(mjbizappsorderspaymentheader_, { userPayload, providers }, pubSub) {
|
|
7970
|
-
this.CheckUserReadPermissions('MJ_BizApps_Orders: Payment Lines', userPayload);
|
|
7971
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
7972
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView('__mj_BizAppsOrders', 'vwPaymentLines')} WHERE ${provider.QuoteIdentifier('PaymentHeaderID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ_BizApps_Orders: Payment Lines', userPayload, EntityPermissionType.Read, 'AND');
|
|
7973
|
-
const rows = await provider.ExecuteSQL(sSQL, [mjbizappsorderspaymentheader_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
7974
|
-
const result = await this.ArrayMapFieldNamesToCodeNames('MJ_BizApps_Orders: Payment Lines', rows, this.GetUserFromPayload(userPayload));
|
|
7975
|
-
return result;
|
|
7976
|
-
}
|
|
7977
|
-
async mjBizAppsOrdersStoredValueTransactions_RelatedPaymentIDArray(mjbizappsorderspaymentheader_, { userPayload, providers }, pubSub) {
|
|
7978
|
-
this.CheckUserReadPermissions('MJ_BizApps_Orders: Stored Value Transactions', userPayload);
|
|
7979
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
7980
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView('__mj_BizAppsOrders', 'vwStoredValueTransactions')} WHERE ${provider.QuoteIdentifier('RelatedPaymentID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ_BizApps_Orders: Stored Value Transactions', userPayload, EntityPermissionType.Read, 'AND');
|
|
7981
|
-
const rows = await provider.ExecuteSQL(sSQL, [mjbizappsorderspaymentheader_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
7982
|
-
const result = await this.ArrayMapFieldNamesToCodeNames('MJ_BizApps_Orders: Stored Value Transactions', rows, this.GetUserFromPayload(userPayload));
|
|
7983
|
-
return result;
|
|
7984
|
-
}
|
|
7985
|
-
async mjBizAppsOrdersSubscriptionEvents_RelatedPaymentIDArray(mjbizappsorderspaymentheader_, { userPayload, providers }, pubSub) {
|
|
7986
|
-
this.CheckUserReadPermissions('MJ_BizApps_Orders: Subscription Events', userPayload);
|
|
7987
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
7988
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView('__mj_BizAppsOrders', 'vwSubscriptionEvents')} WHERE ${provider.QuoteIdentifier('RelatedPaymentID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ_BizApps_Orders: Subscription Events', userPayload, EntityPermissionType.Read, 'AND');
|
|
7989
|
-
const rows = await provider.ExecuteSQL(sSQL, [mjbizappsorderspaymentheader_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
7990
|
-
const result = await this.ArrayMapFieldNamesToCodeNames('MJ_BizApps_Orders: Subscription Events', rows, this.GetUserFromPayload(userPayload));
|
|
7991
|
-
return result;
|
|
7992
|
-
}
|
|
7993
8314
|
async CreatemjBizAppsOrdersPaymentHeader(input, { providers, userPayload }, pubSub) {
|
|
7994
8315
|
const provider = GetReadWriteProvider(providers);
|
|
7995
8316
|
return this.CreateRecord('MJ_BizApps_Orders: Payment Headers', input, provider, userPayload, pubSub);
|
|
@@ -8040,42 +8361,6 @@ __decorate([
|
|
|
8040
8361
|
__metadata("design:paramtypes", [String, Object, PubSubEngine]),
|
|
8041
8362
|
__metadata("design:returntype", Promise)
|
|
8042
8363
|
], mjBizAppsOrdersPaymentHeaderResolver.prototype, "mjBizAppsOrdersPaymentHeader", null);
|
|
8043
|
-
__decorate([
|
|
8044
|
-
FieldResolver(() => [mjBizAppsOrdersPaymentHeader_]),
|
|
8045
|
-
__param(0, Root()),
|
|
8046
|
-
__param(1, Ctx()),
|
|
8047
|
-
__param(2, PubSub()),
|
|
8048
|
-
__metadata("design:type", Function),
|
|
8049
|
-
__metadata("design:paramtypes", [mjBizAppsOrdersPaymentHeader_, Object, PubSubEngine]),
|
|
8050
|
-
__metadata("design:returntype", Promise)
|
|
8051
|
-
], mjBizAppsOrdersPaymentHeaderResolver.prototype, "mjBizAppsOrdersPaymentHeaders_ReversesPaymentHeaderIDArray", null);
|
|
8052
|
-
__decorate([
|
|
8053
|
-
FieldResolver(() => [mjBizAppsOrdersPaymentLine_]),
|
|
8054
|
-
__param(0, Root()),
|
|
8055
|
-
__param(1, Ctx()),
|
|
8056
|
-
__param(2, PubSub()),
|
|
8057
|
-
__metadata("design:type", Function),
|
|
8058
|
-
__metadata("design:paramtypes", [mjBizAppsOrdersPaymentHeader_, Object, PubSubEngine]),
|
|
8059
|
-
__metadata("design:returntype", Promise)
|
|
8060
|
-
], mjBizAppsOrdersPaymentHeaderResolver.prototype, "mjBizAppsOrdersPaymentLines_PaymentHeaderIDArray", null);
|
|
8061
|
-
__decorate([
|
|
8062
|
-
FieldResolver(() => [mjBizAppsOrdersStoredValueTransaction_]),
|
|
8063
|
-
__param(0, Root()),
|
|
8064
|
-
__param(1, Ctx()),
|
|
8065
|
-
__param(2, PubSub()),
|
|
8066
|
-
__metadata("design:type", Function),
|
|
8067
|
-
__metadata("design:paramtypes", [mjBizAppsOrdersPaymentHeader_, Object, PubSubEngine]),
|
|
8068
|
-
__metadata("design:returntype", Promise)
|
|
8069
|
-
], mjBizAppsOrdersPaymentHeaderResolver.prototype, "mjBizAppsOrdersStoredValueTransactions_RelatedPaymentIDArray", null);
|
|
8070
|
-
__decorate([
|
|
8071
|
-
FieldResolver(() => [mjBizAppsOrdersSubscriptionEvent_]),
|
|
8072
|
-
__param(0, Root()),
|
|
8073
|
-
__param(1, Ctx()),
|
|
8074
|
-
__param(2, PubSub()),
|
|
8075
|
-
__metadata("design:type", Function),
|
|
8076
|
-
__metadata("design:paramtypes", [mjBizAppsOrdersPaymentHeader_, Object, PubSubEngine]),
|
|
8077
|
-
__metadata("design:returntype", Promise)
|
|
8078
|
-
], mjBizAppsOrdersPaymentHeaderResolver.prototype, "mjBizAppsOrdersSubscriptionEvents_RelatedPaymentIDArray", null);
|
|
8079
8364
|
__decorate([
|
|
8080
8365
|
Mutation(() => mjBizAppsOrdersPaymentHeader_),
|
|
8081
8366
|
__param(0, Arg('input', () => CreatemjBizAppsOrdersPaymentHeaderInput)),
|
|
@@ -8189,10 +8474,6 @@ __decorate([
|
|
|
8189
8474
|
MaxLength(255),
|
|
8190
8475
|
__metadata("design:type", String)
|
|
8191
8476
|
], mjBizAppsOrdersPaymentIntent_.prototype, "BillToOrganization", void 0);
|
|
8192
|
-
__decorate([
|
|
8193
|
-
Field(() => [mjBizAppsOrdersPaymentHeader_]),
|
|
8194
|
-
__metadata("design:type", Array)
|
|
8195
|
-
], mjBizAppsOrdersPaymentIntent_.prototype, "mjBizAppsOrdersPaymentHeaders_PaymentIntentIDArray", void 0);
|
|
8196
8477
|
mjBizAppsOrdersPaymentIntent_ = __decorate([
|
|
8197
8478
|
ObjectType({ description: `Provider-side collection state (BO-D26; Stripe-shaped). The Manual provider skips intents entirely.` })
|
|
8198
8479
|
], mjBizAppsOrdersPaymentIntent_);
|
|
@@ -8366,14 +8647,6 @@ let mjBizAppsOrdersPaymentIntentResolver = class mjBizAppsOrdersPaymentIntentRes
|
|
|
8366
8647
|
const result = await this.MapFieldNamesToCodeNames('MJ_BizApps_Orders: Payment Intents', rows && rows.length > 0 ? rows[0] : null, this.GetUserFromPayload(userPayload));
|
|
8367
8648
|
return result;
|
|
8368
8649
|
}
|
|
8369
|
-
async mjBizAppsOrdersPaymentHeaders_PaymentIntentIDArray(mjbizappsorderspaymentintent_, { userPayload, providers }, pubSub) {
|
|
8370
|
-
this.CheckUserReadPermissions('MJ_BizApps_Orders: Payment Headers', userPayload);
|
|
8371
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
8372
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView('__mj_BizAppsOrders', 'vwPaymentHeaders')} WHERE ${provider.QuoteIdentifier('PaymentIntentID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ_BizApps_Orders: Payment Headers', userPayload, EntityPermissionType.Read, 'AND');
|
|
8373
|
-
const rows = await provider.ExecuteSQL(sSQL, [mjbizappsorderspaymentintent_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
8374
|
-
const result = await this.ArrayMapFieldNamesToCodeNames('MJ_BizApps_Orders: Payment Headers', rows, this.GetUserFromPayload(userPayload));
|
|
8375
|
-
return result;
|
|
8376
|
-
}
|
|
8377
8650
|
async CreatemjBizAppsOrdersPaymentIntent(input, { providers, userPayload }, pubSub) {
|
|
8378
8651
|
const provider = GetReadWriteProvider(providers);
|
|
8379
8652
|
return this.CreateRecord('MJ_BizApps_Orders: Payment Intents', input, provider, userPayload, pubSub);
|
|
@@ -8424,15 +8697,6 @@ __decorate([
|
|
|
8424
8697
|
__metadata("design:paramtypes", [String, Object, PubSubEngine]),
|
|
8425
8698
|
__metadata("design:returntype", Promise)
|
|
8426
8699
|
], mjBizAppsOrdersPaymentIntentResolver.prototype, "mjBizAppsOrdersPaymentIntent", null);
|
|
8427
|
-
__decorate([
|
|
8428
|
-
FieldResolver(() => [mjBizAppsOrdersPaymentHeader_]),
|
|
8429
|
-
__param(0, Root()),
|
|
8430
|
-
__param(1, Ctx()),
|
|
8431
|
-
__param(2, PubSub()),
|
|
8432
|
-
__metadata("design:type", Function),
|
|
8433
|
-
__metadata("design:paramtypes", [mjBizAppsOrdersPaymentIntent_, Object, PubSubEngine]),
|
|
8434
|
-
__metadata("design:returntype", Promise)
|
|
8435
|
-
], mjBizAppsOrdersPaymentIntentResolver.prototype, "mjBizAppsOrdersPaymentHeaders_PaymentIntentIDArray", null);
|
|
8436
8700
|
__decorate([
|
|
8437
8701
|
Mutation(() => mjBizAppsOrdersPaymentIntent_),
|
|
8438
8702
|
__param(0, Arg('input', () => CreatemjBizAppsOrdersPaymentIntentInput)),
|
|
@@ -8826,10 +9090,6 @@ __decorate([
|
|
|
8826
9090
|
Field(),
|
|
8827
9091
|
__metadata("design:type", Date)
|
|
8828
9092
|
], mjBizAppsOrdersPaymentProviderType_.prototype, "_mj__UpdatedAt", void 0);
|
|
8829
|
-
__decorate([
|
|
8830
|
-
Field(() => [mjBizAppsOrdersPaymentProvider_]),
|
|
8831
|
-
__metadata("design:type", Array)
|
|
8832
|
-
], mjBizAppsOrdersPaymentProviderType_.prototype, "mjBizAppsOrdersPaymentProviders_PaymentProviderTypeIDArray", void 0);
|
|
8833
9093
|
mjBizAppsOrdersPaymentProviderType_ = __decorate([
|
|
8834
9094
|
ObjectType()
|
|
8835
9095
|
], mjBizAppsOrdersPaymentProviderType_);
|
|
@@ -9003,14 +9263,6 @@ let mjBizAppsOrdersPaymentProviderTypeResolver = class mjBizAppsOrdersPaymentPro
|
|
|
9003
9263
|
const result = await this.MapFieldNamesToCodeNames('MJ_BizApps_Orders: Payment Provider Types', rows && rows.length > 0 ? rows[0] : null, this.GetUserFromPayload(userPayload));
|
|
9004
9264
|
return result;
|
|
9005
9265
|
}
|
|
9006
|
-
async mjBizAppsOrdersPaymentProviders_PaymentProviderTypeIDArray(mjbizappsorderspaymentprovidertype_, { userPayload, providers }, pubSub) {
|
|
9007
|
-
this.CheckUserReadPermissions('MJ_BizApps_Orders: Payment Providers', userPayload);
|
|
9008
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
9009
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView('__mj_BizAppsOrders', 'vwPaymentProviders')} WHERE ${provider.QuoteIdentifier('PaymentProviderTypeID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ_BizApps_Orders: Payment Providers', userPayload, EntityPermissionType.Read, 'AND');
|
|
9010
|
-
const rows = await provider.ExecuteSQL(sSQL, [mjbizappsorderspaymentprovidertype_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
9011
|
-
const result = await this.ArrayMapFieldNamesToCodeNames('MJ_BizApps_Orders: Payment Providers', rows, this.GetUserFromPayload(userPayload));
|
|
9012
|
-
return result;
|
|
9013
|
-
}
|
|
9014
9266
|
async CreatemjBizAppsOrdersPaymentProviderType(input, { providers, userPayload }, pubSub) {
|
|
9015
9267
|
const provider = GetReadWriteProvider(providers);
|
|
9016
9268
|
return this.CreateRecord('MJ_BizApps_Orders: Payment Provider Types', input, provider, userPayload, pubSub);
|
|
@@ -9061,15 +9313,6 @@ __decorate([
|
|
|
9061
9313
|
__metadata("design:paramtypes", [String, Object, PubSubEngine]),
|
|
9062
9314
|
__metadata("design:returntype", Promise)
|
|
9063
9315
|
], mjBizAppsOrdersPaymentProviderTypeResolver.prototype, "mjBizAppsOrdersPaymentProviderType", null);
|
|
9064
|
-
__decorate([
|
|
9065
|
-
FieldResolver(() => [mjBizAppsOrdersPaymentProvider_]),
|
|
9066
|
-
__param(0, Root()),
|
|
9067
|
-
__param(1, Ctx()),
|
|
9068
|
-
__param(2, PubSub()),
|
|
9069
|
-
__metadata("design:type", Function),
|
|
9070
|
-
__metadata("design:paramtypes", [mjBizAppsOrdersPaymentProviderType_, Object, PubSubEngine]),
|
|
9071
|
-
__metadata("design:returntype", Promise)
|
|
9072
|
-
], mjBizAppsOrdersPaymentProviderTypeResolver.prototype, "mjBizAppsOrdersPaymentProviders_PaymentProviderTypeIDArray", null);
|
|
9073
9316
|
__decorate([
|
|
9074
9317
|
Mutation(() => mjBizAppsOrdersPaymentProviderType_),
|
|
9075
9318
|
__param(0, Arg('input', () => CreatemjBizAppsOrdersPaymentProviderTypeInput)),
|
|
@@ -9158,22 +9401,6 @@ __decorate([
|
|
|
9158
9401
|
MaxLength(50),
|
|
9159
9402
|
__metadata("design:type", String)
|
|
9160
9403
|
], mjBizAppsOrdersPaymentProvider_.prototype, "Company", void 0);
|
|
9161
|
-
__decorate([
|
|
9162
|
-
Field(() => [mjBizAppsOrdersPaymentIntent_]),
|
|
9163
|
-
__metadata("design:type", Array)
|
|
9164
|
-
], mjBizAppsOrdersPaymentProvider_.prototype, "mjBizAppsOrdersPaymentIntents_PaymentProviderIDArray", void 0);
|
|
9165
|
-
__decorate([
|
|
9166
|
-
Field(() => [mjBizAppsOrdersPaymentHeader_]),
|
|
9167
|
-
__metadata("design:type", Array)
|
|
9168
|
-
], mjBizAppsOrdersPaymentProvider_.prototype, "mjBizAppsOrdersPaymentHeaders_PaymentProviderIDArray", void 0);
|
|
9169
|
-
__decorate([
|
|
9170
|
-
Field(() => [mjBizAppsOrdersSubscription_]),
|
|
9171
|
-
__metadata("design:type", Array)
|
|
9172
|
-
], mjBizAppsOrdersPaymentProvider_.prototype, "mjBizAppsOrdersSubscriptions_PaymentProviderIDArray", void 0);
|
|
9173
|
-
__decorate([
|
|
9174
|
-
Field(() => [mjBizAppsOrdersPaymentDetail_]),
|
|
9175
|
-
__metadata("design:type", Array)
|
|
9176
|
-
], mjBizAppsOrdersPaymentProvider_.prototype, "mjBizAppsOrdersPaymentDetails_PaymentProviderIDArray", void 0);
|
|
9177
9404
|
mjBizAppsOrdersPaymentProvider_ = __decorate([
|
|
9178
9405
|
ObjectType({ description: `A configured payment-processing account (Stripe account, or the built-in Manual provider) owned by one company.` })
|
|
9179
9406
|
], mjBizAppsOrdersPaymentProvider_);
|
|
@@ -9323,38 +9550,6 @@ let mjBizAppsOrdersPaymentProviderResolver = class mjBizAppsOrdersPaymentProvide
|
|
|
9323
9550
|
const result = await this.MapFieldNamesToCodeNames('MJ_BizApps_Orders: Payment Providers', rows && rows.length > 0 ? rows[0] : null, this.GetUserFromPayload(userPayload));
|
|
9324
9551
|
return result;
|
|
9325
9552
|
}
|
|
9326
|
-
async mjBizAppsOrdersPaymentIntents_PaymentProviderIDArray(mjbizappsorderspaymentprovider_, { userPayload, providers }, pubSub) {
|
|
9327
|
-
this.CheckUserReadPermissions('MJ_BizApps_Orders: Payment Intents', userPayload);
|
|
9328
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
9329
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView('__mj_BizAppsOrders', 'vwPaymentIntents')} WHERE ${provider.QuoteIdentifier('PaymentProviderID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ_BizApps_Orders: Payment Intents', userPayload, EntityPermissionType.Read, 'AND');
|
|
9330
|
-
const rows = await provider.ExecuteSQL(sSQL, [mjbizappsorderspaymentprovider_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
9331
|
-
const result = await this.ArrayMapFieldNamesToCodeNames('MJ_BizApps_Orders: Payment Intents', rows, this.GetUserFromPayload(userPayload));
|
|
9332
|
-
return result;
|
|
9333
|
-
}
|
|
9334
|
-
async mjBizAppsOrdersPaymentHeaders_PaymentProviderIDArray(mjbizappsorderspaymentprovider_, { userPayload, providers }, pubSub) {
|
|
9335
|
-
this.CheckUserReadPermissions('MJ_BizApps_Orders: Payment Headers', userPayload);
|
|
9336
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
9337
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView('__mj_BizAppsOrders', 'vwPaymentHeaders')} WHERE ${provider.QuoteIdentifier('PaymentProviderID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ_BizApps_Orders: Payment Headers', userPayload, EntityPermissionType.Read, 'AND');
|
|
9338
|
-
const rows = await provider.ExecuteSQL(sSQL, [mjbizappsorderspaymentprovider_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
9339
|
-
const result = await this.ArrayMapFieldNamesToCodeNames('MJ_BizApps_Orders: Payment Headers', rows, this.GetUserFromPayload(userPayload));
|
|
9340
|
-
return result;
|
|
9341
|
-
}
|
|
9342
|
-
async mjBizAppsOrdersSubscriptions_PaymentProviderIDArray(mjbizappsorderspaymentprovider_, { userPayload, providers }, pubSub) {
|
|
9343
|
-
this.CheckUserReadPermissions('MJ_BizApps_Orders: Subscriptions', userPayload);
|
|
9344
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
9345
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView('__mj_BizAppsOrders', 'vwSubscriptions')} WHERE ${provider.QuoteIdentifier('PaymentProviderID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ_BizApps_Orders: Subscriptions', userPayload, EntityPermissionType.Read, 'AND');
|
|
9346
|
-
const rows = await provider.ExecuteSQL(sSQL, [mjbizappsorderspaymentprovider_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
9347
|
-
const result = await this.ArrayMapFieldNamesToCodeNames('MJ_BizApps_Orders: Subscriptions', rows, this.GetUserFromPayload(userPayload));
|
|
9348
|
-
return result;
|
|
9349
|
-
}
|
|
9350
|
-
async mjBizAppsOrdersPaymentDetails_PaymentProviderIDArray(mjbizappsorderspaymentprovider_, { userPayload, providers }, pubSub) {
|
|
9351
|
-
this.CheckUserReadPermissions('MJ_BizApps_Orders: Payment Details', userPayload);
|
|
9352
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
9353
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView('__mj_BizAppsOrders', 'vwPaymentDetails')} WHERE ${provider.QuoteIdentifier('PaymentProviderID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ_BizApps_Orders: Payment Details', userPayload, EntityPermissionType.Read, 'AND');
|
|
9354
|
-
const rows = await provider.ExecuteSQL(sSQL, [mjbizappsorderspaymentprovider_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
9355
|
-
const result = await this.ArrayMapFieldNamesToCodeNames('MJ_BizApps_Orders: Payment Details', rows, this.GetUserFromPayload(userPayload));
|
|
9356
|
-
return result;
|
|
9357
|
-
}
|
|
9358
9553
|
async CreatemjBizAppsOrdersPaymentProvider(input, { providers, userPayload }, pubSub) {
|
|
9359
9554
|
const provider = GetReadWriteProvider(providers);
|
|
9360
9555
|
return this.CreateRecord('MJ_BizApps_Orders: Payment Providers', input, provider, userPayload, pubSub);
|
|
@@ -9405,42 +9600,6 @@ __decorate([
|
|
|
9405
9600
|
__metadata("design:paramtypes", [String, Object, PubSubEngine]),
|
|
9406
9601
|
__metadata("design:returntype", Promise)
|
|
9407
9602
|
], mjBizAppsOrdersPaymentProviderResolver.prototype, "mjBizAppsOrdersPaymentProvider", null);
|
|
9408
|
-
__decorate([
|
|
9409
|
-
FieldResolver(() => [mjBizAppsOrdersPaymentIntent_]),
|
|
9410
|
-
__param(0, Root()),
|
|
9411
|
-
__param(1, Ctx()),
|
|
9412
|
-
__param(2, PubSub()),
|
|
9413
|
-
__metadata("design:type", Function),
|
|
9414
|
-
__metadata("design:paramtypes", [mjBizAppsOrdersPaymentProvider_, Object, PubSubEngine]),
|
|
9415
|
-
__metadata("design:returntype", Promise)
|
|
9416
|
-
], mjBizAppsOrdersPaymentProviderResolver.prototype, "mjBizAppsOrdersPaymentIntents_PaymentProviderIDArray", null);
|
|
9417
|
-
__decorate([
|
|
9418
|
-
FieldResolver(() => [mjBizAppsOrdersPaymentHeader_]),
|
|
9419
|
-
__param(0, Root()),
|
|
9420
|
-
__param(1, Ctx()),
|
|
9421
|
-
__param(2, PubSub()),
|
|
9422
|
-
__metadata("design:type", Function),
|
|
9423
|
-
__metadata("design:paramtypes", [mjBizAppsOrdersPaymentProvider_, Object, PubSubEngine]),
|
|
9424
|
-
__metadata("design:returntype", Promise)
|
|
9425
|
-
], mjBizAppsOrdersPaymentProviderResolver.prototype, "mjBizAppsOrdersPaymentHeaders_PaymentProviderIDArray", null);
|
|
9426
|
-
__decorate([
|
|
9427
|
-
FieldResolver(() => [mjBizAppsOrdersSubscription_]),
|
|
9428
|
-
__param(0, Root()),
|
|
9429
|
-
__param(1, Ctx()),
|
|
9430
|
-
__param(2, PubSub()),
|
|
9431
|
-
__metadata("design:type", Function),
|
|
9432
|
-
__metadata("design:paramtypes", [mjBizAppsOrdersPaymentProvider_, Object, PubSubEngine]),
|
|
9433
|
-
__metadata("design:returntype", Promise)
|
|
9434
|
-
], mjBizAppsOrdersPaymentProviderResolver.prototype, "mjBizAppsOrdersSubscriptions_PaymentProviderIDArray", null);
|
|
9435
|
-
__decorate([
|
|
9436
|
-
FieldResolver(() => [mjBizAppsOrdersPaymentDetail_]),
|
|
9437
|
-
__param(0, Root()),
|
|
9438
|
-
__param(1, Ctx()),
|
|
9439
|
-
__param(2, PubSub()),
|
|
9440
|
-
__metadata("design:type", Function),
|
|
9441
|
-
__metadata("design:paramtypes", [mjBizAppsOrdersPaymentProvider_, Object, PubSubEngine]),
|
|
9442
|
-
__metadata("design:returntype", Promise)
|
|
9443
|
-
], mjBizAppsOrdersPaymentProviderResolver.prototype, "mjBizAppsOrdersPaymentDetails_PaymentProviderIDArray", null);
|
|
9444
9603
|
__decorate([
|
|
9445
9604
|
Mutation(() => mjBizAppsOrdersPaymentProvider_),
|
|
9446
9605
|
__param(0, Arg('input', () => CreatemjBizAppsOrdersPaymentProviderInput)),
|
|
@@ -9725,14 +9884,6 @@ __decorate([
|
|
|
9725
9884
|
Field(),
|
|
9726
9885
|
__metadata("design:type", Date)
|
|
9727
9886
|
], mjBizAppsOrdersPaymentTermsType_.prototype, "_mj__UpdatedAt", void 0);
|
|
9728
|
-
__decorate([
|
|
9729
|
-
Field(() => [mjBizAppsOrdersOrderHeader_]),
|
|
9730
|
-
__metadata("design:type", Array)
|
|
9731
|
-
], mjBizAppsOrdersPaymentTermsType_.prototype, "mjBizAppsOrdersOrderHeaders_PaymentTermsTypeIDArray", void 0);
|
|
9732
|
-
__decorate([
|
|
9733
|
-
Field(() => [mjBizAppsOrdersCustomerPaymentTerms_]),
|
|
9734
|
-
__metadata("design:type", Array)
|
|
9735
|
-
], mjBizAppsOrdersPaymentTermsType_.prototype, "mjBizAppsOrdersCustomerPaymentTerms_PaymentTermsTypeIDArray", void 0);
|
|
9736
9887
|
mjBizAppsOrdersPaymentTermsType_ = __decorate([
|
|
9737
9888
|
ObjectType({ description: `Payment terms lookup (Net 30, Due on Receipt, ...). Owned by Orders; NetDays derives Order.DueDate from the posting date. Seed rows via metadata sync.` })
|
|
9738
9889
|
], mjBizAppsOrdersPaymentTermsType_);
|
|
@@ -9874,22 +10025,6 @@ let mjBizAppsOrdersPaymentTermsTypeResolver = class mjBizAppsOrdersPaymentTermsT
|
|
|
9874
10025
|
const result = await this.MapFieldNamesToCodeNames('MJ_BizApps_Orders: Payment Terms Types', rows && rows.length > 0 ? rows[0] : null, this.GetUserFromPayload(userPayload));
|
|
9875
10026
|
return result;
|
|
9876
10027
|
}
|
|
9877
|
-
async mjBizAppsOrdersOrderHeaders_PaymentTermsTypeIDArray(mjbizappsorderspaymenttermstype_, { userPayload, providers }, pubSub) {
|
|
9878
|
-
this.CheckUserReadPermissions('MJ_BizApps_Orders: Order Headers', userPayload);
|
|
9879
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
9880
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView('__mj_BizAppsOrders', 'vwOrderHeaders')} WHERE ${provider.QuoteIdentifier('PaymentTermsTypeID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ_BizApps_Orders: Order Headers', userPayload, EntityPermissionType.Read, 'AND');
|
|
9881
|
-
const rows = await provider.ExecuteSQL(sSQL, [mjbizappsorderspaymenttermstype_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
9882
|
-
const result = await this.ArrayMapFieldNamesToCodeNames('MJ_BizApps_Orders: Order Headers', rows, this.GetUserFromPayload(userPayload));
|
|
9883
|
-
return result;
|
|
9884
|
-
}
|
|
9885
|
-
async mjBizAppsOrdersCustomerPaymentTerms_PaymentTermsTypeIDArray(mjbizappsorderspaymenttermstype_, { userPayload, providers }, pubSub) {
|
|
9886
|
-
this.CheckUserReadPermissions('MJ_BizApps_Orders: Customer Payment Terms', userPayload);
|
|
9887
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
9888
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView('__mj_BizAppsOrders', 'vwCustomerPaymentTerms')} WHERE ${provider.QuoteIdentifier('PaymentTermsTypeID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ_BizApps_Orders: Customer Payment Terms', userPayload, EntityPermissionType.Read, 'AND');
|
|
9889
|
-
const rows = await provider.ExecuteSQL(sSQL, [mjbizappsorderspaymenttermstype_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
9890
|
-
const result = await this.ArrayMapFieldNamesToCodeNames('MJ_BizApps_Orders: Customer Payment Terms', rows, this.GetUserFromPayload(userPayload));
|
|
9891
|
-
return result;
|
|
9892
|
-
}
|
|
9893
10028
|
async CreatemjBizAppsOrdersPaymentTermsType(input, { providers, userPayload }, pubSub) {
|
|
9894
10029
|
const provider = GetReadWriteProvider(providers);
|
|
9895
10030
|
return this.CreateRecord('MJ_BizApps_Orders: Payment Terms Types', input, provider, userPayload, pubSub);
|
|
@@ -9940,24 +10075,6 @@ __decorate([
|
|
|
9940
10075
|
__metadata("design:paramtypes", [String, Object, PubSubEngine]),
|
|
9941
10076
|
__metadata("design:returntype", Promise)
|
|
9942
10077
|
], mjBizAppsOrdersPaymentTermsTypeResolver.prototype, "mjBizAppsOrdersPaymentTermsType", null);
|
|
9943
|
-
__decorate([
|
|
9944
|
-
FieldResolver(() => [mjBizAppsOrdersOrderHeader_]),
|
|
9945
|
-
__param(0, Root()),
|
|
9946
|
-
__param(1, Ctx()),
|
|
9947
|
-
__param(2, PubSub()),
|
|
9948
|
-
__metadata("design:type", Function),
|
|
9949
|
-
__metadata("design:paramtypes", [mjBizAppsOrdersPaymentTermsType_, Object, PubSubEngine]),
|
|
9950
|
-
__metadata("design:returntype", Promise)
|
|
9951
|
-
], mjBizAppsOrdersPaymentTermsTypeResolver.prototype, "mjBizAppsOrdersOrderHeaders_PaymentTermsTypeIDArray", null);
|
|
9952
|
-
__decorate([
|
|
9953
|
-
FieldResolver(() => [mjBizAppsOrdersCustomerPaymentTerms_]),
|
|
9954
|
-
__param(0, Root()),
|
|
9955
|
-
__param(1, Ctx()),
|
|
9956
|
-
__param(2, PubSub()),
|
|
9957
|
-
__metadata("design:type", Function),
|
|
9958
|
-
__metadata("design:paramtypes", [mjBizAppsOrdersPaymentTermsType_, Object, PubSubEngine]),
|
|
9959
|
-
__metadata("design:returntype", Promise)
|
|
9960
|
-
], mjBizAppsOrdersPaymentTermsTypeResolver.prototype, "mjBizAppsOrdersCustomerPaymentTerms_PaymentTermsTypeIDArray", null);
|
|
9961
10078
|
__decorate([
|
|
9962
10079
|
Mutation(() => mjBizAppsOrdersPaymentTermsType_),
|
|
9963
10080
|
__param(0, Arg('input', () => CreatemjBizAppsOrdersPaymentTermsTypeInput)),
|
|
@@ -10055,18 +10172,6 @@ __decorate([
|
|
|
10055
10172
|
Field(),
|
|
10056
10173
|
__metadata("design:type", Date)
|
|
10057
10174
|
], mjBizAppsOrdersPaymentType_.prototype, "_mj__UpdatedAt", void 0);
|
|
10058
|
-
__decorate([
|
|
10059
|
-
Field(() => [mjBizAppsOrdersPaymentDetail_]),
|
|
10060
|
-
__metadata("design:type", Array)
|
|
10061
|
-
], mjBizAppsOrdersPaymentType_.prototype, "mjBizAppsOrdersPaymentDetails_PaymentTypeIDArray", void 0);
|
|
10062
|
-
__decorate([
|
|
10063
|
-
Field(() => [mjBizAppsOrdersPaymentHeader_]),
|
|
10064
|
-
__metadata("design:type", Array)
|
|
10065
|
-
], mjBizAppsOrdersPaymentType_.prototype, "mjBizAppsOrdersPaymentHeaders_PaymentTypeIDArray", void 0);
|
|
10066
|
-
__decorate([
|
|
10067
|
-
Field(() => [mjBizAppsOrdersOrderHeader_]),
|
|
10068
|
-
__metadata("design:type", Array)
|
|
10069
|
-
], mjBizAppsOrdersPaymentType_.prototype, "mjBizAppsOrdersOrderHeaders_InitialPaymentTypeIDArray", void 0);
|
|
10070
10175
|
mjBizAppsOrdersPaymentType_ = __decorate([
|
|
10071
10176
|
ObjectType()
|
|
10072
10177
|
], mjBizAppsOrdersPaymentType_);
|
|
@@ -10256,30 +10361,6 @@ let mjBizAppsOrdersPaymentTypeResolver = class mjBizAppsOrdersPaymentTypeResolve
|
|
|
10256
10361
|
const result = await this.MapFieldNamesToCodeNames('MJ_BizApps_Orders: Payment Types', rows && rows.length > 0 ? rows[0] : null, this.GetUserFromPayload(userPayload));
|
|
10257
10362
|
return result;
|
|
10258
10363
|
}
|
|
10259
|
-
async mjBizAppsOrdersPaymentDetails_PaymentTypeIDArray(mjbizappsorderspaymenttype_, { userPayload, providers }, pubSub) {
|
|
10260
|
-
this.CheckUserReadPermissions('MJ_BizApps_Orders: Payment Details', userPayload);
|
|
10261
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
10262
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView('__mj_BizAppsOrders', 'vwPaymentDetails')} WHERE ${provider.QuoteIdentifier('PaymentTypeID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ_BizApps_Orders: Payment Details', userPayload, EntityPermissionType.Read, 'AND');
|
|
10263
|
-
const rows = await provider.ExecuteSQL(sSQL, [mjbizappsorderspaymenttype_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
10264
|
-
const result = await this.ArrayMapFieldNamesToCodeNames('MJ_BizApps_Orders: Payment Details', rows, this.GetUserFromPayload(userPayload));
|
|
10265
|
-
return result;
|
|
10266
|
-
}
|
|
10267
|
-
async mjBizAppsOrdersPaymentHeaders_PaymentTypeIDArray(mjbizappsorderspaymenttype_, { userPayload, providers }, pubSub) {
|
|
10268
|
-
this.CheckUserReadPermissions('MJ_BizApps_Orders: Payment Headers', userPayload);
|
|
10269
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
10270
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView('__mj_BizAppsOrders', 'vwPaymentHeaders')} WHERE ${provider.QuoteIdentifier('PaymentTypeID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ_BizApps_Orders: Payment Headers', userPayload, EntityPermissionType.Read, 'AND');
|
|
10271
|
-
const rows = await provider.ExecuteSQL(sSQL, [mjbizappsorderspaymenttype_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
10272
|
-
const result = await this.ArrayMapFieldNamesToCodeNames('MJ_BizApps_Orders: Payment Headers', rows, this.GetUserFromPayload(userPayload));
|
|
10273
|
-
return result;
|
|
10274
|
-
}
|
|
10275
|
-
async mjBizAppsOrdersOrderHeaders_InitialPaymentTypeIDArray(mjbizappsorderspaymenttype_, { userPayload, providers }, pubSub) {
|
|
10276
|
-
this.CheckUserReadPermissions('MJ_BizApps_Orders: Order Headers', userPayload);
|
|
10277
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
10278
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView('__mj_BizAppsOrders', 'vwOrderHeaders')} WHERE ${provider.QuoteIdentifier('InitialPaymentTypeID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ_BizApps_Orders: Order Headers', userPayload, EntityPermissionType.Read, 'AND');
|
|
10279
|
-
const rows = await provider.ExecuteSQL(sSQL, [mjbizappsorderspaymenttype_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
10280
|
-
const result = await this.ArrayMapFieldNamesToCodeNames('MJ_BizApps_Orders: Order Headers', rows, this.GetUserFromPayload(userPayload));
|
|
10281
|
-
return result;
|
|
10282
|
-
}
|
|
10283
10364
|
async CreatemjBizAppsOrdersPaymentType(input, { providers, userPayload }, pubSub) {
|
|
10284
10365
|
const provider = GetReadWriteProvider(providers);
|
|
10285
10366
|
return this.CreateRecord('MJ_BizApps_Orders: Payment Types', input, provider, userPayload, pubSub);
|
|
@@ -10323,40 +10404,13 @@ __decorate([
|
|
|
10323
10404
|
], mjBizAppsOrdersPaymentTypeResolver.prototype, "RunmjBizAppsOrdersPaymentTypeDynamicView", null);
|
|
10324
10405
|
__decorate([
|
|
10325
10406
|
Query(() => mjBizAppsOrdersPaymentType_, { nullable: true }),
|
|
10326
|
-
__param(0, Arg('ID', () => String)),
|
|
10327
|
-
__param(1, Ctx()),
|
|
10328
|
-
__param(2, PubSub()),
|
|
10329
|
-
__metadata("design:type", Function),
|
|
10330
|
-
__metadata("design:paramtypes", [String, Object, PubSubEngine]),
|
|
10331
|
-
__metadata("design:returntype", Promise)
|
|
10332
|
-
], mjBizAppsOrdersPaymentTypeResolver.prototype, "mjBizAppsOrdersPaymentType", null);
|
|
10333
|
-
__decorate([
|
|
10334
|
-
FieldResolver(() => [mjBizAppsOrdersPaymentDetail_]),
|
|
10335
|
-
__param(0, Root()),
|
|
10336
|
-
__param(1, Ctx()),
|
|
10337
|
-
__param(2, PubSub()),
|
|
10338
|
-
__metadata("design:type", Function),
|
|
10339
|
-
__metadata("design:paramtypes", [mjBizAppsOrdersPaymentType_, Object, PubSubEngine]),
|
|
10340
|
-
__metadata("design:returntype", Promise)
|
|
10341
|
-
], mjBizAppsOrdersPaymentTypeResolver.prototype, "mjBizAppsOrdersPaymentDetails_PaymentTypeIDArray", null);
|
|
10342
|
-
__decorate([
|
|
10343
|
-
FieldResolver(() => [mjBizAppsOrdersPaymentHeader_]),
|
|
10344
|
-
__param(0, Root()),
|
|
10345
|
-
__param(1, Ctx()),
|
|
10346
|
-
__param(2, PubSub()),
|
|
10347
|
-
__metadata("design:type", Function),
|
|
10348
|
-
__metadata("design:paramtypes", [mjBizAppsOrdersPaymentType_, Object, PubSubEngine]),
|
|
10349
|
-
__metadata("design:returntype", Promise)
|
|
10350
|
-
], mjBizAppsOrdersPaymentTypeResolver.prototype, "mjBizAppsOrdersPaymentHeaders_PaymentTypeIDArray", null);
|
|
10351
|
-
__decorate([
|
|
10352
|
-
FieldResolver(() => [mjBizAppsOrdersOrderHeader_]),
|
|
10353
|
-
__param(0, Root()),
|
|
10407
|
+
__param(0, Arg('ID', () => String)),
|
|
10354
10408
|
__param(1, Ctx()),
|
|
10355
10409
|
__param(2, PubSub()),
|
|
10356
10410
|
__metadata("design:type", Function),
|
|
10357
|
-
__metadata("design:paramtypes", [
|
|
10411
|
+
__metadata("design:paramtypes", [String, Object, PubSubEngine]),
|
|
10358
10412
|
__metadata("design:returntype", Promise)
|
|
10359
|
-
], mjBizAppsOrdersPaymentTypeResolver.prototype, "
|
|
10413
|
+
], mjBizAppsOrdersPaymentTypeResolver.prototype, "mjBizAppsOrdersPaymentType", null);
|
|
10360
10414
|
__decorate([
|
|
10361
10415
|
Mutation(() => mjBizAppsOrdersPaymentType_),
|
|
10362
10416
|
__param(0, Arg('input', () => CreatemjBizAppsOrdersPaymentTypeInput)),
|
|
@@ -10750,18 +10804,6 @@ __decorate([
|
|
|
10750
10804
|
Field(),
|
|
10751
10805
|
__metadata("design:type", Date)
|
|
10752
10806
|
], mjBizAppsOrdersPriceList_.prototype, "_mj__UpdatedAt", void 0);
|
|
10753
|
-
__decorate([
|
|
10754
|
-
Field(() => [mjBizAppsOrdersProductPrice_]),
|
|
10755
|
-
__metadata("design:type", Array)
|
|
10756
|
-
], mjBizAppsOrdersPriceList_.prototype, "mjBizAppsOrdersProductPrices_PriceListIDArray", void 0);
|
|
10757
|
-
__decorate([
|
|
10758
|
-
Field(() => [mjBizAppsOrdersOrderCompanyPolicy_]),
|
|
10759
|
-
__metadata("design:type", Array)
|
|
10760
|
-
], mjBizAppsOrdersPriceList_.prototype, "mjBizAppsOrdersOrderCompanyPolicies_DefaultPriceListIDArray", void 0);
|
|
10761
|
-
__decorate([
|
|
10762
|
-
Field(() => [mjBizAppsOrdersPriceListAssignment_]),
|
|
10763
|
-
__metadata("design:type", Array)
|
|
10764
|
-
], mjBizAppsOrdersPriceList_.prototype, "mjBizAppsOrdersPriceListAssignments_PriceListIDArray", void 0);
|
|
10765
10807
|
mjBizAppsOrdersPriceList_ = __decorate([
|
|
10766
10808
|
ObjectType({ description: `Pricing segmentation container (BO-D33): region/channel/customer-tier scope, effective-dated. Currency column deferred with FX (MOD-4).` })
|
|
10767
10809
|
], mjBizAppsOrdersPriceList_);
|
|
@@ -10911,30 +10953,6 @@ let mjBizAppsOrdersPriceListResolver = class mjBizAppsOrdersPriceListResolver ex
|
|
|
10911
10953
|
const result = await this.MapFieldNamesToCodeNames('MJ_BizApps_Orders: Price Lists', rows && rows.length > 0 ? rows[0] : null, this.GetUserFromPayload(userPayload));
|
|
10912
10954
|
return result;
|
|
10913
10955
|
}
|
|
10914
|
-
async mjBizAppsOrdersProductPrices_PriceListIDArray(mjbizappsorderspricelist_, { userPayload, providers }, pubSub) {
|
|
10915
|
-
this.CheckUserReadPermissions('MJ_BizApps_Orders: Product Prices', userPayload);
|
|
10916
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
10917
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView('__mj_BizAppsOrders', 'vwProductPrices')} WHERE ${provider.QuoteIdentifier('PriceListID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ_BizApps_Orders: Product Prices', userPayload, EntityPermissionType.Read, 'AND');
|
|
10918
|
-
const rows = await provider.ExecuteSQL(sSQL, [mjbizappsorderspricelist_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
10919
|
-
const result = await this.ArrayMapFieldNamesToCodeNames('MJ_BizApps_Orders: Product Prices', rows, this.GetUserFromPayload(userPayload));
|
|
10920
|
-
return result;
|
|
10921
|
-
}
|
|
10922
|
-
async mjBizAppsOrdersOrderCompanyPolicies_DefaultPriceListIDArray(mjbizappsorderspricelist_, { userPayload, providers }, pubSub) {
|
|
10923
|
-
this.CheckUserReadPermissions('MJ_BizApps_Orders: Order Company Policies', userPayload);
|
|
10924
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
10925
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView('__mj_BizAppsOrders', 'vwOrderCompanyPolicies')} WHERE ${provider.QuoteIdentifier('DefaultPriceListID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ_BizApps_Orders: Order Company Policies', userPayload, EntityPermissionType.Read, 'AND');
|
|
10926
|
-
const rows = await provider.ExecuteSQL(sSQL, [mjbizappsorderspricelist_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
10927
|
-
const result = await this.ArrayMapFieldNamesToCodeNames('MJ_BizApps_Orders: Order Company Policies', rows, this.GetUserFromPayload(userPayload));
|
|
10928
|
-
return result;
|
|
10929
|
-
}
|
|
10930
|
-
async mjBizAppsOrdersPriceListAssignments_PriceListIDArray(mjbizappsorderspricelist_, { userPayload, providers }, pubSub) {
|
|
10931
|
-
this.CheckUserReadPermissions('MJ_BizApps_Orders: Price List Assignments', userPayload);
|
|
10932
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
10933
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView('__mj_BizAppsOrders', 'vwPriceListAssignments')} WHERE ${provider.QuoteIdentifier('PriceListID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ_BizApps_Orders: Price List Assignments', userPayload, EntityPermissionType.Read, 'AND');
|
|
10934
|
-
const rows = await provider.ExecuteSQL(sSQL, [mjbizappsorderspricelist_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
10935
|
-
const result = await this.ArrayMapFieldNamesToCodeNames('MJ_BizApps_Orders: Price List Assignments', rows, this.GetUserFromPayload(userPayload));
|
|
10936
|
-
return result;
|
|
10937
|
-
}
|
|
10938
10956
|
async CreatemjBizAppsOrdersPriceList(input, { providers, userPayload }, pubSub) {
|
|
10939
10957
|
const provider = GetReadWriteProvider(providers);
|
|
10940
10958
|
return this.CreateRecord('MJ_BizApps_Orders: Price Lists', input, provider, userPayload, pubSub);
|
|
@@ -10985,33 +11003,6 @@ __decorate([
|
|
|
10985
11003
|
__metadata("design:paramtypes", [String, Object, PubSubEngine]),
|
|
10986
11004
|
__metadata("design:returntype", Promise)
|
|
10987
11005
|
], mjBizAppsOrdersPriceListResolver.prototype, "mjBizAppsOrdersPriceList", null);
|
|
10988
|
-
__decorate([
|
|
10989
|
-
FieldResolver(() => [mjBizAppsOrdersProductPrice_]),
|
|
10990
|
-
__param(0, Root()),
|
|
10991
|
-
__param(1, Ctx()),
|
|
10992
|
-
__param(2, PubSub()),
|
|
10993
|
-
__metadata("design:type", Function),
|
|
10994
|
-
__metadata("design:paramtypes", [mjBizAppsOrdersPriceList_, Object, PubSubEngine]),
|
|
10995
|
-
__metadata("design:returntype", Promise)
|
|
10996
|
-
], mjBizAppsOrdersPriceListResolver.prototype, "mjBizAppsOrdersProductPrices_PriceListIDArray", null);
|
|
10997
|
-
__decorate([
|
|
10998
|
-
FieldResolver(() => [mjBizAppsOrdersOrderCompanyPolicy_]),
|
|
10999
|
-
__param(0, Root()),
|
|
11000
|
-
__param(1, Ctx()),
|
|
11001
|
-
__param(2, PubSub()),
|
|
11002
|
-
__metadata("design:type", Function),
|
|
11003
|
-
__metadata("design:paramtypes", [mjBizAppsOrdersPriceList_, Object, PubSubEngine]),
|
|
11004
|
-
__metadata("design:returntype", Promise)
|
|
11005
|
-
], mjBizAppsOrdersPriceListResolver.prototype, "mjBizAppsOrdersOrderCompanyPolicies_DefaultPriceListIDArray", null);
|
|
11006
|
-
__decorate([
|
|
11007
|
-
FieldResolver(() => [mjBizAppsOrdersPriceListAssignment_]),
|
|
11008
|
-
__param(0, Root()),
|
|
11009
|
-
__param(1, Ctx()),
|
|
11010
|
-
__param(2, PubSub()),
|
|
11011
|
-
__metadata("design:type", Function),
|
|
11012
|
-
__metadata("design:paramtypes", [mjBizAppsOrdersPriceList_, Object, PubSubEngine]),
|
|
11013
|
-
__metadata("design:returntype", Promise)
|
|
11014
|
-
], mjBizAppsOrdersPriceListResolver.prototype, "mjBizAppsOrdersPriceListAssignments_PriceListIDArray", null);
|
|
11015
11006
|
__decorate([
|
|
11016
11007
|
Mutation(() => mjBizAppsOrdersPriceList_),
|
|
11017
11008
|
__param(0, Arg('input', () => CreatemjBizAppsOrdersPriceListInput)),
|
|
@@ -11686,18 +11677,6 @@ __decorate([
|
|
|
11686
11677
|
Field(() => Int, { nullable: true }),
|
|
11687
11678
|
__metadata("design:type", Number)
|
|
11688
11679
|
], mjBizAppsOrdersProductCategory_.prototype, "ParentProductCategoryIDChildCount", void 0);
|
|
11689
|
-
__decorate([
|
|
11690
|
-
Field(() => [mjBizAppsOrdersProduct_]),
|
|
11691
|
-
__metadata("design:type", Array)
|
|
11692
|
-
], mjBizAppsOrdersProductCategory_.prototype, "mjBizAppsOrdersProducts_ProductCategoryIDArray", void 0);
|
|
11693
|
-
__decorate([
|
|
11694
|
-
Field(() => [mjBizAppsOrdersProductCategory_]),
|
|
11695
|
-
__metadata("design:type", Array)
|
|
11696
|
-
], mjBizAppsOrdersProductCategory_.prototype, "mjBizAppsOrdersProductCategories_ParentProductCategoryIDArray", void 0);
|
|
11697
|
-
__decorate([
|
|
11698
|
-
Field(() => [mjBizAppsOrdersPromotionTarget_]),
|
|
11699
|
-
__metadata("design:type", Array)
|
|
11700
|
-
], mjBizAppsOrdersProductCategory_.prototype, "mjBizAppsOrdersPromotionTargets_ProductCategoryIDArray", void 0);
|
|
11701
11680
|
mjBizAppsOrdersProductCategory_ = __decorate([
|
|
11702
11681
|
ObjectType({ description: `PER-COMPANY hierarchical grouping of products (D7): each company owns its own category tree; identical names across companies display-collapse in the UI. The account resolver walks the ParentProductCategoryID tree upward within the company.` })
|
|
11703
11682
|
], mjBizAppsOrdersProductCategory_);
|
|
@@ -11895,30 +11874,6 @@ let mjBizAppsOrdersProductCategoryResolver = class mjBizAppsOrdersProductCategor
|
|
|
11895
11874
|
const result = await this.MapFieldNamesToCodeNames('MJ_BizApps_Orders: Product Categories', rows && rows.length > 0 ? rows[0] : null, this.GetUserFromPayload(userPayload));
|
|
11896
11875
|
return result;
|
|
11897
11876
|
}
|
|
11898
|
-
async mjBizAppsOrdersProducts_ProductCategoryIDArray(mjbizappsordersproductcategory_, { userPayload, providers }, pubSub) {
|
|
11899
|
-
this.CheckUserReadPermissions('MJ_BizApps_Orders: Products', userPayload);
|
|
11900
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
11901
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView('__mj_BizAppsOrders', 'vwProducts')} WHERE ${provider.QuoteIdentifier('ProductCategoryID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ_BizApps_Orders: Products', userPayload, EntityPermissionType.Read, 'AND');
|
|
11902
|
-
const rows = await provider.ExecuteSQL(sSQL, [mjbizappsordersproductcategory_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
11903
|
-
const result = await this.ArrayMapFieldNamesToCodeNames('MJ_BizApps_Orders: Products', rows, this.GetUserFromPayload(userPayload));
|
|
11904
|
-
return result;
|
|
11905
|
-
}
|
|
11906
|
-
async mjBizAppsOrdersProductCategories_ParentProductCategoryIDArray(mjbizappsordersproductcategory_, { userPayload, providers }, pubSub) {
|
|
11907
|
-
this.CheckUserReadPermissions('MJ_BizApps_Orders: Product Categories', userPayload);
|
|
11908
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
11909
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView('__mj_BizAppsOrders', 'vwProductCategories')} WHERE ${provider.QuoteIdentifier('ParentProductCategoryID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ_BizApps_Orders: Product Categories', userPayload, EntityPermissionType.Read, 'AND');
|
|
11910
|
-
const rows = await provider.ExecuteSQL(sSQL, [mjbizappsordersproductcategory_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
11911
|
-
const result = await this.ArrayMapFieldNamesToCodeNames('MJ_BizApps_Orders: Product Categories', rows, this.GetUserFromPayload(userPayload));
|
|
11912
|
-
return result;
|
|
11913
|
-
}
|
|
11914
|
-
async mjBizAppsOrdersPromotionTargets_ProductCategoryIDArray(mjbizappsordersproductcategory_, { userPayload, providers }, pubSub) {
|
|
11915
|
-
this.CheckUserReadPermissions('MJ_BizApps_Orders: Promotion Targets', userPayload);
|
|
11916
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
11917
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView('__mj_BizAppsOrders', 'vwPromotionTargets')} WHERE ${provider.QuoteIdentifier('ProductCategoryID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ_BizApps_Orders: Promotion Targets', userPayload, EntityPermissionType.Read, 'AND');
|
|
11918
|
-
const rows = await provider.ExecuteSQL(sSQL, [mjbizappsordersproductcategory_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
11919
|
-
const result = await this.ArrayMapFieldNamesToCodeNames('MJ_BizApps_Orders: Promotion Targets', rows, this.GetUserFromPayload(userPayload));
|
|
11920
|
-
return result;
|
|
11921
|
-
}
|
|
11922
11877
|
async CreatemjBizAppsOrdersProductCategory(input, { providers, userPayload }, pubSub) {
|
|
11923
11878
|
const provider = GetReadWriteProvider(providers);
|
|
11924
11879
|
return this.CreateRecord('MJ_BizApps_Orders: Product Categories', input, provider, userPayload, pubSub);
|
|
@@ -11969,33 +11924,6 @@ __decorate([
|
|
|
11969
11924
|
__metadata("design:paramtypes", [String, Object, PubSubEngine]),
|
|
11970
11925
|
__metadata("design:returntype", Promise)
|
|
11971
11926
|
], mjBizAppsOrdersProductCategoryResolver.prototype, "mjBizAppsOrdersProductCategory", null);
|
|
11972
|
-
__decorate([
|
|
11973
|
-
FieldResolver(() => [mjBizAppsOrdersProduct_]),
|
|
11974
|
-
__param(0, Root()),
|
|
11975
|
-
__param(1, Ctx()),
|
|
11976
|
-
__param(2, PubSub()),
|
|
11977
|
-
__metadata("design:type", Function),
|
|
11978
|
-
__metadata("design:paramtypes", [mjBizAppsOrdersProductCategory_, Object, PubSubEngine]),
|
|
11979
|
-
__metadata("design:returntype", Promise)
|
|
11980
|
-
], mjBizAppsOrdersProductCategoryResolver.prototype, "mjBizAppsOrdersProducts_ProductCategoryIDArray", null);
|
|
11981
|
-
__decorate([
|
|
11982
|
-
FieldResolver(() => [mjBizAppsOrdersProductCategory_]),
|
|
11983
|
-
__param(0, Root()),
|
|
11984
|
-
__param(1, Ctx()),
|
|
11985
|
-
__param(2, PubSub()),
|
|
11986
|
-
__metadata("design:type", Function),
|
|
11987
|
-
__metadata("design:paramtypes", [mjBizAppsOrdersProductCategory_, Object, PubSubEngine]),
|
|
11988
|
-
__metadata("design:returntype", Promise)
|
|
11989
|
-
], mjBizAppsOrdersProductCategoryResolver.prototype, "mjBizAppsOrdersProductCategories_ParentProductCategoryIDArray", null);
|
|
11990
|
-
__decorate([
|
|
11991
|
-
FieldResolver(() => [mjBizAppsOrdersPromotionTarget_]),
|
|
11992
|
-
__param(0, Root()),
|
|
11993
|
-
__param(1, Ctx()),
|
|
11994
|
-
__param(2, PubSub()),
|
|
11995
|
-
__metadata("design:type", Function),
|
|
11996
|
-
__metadata("design:paramtypes", [mjBizAppsOrdersProductCategory_, Object, PubSubEngine]),
|
|
11997
|
-
__metadata("design:returntype", Promise)
|
|
11998
|
-
], mjBizAppsOrdersProductCategoryResolver.prototype, "mjBizAppsOrdersPromotionTargets_ProductCategoryIDArray", null);
|
|
11999
11927
|
__decorate([
|
|
12000
11928
|
Mutation(() => mjBizAppsOrdersProductCategory_),
|
|
12001
11929
|
__param(0, Arg('input', () => CreatemjBizAppsOrdersProductCategoryInput)),
|
|
@@ -12101,10 +12029,6 @@ __decorate([
|
|
|
12101
12029
|
MaxLength(200),
|
|
12102
12030
|
__metadata("design:type", String)
|
|
12103
12031
|
], mjBizAppsOrdersProductEntitlement_.prototype, "Product", void 0);
|
|
12104
|
-
__decorate([
|
|
12105
|
-
Field(() => [mjBizAppsOrdersEntitlementGrant_]),
|
|
12106
|
-
__metadata("design:type", Array)
|
|
12107
|
-
], mjBizAppsOrdersProductEntitlement_.prototype, "mjBizAppsOrdersEntitlementGrants_ProductEntitlementIDArray", void 0);
|
|
12108
12032
|
mjBizAppsOrdersProductEntitlement_ = __decorate([
|
|
12109
12033
|
ObjectType({ description: `The DEFINITION of what purchasing a product grants (BO-D34): feature, access level, or resource quantity. EntitlementGrant is the per-purchase instance.` })
|
|
12110
12034
|
], mjBizAppsOrdersProductEntitlement_);
|
|
@@ -12294,14 +12218,6 @@ let mjBizAppsOrdersProductEntitlementResolver = class mjBizAppsOrdersProductEnti
|
|
|
12294
12218
|
const result = await this.MapFieldNamesToCodeNames('MJ_BizApps_Orders: Product Entitlements', rows && rows.length > 0 ? rows[0] : null, this.GetUserFromPayload(userPayload));
|
|
12295
12219
|
return result;
|
|
12296
12220
|
}
|
|
12297
|
-
async mjBizAppsOrdersEntitlementGrants_ProductEntitlementIDArray(mjbizappsordersproductentitlement_, { userPayload, providers }, pubSub) {
|
|
12298
|
-
this.CheckUserReadPermissions('MJ_BizApps_Orders: Entitlement Grants', userPayload);
|
|
12299
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
12300
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView('__mj_BizAppsOrders', 'vwEntitlementGrants')} WHERE ${provider.QuoteIdentifier('ProductEntitlementID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ_BizApps_Orders: Entitlement Grants', userPayload, EntityPermissionType.Read, 'AND');
|
|
12301
|
-
const rows = await provider.ExecuteSQL(sSQL, [mjbizappsordersproductentitlement_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
12302
|
-
const result = await this.ArrayMapFieldNamesToCodeNames('MJ_BizApps_Orders: Entitlement Grants', rows, this.GetUserFromPayload(userPayload));
|
|
12303
|
-
return result;
|
|
12304
|
-
}
|
|
12305
12221
|
async CreatemjBizAppsOrdersProductEntitlement(input, { providers, userPayload }, pubSub) {
|
|
12306
12222
|
const provider = GetReadWriteProvider(providers);
|
|
12307
12223
|
return this.CreateRecord('MJ_BizApps_Orders: Product Entitlements', input, provider, userPayload, pubSub);
|
|
@@ -12352,15 +12268,6 @@ __decorate([
|
|
|
12352
12268
|
__metadata("design:paramtypes", [String, Object, PubSubEngine]),
|
|
12353
12269
|
__metadata("design:returntype", Promise)
|
|
12354
12270
|
], mjBizAppsOrdersProductEntitlementResolver.prototype, "mjBizAppsOrdersProductEntitlement", null);
|
|
12355
|
-
__decorate([
|
|
12356
|
-
FieldResolver(() => [mjBizAppsOrdersEntitlementGrant_]),
|
|
12357
|
-
__param(0, Root()),
|
|
12358
|
-
__param(1, Ctx()),
|
|
12359
|
-
__param(2, PubSub()),
|
|
12360
|
-
__metadata("design:type", Function),
|
|
12361
|
-
__metadata("design:paramtypes", [mjBizAppsOrdersProductEntitlement_, Object, PubSubEngine]),
|
|
12362
|
-
__metadata("design:returntype", Promise)
|
|
12363
|
-
], mjBizAppsOrdersProductEntitlementResolver.prototype, "mjBizAppsOrdersEntitlementGrants_ProductEntitlementIDArray", null);
|
|
12364
12271
|
__decorate([
|
|
12365
12272
|
Mutation(() => mjBizAppsOrdersProductEntitlement_),
|
|
12366
12273
|
__param(0, Arg('input', () => CreatemjBizAppsOrdersProductEntitlementInput)),
|
|
@@ -12509,14 +12416,6 @@ __decorate([
|
|
|
12509
12416
|
MaxLength(200),
|
|
12510
12417
|
__metadata("design:type", String)
|
|
12511
12418
|
], mjBizAppsOrdersProductPrice_.prototype, "PriceList", void 0);
|
|
12512
|
-
__decorate([
|
|
12513
|
-
Field(() => [mjBizAppsOrdersPriceTier_]),
|
|
12514
|
-
__metadata("design:type", Array)
|
|
12515
|
-
], mjBizAppsOrdersProductPrice_.prototype, "mjBizAppsOrdersPriceTiers_ProductPriceIDArray", void 0);
|
|
12516
|
-
__decorate([
|
|
12517
|
-
Field(() => [mjBizAppsOrdersOrderLine_]),
|
|
12518
|
-
__metadata("design:type", Array)
|
|
12519
|
-
], mjBizAppsOrdersProductPrice_.prototype, "mjBizAppsOrdersOrderLines_ProductPriceIDArray", void 0);
|
|
12520
12419
|
mjBizAppsOrdersProductPrice_ = __decorate([
|
|
12521
12420
|
ObjectType({ description: `ONE ROW IS ONE PRICE RULE. Several rows per product and list express quantity bands, seasons, promotional windows and time-of-day rates; Priority disambiguates. The row carries both the applicability predicates and the outcome, so there is no separate rule table to keep in step. Ties on Priority are refused when WRITTEN, not resolved when read - an arbitrary winner between two applicable rules is stable in test and liable to flip in production.` })
|
|
12522
12421
|
], mjBizAppsOrdersProductPrice_);
|
|
@@ -12778,22 +12677,6 @@ let mjBizAppsOrdersProductPriceResolver = class mjBizAppsOrdersProductPriceResol
|
|
|
12778
12677
|
const result = await this.MapFieldNamesToCodeNames('MJ_BizApps_Orders: Product Prices', rows && rows.length > 0 ? rows[0] : null, this.GetUserFromPayload(userPayload));
|
|
12779
12678
|
return result;
|
|
12780
12679
|
}
|
|
12781
|
-
async mjBizAppsOrdersPriceTiers_ProductPriceIDArray(mjbizappsordersproductprice_, { userPayload, providers }, pubSub) {
|
|
12782
|
-
this.CheckUserReadPermissions('MJ_BizApps_Orders: Price Tiers', userPayload);
|
|
12783
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
12784
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView('__mj_BizAppsOrders', 'vwPriceTiers')} WHERE ${provider.QuoteIdentifier('ProductPriceID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ_BizApps_Orders: Price Tiers', userPayload, EntityPermissionType.Read, 'AND');
|
|
12785
|
-
const rows = await provider.ExecuteSQL(sSQL, [mjbizappsordersproductprice_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
12786
|
-
const result = await this.ArrayMapFieldNamesToCodeNames('MJ_BizApps_Orders: Price Tiers', rows, this.GetUserFromPayload(userPayload));
|
|
12787
|
-
return result;
|
|
12788
|
-
}
|
|
12789
|
-
async mjBizAppsOrdersOrderLines_ProductPriceIDArray(mjbizappsordersproductprice_, { userPayload, providers }, pubSub) {
|
|
12790
|
-
this.CheckUserReadPermissions('MJ_BizApps_Orders: Order Lines', userPayload);
|
|
12791
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
12792
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView('__mj_BizAppsOrders', 'vwOrderLines')} WHERE ${provider.QuoteIdentifier('ProductPriceID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ_BizApps_Orders: Order Lines', userPayload, EntityPermissionType.Read, 'AND');
|
|
12793
|
-
const rows = await provider.ExecuteSQL(sSQL, [mjbizappsordersproductprice_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
12794
|
-
const result = await this.ArrayMapFieldNamesToCodeNames('MJ_BizApps_Orders: Order Lines', rows, this.GetUserFromPayload(userPayload));
|
|
12795
|
-
return result;
|
|
12796
|
-
}
|
|
12797
12680
|
async CreatemjBizAppsOrdersProductPrice(input, { providers, userPayload }, pubSub) {
|
|
12798
12681
|
const provider = GetReadWriteProvider(providers);
|
|
12799
12682
|
return this.CreateRecord('MJ_BizApps_Orders: Product Prices', input, provider, userPayload, pubSub);
|
|
@@ -12844,24 +12727,6 @@ __decorate([
|
|
|
12844
12727
|
__metadata("design:paramtypes", [String, Object, PubSubEngine]),
|
|
12845
12728
|
__metadata("design:returntype", Promise)
|
|
12846
12729
|
], mjBizAppsOrdersProductPriceResolver.prototype, "mjBizAppsOrdersProductPrice", null);
|
|
12847
|
-
__decorate([
|
|
12848
|
-
FieldResolver(() => [mjBizAppsOrdersPriceTier_]),
|
|
12849
|
-
__param(0, Root()),
|
|
12850
|
-
__param(1, Ctx()),
|
|
12851
|
-
__param(2, PubSub()),
|
|
12852
|
-
__metadata("design:type", Function),
|
|
12853
|
-
__metadata("design:paramtypes", [mjBizAppsOrdersProductPrice_, Object, PubSubEngine]),
|
|
12854
|
-
__metadata("design:returntype", Promise)
|
|
12855
|
-
], mjBizAppsOrdersProductPriceResolver.prototype, "mjBizAppsOrdersPriceTiers_ProductPriceIDArray", null);
|
|
12856
|
-
__decorate([
|
|
12857
|
-
FieldResolver(() => [mjBizAppsOrdersOrderLine_]),
|
|
12858
|
-
__param(0, Root()),
|
|
12859
|
-
__param(1, Ctx()),
|
|
12860
|
-
__param(2, PubSub()),
|
|
12861
|
-
__metadata("design:type", Function),
|
|
12862
|
-
__metadata("design:paramtypes", [mjBizAppsOrdersProductPrice_, Object, PubSubEngine]),
|
|
12863
|
-
__metadata("design:returntype", Promise)
|
|
12864
|
-
], mjBizAppsOrdersProductPriceResolver.prototype, "mjBizAppsOrdersOrderLines_ProductPriceIDArray", null);
|
|
12865
12730
|
__decorate([
|
|
12866
12731
|
Mutation(() => mjBizAppsOrdersProductPrice_),
|
|
12867
12732
|
__param(0, Arg('input', () => CreatemjBizAppsOrdersProductPriceInput)),
|
|
@@ -12983,6 +12848,10 @@ __decorate([
|
|
|
12983
12848
|
MaxLength(255),
|
|
12984
12849
|
__metadata("design:type", String)
|
|
12985
12850
|
], mjBizAppsOrdersProductType_.prototype, "PricingDriverClass", void 0);
|
|
12851
|
+
__decorate([
|
|
12852
|
+
Field({ nullable: true, description: `Extensible JSON configuration for this product type including customUI (js, css, theme, componentOverrideKey), unitMode, allowQuantity, and fieldOverrides.` }),
|
|
12853
|
+
__metadata("design:type", String)
|
|
12854
|
+
], mjBizAppsOrdersProductType_.prototype, "Configuration", void 0);
|
|
12986
12855
|
__decorate([
|
|
12987
12856
|
Field({ nullable: true }),
|
|
12988
12857
|
MaxLength(200),
|
|
@@ -12993,10 +12862,6 @@ __decorate([
|
|
|
12993
12862
|
MaxLength(200),
|
|
12994
12863
|
__metadata("design:type", String)
|
|
12995
12864
|
], mjBizAppsOrdersProductType_.prototype, "DefaultSubscriptionType", void 0);
|
|
12996
|
-
__decorate([
|
|
12997
|
-
Field(() => [mjBizAppsOrdersProduct_]),
|
|
12998
|
-
__metadata("design:type", Array)
|
|
12999
|
-
], mjBizAppsOrdersProductType_.prototype, "mjBizAppsOrdersProducts_ProductTypeIDArray", void 0);
|
|
13000
12865
|
mjBizAppsOrdersProductType_ = __decorate([
|
|
13001
12866
|
ObjectType({ description: `Classifies products (e.g. Physical Good, Service, Subscription).` })
|
|
13002
12867
|
], mjBizAppsOrdersProductType_);
|
|
@@ -13070,6 +12935,10 @@ __decorate([
|
|
|
13070
12935
|
Field({ nullable: true }),
|
|
13071
12936
|
__metadata("design:type", String)
|
|
13072
12937
|
], CreatemjBizAppsOrdersProductTypeInput.prototype, "PricingDriverClass", void 0);
|
|
12938
|
+
__decorate([
|
|
12939
|
+
Field({ nullable: true }),
|
|
12940
|
+
__metadata("design:type", String)
|
|
12941
|
+
], CreatemjBizAppsOrdersProductTypeInput.prototype, "Configuration", void 0);
|
|
13073
12942
|
__decorate([
|
|
13074
12943
|
Field(() => RestoreContextInput, { nullable: true }),
|
|
13075
12944
|
__metadata("design:type", RestoreContextInput)
|
|
@@ -13147,6 +13016,10 @@ __decorate([
|
|
|
13147
13016
|
Field({ nullable: true }),
|
|
13148
13017
|
__metadata("design:type", String)
|
|
13149
13018
|
], UpdatemjBizAppsOrdersProductTypeInput.prototype, "PricingDriverClass", void 0);
|
|
13019
|
+
__decorate([
|
|
13020
|
+
Field({ nullable: true }),
|
|
13021
|
+
__metadata("design:type", String)
|
|
13022
|
+
], UpdatemjBizAppsOrdersProductTypeInput.prototype, "Configuration", void 0);
|
|
13150
13023
|
__decorate([
|
|
13151
13024
|
Field(() => [KeyValuePairInput], { nullable: true }),
|
|
13152
13025
|
__metadata("design:type", Array)
|
|
@@ -13218,14 +13091,6 @@ let mjBizAppsOrdersProductTypeResolver = class mjBizAppsOrdersProductTypeResolve
|
|
|
13218
13091
|
const result = await this.MapFieldNamesToCodeNames('MJ_BizApps_Orders: Product Types', rows && rows.length > 0 ? rows[0] : null, this.GetUserFromPayload(userPayload));
|
|
13219
13092
|
return result;
|
|
13220
13093
|
}
|
|
13221
|
-
async mjBizAppsOrdersProducts_ProductTypeIDArray(mjbizappsordersproducttype_, { userPayload, providers }, pubSub) {
|
|
13222
|
-
this.CheckUserReadPermissions('MJ_BizApps_Orders: Products', userPayload);
|
|
13223
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
13224
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView('__mj_BizAppsOrders', 'vwProducts')} WHERE ${provider.QuoteIdentifier('ProductTypeID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ_BizApps_Orders: Products', userPayload, EntityPermissionType.Read, 'AND');
|
|
13225
|
-
const rows = await provider.ExecuteSQL(sSQL, [mjbizappsordersproducttype_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
13226
|
-
const result = await this.ArrayMapFieldNamesToCodeNames('MJ_BizApps_Orders: Products', rows, this.GetUserFromPayload(userPayload));
|
|
13227
|
-
return result;
|
|
13228
|
-
}
|
|
13229
13094
|
async CreatemjBizAppsOrdersProductType(input, { providers, userPayload }, pubSub) {
|
|
13230
13095
|
const provider = GetReadWriteProvider(providers);
|
|
13231
13096
|
return this.CreateRecord('MJ_BizApps_Orders: Product Types', input, provider, userPayload, pubSub);
|
|
@@ -13276,15 +13141,6 @@ __decorate([
|
|
|
13276
13141
|
__metadata("design:paramtypes", [String, Object, PubSubEngine]),
|
|
13277
13142
|
__metadata("design:returntype", Promise)
|
|
13278
13143
|
], mjBizAppsOrdersProductTypeResolver.prototype, "mjBizAppsOrdersProductType", null);
|
|
13279
|
-
__decorate([
|
|
13280
|
-
FieldResolver(() => [mjBizAppsOrdersProduct_]),
|
|
13281
|
-
__param(0, Root()),
|
|
13282
|
-
__param(1, Ctx()),
|
|
13283
|
-
__param(2, PubSub()),
|
|
13284
|
-
__metadata("design:type", Function),
|
|
13285
|
-
__metadata("design:paramtypes", [mjBizAppsOrdersProductType_, Object, PubSubEngine]),
|
|
13286
|
-
__metadata("design:returntype", Promise)
|
|
13287
|
-
], mjBizAppsOrdersProductTypeResolver.prototype, "mjBizAppsOrdersProducts_ProductTypeIDArray", null);
|
|
13288
13144
|
__decorate([
|
|
13289
13145
|
Mutation(() => mjBizAppsOrdersProductType_),
|
|
13290
13146
|
__param(0, Arg('input', () => CreatemjBizAppsOrdersProductTypeInput)),
|
|
@@ -13459,46 +13315,6 @@ __decorate([
|
|
|
13459
13315
|
MaxLength(200),
|
|
13460
13316
|
__metadata("design:type", String)
|
|
13461
13317
|
], mjBizAppsOrdersProduct_.prototype, "SubscriptionType", void 0);
|
|
13462
|
-
__decorate([
|
|
13463
|
-
Field(() => [mjBizAppsOrdersProductEntitlement_]),
|
|
13464
|
-
__metadata("design:type", Array)
|
|
13465
|
-
], mjBizAppsOrdersProduct_.prototype, "mjBizAppsOrdersProductEntitlements_ProductIDArray", void 0);
|
|
13466
|
-
__decorate([
|
|
13467
|
-
Field(() => [mjBizAppsOrdersProductBundleItem_]),
|
|
13468
|
-
__metadata("design:type", Array)
|
|
13469
|
-
], mjBizAppsOrdersProduct_.prototype, "mjBizAppsOrdersProductBundleItems_ComponentProductIDArray", void 0);
|
|
13470
|
-
__decorate([
|
|
13471
|
-
Field(() => [mjBizAppsOrdersProductBundleItem_]),
|
|
13472
|
-
__metadata("design:type", Array)
|
|
13473
|
-
], mjBizAppsOrdersProduct_.prototype, "mjBizAppsOrdersProductBundleItems_BundleProductIDArray", void 0);
|
|
13474
|
-
__decorate([
|
|
13475
|
-
Field(() => [mjBizAppsOrdersProduct_]),
|
|
13476
|
-
__metadata("design:type", Array)
|
|
13477
|
-
], mjBizAppsOrdersProduct_.prototype, "mjBizAppsOrdersProducts_SuccessorProductIDArray", void 0);
|
|
13478
|
-
__decorate([
|
|
13479
|
-
Field(() => [mjBizAppsOrdersOrderLine_]),
|
|
13480
|
-
__metadata("design:type", Array)
|
|
13481
|
-
], mjBizAppsOrdersProduct_.prototype, "mjBizAppsOrdersOrderLines_SourceBundleProductIDArray", void 0);
|
|
13482
|
-
__decorate([
|
|
13483
|
-
Field(() => [mjBizAppsOrdersOrderLine_]),
|
|
13484
|
-
__metadata("design:type", Array)
|
|
13485
|
-
], mjBizAppsOrdersProduct_.prototype, "mjBizAppsOrdersOrderLines_ProductIDArray", void 0);
|
|
13486
|
-
__decorate([
|
|
13487
|
-
Field(() => [mjBizAppsOrdersSubscription_]),
|
|
13488
|
-
__metadata("design:type", Array)
|
|
13489
|
-
], mjBizAppsOrdersProduct_.prototype, "mjBizAppsOrdersSubscriptions_ProductIDArray", void 0);
|
|
13490
|
-
__decorate([
|
|
13491
|
-
Field(() => [mjBizAppsOrdersProductPrice_]),
|
|
13492
|
-
__metadata("design:type", Array)
|
|
13493
|
-
], mjBizAppsOrdersProduct_.prototype, "mjBizAppsOrdersProductPrices_ProductIDArray", void 0);
|
|
13494
|
-
__decorate([
|
|
13495
|
-
Field(() => [mjBizAppsOrdersEventProduct_]),
|
|
13496
|
-
__metadata("design:type", Array)
|
|
13497
|
-
], mjBizAppsOrdersProduct_.prototype, "mjBizAppsOrdersEventProducts_IDArray", void 0);
|
|
13498
|
-
__decorate([
|
|
13499
|
-
Field(() => [mjBizAppsOrdersPromotionTarget_]),
|
|
13500
|
-
__metadata("design:type", Array)
|
|
13501
|
-
], mjBizAppsOrdersProduct_.prototype, "mjBizAppsOrdersPromotionTargets_ProductIDArray", void 0);
|
|
13502
13318
|
mjBizAppsOrdersProduct_ = __decorate([
|
|
13503
13319
|
ObjectType({ description: `A catalog item that can be ordered. GL accounts are NOT stored here — accounting\'s GLAccountLink points at Product rows (role-mapped, date-effective).` })
|
|
13504
13320
|
], mjBizAppsOrdersProduct_);
|
|
@@ -13760,86 +13576,6 @@ let mjBizAppsOrdersProductResolver = class mjBizAppsOrdersProductResolver extend
|
|
|
13760
13576
|
const result = await this.MapFieldNamesToCodeNames('MJ_BizApps_Orders: Products', rows && rows.length > 0 ? rows[0] : null, this.GetUserFromPayload(userPayload));
|
|
13761
13577
|
return result;
|
|
13762
13578
|
}
|
|
13763
|
-
async mjBizAppsOrdersProductEntitlements_ProductIDArray(mjbizappsordersproduct_, { userPayload, providers }, pubSub) {
|
|
13764
|
-
this.CheckUserReadPermissions('MJ_BizApps_Orders: Product Entitlements', userPayload);
|
|
13765
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
13766
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView('__mj_BizAppsOrders', 'vwProductEntitlements')} WHERE ${provider.QuoteIdentifier('ProductID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ_BizApps_Orders: Product Entitlements', userPayload, EntityPermissionType.Read, 'AND');
|
|
13767
|
-
const rows = await provider.ExecuteSQL(sSQL, [mjbizappsordersproduct_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
13768
|
-
const result = await this.ArrayMapFieldNamesToCodeNames('MJ_BizApps_Orders: Product Entitlements', rows, this.GetUserFromPayload(userPayload));
|
|
13769
|
-
return result;
|
|
13770
|
-
}
|
|
13771
|
-
async mjBizAppsOrdersProductBundleItems_ComponentProductIDArray(mjbizappsordersproduct_, { userPayload, providers }, pubSub) {
|
|
13772
|
-
this.CheckUserReadPermissions('MJ_BizApps_Orders: Product Bundle Items', userPayload);
|
|
13773
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
13774
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView('__mj_BizAppsOrders', 'vwProductBundleItems')} WHERE ${provider.QuoteIdentifier('ComponentProductID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ_BizApps_Orders: Product Bundle Items', userPayload, EntityPermissionType.Read, 'AND');
|
|
13775
|
-
const rows = await provider.ExecuteSQL(sSQL, [mjbizappsordersproduct_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
13776
|
-
const result = await this.ArrayMapFieldNamesToCodeNames('MJ_BizApps_Orders: Product Bundle Items', rows, this.GetUserFromPayload(userPayload));
|
|
13777
|
-
return result;
|
|
13778
|
-
}
|
|
13779
|
-
async mjBizAppsOrdersProductBundleItems_BundleProductIDArray(mjbizappsordersproduct_, { userPayload, providers }, pubSub) {
|
|
13780
|
-
this.CheckUserReadPermissions('MJ_BizApps_Orders: Product Bundle Items', userPayload);
|
|
13781
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
13782
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView('__mj_BizAppsOrders', 'vwProductBundleItems')} WHERE ${provider.QuoteIdentifier('BundleProductID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ_BizApps_Orders: Product Bundle Items', userPayload, EntityPermissionType.Read, 'AND');
|
|
13783
|
-
const rows = await provider.ExecuteSQL(sSQL, [mjbizappsordersproduct_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
13784
|
-
const result = await this.ArrayMapFieldNamesToCodeNames('MJ_BizApps_Orders: Product Bundle Items', rows, this.GetUserFromPayload(userPayload));
|
|
13785
|
-
return result;
|
|
13786
|
-
}
|
|
13787
|
-
async mjBizAppsOrdersProducts_SuccessorProductIDArray(mjbizappsordersproduct_, { userPayload, providers }, pubSub) {
|
|
13788
|
-
this.CheckUserReadPermissions('MJ_BizApps_Orders: Products', userPayload);
|
|
13789
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
13790
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView('__mj_BizAppsOrders', 'vwProducts')} WHERE ${provider.QuoteIdentifier('SuccessorProductID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ_BizApps_Orders: Products', userPayload, EntityPermissionType.Read, 'AND');
|
|
13791
|
-
const rows = await provider.ExecuteSQL(sSQL, [mjbizappsordersproduct_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
13792
|
-
const result = await this.ArrayMapFieldNamesToCodeNames('MJ_BizApps_Orders: Products', rows, this.GetUserFromPayload(userPayload));
|
|
13793
|
-
return result;
|
|
13794
|
-
}
|
|
13795
|
-
async mjBizAppsOrdersOrderLines_SourceBundleProductIDArray(mjbizappsordersproduct_, { userPayload, providers }, pubSub) {
|
|
13796
|
-
this.CheckUserReadPermissions('MJ_BizApps_Orders: Order Lines', userPayload);
|
|
13797
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
13798
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView('__mj_BizAppsOrders', 'vwOrderLines')} WHERE ${provider.QuoteIdentifier('SourceBundleProductID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ_BizApps_Orders: Order Lines', userPayload, EntityPermissionType.Read, 'AND');
|
|
13799
|
-
const rows = await provider.ExecuteSQL(sSQL, [mjbizappsordersproduct_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
13800
|
-
const result = await this.ArrayMapFieldNamesToCodeNames('MJ_BizApps_Orders: Order Lines', rows, this.GetUserFromPayload(userPayload));
|
|
13801
|
-
return result;
|
|
13802
|
-
}
|
|
13803
|
-
async mjBizAppsOrdersOrderLines_ProductIDArray(mjbizappsordersproduct_, { userPayload, providers }, pubSub) {
|
|
13804
|
-
this.CheckUserReadPermissions('MJ_BizApps_Orders: Order Lines', userPayload);
|
|
13805
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
13806
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView('__mj_BizAppsOrders', 'vwOrderLines')} WHERE ${provider.QuoteIdentifier('ProductID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ_BizApps_Orders: Order Lines', userPayload, EntityPermissionType.Read, 'AND');
|
|
13807
|
-
const rows = await provider.ExecuteSQL(sSQL, [mjbizappsordersproduct_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
13808
|
-
const result = await this.ArrayMapFieldNamesToCodeNames('MJ_BizApps_Orders: Order Lines', rows, this.GetUserFromPayload(userPayload));
|
|
13809
|
-
return result;
|
|
13810
|
-
}
|
|
13811
|
-
async mjBizAppsOrdersSubscriptions_ProductIDArray(mjbizappsordersproduct_, { userPayload, providers }, pubSub) {
|
|
13812
|
-
this.CheckUserReadPermissions('MJ_BizApps_Orders: Subscriptions', userPayload);
|
|
13813
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
13814
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView('__mj_BizAppsOrders', 'vwSubscriptions')} WHERE ${provider.QuoteIdentifier('ProductID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ_BizApps_Orders: Subscriptions', userPayload, EntityPermissionType.Read, 'AND');
|
|
13815
|
-
const rows = await provider.ExecuteSQL(sSQL, [mjbizappsordersproduct_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
13816
|
-
const result = await this.ArrayMapFieldNamesToCodeNames('MJ_BizApps_Orders: Subscriptions', rows, this.GetUserFromPayload(userPayload));
|
|
13817
|
-
return result;
|
|
13818
|
-
}
|
|
13819
|
-
async mjBizAppsOrdersProductPrices_ProductIDArray(mjbizappsordersproduct_, { userPayload, providers }, pubSub) {
|
|
13820
|
-
this.CheckUserReadPermissions('MJ_BizApps_Orders: Product Prices', userPayload);
|
|
13821
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
13822
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView('__mj_BizAppsOrders', 'vwProductPrices')} WHERE ${provider.QuoteIdentifier('ProductID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ_BizApps_Orders: Product Prices', userPayload, EntityPermissionType.Read, 'AND');
|
|
13823
|
-
const rows = await provider.ExecuteSQL(sSQL, [mjbizappsordersproduct_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
13824
|
-
const result = await this.ArrayMapFieldNamesToCodeNames('MJ_BizApps_Orders: Product Prices', rows, this.GetUserFromPayload(userPayload));
|
|
13825
|
-
return result;
|
|
13826
|
-
}
|
|
13827
|
-
async mjBizAppsOrdersEventProducts_IDArray(mjbizappsordersproduct_, { userPayload, providers }, pubSub) {
|
|
13828
|
-
this.CheckUserReadPermissions('MJ_BizApps_Orders: Event Products', userPayload);
|
|
13829
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
13830
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView('__mj_BizAppsOrders', 'vwEventProducts')} WHERE ${provider.QuoteIdentifier('ID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ_BizApps_Orders: Event Products', userPayload, EntityPermissionType.Read, 'AND');
|
|
13831
|
-
const rows = await provider.ExecuteSQL(sSQL, [mjbizappsordersproduct_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
13832
|
-
const result = await this.ArrayMapFieldNamesToCodeNames('MJ_BizApps_Orders: Event Products', rows, this.GetUserFromPayload(userPayload));
|
|
13833
|
-
return result;
|
|
13834
|
-
}
|
|
13835
|
-
async mjBizAppsOrdersPromotionTargets_ProductIDArray(mjbizappsordersproduct_, { userPayload, providers }, pubSub) {
|
|
13836
|
-
this.CheckUserReadPermissions('MJ_BizApps_Orders: Promotion Targets', userPayload);
|
|
13837
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
13838
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView('__mj_BizAppsOrders', 'vwPromotionTargets')} WHERE ${provider.QuoteIdentifier('ProductID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ_BizApps_Orders: Promotion Targets', userPayload, EntityPermissionType.Read, 'AND');
|
|
13839
|
-
const rows = await provider.ExecuteSQL(sSQL, [mjbizappsordersproduct_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
13840
|
-
const result = await this.ArrayMapFieldNamesToCodeNames('MJ_BizApps_Orders: Promotion Targets', rows, this.GetUserFromPayload(userPayload));
|
|
13841
|
-
return result;
|
|
13842
|
-
}
|
|
13843
13579
|
async CreatemjBizAppsOrdersProduct(input, { providers, userPayload }, pubSub) {
|
|
13844
13580
|
const provider = GetReadWriteProvider(providers);
|
|
13845
13581
|
return this.CreateRecord('MJ_BizApps_Orders: Products', input, provider, userPayload, pubSub);
|
|
@@ -13882,104 +13618,14 @@ __decorate([
|
|
|
13882
13618
|
__metadata("design:returntype", Promise)
|
|
13883
13619
|
], mjBizAppsOrdersProductResolver.prototype, "RunmjBizAppsOrdersProductDynamicView", null);
|
|
13884
13620
|
__decorate([
|
|
13885
|
-
Query(() => mjBizAppsOrdersProduct_, { nullable: true }),
|
|
13886
|
-
__param(0, Arg('ID', () => String)),
|
|
13887
|
-
__param(1, Ctx()),
|
|
13888
|
-
__param(2, PubSub()),
|
|
13889
|
-
__metadata("design:type", Function),
|
|
13890
|
-
__metadata("design:paramtypes", [String, Object, PubSubEngine]),
|
|
13891
|
-
__metadata("design:returntype", Promise)
|
|
13892
|
-
], mjBizAppsOrdersProductResolver.prototype, "mjBizAppsOrdersProduct", null);
|
|
13893
|
-
__decorate([
|
|
13894
|
-
FieldResolver(() => [mjBizAppsOrdersProductEntitlement_]),
|
|
13895
|
-
__param(0, Root()),
|
|
13896
|
-
__param(1, Ctx()),
|
|
13897
|
-
__param(2, PubSub()),
|
|
13898
|
-
__metadata("design:type", Function),
|
|
13899
|
-
__metadata("design:paramtypes", [mjBizAppsOrdersProduct_, Object, PubSubEngine]),
|
|
13900
|
-
__metadata("design:returntype", Promise)
|
|
13901
|
-
], mjBizAppsOrdersProductResolver.prototype, "mjBizAppsOrdersProductEntitlements_ProductIDArray", null);
|
|
13902
|
-
__decorate([
|
|
13903
|
-
FieldResolver(() => [mjBizAppsOrdersProductBundleItem_]),
|
|
13904
|
-
__param(0, Root()),
|
|
13905
|
-
__param(1, Ctx()),
|
|
13906
|
-
__param(2, PubSub()),
|
|
13907
|
-
__metadata("design:type", Function),
|
|
13908
|
-
__metadata("design:paramtypes", [mjBizAppsOrdersProduct_, Object, PubSubEngine]),
|
|
13909
|
-
__metadata("design:returntype", Promise)
|
|
13910
|
-
], mjBizAppsOrdersProductResolver.prototype, "mjBizAppsOrdersProductBundleItems_ComponentProductIDArray", null);
|
|
13911
|
-
__decorate([
|
|
13912
|
-
FieldResolver(() => [mjBizAppsOrdersProductBundleItem_]),
|
|
13913
|
-
__param(0, Root()),
|
|
13914
|
-
__param(1, Ctx()),
|
|
13915
|
-
__param(2, PubSub()),
|
|
13916
|
-
__metadata("design:type", Function),
|
|
13917
|
-
__metadata("design:paramtypes", [mjBizAppsOrdersProduct_, Object, PubSubEngine]),
|
|
13918
|
-
__metadata("design:returntype", Promise)
|
|
13919
|
-
], mjBizAppsOrdersProductResolver.prototype, "mjBizAppsOrdersProductBundleItems_BundleProductIDArray", null);
|
|
13920
|
-
__decorate([
|
|
13921
|
-
FieldResolver(() => [mjBizAppsOrdersProduct_]),
|
|
13922
|
-
__param(0, Root()),
|
|
13923
|
-
__param(1, Ctx()),
|
|
13924
|
-
__param(2, PubSub()),
|
|
13925
|
-
__metadata("design:type", Function),
|
|
13926
|
-
__metadata("design:paramtypes", [mjBizAppsOrdersProduct_, Object, PubSubEngine]),
|
|
13927
|
-
__metadata("design:returntype", Promise)
|
|
13928
|
-
], mjBizAppsOrdersProductResolver.prototype, "mjBizAppsOrdersProducts_SuccessorProductIDArray", null);
|
|
13929
|
-
__decorate([
|
|
13930
|
-
FieldResolver(() => [mjBizAppsOrdersOrderLine_]),
|
|
13931
|
-
__param(0, Root()),
|
|
13932
|
-
__param(1, Ctx()),
|
|
13933
|
-
__param(2, PubSub()),
|
|
13934
|
-
__metadata("design:type", Function),
|
|
13935
|
-
__metadata("design:paramtypes", [mjBizAppsOrdersProduct_, Object, PubSubEngine]),
|
|
13936
|
-
__metadata("design:returntype", Promise)
|
|
13937
|
-
], mjBizAppsOrdersProductResolver.prototype, "mjBizAppsOrdersOrderLines_SourceBundleProductIDArray", null);
|
|
13938
|
-
__decorate([
|
|
13939
|
-
FieldResolver(() => [mjBizAppsOrdersOrderLine_]),
|
|
13940
|
-
__param(0, Root()),
|
|
13941
|
-
__param(1, Ctx()),
|
|
13942
|
-
__param(2, PubSub()),
|
|
13943
|
-
__metadata("design:type", Function),
|
|
13944
|
-
__metadata("design:paramtypes", [mjBizAppsOrdersProduct_, Object, PubSubEngine]),
|
|
13945
|
-
__metadata("design:returntype", Promise)
|
|
13946
|
-
], mjBizAppsOrdersProductResolver.prototype, "mjBizAppsOrdersOrderLines_ProductIDArray", null);
|
|
13947
|
-
__decorate([
|
|
13948
|
-
FieldResolver(() => [mjBizAppsOrdersSubscription_]),
|
|
13949
|
-
__param(0, Root()),
|
|
13950
|
-
__param(1, Ctx()),
|
|
13951
|
-
__param(2, PubSub()),
|
|
13952
|
-
__metadata("design:type", Function),
|
|
13953
|
-
__metadata("design:paramtypes", [mjBizAppsOrdersProduct_, Object, PubSubEngine]),
|
|
13954
|
-
__metadata("design:returntype", Promise)
|
|
13955
|
-
], mjBizAppsOrdersProductResolver.prototype, "mjBizAppsOrdersSubscriptions_ProductIDArray", null);
|
|
13956
|
-
__decorate([
|
|
13957
|
-
FieldResolver(() => [mjBizAppsOrdersProductPrice_]),
|
|
13958
|
-
__param(0, Root()),
|
|
13959
|
-
__param(1, Ctx()),
|
|
13960
|
-
__param(2, PubSub()),
|
|
13961
|
-
__metadata("design:type", Function),
|
|
13962
|
-
__metadata("design:paramtypes", [mjBizAppsOrdersProduct_, Object, PubSubEngine]),
|
|
13963
|
-
__metadata("design:returntype", Promise)
|
|
13964
|
-
], mjBizAppsOrdersProductResolver.prototype, "mjBizAppsOrdersProductPrices_ProductIDArray", null);
|
|
13965
|
-
__decorate([
|
|
13966
|
-
FieldResolver(() => [mjBizAppsOrdersEventProduct_]),
|
|
13967
|
-
__param(0, Root()),
|
|
13968
|
-
__param(1, Ctx()),
|
|
13969
|
-
__param(2, PubSub()),
|
|
13970
|
-
__metadata("design:type", Function),
|
|
13971
|
-
__metadata("design:paramtypes", [mjBizAppsOrdersProduct_, Object, PubSubEngine]),
|
|
13972
|
-
__metadata("design:returntype", Promise)
|
|
13973
|
-
], mjBizAppsOrdersProductResolver.prototype, "mjBizAppsOrdersEventProducts_IDArray", null);
|
|
13974
|
-
__decorate([
|
|
13975
|
-
FieldResolver(() => [mjBizAppsOrdersPromotionTarget_]),
|
|
13976
|
-
__param(0, Root()),
|
|
13621
|
+
Query(() => mjBizAppsOrdersProduct_, { nullable: true }),
|
|
13622
|
+
__param(0, Arg('ID', () => String)),
|
|
13977
13623
|
__param(1, Ctx()),
|
|
13978
13624
|
__param(2, PubSub()),
|
|
13979
13625
|
__metadata("design:type", Function),
|
|
13980
|
-
__metadata("design:paramtypes", [
|
|
13626
|
+
__metadata("design:paramtypes", [String, Object, PubSubEngine]),
|
|
13981
13627
|
__metadata("design:returntype", Promise)
|
|
13982
|
-
], mjBizAppsOrdersProductResolver.prototype, "
|
|
13628
|
+
], mjBizAppsOrdersProductResolver.prototype, "mjBizAppsOrdersProduct", null);
|
|
13983
13629
|
__decorate([
|
|
13984
13630
|
Mutation(() => mjBizAppsOrdersProduct_),
|
|
13985
13631
|
__param(0, Arg('input', () => CreatemjBizAppsOrdersProductInput)),
|
|
@@ -14082,10 +13728,6 @@ __decorate([
|
|
|
14082
13728
|
MaxLength(201),
|
|
14083
13729
|
__metadata("design:type", String)
|
|
14084
13730
|
], mjBizAppsOrdersPromotionCode_.prototype, "AssignedPerson", void 0);
|
|
14085
|
-
__decorate([
|
|
14086
|
-
Field(() => [mjBizAppsOrdersOrderAdjustment_]),
|
|
14087
|
-
__metadata("design:type", Array)
|
|
14088
|
-
], mjBizAppsOrdersPromotionCode_.prototype, "mjBizAppsOrdersOrderAdjustments_PromotionCodeIDArray", void 0);
|
|
14089
13731
|
mjBizAppsOrdersPromotionCode_ = __decorate([
|
|
14090
13732
|
ObjectType({ description: `A redeemable string pointing at a Promotion. Deliberately carries NO redemption counter: a stored count drifts the first time anything is voided, so redemptions are counted from OrderAdjustment - the record of what actually happened.` })
|
|
14091
13733
|
], mjBizAppsOrdersPromotionCode_);
|
|
@@ -14251,14 +13893,6 @@ let mjBizAppsOrdersPromotionCodeResolver = class mjBizAppsOrdersPromotionCodeRes
|
|
|
14251
13893
|
const result = await this.MapFieldNamesToCodeNames('MJ_BizApps_Orders: Promotion Codes', rows && rows.length > 0 ? rows[0] : null, this.GetUserFromPayload(userPayload));
|
|
14252
13894
|
return result;
|
|
14253
13895
|
}
|
|
14254
|
-
async mjBizAppsOrdersOrderAdjustments_PromotionCodeIDArray(mjbizappsorderspromotioncode_, { userPayload, providers }, pubSub) {
|
|
14255
|
-
this.CheckUserReadPermissions('MJ_BizApps_Orders: Order Adjustments', userPayload);
|
|
14256
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
14257
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView('__mj_BizAppsOrders', 'vwOrderAdjustments')} WHERE ${provider.QuoteIdentifier('PromotionCodeID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ_BizApps_Orders: Order Adjustments', userPayload, EntityPermissionType.Read, 'AND');
|
|
14258
|
-
const rows = await provider.ExecuteSQL(sSQL, [mjbizappsorderspromotioncode_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
14259
|
-
const result = await this.ArrayMapFieldNamesToCodeNames('MJ_BizApps_Orders: Order Adjustments', rows, this.GetUserFromPayload(userPayload));
|
|
14260
|
-
return result;
|
|
14261
|
-
}
|
|
14262
13896
|
async CreatemjBizAppsOrdersPromotionCode(input, { providers, userPayload }, pubSub) {
|
|
14263
13897
|
const provider = GetReadWriteProvider(providers);
|
|
14264
13898
|
return this.CreateRecord('MJ_BizApps_Orders: Promotion Codes', input, provider, userPayload, pubSub);
|
|
@@ -14309,15 +13943,6 @@ __decorate([
|
|
|
14309
13943
|
__metadata("design:paramtypes", [String, Object, PubSubEngine]),
|
|
14310
13944
|
__metadata("design:returntype", Promise)
|
|
14311
13945
|
], mjBizAppsOrdersPromotionCodeResolver.prototype, "mjBizAppsOrdersPromotionCode", null);
|
|
14312
|
-
__decorate([
|
|
14313
|
-
FieldResolver(() => [mjBizAppsOrdersOrderAdjustment_]),
|
|
14314
|
-
__param(0, Root()),
|
|
14315
|
-
__param(1, Ctx()),
|
|
14316
|
-
__param(2, PubSub()),
|
|
14317
|
-
__metadata("design:type", Function),
|
|
14318
|
-
__metadata("design:paramtypes", [mjBizAppsOrdersPromotionCode_, Object, PubSubEngine]),
|
|
14319
|
-
__metadata("design:returntype", Promise)
|
|
14320
|
-
], mjBizAppsOrdersPromotionCodeResolver.prototype, "mjBizAppsOrdersOrderAdjustments_PromotionCodeIDArray", null);
|
|
14321
13946
|
__decorate([
|
|
14322
13947
|
Mutation(() => mjBizAppsOrdersPromotionCode_),
|
|
14323
13948
|
__param(0, Arg('input', () => CreatemjBizAppsOrdersPromotionCodeInput)),
|
|
@@ -14657,10 +14282,6 @@ __decorate([
|
|
|
14657
14282
|
Field(),
|
|
14658
14283
|
__metadata("design:type", Date)
|
|
14659
14284
|
], mjBizAppsOrdersPromotionType_.prototype, "_mj__UpdatedAt", void 0);
|
|
14660
|
-
__decorate([
|
|
14661
|
-
Field(() => [mjBizAppsOrdersPromotion_]),
|
|
14662
|
-
__metadata("design:type", Array)
|
|
14663
|
-
], mjBizAppsOrdersPromotionType_.prototype, "mjBizAppsOrdersPromotions_PromotionTypeIDArray", void 0);
|
|
14664
14285
|
mjBizAppsOrdersPromotionType_ = __decorate([
|
|
14665
14286
|
ObjectType({ description: `The discount shape a promotion takes: percent off, amount off, override price, free shipping. A lookup rather than a CHECK so types are additive at runtime, and so Code can key a ClassFactory registration for custom behaviour.` })
|
|
14666
14287
|
], mjBizAppsOrdersPromotionType_);
|
|
@@ -14802,14 +14423,6 @@ let mjBizAppsOrdersPromotionTypeResolver = class mjBizAppsOrdersPromotionTypeRes
|
|
|
14802
14423
|
const result = await this.MapFieldNamesToCodeNames('MJ_BizApps_Orders: Promotion Types', rows && rows.length > 0 ? rows[0] : null, this.GetUserFromPayload(userPayload));
|
|
14803
14424
|
return result;
|
|
14804
14425
|
}
|
|
14805
|
-
async mjBizAppsOrdersPromotions_PromotionTypeIDArray(mjbizappsorderspromotiontype_, { userPayload, providers }, pubSub) {
|
|
14806
|
-
this.CheckUserReadPermissions('MJ_BizApps_Orders: Promotions', userPayload);
|
|
14807
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
14808
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView('__mj_BizAppsOrders', 'vwPromotions')} WHERE ${provider.QuoteIdentifier('PromotionTypeID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ_BizApps_Orders: Promotions', userPayload, EntityPermissionType.Read, 'AND');
|
|
14809
|
-
const rows = await provider.ExecuteSQL(sSQL, [mjbizappsorderspromotiontype_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
14810
|
-
const result = await this.ArrayMapFieldNamesToCodeNames('MJ_BizApps_Orders: Promotions', rows, this.GetUserFromPayload(userPayload));
|
|
14811
|
-
return result;
|
|
14812
|
-
}
|
|
14813
14426
|
async CreatemjBizAppsOrdersPromotionType(input, { providers, userPayload }, pubSub) {
|
|
14814
14427
|
const provider = GetReadWriteProvider(providers);
|
|
14815
14428
|
return this.CreateRecord('MJ_BizApps_Orders: Promotion Types', input, provider, userPayload, pubSub);
|
|
@@ -14860,15 +14473,6 @@ __decorate([
|
|
|
14860
14473
|
__metadata("design:paramtypes", [String, Object, PubSubEngine]),
|
|
14861
14474
|
__metadata("design:returntype", Promise)
|
|
14862
14475
|
], mjBizAppsOrdersPromotionTypeResolver.prototype, "mjBizAppsOrdersPromotionType", null);
|
|
14863
|
-
__decorate([
|
|
14864
|
-
FieldResolver(() => [mjBizAppsOrdersPromotion_]),
|
|
14865
|
-
__param(0, Root()),
|
|
14866
|
-
__param(1, Ctx()),
|
|
14867
|
-
__param(2, PubSub()),
|
|
14868
|
-
__metadata("design:type", Function),
|
|
14869
|
-
__metadata("design:paramtypes", [mjBizAppsOrdersPromotionType_, Object, PubSubEngine]),
|
|
14870
|
-
__metadata("design:returntype", Promise)
|
|
14871
|
-
], mjBizAppsOrdersPromotionTypeResolver.prototype, "mjBizAppsOrdersPromotions_PromotionTypeIDArray", null);
|
|
14872
14476
|
__decorate([
|
|
14873
14477
|
Mutation(() => mjBizAppsOrdersPromotionType_),
|
|
14874
14478
|
__param(0, Arg('input', () => CreatemjBizAppsOrdersPromotionTypeInput)),
|
|
@@ -15022,18 +14626,6 @@ __decorate([
|
|
|
15022
14626
|
MaxLength(50),
|
|
15023
14627
|
__metadata("design:type", String)
|
|
15024
14628
|
], mjBizAppsOrdersPromotion_.prototype, "Company", void 0);
|
|
15025
|
-
__decorate([
|
|
15026
|
-
Field(() => [mjBizAppsOrdersPromotionCode_]),
|
|
15027
|
-
__metadata("design:type", Array)
|
|
15028
|
-
], mjBizAppsOrdersPromotion_.prototype, "mjBizAppsOrdersPromotionCodes_PromotionIDArray", void 0);
|
|
15029
|
-
__decorate([
|
|
15030
|
-
Field(() => [mjBizAppsOrdersPromotionTarget_]),
|
|
15031
|
-
__metadata("design:type", Array)
|
|
15032
|
-
], mjBizAppsOrdersPromotion_.prototype, "mjBizAppsOrdersPromotionTargets_PromotionIDArray", void 0);
|
|
15033
|
-
__decorate([
|
|
15034
|
-
Field(() => [mjBizAppsOrdersOrderAdjustment_]),
|
|
15035
|
-
__metadata("design:type", Array)
|
|
15036
|
-
], mjBizAppsOrdersPromotion_.prototype, "mjBizAppsOrdersOrderAdjustments_PromotionIDArray", void 0);
|
|
15037
14629
|
mjBizAppsOrdersPromotion_ = __decorate([
|
|
15038
14630
|
ObjectType({ description: `A promotional OFFER and its rules. Distinct from PromotionCode, which is a redeemable string pointing here - one promotion can have many codes (public, per-campaign, per-customer) without duplicating the offer. Follows Stripe\'s Coupon / Promotion Code split, which is the launch provider, so the mapping is one-to-one.` })
|
|
15039
14631
|
], mjBizAppsOrdersPromotion_);
|
|
@@ -15303,30 +14895,6 @@ let mjBizAppsOrdersPromotionResolver = class mjBizAppsOrdersPromotionResolver ex
|
|
|
15303
14895
|
const result = await this.MapFieldNamesToCodeNames('MJ_BizApps_Orders: Promotions', rows && rows.length > 0 ? rows[0] : null, this.GetUserFromPayload(userPayload));
|
|
15304
14896
|
return result;
|
|
15305
14897
|
}
|
|
15306
|
-
async mjBizAppsOrdersPromotionCodes_PromotionIDArray(mjbizappsorderspromotion_, { userPayload, providers }, pubSub) {
|
|
15307
|
-
this.CheckUserReadPermissions('MJ_BizApps_Orders: Promotion Codes', userPayload);
|
|
15308
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
15309
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView('__mj_BizAppsOrders', 'vwPromotionCodes')} WHERE ${provider.QuoteIdentifier('PromotionID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ_BizApps_Orders: Promotion Codes', userPayload, EntityPermissionType.Read, 'AND');
|
|
15310
|
-
const rows = await provider.ExecuteSQL(sSQL, [mjbizappsorderspromotion_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
15311
|
-
const result = await this.ArrayMapFieldNamesToCodeNames('MJ_BizApps_Orders: Promotion Codes', rows, this.GetUserFromPayload(userPayload));
|
|
15312
|
-
return result;
|
|
15313
|
-
}
|
|
15314
|
-
async mjBizAppsOrdersPromotionTargets_PromotionIDArray(mjbizappsorderspromotion_, { userPayload, providers }, pubSub) {
|
|
15315
|
-
this.CheckUserReadPermissions('MJ_BizApps_Orders: Promotion Targets', userPayload);
|
|
15316
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
15317
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView('__mj_BizAppsOrders', 'vwPromotionTargets')} WHERE ${provider.QuoteIdentifier('PromotionID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ_BizApps_Orders: Promotion Targets', userPayload, EntityPermissionType.Read, 'AND');
|
|
15318
|
-
const rows = await provider.ExecuteSQL(sSQL, [mjbizappsorderspromotion_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
15319
|
-
const result = await this.ArrayMapFieldNamesToCodeNames('MJ_BizApps_Orders: Promotion Targets', rows, this.GetUserFromPayload(userPayload));
|
|
15320
|
-
return result;
|
|
15321
|
-
}
|
|
15322
|
-
async mjBizAppsOrdersOrderAdjustments_PromotionIDArray(mjbizappsorderspromotion_, { userPayload, providers }, pubSub) {
|
|
15323
|
-
this.CheckUserReadPermissions('MJ_BizApps_Orders: Order Adjustments', userPayload);
|
|
15324
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
15325
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView('__mj_BizAppsOrders', 'vwOrderAdjustments')} WHERE ${provider.QuoteIdentifier('PromotionID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ_BizApps_Orders: Order Adjustments', userPayload, EntityPermissionType.Read, 'AND');
|
|
15326
|
-
const rows = await provider.ExecuteSQL(sSQL, [mjbizappsorderspromotion_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
15327
|
-
const result = await this.ArrayMapFieldNamesToCodeNames('MJ_BizApps_Orders: Order Adjustments', rows, this.GetUserFromPayload(userPayload));
|
|
15328
|
-
return result;
|
|
15329
|
-
}
|
|
15330
14898
|
async CreatemjBizAppsOrdersPromotion(input, { providers, userPayload }, pubSub) {
|
|
15331
14899
|
const provider = GetReadWriteProvider(providers);
|
|
15332
14900
|
return this.CreateRecord('MJ_BizApps_Orders: Promotions', input, provider, userPayload, pubSub);
|
|
@@ -15377,33 +14945,6 @@ __decorate([
|
|
|
15377
14945
|
__metadata("design:paramtypes", [String, Object, PubSubEngine]),
|
|
15378
14946
|
__metadata("design:returntype", Promise)
|
|
15379
14947
|
], mjBizAppsOrdersPromotionResolver.prototype, "mjBizAppsOrdersPromotion", null);
|
|
15380
|
-
__decorate([
|
|
15381
|
-
FieldResolver(() => [mjBizAppsOrdersPromotionCode_]),
|
|
15382
|
-
__param(0, Root()),
|
|
15383
|
-
__param(1, Ctx()),
|
|
15384
|
-
__param(2, PubSub()),
|
|
15385
|
-
__metadata("design:type", Function),
|
|
15386
|
-
__metadata("design:paramtypes", [mjBizAppsOrdersPromotion_, Object, PubSubEngine]),
|
|
15387
|
-
__metadata("design:returntype", Promise)
|
|
15388
|
-
], mjBizAppsOrdersPromotionResolver.prototype, "mjBizAppsOrdersPromotionCodes_PromotionIDArray", null);
|
|
15389
|
-
__decorate([
|
|
15390
|
-
FieldResolver(() => [mjBizAppsOrdersPromotionTarget_]),
|
|
15391
|
-
__param(0, Root()),
|
|
15392
|
-
__param(1, Ctx()),
|
|
15393
|
-
__param(2, PubSub()),
|
|
15394
|
-
__metadata("design:type", Function),
|
|
15395
|
-
__metadata("design:paramtypes", [mjBizAppsOrdersPromotion_, Object, PubSubEngine]),
|
|
15396
|
-
__metadata("design:returntype", Promise)
|
|
15397
|
-
], mjBizAppsOrdersPromotionResolver.prototype, "mjBizAppsOrdersPromotionTargets_PromotionIDArray", null);
|
|
15398
|
-
__decorate([
|
|
15399
|
-
FieldResolver(() => [mjBizAppsOrdersOrderAdjustment_]),
|
|
15400
|
-
__param(0, Root()),
|
|
15401
|
-
__param(1, Ctx()),
|
|
15402
|
-
__param(2, PubSub()),
|
|
15403
|
-
__metadata("design:type", Function),
|
|
15404
|
-
__metadata("design:paramtypes", [mjBizAppsOrdersPromotion_, Object, PubSubEngine]),
|
|
15405
|
-
__metadata("design:returntype", Promise)
|
|
15406
|
-
], mjBizAppsOrdersPromotionResolver.prototype, "mjBizAppsOrdersOrderAdjustments_PromotionIDArray", null);
|
|
15407
14948
|
__decorate([
|
|
15408
14949
|
Mutation(() => mjBizAppsOrdersPromotion_),
|
|
15409
14950
|
__param(0, Arg('input', () => CreatemjBizAppsOrdersPromotionInput)),
|
|
@@ -15489,18 +15030,6 @@ __decorate([
|
|
|
15489
15030
|
Field(),
|
|
15490
15031
|
__metadata("design:type", Date)
|
|
15491
15032
|
], mjBizAppsOrdersRevenueRecognitionType_.prototype, "_mj__UpdatedAt", void 0);
|
|
15492
|
-
__decorate([
|
|
15493
|
-
Field(() => [mjBizAppsOrdersProductType_]),
|
|
15494
|
-
__metadata("design:type", Array)
|
|
15495
|
-
], mjBizAppsOrdersRevenueRecognitionType_.prototype, "mjBizAppsOrdersProductTypes_DefaultRevenueRecognitionTypeIDArray", void 0);
|
|
15496
|
-
__decorate([
|
|
15497
|
-
Field(() => [mjBizAppsOrdersSubscriptionTerm_]),
|
|
15498
|
-
__metadata("design:type", Array)
|
|
15499
|
-
], mjBizAppsOrdersRevenueRecognitionType_.prototype, "mjBizAppsOrdersSubscriptionTerms_RevenueRecognitionTypeIDArray", void 0);
|
|
15500
|
-
__decorate([
|
|
15501
|
-
Field(() => [mjBizAppsOrdersProduct_]),
|
|
15502
|
-
__metadata("design:type", Array)
|
|
15503
|
-
], mjBizAppsOrdersRevenueRecognitionType_.prototype, "mjBizAppsOrdersProducts_RevenueRecognitionTypeIDArray", void 0);
|
|
15504
15033
|
mjBizAppsOrdersRevenueRecognitionType_ = __decorate([
|
|
15505
15034
|
ObjectType()
|
|
15506
15035
|
], mjBizAppsOrdersRevenueRecognitionType_);
|
|
@@ -15666,30 +15195,6 @@ let mjBizAppsOrdersRevenueRecognitionTypeResolver = class mjBizAppsOrdersRevenue
|
|
|
15666
15195
|
const result = await this.MapFieldNamesToCodeNames('MJ_BizApps_Orders: Revenue Recognition Types', rows && rows.length > 0 ? rows[0] : null, this.GetUserFromPayload(userPayload));
|
|
15667
15196
|
return result;
|
|
15668
15197
|
}
|
|
15669
|
-
async mjBizAppsOrdersProductTypes_DefaultRevenueRecognitionTypeIDArray(mjbizappsordersrevenuerecognitiontype_, { userPayload, providers }, pubSub) {
|
|
15670
|
-
this.CheckUserReadPermissions('MJ_BizApps_Orders: Product Types', userPayload);
|
|
15671
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
15672
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView('__mj_BizAppsOrders', 'vwProductTypes')} WHERE ${provider.QuoteIdentifier('DefaultRevenueRecognitionTypeID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ_BizApps_Orders: Product Types', userPayload, EntityPermissionType.Read, 'AND');
|
|
15673
|
-
const rows = await provider.ExecuteSQL(sSQL, [mjbizappsordersrevenuerecognitiontype_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
15674
|
-
const result = await this.ArrayMapFieldNamesToCodeNames('MJ_BizApps_Orders: Product Types', rows, this.GetUserFromPayload(userPayload));
|
|
15675
|
-
return result;
|
|
15676
|
-
}
|
|
15677
|
-
async mjBizAppsOrdersSubscriptionTerms_RevenueRecognitionTypeIDArray(mjbizappsordersrevenuerecognitiontype_, { userPayload, providers }, pubSub) {
|
|
15678
|
-
this.CheckUserReadPermissions('MJ_BizApps_Orders: Subscription Terms', userPayload);
|
|
15679
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
15680
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView('__mj_BizAppsOrders', 'vwSubscriptionTerms')} WHERE ${provider.QuoteIdentifier('RevenueRecognitionTypeID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ_BizApps_Orders: Subscription Terms', userPayload, EntityPermissionType.Read, 'AND');
|
|
15681
|
-
const rows = await provider.ExecuteSQL(sSQL, [mjbizappsordersrevenuerecognitiontype_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
15682
|
-
const result = await this.ArrayMapFieldNamesToCodeNames('MJ_BizApps_Orders: Subscription Terms', rows, this.GetUserFromPayload(userPayload));
|
|
15683
|
-
return result;
|
|
15684
|
-
}
|
|
15685
|
-
async mjBizAppsOrdersProducts_RevenueRecognitionTypeIDArray(mjbizappsordersrevenuerecognitiontype_, { userPayload, providers }, pubSub) {
|
|
15686
|
-
this.CheckUserReadPermissions('MJ_BizApps_Orders: Products', userPayload);
|
|
15687
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
15688
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView('__mj_BizAppsOrders', 'vwProducts')} WHERE ${provider.QuoteIdentifier('RevenueRecognitionTypeID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ_BizApps_Orders: Products', userPayload, EntityPermissionType.Read, 'AND');
|
|
15689
|
-
const rows = await provider.ExecuteSQL(sSQL, [mjbizappsordersrevenuerecognitiontype_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
15690
|
-
const result = await this.ArrayMapFieldNamesToCodeNames('MJ_BizApps_Orders: Products', rows, this.GetUserFromPayload(userPayload));
|
|
15691
|
-
return result;
|
|
15692
|
-
}
|
|
15693
15198
|
async CreatemjBizAppsOrdersRevenueRecognitionType(input, { providers, userPayload }, pubSub) {
|
|
15694
15199
|
const provider = GetReadWriteProvider(providers);
|
|
15695
15200
|
return this.CreateRecord('MJ_BizApps_Orders: Revenue Recognition Types', input, provider, userPayload, pubSub);
|
|
@@ -15740,33 +15245,6 @@ __decorate([
|
|
|
15740
15245
|
__metadata("design:paramtypes", [String, Object, PubSubEngine]),
|
|
15741
15246
|
__metadata("design:returntype", Promise)
|
|
15742
15247
|
], mjBizAppsOrdersRevenueRecognitionTypeResolver.prototype, "mjBizAppsOrdersRevenueRecognitionType", null);
|
|
15743
|
-
__decorate([
|
|
15744
|
-
FieldResolver(() => [mjBizAppsOrdersProductType_]),
|
|
15745
|
-
__param(0, Root()),
|
|
15746
|
-
__param(1, Ctx()),
|
|
15747
|
-
__param(2, PubSub()),
|
|
15748
|
-
__metadata("design:type", Function),
|
|
15749
|
-
__metadata("design:paramtypes", [mjBizAppsOrdersRevenueRecognitionType_, Object, PubSubEngine]),
|
|
15750
|
-
__metadata("design:returntype", Promise)
|
|
15751
|
-
], mjBizAppsOrdersRevenueRecognitionTypeResolver.prototype, "mjBizAppsOrdersProductTypes_DefaultRevenueRecognitionTypeIDArray", null);
|
|
15752
|
-
__decorate([
|
|
15753
|
-
FieldResolver(() => [mjBizAppsOrdersSubscriptionTerm_]),
|
|
15754
|
-
__param(0, Root()),
|
|
15755
|
-
__param(1, Ctx()),
|
|
15756
|
-
__param(2, PubSub()),
|
|
15757
|
-
__metadata("design:type", Function),
|
|
15758
|
-
__metadata("design:paramtypes", [mjBizAppsOrdersRevenueRecognitionType_, Object, PubSubEngine]),
|
|
15759
|
-
__metadata("design:returntype", Promise)
|
|
15760
|
-
], mjBizAppsOrdersRevenueRecognitionTypeResolver.prototype, "mjBizAppsOrdersSubscriptionTerms_RevenueRecognitionTypeIDArray", null);
|
|
15761
|
-
__decorate([
|
|
15762
|
-
FieldResolver(() => [mjBizAppsOrdersProduct_]),
|
|
15763
|
-
__param(0, Root()),
|
|
15764
|
-
__param(1, Ctx()),
|
|
15765
|
-
__param(2, PubSub()),
|
|
15766
|
-
__metadata("design:type", Function),
|
|
15767
|
-
__metadata("design:paramtypes", [mjBizAppsOrdersRevenueRecognitionType_, Object, PubSubEngine]),
|
|
15768
|
-
__metadata("design:returntype", Promise)
|
|
15769
|
-
], mjBizAppsOrdersRevenueRecognitionTypeResolver.prototype, "mjBizAppsOrdersProducts_RevenueRecognitionTypeIDArray", null);
|
|
15770
15248
|
__decorate([
|
|
15771
15249
|
Mutation(() => mjBizAppsOrdersRevenueRecognitionType_),
|
|
15772
15250
|
__param(0, Arg('input', () => CreatemjBizAppsOrdersRevenueRecognitionTypeInput)),
|
|
@@ -15847,10 +15325,6 @@ __decorate([
|
|
|
15847
15325
|
MaxLength(100),
|
|
15848
15326
|
__metadata("design:type", String)
|
|
15849
15327
|
], mjBizAppsOrdersSalesAuthority_.prototype, "SalesRepUser", void 0);
|
|
15850
|
-
__decorate([
|
|
15851
|
-
Field(() => [mjBizAppsOrdersOrderAdjustment_]),
|
|
15852
|
-
__metadata("design:type", Array)
|
|
15853
|
-
], mjBizAppsOrdersSalesAuthority_.prototype, "mjBizAppsOrdersOrderAdjustments_AuthorizedBySalesAuthorityIDArray", void 0);
|
|
15854
15328
|
mjBizAppsOrdersSalesAuthority_ = __decorate([
|
|
15855
15329
|
ObjectType({ description: `Per-rep authority limits (§4.8): the caps within which a sales rep confirms without approval.` })
|
|
15856
15330
|
], mjBizAppsOrdersSalesAuthority_);
|
|
@@ -16000,14 +15474,6 @@ let mjBizAppsOrdersSalesAuthorityResolver = class mjBizAppsOrdersSalesAuthorityR
|
|
|
16000
15474
|
const result = await this.MapFieldNamesToCodeNames('MJ_BizApps_Orders: Sales Authorities', rows && rows.length > 0 ? rows[0] : null, this.GetUserFromPayload(userPayload));
|
|
16001
15475
|
return result;
|
|
16002
15476
|
}
|
|
16003
|
-
async mjBizAppsOrdersOrderAdjustments_AuthorizedBySalesAuthorityIDArray(mjbizappsorderssalesauthority_, { userPayload, providers }, pubSub) {
|
|
16004
|
-
this.CheckUserReadPermissions('MJ_BizApps_Orders: Order Adjustments', userPayload);
|
|
16005
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
16006
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView('__mj_BizAppsOrders', 'vwOrderAdjustments')} WHERE ${provider.QuoteIdentifier('AuthorizedBySalesAuthorityID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ_BizApps_Orders: Order Adjustments', userPayload, EntityPermissionType.Read, 'AND');
|
|
16007
|
-
const rows = await provider.ExecuteSQL(sSQL, [mjbizappsorderssalesauthority_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
16008
|
-
const result = await this.ArrayMapFieldNamesToCodeNames('MJ_BizApps_Orders: Order Adjustments', rows, this.GetUserFromPayload(userPayload));
|
|
16009
|
-
return result;
|
|
16010
|
-
}
|
|
16011
15477
|
async CreatemjBizAppsOrdersSalesAuthority(input, { providers, userPayload }, pubSub) {
|
|
16012
15478
|
const provider = GetReadWriteProvider(providers);
|
|
16013
15479
|
return this.CreateRecord('MJ_BizApps_Orders: Sales Authorities', input, provider, userPayload, pubSub);
|
|
@@ -16058,15 +15524,6 @@ __decorate([
|
|
|
16058
15524
|
__metadata("design:paramtypes", [String, Object, PubSubEngine]),
|
|
16059
15525
|
__metadata("design:returntype", Promise)
|
|
16060
15526
|
], mjBizAppsOrdersSalesAuthorityResolver.prototype, "mjBizAppsOrdersSalesAuthority", null);
|
|
16061
|
-
__decorate([
|
|
16062
|
-
FieldResolver(() => [mjBizAppsOrdersOrderAdjustment_]),
|
|
16063
|
-
__param(0, Root()),
|
|
16064
|
-
__param(1, Ctx()),
|
|
16065
|
-
__param(2, PubSub()),
|
|
16066
|
-
__metadata("design:type", Function),
|
|
16067
|
-
__metadata("design:paramtypes", [mjBizAppsOrdersSalesAuthority_, Object, PubSubEngine]),
|
|
16068
|
-
__metadata("design:returntype", Promise)
|
|
16069
|
-
], mjBizAppsOrdersSalesAuthorityResolver.prototype, "mjBizAppsOrdersOrderAdjustments_AuthorizedBySalesAuthorityIDArray", null);
|
|
16070
15527
|
__decorate([
|
|
16071
15528
|
Mutation(() => mjBizAppsOrdersSalesAuthority_),
|
|
16072
15529
|
__param(0, Arg('input', () => CreatemjBizAppsOrdersSalesAuthorityInput)),
|
|
@@ -16469,14 +15926,6 @@ __decorate([
|
|
|
16469
15926
|
MaxLength(255),
|
|
16470
15927
|
__metadata("design:type", String)
|
|
16471
15928
|
], mjBizAppsOrdersStoredValueAccount_.prototype, "BeneficiaryOrganization", void 0);
|
|
16472
|
-
__decorate([
|
|
16473
|
-
Field(() => [mjBizAppsOrdersStoredValueTransaction_]),
|
|
16474
|
-
__metadata("design:type", Array)
|
|
16475
|
-
], mjBizAppsOrdersStoredValueAccount_.prototype, "mjBizAppsOrdersStoredValueTransactions_StoredValueAccountIDArray", void 0);
|
|
16476
|
-
__decorate([
|
|
16477
|
-
Field(() => [mjBizAppsOrdersPaymentDetail_]),
|
|
16478
|
-
__metadata("design:type", Array)
|
|
16479
|
-
], mjBizAppsOrdersStoredValueAccount_.prototype, "mjBizAppsOrdersPaymentDetails_StoredValueAccountIDArray", void 0);
|
|
16480
15929
|
mjBizAppsOrdersStoredValueAccount_ = __decorate([
|
|
16481
15930
|
ObjectType({ description: `Gift-card / stored-value instrument (BO-D44). Selling one books a LIABILITY (not revenue); redemption is a Payment with Method=GiftCard relieving the liability.` })
|
|
16482
15931
|
], mjBizAppsOrdersStoredValueAccount_);
|
|
@@ -16650,22 +16099,6 @@ let mjBizAppsOrdersStoredValueAccountResolver = class mjBizAppsOrdersStoredValue
|
|
|
16650
16099
|
const result = await this.MapFieldNamesToCodeNames('MJ_BizApps_Orders: Stored Value Accounts', rows && rows.length > 0 ? rows[0] : null, this.GetUserFromPayload(userPayload));
|
|
16651
16100
|
return result;
|
|
16652
16101
|
}
|
|
16653
|
-
async mjBizAppsOrdersStoredValueTransactions_StoredValueAccountIDArray(mjbizappsordersstoredvalueaccount_, { userPayload, providers }, pubSub) {
|
|
16654
|
-
this.CheckUserReadPermissions('MJ_BizApps_Orders: Stored Value Transactions', userPayload);
|
|
16655
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
16656
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView('__mj_BizAppsOrders', 'vwStoredValueTransactions')} WHERE ${provider.QuoteIdentifier('StoredValueAccountID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ_BizApps_Orders: Stored Value Transactions', userPayload, EntityPermissionType.Read, 'AND');
|
|
16657
|
-
const rows = await provider.ExecuteSQL(sSQL, [mjbizappsordersstoredvalueaccount_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
16658
|
-
const result = await this.ArrayMapFieldNamesToCodeNames('MJ_BizApps_Orders: Stored Value Transactions', rows, this.GetUserFromPayload(userPayload));
|
|
16659
|
-
return result;
|
|
16660
|
-
}
|
|
16661
|
-
async mjBizAppsOrdersPaymentDetails_StoredValueAccountIDArray(mjbizappsordersstoredvalueaccount_, { userPayload, providers }, pubSub) {
|
|
16662
|
-
this.CheckUserReadPermissions('MJ_BizApps_Orders: Payment Details', userPayload);
|
|
16663
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
16664
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView('__mj_BizAppsOrders', 'vwPaymentDetails')} WHERE ${provider.QuoteIdentifier('StoredValueAccountID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ_BizApps_Orders: Payment Details', userPayload, EntityPermissionType.Read, 'AND');
|
|
16665
|
-
const rows = await provider.ExecuteSQL(sSQL, [mjbizappsordersstoredvalueaccount_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
16666
|
-
const result = await this.ArrayMapFieldNamesToCodeNames('MJ_BizApps_Orders: Payment Details', rows, this.GetUserFromPayload(userPayload));
|
|
16667
|
-
return result;
|
|
16668
|
-
}
|
|
16669
16102
|
async CreatemjBizAppsOrdersStoredValueAccount(input, { providers, userPayload }, pubSub) {
|
|
16670
16103
|
const provider = GetReadWriteProvider(providers);
|
|
16671
16104
|
return this.CreateRecord('MJ_BizApps_Orders: Stored Value Accounts', input, provider, userPayload, pubSub);
|
|
@@ -16716,24 +16149,6 @@ __decorate([
|
|
|
16716
16149
|
__metadata("design:paramtypes", [String, Object, PubSubEngine]),
|
|
16717
16150
|
__metadata("design:returntype", Promise)
|
|
16718
16151
|
], mjBizAppsOrdersStoredValueAccountResolver.prototype, "mjBizAppsOrdersStoredValueAccount", null);
|
|
16719
|
-
__decorate([
|
|
16720
|
-
FieldResolver(() => [mjBizAppsOrdersStoredValueTransaction_]),
|
|
16721
|
-
__param(0, Root()),
|
|
16722
|
-
__param(1, Ctx()),
|
|
16723
|
-
__param(2, PubSub()),
|
|
16724
|
-
__metadata("design:type", Function),
|
|
16725
|
-
__metadata("design:paramtypes", [mjBizAppsOrdersStoredValueAccount_, Object, PubSubEngine]),
|
|
16726
|
-
__metadata("design:returntype", Promise)
|
|
16727
|
-
], mjBizAppsOrdersStoredValueAccountResolver.prototype, "mjBizAppsOrdersStoredValueTransactions_StoredValueAccountIDArray", null);
|
|
16728
|
-
__decorate([
|
|
16729
|
-
FieldResolver(() => [mjBizAppsOrdersPaymentDetail_]),
|
|
16730
|
-
__param(0, Root()),
|
|
16731
|
-
__param(1, Ctx()),
|
|
16732
|
-
__param(2, PubSub()),
|
|
16733
|
-
__metadata("design:type", Function),
|
|
16734
|
-
__metadata("design:paramtypes", [mjBizAppsOrdersStoredValueAccount_, Object, PubSubEngine]),
|
|
16735
|
-
__metadata("design:returntype", Promise)
|
|
16736
|
-
], mjBizAppsOrdersStoredValueAccountResolver.prototype, "mjBizAppsOrdersPaymentDetails_StoredValueAccountIDArray", null);
|
|
16737
16152
|
__decorate([
|
|
16738
16153
|
Mutation(() => mjBizAppsOrdersStoredValueAccount_),
|
|
16739
16154
|
__param(0, Arg('input', () => CreatemjBizAppsOrdersStoredValueAccountInput)),
|
|
@@ -17667,10 +17082,6 @@ __decorate([
|
|
|
17667
17082
|
MaxLength(200),
|
|
17668
17083
|
__metadata("design:type", String)
|
|
17669
17084
|
], mjBizAppsOrdersSubscriptionTerm_.prototype, "RevenueRecognitionType", void 0);
|
|
17670
|
-
__decorate([
|
|
17671
|
-
Field(() => [mjBizAppsOrdersEntitlementGrant_]),
|
|
17672
|
-
__metadata("design:type", Array)
|
|
17673
|
-
], mjBizAppsOrdersSubscriptionTerm_.prototype, "mjBizAppsOrdersEntitlementGrants_SubscriptionTermIDArray", void 0);
|
|
17674
17085
|
mjBizAppsOrdersSubscriptionTerm_ = __decorate([
|
|
17675
17086
|
ObjectType()
|
|
17676
17087
|
], mjBizAppsOrdersSubscriptionTerm_);
|
|
@@ -17868,14 +17279,6 @@ let mjBizAppsOrdersSubscriptionTermResolver = class mjBizAppsOrdersSubscriptionT
|
|
|
17868
17279
|
const result = await this.MapFieldNamesToCodeNames('MJ_BizApps_Orders: Subscription Terms', rows && rows.length > 0 ? rows[0] : null, this.GetUserFromPayload(userPayload));
|
|
17869
17280
|
return result;
|
|
17870
17281
|
}
|
|
17871
|
-
async mjBizAppsOrdersEntitlementGrants_SubscriptionTermIDArray(mjbizappsorderssubscriptionterm_, { userPayload, providers }, pubSub) {
|
|
17872
|
-
this.CheckUserReadPermissions('MJ_BizApps_Orders: Entitlement Grants', userPayload);
|
|
17873
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
17874
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView('__mj_BizAppsOrders', 'vwEntitlementGrants')} WHERE ${provider.QuoteIdentifier('SubscriptionTermID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ_BizApps_Orders: Entitlement Grants', userPayload, EntityPermissionType.Read, 'AND');
|
|
17875
|
-
const rows = await provider.ExecuteSQL(sSQL, [mjbizappsorderssubscriptionterm_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
17876
|
-
const result = await this.ArrayMapFieldNamesToCodeNames('MJ_BizApps_Orders: Entitlement Grants', rows, this.GetUserFromPayload(userPayload));
|
|
17877
|
-
return result;
|
|
17878
|
-
}
|
|
17879
17282
|
async CreatemjBizAppsOrdersSubscriptionTerm(input, { providers, userPayload }, pubSub) {
|
|
17880
17283
|
const provider = GetReadWriteProvider(providers);
|
|
17881
17284
|
return this.CreateRecord('MJ_BizApps_Orders: Subscription Terms', input, provider, userPayload, pubSub);
|
|
@@ -17926,15 +17329,6 @@ __decorate([
|
|
|
17926
17329
|
__metadata("design:paramtypes", [String, Object, PubSubEngine]),
|
|
17927
17330
|
__metadata("design:returntype", Promise)
|
|
17928
17331
|
], mjBizAppsOrdersSubscriptionTermResolver.prototype, "mjBizAppsOrdersSubscriptionTerm", null);
|
|
17929
|
-
__decorate([
|
|
17930
|
-
FieldResolver(() => [mjBizAppsOrdersEntitlementGrant_]),
|
|
17931
|
-
__param(0, Root()),
|
|
17932
|
-
__param(1, Ctx()),
|
|
17933
|
-
__param(2, PubSub()),
|
|
17934
|
-
__metadata("design:type", Function),
|
|
17935
|
-
__metadata("design:paramtypes", [mjBizAppsOrdersSubscriptionTerm_, Object, PubSubEngine]),
|
|
17936
|
-
__metadata("design:returntype", Promise)
|
|
17937
|
-
], mjBizAppsOrdersSubscriptionTermResolver.prototype, "mjBizAppsOrdersEntitlementGrants_SubscriptionTermIDArray", null);
|
|
17938
17332
|
__decorate([
|
|
17939
17333
|
Mutation(() => mjBizAppsOrdersSubscriptionTerm_),
|
|
17940
17334
|
__param(0, Arg('input', () => CreatemjBizAppsOrdersSubscriptionTermInput)),
|
|
@@ -18106,18 +17500,6 @@ __decorate([
|
|
|
18106
17500
|
Field(),
|
|
18107
17501
|
__metadata("design:type", Date)
|
|
18108
17502
|
], mjBizAppsOrdersSubscriptionType_.prototype, "_mj__UpdatedAt", void 0);
|
|
18109
|
-
__decorate([
|
|
18110
|
-
Field(() => [mjBizAppsOrdersSubscription_]),
|
|
18111
|
-
__metadata("design:type", Array)
|
|
18112
|
-
], mjBizAppsOrdersSubscriptionType_.prototype, "mjBizAppsOrdersSubscriptions_SubscriptionTypeIDArray", void 0);
|
|
18113
|
-
__decorate([
|
|
18114
|
-
Field(() => [mjBizAppsOrdersProductType_]),
|
|
18115
|
-
__metadata("design:type", Array)
|
|
18116
|
-
], mjBizAppsOrdersSubscriptionType_.prototype, "mjBizAppsOrdersProductTypes_DefaultSubscriptionTypeIDArray", void 0);
|
|
18117
|
-
__decorate([
|
|
18118
|
-
Field(() => [mjBizAppsOrdersProduct_]),
|
|
18119
|
-
__metadata("design:type", Array)
|
|
18120
|
-
], mjBizAppsOrdersSubscriptionType_.prototype, "mjBizAppsOrdersProducts_SubscriptionTypeIDArray", void 0);
|
|
18121
17503
|
mjBizAppsOrdersSubscriptionType_ = __decorate([
|
|
18122
17504
|
ObjectType()
|
|
18123
17505
|
], mjBizAppsOrdersSubscriptionType_);
|
|
@@ -18435,30 +17817,6 @@ let mjBizAppsOrdersSubscriptionTypeResolver = class mjBizAppsOrdersSubscriptionT
|
|
|
18435
17817
|
const result = await this.MapFieldNamesToCodeNames('MJ_BizApps_Orders: Subscription Types', rows && rows.length > 0 ? rows[0] : null, this.GetUserFromPayload(userPayload));
|
|
18436
17818
|
return result;
|
|
18437
17819
|
}
|
|
18438
|
-
async mjBizAppsOrdersSubscriptions_SubscriptionTypeIDArray(mjbizappsorderssubscriptiontype_, { userPayload, providers }, pubSub) {
|
|
18439
|
-
this.CheckUserReadPermissions('MJ_BizApps_Orders: Subscriptions', userPayload);
|
|
18440
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
18441
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView('__mj_BizAppsOrders', 'vwSubscriptions')} WHERE ${provider.QuoteIdentifier('SubscriptionTypeID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ_BizApps_Orders: Subscriptions', userPayload, EntityPermissionType.Read, 'AND');
|
|
18442
|
-
const rows = await provider.ExecuteSQL(sSQL, [mjbizappsorderssubscriptiontype_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
18443
|
-
const result = await this.ArrayMapFieldNamesToCodeNames('MJ_BizApps_Orders: Subscriptions', rows, this.GetUserFromPayload(userPayload));
|
|
18444
|
-
return result;
|
|
18445
|
-
}
|
|
18446
|
-
async mjBizAppsOrdersProductTypes_DefaultSubscriptionTypeIDArray(mjbizappsorderssubscriptiontype_, { userPayload, providers }, pubSub) {
|
|
18447
|
-
this.CheckUserReadPermissions('MJ_BizApps_Orders: Product Types', userPayload);
|
|
18448
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
18449
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView('__mj_BizAppsOrders', 'vwProductTypes')} WHERE ${provider.QuoteIdentifier('DefaultSubscriptionTypeID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ_BizApps_Orders: Product Types', userPayload, EntityPermissionType.Read, 'AND');
|
|
18450
|
-
const rows = await provider.ExecuteSQL(sSQL, [mjbizappsorderssubscriptiontype_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
18451
|
-
const result = await this.ArrayMapFieldNamesToCodeNames('MJ_BizApps_Orders: Product Types', rows, this.GetUserFromPayload(userPayload));
|
|
18452
|
-
return result;
|
|
18453
|
-
}
|
|
18454
|
-
async mjBizAppsOrdersProducts_SubscriptionTypeIDArray(mjbizappsorderssubscriptiontype_, { userPayload, providers }, pubSub) {
|
|
18455
|
-
this.CheckUserReadPermissions('MJ_BizApps_Orders: Products', userPayload);
|
|
18456
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
18457
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView('__mj_BizAppsOrders', 'vwProducts')} WHERE ${provider.QuoteIdentifier('SubscriptionTypeID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ_BizApps_Orders: Products', userPayload, EntityPermissionType.Read, 'AND');
|
|
18458
|
-
const rows = await provider.ExecuteSQL(sSQL, [mjbizappsorderssubscriptiontype_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
18459
|
-
const result = await this.ArrayMapFieldNamesToCodeNames('MJ_BizApps_Orders: Products', rows, this.GetUserFromPayload(userPayload));
|
|
18460
|
-
return result;
|
|
18461
|
-
}
|
|
18462
17820
|
async CreatemjBizAppsOrdersSubscriptionType(input, { providers, userPayload }, pubSub) {
|
|
18463
17821
|
const provider = GetReadWriteProvider(providers);
|
|
18464
17822
|
return this.CreateRecord('MJ_BizApps_Orders: Subscription Types', input, provider, userPayload, pubSub);
|
|
@@ -18509,33 +17867,6 @@ __decorate([
|
|
|
18509
17867
|
__metadata("design:paramtypes", [String, Object, PubSubEngine]),
|
|
18510
17868
|
__metadata("design:returntype", Promise)
|
|
18511
17869
|
], mjBizAppsOrdersSubscriptionTypeResolver.prototype, "mjBizAppsOrdersSubscriptionType", null);
|
|
18512
|
-
__decorate([
|
|
18513
|
-
FieldResolver(() => [mjBizAppsOrdersSubscription_]),
|
|
18514
|
-
__param(0, Root()),
|
|
18515
|
-
__param(1, Ctx()),
|
|
18516
|
-
__param(2, PubSub()),
|
|
18517
|
-
__metadata("design:type", Function),
|
|
18518
|
-
__metadata("design:paramtypes", [mjBizAppsOrdersSubscriptionType_, Object, PubSubEngine]),
|
|
18519
|
-
__metadata("design:returntype", Promise)
|
|
18520
|
-
], mjBizAppsOrdersSubscriptionTypeResolver.prototype, "mjBizAppsOrdersSubscriptions_SubscriptionTypeIDArray", null);
|
|
18521
|
-
__decorate([
|
|
18522
|
-
FieldResolver(() => [mjBizAppsOrdersProductType_]),
|
|
18523
|
-
__param(0, Root()),
|
|
18524
|
-
__param(1, Ctx()),
|
|
18525
|
-
__param(2, PubSub()),
|
|
18526
|
-
__metadata("design:type", Function),
|
|
18527
|
-
__metadata("design:paramtypes", [mjBizAppsOrdersSubscriptionType_, Object, PubSubEngine]),
|
|
18528
|
-
__metadata("design:returntype", Promise)
|
|
18529
|
-
], mjBizAppsOrdersSubscriptionTypeResolver.prototype, "mjBizAppsOrdersProductTypes_DefaultSubscriptionTypeIDArray", null);
|
|
18530
|
-
__decorate([
|
|
18531
|
-
FieldResolver(() => [mjBizAppsOrdersProduct_]),
|
|
18532
|
-
__param(0, Root()),
|
|
18533
|
-
__param(1, Ctx()),
|
|
18534
|
-
__param(2, PubSub()),
|
|
18535
|
-
__metadata("design:type", Function),
|
|
18536
|
-
__metadata("design:paramtypes", [mjBizAppsOrdersSubscriptionType_, Object, PubSubEngine]),
|
|
18537
|
-
__metadata("design:returntype", Promise)
|
|
18538
|
-
], mjBizAppsOrdersSubscriptionTypeResolver.prototype, "mjBizAppsOrdersProducts_SubscriptionTypeIDArray", null);
|
|
18539
17870
|
__decorate([
|
|
18540
17871
|
Mutation(() => mjBizAppsOrdersSubscriptionType_),
|
|
18541
17872
|
__param(0, Arg('input', () => CreatemjBizAppsOrdersSubscriptionTypeInput)),
|
|
@@ -18710,30 +18041,6 @@ __decorate([
|
|
|
18710
18041
|
MaxLength(40),
|
|
18711
18042
|
__metadata("design:type", String)
|
|
18712
18043
|
], mjBizAppsOrdersSubscription_.prototype, "MigratesToSubscription", void 0);
|
|
18713
|
-
__decorate([
|
|
18714
|
-
Field(() => [mjBizAppsOrdersEntitlementGrant_]),
|
|
18715
|
-
__metadata("design:type", Array)
|
|
18716
|
-
], mjBizAppsOrdersSubscription_.prototype, "mjBizAppsOrdersEntitlementGrants_SubscriptionIDArray", void 0);
|
|
18717
|
-
__decorate([
|
|
18718
|
-
Field(() => [mjBizAppsOrdersSubscription_]),
|
|
18719
|
-
__metadata("design:type", Array)
|
|
18720
|
-
], mjBizAppsOrdersSubscription_.prototype, "mjBizAppsOrdersSubscriptions_MigratesToSubscriptionIDArray", void 0);
|
|
18721
|
-
__decorate([
|
|
18722
|
-
Field(() => [mjBizAppsOrdersSubscription_]),
|
|
18723
|
-
__metadata("design:type", Array)
|
|
18724
|
-
], mjBizAppsOrdersSubscription_.prototype, "mjBizAppsOrdersSubscriptions_MigratesFromSubscriptionIDArray", void 0);
|
|
18725
|
-
__decorate([
|
|
18726
|
-
Field(() => [mjBizAppsOrdersSubscriptionEvent_]),
|
|
18727
|
-
__metadata("design:type", Array)
|
|
18728
|
-
], mjBizAppsOrdersSubscription_.prototype, "mjBizAppsOrdersSubscriptionEvents_SubscriptionIDArray", void 0);
|
|
18729
|
-
__decorate([
|
|
18730
|
-
Field(() => [mjBizAppsOrdersSubscriptionTerm_]),
|
|
18731
|
-
__metadata("design:type", Array)
|
|
18732
|
-
], mjBizAppsOrdersSubscription_.prototype, "mjBizAppsOrdersSubscriptionTerms_SubscriptionIDArray", void 0);
|
|
18733
|
-
__decorate([
|
|
18734
|
-
Field(() => [mjBizAppsOrdersOrderLine_]),
|
|
18735
|
-
__metadata("design:type", Array)
|
|
18736
|
-
], mjBizAppsOrdersSubscription_.prototype, "mjBizAppsOrdersOrderLines_SubscriptionIDArray", void 0);
|
|
18737
18044
|
mjBizAppsOrdersSubscription_ = __decorate([
|
|
18738
18045
|
ObjectType({ description: `A recurring (Product, Customer, Beneficiary) relationship born from an order line (D20/D27). Renewal cycles spawn new Orders under it (Draft at launch, D20); schedules hang off order lines, not here.` })
|
|
18739
18046
|
], mjBizAppsOrdersSubscription_);
|
|
@@ -18979,54 +18286,6 @@ let mjBizAppsOrdersSubscriptionResolver = class mjBizAppsOrdersSubscriptionResol
|
|
|
18979
18286
|
const result = await this.MapFieldNamesToCodeNames('MJ_BizApps_Orders: Subscriptions', rows && rows.length > 0 ? rows[0] : null, this.GetUserFromPayload(userPayload));
|
|
18980
18287
|
return result;
|
|
18981
18288
|
}
|
|
18982
|
-
async mjBizAppsOrdersEntitlementGrants_SubscriptionIDArray(mjbizappsorderssubscription_, { userPayload, providers }, pubSub) {
|
|
18983
|
-
this.CheckUserReadPermissions('MJ_BizApps_Orders: Entitlement Grants', userPayload);
|
|
18984
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
18985
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView('__mj_BizAppsOrders', 'vwEntitlementGrants')} WHERE ${provider.QuoteIdentifier('SubscriptionID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ_BizApps_Orders: Entitlement Grants', userPayload, EntityPermissionType.Read, 'AND');
|
|
18986
|
-
const rows = await provider.ExecuteSQL(sSQL, [mjbizappsorderssubscription_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
18987
|
-
const result = await this.ArrayMapFieldNamesToCodeNames('MJ_BizApps_Orders: Entitlement Grants', rows, this.GetUserFromPayload(userPayload));
|
|
18988
|
-
return result;
|
|
18989
|
-
}
|
|
18990
|
-
async mjBizAppsOrdersSubscriptions_MigratesToSubscriptionIDArray(mjbizappsorderssubscription_, { userPayload, providers }, pubSub) {
|
|
18991
|
-
this.CheckUserReadPermissions('MJ_BizApps_Orders: Subscriptions', userPayload);
|
|
18992
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
18993
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView('__mj_BizAppsOrders', 'vwSubscriptions')} WHERE ${provider.QuoteIdentifier('MigratesToSubscriptionID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ_BizApps_Orders: Subscriptions', userPayload, EntityPermissionType.Read, 'AND');
|
|
18994
|
-
const rows = await provider.ExecuteSQL(sSQL, [mjbizappsorderssubscription_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
18995
|
-
const result = await this.ArrayMapFieldNamesToCodeNames('MJ_BizApps_Orders: Subscriptions', rows, this.GetUserFromPayload(userPayload));
|
|
18996
|
-
return result;
|
|
18997
|
-
}
|
|
18998
|
-
async mjBizAppsOrdersSubscriptions_MigratesFromSubscriptionIDArray(mjbizappsorderssubscription_, { userPayload, providers }, pubSub) {
|
|
18999
|
-
this.CheckUserReadPermissions('MJ_BizApps_Orders: Subscriptions', userPayload);
|
|
19000
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
19001
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView('__mj_BizAppsOrders', 'vwSubscriptions')} WHERE ${provider.QuoteIdentifier('MigratesFromSubscriptionID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ_BizApps_Orders: Subscriptions', userPayload, EntityPermissionType.Read, 'AND');
|
|
19002
|
-
const rows = await provider.ExecuteSQL(sSQL, [mjbizappsorderssubscription_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
19003
|
-
const result = await this.ArrayMapFieldNamesToCodeNames('MJ_BizApps_Orders: Subscriptions', rows, this.GetUserFromPayload(userPayload));
|
|
19004
|
-
return result;
|
|
19005
|
-
}
|
|
19006
|
-
async mjBizAppsOrdersSubscriptionEvents_SubscriptionIDArray(mjbizappsorderssubscription_, { userPayload, providers }, pubSub) {
|
|
19007
|
-
this.CheckUserReadPermissions('MJ_BizApps_Orders: Subscription Events', userPayload);
|
|
19008
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
19009
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView('__mj_BizAppsOrders', 'vwSubscriptionEvents')} WHERE ${provider.QuoteIdentifier('SubscriptionID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ_BizApps_Orders: Subscription Events', userPayload, EntityPermissionType.Read, 'AND');
|
|
19010
|
-
const rows = await provider.ExecuteSQL(sSQL, [mjbizappsorderssubscription_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
19011
|
-
const result = await this.ArrayMapFieldNamesToCodeNames('MJ_BizApps_Orders: Subscription Events', rows, this.GetUserFromPayload(userPayload));
|
|
19012
|
-
return result;
|
|
19013
|
-
}
|
|
19014
|
-
async mjBizAppsOrdersSubscriptionTerms_SubscriptionIDArray(mjbizappsorderssubscription_, { userPayload, providers }, pubSub) {
|
|
19015
|
-
this.CheckUserReadPermissions('MJ_BizApps_Orders: Subscription Terms', userPayload);
|
|
19016
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
19017
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView('__mj_BizAppsOrders', 'vwSubscriptionTerms')} WHERE ${provider.QuoteIdentifier('SubscriptionID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ_BizApps_Orders: Subscription Terms', userPayload, EntityPermissionType.Read, 'AND');
|
|
19018
|
-
const rows = await provider.ExecuteSQL(sSQL, [mjbizappsorderssubscription_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
19019
|
-
const result = await this.ArrayMapFieldNamesToCodeNames('MJ_BizApps_Orders: Subscription Terms', rows, this.GetUserFromPayload(userPayload));
|
|
19020
|
-
return result;
|
|
19021
|
-
}
|
|
19022
|
-
async mjBizAppsOrdersOrderLines_SubscriptionIDArray(mjbizappsorderssubscription_, { userPayload, providers }, pubSub) {
|
|
19023
|
-
this.CheckUserReadPermissions('MJ_BizApps_Orders: Order Lines', userPayload);
|
|
19024
|
-
const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
|
|
19025
|
-
const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView('__mj_BizAppsOrders', 'vwOrderLines')} WHERE ${provider.QuoteIdentifier('SubscriptionID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ_BizApps_Orders: Order Lines', userPayload, EntityPermissionType.Read, 'AND');
|
|
19026
|
-
const rows = await provider.ExecuteSQL(sSQL, [mjbizappsorderssubscription_.ID], undefined, this.GetUserFromPayload(userPayload));
|
|
19027
|
-
const result = await this.ArrayMapFieldNamesToCodeNames('MJ_BizApps_Orders: Order Lines', rows, this.GetUserFromPayload(userPayload));
|
|
19028
|
-
return result;
|
|
19029
|
-
}
|
|
19030
18289
|
async CreatemjBizAppsOrdersSubscription(input, { providers, userPayload }, pubSub) {
|
|
19031
18290
|
const provider = GetReadWriteProvider(providers);
|
|
19032
18291
|
return this.CreateRecord('MJ_BizApps_Orders: Subscriptions', input, provider, userPayload, pubSub);
|
|
@@ -19077,60 +18336,6 @@ __decorate([
|
|
|
19077
18336
|
__metadata("design:paramtypes", [String, Object, PubSubEngine]),
|
|
19078
18337
|
__metadata("design:returntype", Promise)
|
|
19079
18338
|
], mjBizAppsOrdersSubscriptionResolver.prototype, "mjBizAppsOrdersSubscription", null);
|
|
19080
|
-
__decorate([
|
|
19081
|
-
FieldResolver(() => [mjBizAppsOrdersEntitlementGrant_]),
|
|
19082
|
-
__param(0, Root()),
|
|
19083
|
-
__param(1, Ctx()),
|
|
19084
|
-
__param(2, PubSub()),
|
|
19085
|
-
__metadata("design:type", Function),
|
|
19086
|
-
__metadata("design:paramtypes", [mjBizAppsOrdersSubscription_, Object, PubSubEngine]),
|
|
19087
|
-
__metadata("design:returntype", Promise)
|
|
19088
|
-
], mjBizAppsOrdersSubscriptionResolver.prototype, "mjBizAppsOrdersEntitlementGrants_SubscriptionIDArray", null);
|
|
19089
|
-
__decorate([
|
|
19090
|
-
FieldResolver(() => [mjBizAppsOrdersSubscription_]),
|
|
19091
|
-
__param(0, Root()),
|
|
19092
|
-
__param(1, Ctx()),
|
|
19093
|
-
__param(2, PubSub()),
|
|
19094
|
-
__metadata("design:type", Function),
|
|
19095
|
-
__metadata("design:paramtypes", [mjBizAppsOrdersSubscription_, Object, PubSubEngine]),
|
|
19096
|
-
__metadata("design:returntype", Promise)
|
|
19097
|
-
], mjBizAppsOrdersSubscriptionResolver.prototype, "mjBizAppsOrdersSubscriptions_MigratesToSubscriptionIDArray", null);
|
|
19098
|
-
__decorate([
|
|
19099
|
-
FieldResolver(() => [mjBizAppsOrdersSubscription_]),
|
|
19100
|
-
__param(0, Root()),
|
|
19101
|
-
__param(1, Ctx()),
|
|
19102
|
-
__param(2, PubSub()),
|
|
19103
|
-
__metadata("design:type", Function),
|
|
19104
|
-
__metadata("design:paramtypes", [mjBizAppsOrdersSubscription_, Object, PubSubEngine]),
|
|
19105
|
-
__metadata("design:returntype", Promise)
|
|
19106
|
-
], mjBizAppsOrdersSubscriptionResolver.prototype, "mjBizAppsOrdersSubscriptions_MigratesFromSubscriptionIDArray", null);
|
|
19107
|
-
__decorate([
|
|
19108
|
-
FieldResolver(() => [mjBizAppsOrdersSubscriptionEvent_]),
|
|
19109
|
-
__param(0, Root()),
|
|
19110
|
-
__param(1, Ctx()),
|
|
19111
|
-
__param(2, PubSub()),
|
|
19112
|
-
__metadata("design:type", Function),
|
|
19113
|
-
__metadata("design:paramtypes", [mjBizAppsOrdersSubscription_, Object, PubSubEngine]),
|
|
19114
|
-
__metadata("design:returntype", Promise)
|
|
19115
|
-
], mjBizAppsOrdersSubscriptionResolver.prototype, "mjBizAppsOrdersSubscriptionEvents_SubscriptionIDArray", null);
|
|
19116
|
-
__decorate([
|
|
19117
|
-
FieldResolver(() => [mjBizAppsOrdersSubscriptionTerm_]),
|
|
19118
|
-
__param(0, Root()),
|
|
19119
|
-
__param(1, Ctx()),
|
|
19120
|
-
__param(2, PubSub()),
|
|
19121
|
-
__metadata("design:type", Function),
|
|
19122
|
-
__metadata("design:paramtypes", [mjBizAppsOrdersSubscription_, Object, PubSubEngine]),
|
|
19123
|
-
__metadata("design:returntype", Promise)
|
|
19124
|
-
], mjBizAppsOrdersSubscriptionResolver.prototype, "mjBizAppsOrdersSubscriptionTerms_SubscriptionIDArray", null);
|
|
19125
|
-
__decorate([
|
|
19126
|
-
FieldResolver(() => [mjBizAppsOrdersOrderLine_]),
|
|
19127
|
-
__param(0, Root()),
|
|
19128
|
-
__param(1, Ctx()),
|
|
19129
|
-
__param(2, PubSub()),
|
|
19130
|
-
__metadata("design:type", Function),
|
|
19131
|
-
__metadata("design:paramtypes", [mjBizAppsOrdersSubscription_, Object, PubSubEngine]),
|
|
19132
|
-
__metadata("design:returntype", Promise)
|
|
19133
|
-
], mjBizAppsOrdersSubscriptionResolver.prototype, "mjBizAppsOrdersOrderLines_SubscriptionIDArray", null);
|
|
19134
18339
|
__decorate([
|
|
19135
18340
|
Mutation(() => mjBizAppsOrdersSubscription_),
|
|
19136
18341
|
__param(0, Arg('input', () => CreatemjBizAppsOrdersSubscriptionInput)),
|