@mj-biz-apps/orders-server 5.19.0 → 5.20.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.
Files changed (47) hide show
  1. package/dist/BillComWebhookExtension.d.ts +46 -0
  2. package/dist/BillComWebhookExtension.d.ts.map +1 -0
  3. package/dist/BillComWebhookExtension.js +220 -0
  4. package/dist/BillComWebhookExtension.js.map +1 -0
  5. package/dist/CheckoutServerExtension.d.ts +9 -1
  6. package/dist/CheckoutServerExtension.d.ts.map +1 -1
  7. package/dist/CheckoutServerExtension.js +15 -0
  8. package/dist/CheckoutServerExtension.js.map +1 -1
  9. package/dist/__tests__/BillComWebhookExtension.test.d.ts +2 -0
  10. package/dist/__tests__/BillComWebhookExtension.test.d.ts.map +1 -0
  11. package/dist/__tests__/BillComWebhookExtension.test.js +166 -0
  12. package/dist/__tests__/BillComWebhookExtension.test.js.map +1 -0
  13. package/dist/__tests__/CheckoutServerExtension.test.js +19 -0
  14. package/dist/__tests__/CheckoutServerExtension.test.js.map +1 -1
  15. package/dist/__tests__/billcom-actions.test.d.ts +2 -0
  16. package/dist/__tests__/billcom-actions.test.d.ts.map +1 -0
  17. package/dist/__tests__/billcom-actions.test.js +89 -0
  18. package/dist/__tests__/billcom-actions.test.js.map +1 -0
  19. package/dist/__tests__/server-extensions-manifest.test.js +6 -0
  20. package/dist/__tests__/server-extensions-manifest.test.js.map +1 -1
  21. package/dist/custom/action-params.d.ts +31 -0
  22. package/dist/custom/action-params.d.ts.map +1 -0
  23. package/dist/custom/action-params.js +69 -0
  24. package/dist/custom/action-params.js.map +1 -0
  25. package/dist/custom/poll-external-payments.action.d.ts +25 -0
  26. package/dist/custom/poll-external-payments.action.d.ts.map +1 -0
  27. package/dist/custom/poll-external-payments.action.js +98 -0
  28. package/dist/custom/poll-external-payments.action.js.map +1 -0
  29. package/dist/custom/send-document.action.d.ts.map +1 -1
  30. package/dist/custom/send-document.action.js +3 -1
  31. package/dist/custom/send-document.action.js.map +1 -1
  32. package/dist/custom/send-external-invoices.action.d.ts +27 -0
  33. package/dist/custom/send-external-invoices.action.d.ts.map +1 -0
  34. package/dist/custom/send-external-invoices.action.js +92 -0
  35. package/dist/custom/send-external-invoices.action.js.map +1 -0
  36. package/dist/generated/graphql-schemas/__mj_BizAppsOrders.d.ts +361 -0
  37. package/dist/generated/graphql-schemas/__mj_BizAppsOrders.d.ts.map +1 -1
  38. package/dist/generated/graphql-schemas/__mj_BizAppsOrders.js +2428 -569
  39. package/dist/generated/graphql-schemas/__mj_BizAppsOrders.js.map +1 -1
  40. package/dist/index.d.ts +1 -0
  41. package/dist/index.d.ts.map +1 -1
  42. package/dist/index.js +19 -1
  43. package/dist/index.js.map +1 -1
  44. package/dist/server-extensions-manifest.d.ts.map +1 -1
  45. package/dist/server-extensions-manifest.js +6 -0
  46. package/dist/server-extensions-manifest.js.map +1 -1
  47. package/package.json +10 -4
@@ -4407,236 +4407,273 @@ mjBizAppsOrdersEventProductResolver = __decorate([
4407
4407
  ], mjBizAppsOrdersEventProductResolver);
4408
4408
  export { mjBizAppsOrdersEventProductResolver };
4409
4409
  //****************************************************************************
4410
- // ENTITY CLASS for MJ_BizApps_Orders: Order Adjustment Allocations
4410
+ // ENTITY CLASS for MJ_BizApps_Orders: External Customers
4411
4411
  //****************************************************************************
4412
- let mjBizAppsOrdersOrderAdjustmentAllocation_ = class mjBizAppsOrdersOrderAdjustmentAllocation_ {
4412
+ let mjBizAppsOrdersExternalCustomer_ = class mjBizAppsOrdersExternalCustomer_ {
4413
4413
  };
4414
4414
  __decorate([
4415
4415
  Field(),
4416
4416
  MaxLength(36),
4417
4417
  __metadata("design:type", String)
4418
- ], mjBizAppsOrdersOrderAdjustmentAllocation_.prototype, "ID", void 0);
4418
+ ], mjBizAppsOrdersExternalCustomer_.prototype, "ID", void 0);
4419
4419
  __decorate([
4420
- Field({ nullable: true }),
4420
+ Field({ description: `The provider row (rail + company) this customer record belongs to.` }),
4421
4421
  MaxLength(36),
4422
4422
  __metadata("design:type", String)
4423
- ], mjBizAppsOrdersOrderAdjustmentAllocation_.prototype, "OrderAdjustmentID", void 0);
4423
+ ], mjBizAppsOrdersExternalCustomer_.prototype, "PaymentProviderID", void 0);
4424
4424
  __decorate([
4425
- Field({ nullable: true }),
4425
+ Field({ nullable: true, description: `The organisation this rail customer represents, when the bill-to is an organisation.` }),
4426
4426
  MaxLength(36),
4427
4427
  __metadata("design:type", String)
4428
- ], mjBizAppsOrdersOrderAdjustmentAllocation_.prototype, "OrderLineID", void 0);
4428
+ ], mjBizAppsOrdersExternalCustomer_.prototype, "BillToOrganizationID", void 0);
4429
4429
  __decorate([
4430
- Field(() => Float, { nullable: true }),
4431
- __metadata("design:type", Number)
4432
- ], mjBizAppsOrdersOrderAdjustmentAllocation_.prototype, "Amount", void 0);
4430
+ Field({ nullable: true, description: `The person this rail customer represents, when the bill-to is a person.` }),
4431
+ MaxLength(36),
4432
+ __metadata("design:type", String)
4433
+ ], mjBizAppsOrdersExternalCustomer_.prototype, "BillToPersonID", void 0);
4434
+ __decorate([
4435
+ Field({ description: `The rail's customer id (Bill.com 0cu…). Our party id is also sent as the rail's account number so the link is recoverable from that side.` }),
4436
+ MaxLength(100),
4437
+ __metadata("design:type", String)
4438
+ ], mjBizAppsOrdersExternalCustomer_.prototype, "ExternalCustomerRef", void 0);
4439
+ __decorate([
4440
+ Field({ nullable: true, description: `When the rail customer was last created or refreshed from here.` }),
4441
+ __metadata("design:type", Date)
4442
+ ], mjBizAppsOrdersExternalCustomer_.prototype, "LastSyncedAt", void 0);
4433
4443
  __decorate([
4434
4444
  Field(),
4435
4445
  __metadata("design:type", Date)
4436
- ], mjBizAppsOrdersOrderAdjustmentAllocation_.prototype, "_mj__CreatedAt", void 0);
4446
+ ], mjBizAppsOrdersExternalCustomer_.prototype, "_mj__CreatedAt", void 0);
4437
4447
  __decorate([
4438
4448
  Field(),
4439
4449
  __metadata("design:type", Date)
4440
- ], mjBizAppsOrdersOrderAdjustmentAllocation_.prototype, "_mj__UpdatedAt", void 0);
4450
+ ], mjBizAppsOrdersExternalCustomer_.prototype, "_mj__UpdatedAt", void 0);
4441
4451
  __decorate([
4442
- Field(() => [String], { nullable: true, description: `Field-level security: when non-null, the fields on this entity the calling user may read. Any other field arriving as null was withheld by the server rather than genuinely empty. Null for callers with no field restrictions.` }),
4443
- __metadata("design:type", Array)
4444
- ], mjBizAppsOrdersOrderAdjustmentAllocation_.prototype, "ReadableFields___", void 0);
4445
- mjBizAppsOrdersOrderAdjustmentAllocation_ = __decorate([
4446
- ObjectType({ description: `Which lines an adjustment reduces, and by how much. Mandatory rather than optional: tax and GL are per line, and on a multi-company order this split decides WHOSE revenue is reduced. A line-level adjustment gets one row; an order-level one gets several, pro-rata by line value with the largest line absorbing the rounding remainder.` })
4447
- ], mjBizAppsOrdersOrderAdjustmentAllocation_);
4448
- export { mjBizAppsOrdersOrderAdjustmentAllocation_ };
4452
+ Field(),
4453
+ MaxLength(200),
4454
+ __metadata("design:type", String)
4455
+ ], mjBizAppsOrdersExternalCustomer_.prototype, "PaymentProvider", void 0);
4456
+ __decorate([
4457
+ Field({ nullable: true }),
4458
+ MaxLength(255),
4459
+ __metadata("design:type", String)
4460
+ ], mjBizAppsOrdersExternalCustomer_.prototype, "BillToOrganization", void 0);
4461
+ __decorate([
4462
+ Field({ nullable: true }),
4463
+ MaxLength(201),
4464
+ __metadata("design:type", String)
4465
+ ], mjBizAppsOrdersExternalCustomer_.prototype, "BillToPerson", void 0);
4466
+ mjBizAppsOrdersExternalCustomer_ = __decorate([
4467
+ ObjectType({ description: `A bill-to party\'s customer record on an external AR rail, per provider row (a Bill.com organisation is per company). Exactly one of BillToOrganizationID / BillToPersonID.` })
4468
+ ], mjBizAppsOrdersExternalCustomer_);
4469
+ export { mjBizAppsOrdersExternalCustomer_ };
4449
4470
  //****************************************************************************
4450
- // INPUT TYPE for MJ_BizApps_Orders: Order Adjustment Allocations
4471
+ // INPUT TYPE for MJ_BizApps_Orders: External Customers
4451
4472
  //****************************************************************************
4452
- let CreatemjBizAppsOrdersOrderAdjustmentAllocationInput = class CreatemjBizAppsOrdersOrderAdjustmentAllocationInput {
4473
+ let CreatemjBizAppsOrdersExternalCustomerInput = class CreatemjBizAppsOrdersExternalCustomerInput {
4453
4474
  };
4454
4475
  __decorate([
4455
4476
  Field({ nullable: true }),
4456
4477
  __metadata("design:type", String)
4457
- ], CreatemjBizAppsOrdersOrderAdjustmentAllocationInput.prototype, "ID", void 0);
4478
+ ], CreatemjBizAppsOrdersExternalCustomerInput.prototype, "ID", void 0);
4458
4479
  __decorate([
4459
4480
  Field({ nullable: true }),
4460
4481
  __metadata("design:type", String)
4461
- ], CreatemjBizAppsOrdersOrderAdjustmentAllocationInput.prototype, "OrderAdjustmentID", void 0);
4482
+ ], CreatemjBizAppsOrdersExternalCustomerInput.prototype, "PaymentProviderID", void 0);
4462
4483
  __decorate([
4463
4484
  Field({ nullable: true }),
4464
4485
  __metadata("design:type", String)
4465
- ], CreatemjBizAppsOrdersOrderAdjustmentAllocationInput.prototype, "OrderLineID", void 0);
4486
+ ], CreatemjBizAppsOrdersExternalCustomerInput.prototype, "BillToOrganizationID", void 0);
4466
4487
  __decorate([
4467
- Field(() => Float, { nullable: true }),
4468
- __metadata("design:type", Number)
4469
- ], CreatemjBizAppsOrdersOrderAdjustmentAllocationInput.prototype, "Amount", void 0);
4488
+ Field({ nullable: true }),
4489
+ __metadata("design:type", String)
4490
+ ], CreatemjBizAppsOrdersExternalCustomerInput.prototype, "BillToPersonID", void 0);
4491
+ __decorate([
4492
+ Field({ nullable: true }),
4493
+ __metadata("design:type", String)
4494
+ ], CreatemjBizAppsOrdersExternalCustomerInput.prototype, "ExternalCustomerRef", void 0);
4495
+ __decorate([
4496
+ Field({ nullable: true }),
4497
+ __metadata("design:type", Date)
4498
+ ], CreatemjBizAppsOrdersExternalCustomerInput.prototype, "LastSyncedAt", void 0);
4470
4499
  __decorate([
4471
4500
  Field(() => RestoreContextInput, { nullable: true }),
4472
4501
  __metadata("design:type", RestoreContextInput)
4473
- ], CreatemjBizAppsOrdersOrderAdjustmentAllocationInput.prototype, "RestoreContext___", void 0);
4474
- CreatemjBizAppsOrdersOrderAdjustmentAllocationInput = __decorate([
4502
+ ], CreatemjBizAppsOrdersExternalCustomerInput.prototype, "RestoreContext___", void 0);
4503
+ CreatemjBizAppsOrdersExternalCustomerInput = __decorate([
4475
4504
  InputType()
4476
- ], CreatemjBizAppsOrdersOrderAdjustmentAllocationInput);
4477
- export { CreatemjBizAppsOrdersOrderAdjustmentAllocationInput };
4505
+ ], CreatemjBizAppsOrdersExternalCustomerInput);
4506
+ export { CreatemjBizAppsOrdersExternalCustomerInput };
4478
4507
  //****************************************************************************
4479
- // INPUT TYPE for MJ_BizApps_Orders: Order Adjustment Allocations
4508
+ // INPUT TYPE for MJ_BizApps_Orders: External Customers
4480
4509
  //****************************************************************************
4481
- let UpdatemjBizAppsOrdersOrderAdjustmentAllocationInput = class UpdatemjBizAppsOrdersOrderAdjustmentAllocationInput {
4510
+ let UpdatemjBizAppsOrdersExternalCustomerInput = class UpdatemjBizAppsOrdersExternalCustomerInput {
4482
4511
  };
4483
4512
  __decorate([
4484
4513
  Field(),
4485
4514
  __metadata("design:type", String)
4486
- ], UpdatemjBizAppsOrdersOrderAdjustmentAllocationInput.prototype, "ID", void 0);
4515
+ ], UpdatemjBizAppsOrdersExternalCustomerInput.prototype, "ID", void 0);
4487
4516
  __decorate([
4488
4517
  Field({ nullable: true }),
4489
4518
  __metadata("design:type", String)
4490
- ], UpdatemjBizAppsOrdersOrderAdjustmentAllocationInput.prototype, "OrderAdjustmentID", void 0);
4519
+ ], UpdatemjBizAppsOrdersExternalCustomerInput.prototype, "PaymentProviderID", void 0);
4491
4520
  __decorate([
4492
4521
  Field({ nullable: true }),
4493
4522
  __metadata("design:type", String)
4494
- ], UpdatemjBizAppsOrdersOrderAdjustmentAllocationInput.prototype, "OrderLineID", void 0);
4523
+ ], UpdatemjBizAppsOrdersExternalCustomerInput.prototype, "BillToOrganizationID", void 0);
4495
4524
  __decorate([
4496
- Field(() => Float, { nullable: true }),
4497
- __metadata("design:type", Number)
4498
- ], UpdatemjBizAppsOrdersOrderAdjustmentAllocationInput.prototype, "Amount", void 0);
4525
+ Field({ nullable: true }),
4526
+ __metadata("design:type", String)
4527
+ ], UpdatemjBizAppsOrdersExternalCustomerInput.prototype, "BillToPersonID", void 0);
4528
+ __decorate([
4529
+ Field({ nullable: true }),
4530
+ __metadata("design:type", String)
4531
+ ], UpdatemjBizAppsOrdersExternalCustomerInput.prototype, "ExternalCustomerRef", void 0);
4532
+ __decorate([
4533
+ Field({ nullable: true }),
4534
+ __metadata("design:type", Date)
4535
+ ], UpdatemjBizAppsOrdersExternalCustomerInput.prototype, "LastSyncedAt", void 0);
4499
4536
  __decorate([
4500
4537
  Field(() => [KeyValuePairInput], { nullable: true }),
4501
4538
  __metadata("design:type", Array)
4502
- ], UpdatemjBizAppsOrdersOrderAdjustmentAllocationInput.prototype, "OldValues___", void 0);
4539
+ ], UpdatemjBizAppsOrdersExternalCustomerInput.prototype, "OldValues___", void 0);
4503
4540
  __decorate([
4504
4541
  Field(() => RestoreContextInput, { nullable: true }),
4505
4542
  __metadata("design:type", RestoreContextInput)
4506
- ], UpdatemjBizAppsOrdersOrderAdjustmentAllocationInput.prototype, "RestoreContext___", void 0);
4507
- UpdatemjBizAppsOrdersOrderAdjustmentAllocationInput = __decorate([
4543
+ ], UpdatemjBizAppsOrdersExternalCustomerInput.prototype, "RestoreContext___", void 0);
4544
+ UpdatemjBizAppsOrdersExternalCustomerInput = __decorate([
4508
4545
  InputType()
4509
- ], UpdatemjBizAppsOrdersOrderAdjustmentAllocationInput);
4510
- export { UpdatemjBizAppsOrdersOrderAdjustmentAllocationInput };
4546
+ ], UpdatemjBizAppsOrdersExternalCustomerInput);
4547
+ export { UpdatemjBizAppsOrdersExternalCustomerInput };
4511
4548
  //****************************************************************************
4512
- // RESOLVER for MJ_BizApps_Orders: Order Adjustment Allocations
4549
+ // RESOLVER for MJ_BizApps_Orders: External Customers
4513
4550
  //****************************************************************************
4514
- let RunmjBizAppsOrdersOrderAdjustmentAllocationViewResult = class RunmjBizAppsOrdersOrderAdjustmentAllocationViewResult {
4551
+ let RunmjBizAppsOrdersExternalCustomerViewResult = class RunmjBizAppsOrdersExternalCustomerViewResult {
4515
4552
  };
4516
4553
  __decorate([
4517
- Field(() => [mjBizAppsOrdersOrderAdjustmentAllocation_]),
4554
+ Field(() => [mjBizAppsOrdersExternalCustomer_]),
4518
4555
  __metadata("design:type", Array)
4519
- ], RunmjBizAppsOrdersOrderAdjustmentAllocationViewResult.prototype, "Results", void 0);
4556
+ ], RunmjBizAppsOrdersExternalCustomerViewResult.prototype, "Results", void 0);
4520
4557
  __decorate([
4521
4558
  Field(() => String, { nullable: true }),
4522
4559
  __metadata("design:type", String)
4523
- ], RunmjBizAppsOrdersOrderAdjustmentAllocationViewResult.prototype, "UserViewRunID", void 0);
4560
+ ], RunmjBizAppsOrdersExternalCustomerViewResult.prototype, "UserViewRunID", void 0);
4524
4561
  __decorate([
4525
4562
  Field(() => Int, { nullable: true }),
4526
4563
  __metadata("design:type", Number)
4527
- ], RunmjBizAppsOrdersOrderAdjustmentAllocationViewResult.prototype, "RowCount", void 0);
4564
+ ], RunmjBizAppsOrdersExternalCustomerViewResult.prototype, "RowCount", void 0);
4528
4565
  __decorate([
4529
4566
  Field(() => Int, { nullable: true }),
4530
4567
  __metadata("design:type", Number)
4531
- ], RunmjBizAppsOrdersOrderAdjustmentAllocationViewResult.prototype, "TotalRowCount", void 0);
4568
+ ], RunmjBizAppsOrdersExternalCustomerViewResult.prototype, "TotalRowCount", void 0);
4532
4569
  __decorate([
4533
4570
  Field(() => Int, { nullable: true }),
4534
4571
  __metadata("design:type", Number)
4535
- ], RunmjBizAppsOrdersOrderAdjustmentAllocationViewResult.prototype, "ExecutionTime", void 0);
4572
+ ], RunmjBizAppsOrdersExternalCustomerViewResult.prototype, "ExecutionTime", void 0);
4536
4573
  __decorate([
4537
4574
  Field({ nullable: true }),
4538
4575
  __metadata("design:type", String)
4539
- ], RunmjBizAppsOrdersOrderAdjustmentAllocationViewResult.prototype, "ErrorMessage", void 0);
4576
+ ], RunmjBizAppsOrdersExternalCustomerViewResult.prototype, "ErrorMessage", void 0);
4540
4577
  __decorate([
4541
4578
  Field(() => Boolean, { nullable: false }),
4542
4579
  __metadata("design:type", Boolean)
4543
- ], RunmjBizAppsOrdersOrderAdjustmentAllocationViewResult.prototype, "Success", void 0);
4544
- RunmjBizAppsOrdersOrderAdjustmentAllocationViewResult = __decorate([
4580
+ ], RunmjBizAppsOrdersExternalCustomerViewResult.prototype, "Success", void 0);
4581
+ RunmjBizAppsOrdersExternalCustomerViewResult = __decorate([
4545
4582
  ObjectType()
4546
- ], RunmjBizAppsOrdersOrderAdjustmentAllocationViewResult);
4547
- export { RunmjBizAppsOrdersOrderAdjustmentAllocationViewResult };
4548
- let mjBizAppsOrdersOrderAdjustmentAllocationResolver = class mjBizAppsOrdersOrderAdjustmentAllocationResolver extends ResolverBase {
4549
- async RunmjBizAppsOrdersOrderAdjustmentAllocationViewByID(input, { providers, userPayload }, pubSub) {
4583
+ ], RunmjBizAppsOrdersExternalCustomerViewResult);
4584
+ export { RunmjBizAppsOrdersExternalCustomerViewResult };
4585
+ let mjBizAppsOrdersExternalCustomerResolver = class mjBizAppsOrdersExternalCustomerResolver extends ResolverBase {
4586
+ async RunmjBizAppsOrdersExternalCustomerViewByID(input, { providers, userPayload }, pubSub) {
4550
4587
  const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
4551
4588
  return super.RunViewByIDGeneric(input, provider, userPayload, pubSub);
4552
4589
  }
4553
- async RunmjBizAppsOrdersOrderAdjustmentAllocationViewByName(input, { providers, userPayload }, pubSub) {
4590
+ async RunmjBizAppsOrdersExternalCustomerViewByName(input, { providers, userPayload }, pubSub) {
4554
4591
  const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
4555
4592
  return super.RunViewByNameGeneric(input, provider, userPayload, pubSub);
4556
4593
  }
4557
- async RunmjBizAppsOrdersOrderAdjustmentAllocationDynamicView(input, { providers, userPayload }, pubSub) {
4594
+ async RunmjBizAppsOrdersExternalCustomerDynamicView(input, { providers, userPayload }, pubSub) {
4558
4595
  const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
4559
- input.EntityName = 'MJ_BizApps_Orders: Order Adjustment Allocations';
4596
+ input.EntityName = 'MJ_BizApps_Orders: External Customers';
4560
4597
  return super.RunDynamicViewGeneric(input, provider, userPayload, pubSub);
4561
4598
  }
4562
- async mjBizAppsOrdersOrderAdjustmentAllocation(ID, { userPayload, providers }, pubSub) {
4563
- this.CheckUserReadPermissions('MJ_BizApps_Orders: Order Adjustment Allocations', userPayload);
4599
+ async mjBizAppsOrdersExternalCustomer(ID, { userPayload, providers }, pubSub) {
4600
+ this.CheckUserReadPermissions('MJ_BizApps_Orders: External Customers', userPayload);
4564
4601
  const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
4565
- const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView('__mj_BizAppsOrders', 'vwOrderAdjustmentAllocations')} WHERE ${provider.QuoteIdentifier('ID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ_BizApps_Orders: Order Adjustment Allocations', userPayload, EntityPermissionType.Read, 'AND');
4602
+ const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView('__mj_BizAppsOrders', 'vwExternalCustomers')} WHERE ${provider.QuoteIdentifier('ID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ_BizApps_Orders: External Customers', userPayload, EntityPermissionType.Read, 'AND');
4566
4603
  const rows = await provider.ExecuteSQL(sSQL, [ID], undefined, this.GetUserFromPayload(userPayload));
4567
- const result = await this.MapFieldNamesToCodeNames('MJ_BizApps_Orders: Order Adjustment Allocations', rows && rows.length > 0 ? rows[0] : null, this.GetUserFromPayload(userPayload));
4604
+ const result = await this.MapFieldNamesToCodeNames('MJ_BizApps_Orders: External Customers', rows && rows.length > 0 ? rows[0] : null, this.GetUserFromPayload(userPayload));
4568
4605
  return result;
4569
4606
  }
4570
- async CreatemjBizAppsOrdersOrderAdjustmentAllocation(input, { providers, userPayload }, pubSub) {
4607
+ async CreatemjBizAppsOrdersExternalCustomer(input, { providers, userPayload }, pubSub) {
4571
4608
  const provider = GetReadWriteProvider(providers);
4572
- return this.CreateRecord('MJ_BizApps_Orders: Order Adjustment Allocations', input, provider, userPayload, pubSub);
4609
+ return this.CreateRecord('MJ_BizApps_Orders: External Customers', input, provider, userPayload, pubSub);
4573
4610
  }
4574
- async UpdatemjBizAppsOrdersOrderAdjustmentAllocation(input, { providers, userPayload }, pubSub) {
4611
+ async UpdatemjBizAppsOrdersExternalCustomer(input, { providers, userPayload }, pubSub) {
4575
4612
  const provider = GetReadWriteProvider(providers);
4576
- return this.UpdateRecord('MJ_BizApps_Orders: Order Adjustment Allocations', input, provider, userPayload, pubSub);
4613
+ return this.UpdateRecord('MJ_BizApps_Orders: External Customers', input, provider, userPayload, pubSub);
4577
4614
  }
4578
- async DeletemjBizAppsOrdersOrderAdjustmentAllocation(ID, options, { providers, userPayload }, pubSub) {
4615
+ async DeletemjBizAppsOrdersExternalCustomer(ID, options, { providers, userPayload }, pubSub) {
4579
4616
  const provider = GetReadWriteProvider(providers);
4580
4617
  const key = new CompositeKey([{ FieldName: 'ID', Value: ID }]);
4581
- return this.DeleteRecord('MJ_BizApps_Orders: Order Adjustment Allocations', key, options, provider, userPayload, pubSub);
4618
+ return this.DeleteRecord('MJ_BizApps_Orders: External Customers', key, options, provider, userPayload, pubSub);
4582
4619
  }
4583
4620
  };
4584
4621
  __decorate([
4585
- Query(() => RunmjBizAppsOrdersOrderAdjustmentAllocationViewResult),
4622
+ Query(() => RunmjBizAppsOrdersExternalCustomerViewResult),
4586
4623
  __param(0, Arg('input', () => RunViewByIDInput)),
4587
4624
  __param(1, Ctx()),
4588
4625
  __param(2, PubSub()),
4589
4626
  __metadata("design:type", Function),
4590
4627
  __metadata("design:paramtypes", [RunViewByIDInput, Object, PubSubEngine]),
4591
4628
  __metadata("design:returntype", Promise)
4592
- ], mjBizAppsOrdersOrderAdjustmentAllocationResolver.prototype, "RunmjBizAppsOrdersOrderAdjustmentAllocationViewByID", null);
4629
+ ], mjBizAppsOrdersExternalCustomerResolver.prototype, "RunmjBizAppsOrdersExternalCustomerViewByID", null);
4593
4630
  __decorate([
4594
- Query(() => RunmjBizAppsOrdersOrderAdjustmentAllocationViewResult),
4631
+ Query(() => RunmjBizAppsOrdersExternalCustomerViewResult),
4595
4632
  __param(0, Arg('input', () => RunViewByNameInput)),
4596
4633
  __param(1, Ctx()),
4597
4634
  __param(2, PubSub()),
4598
4635
  __metadata("design:type", Function),
4599
4636
  __metadata("design:paramtypes", [RunViewByNameInput, Object, PubSubEngine]),
4600
4637
  __metadata("design:returntype", Promise)
4601
- ], mjBizAppsOrdersOrderAdjustmentAllocationResolver.prototype, "RunmjBizAppsOrdersOrderAdjustmentAllocationViewByName", null);
4638
+ ], mjBizAppsOrdersExternalCustomerResolver.prototype, "RunmjBizAppsOrdersExternalCustomerViewByName", null);
4602
4639
  __decorate([
4603
- Query(() => RunmjBizAppsOrdersOrderAdjustmentAllocationViewResult),
4640
+ Query(() => RunmjBizAppsOrdersExternalCustomerViewResult),
4604
4641
  __param(0, Arg('input', () => RunDynamicViewInput)),
4605
4642
  __param(1, Ctx()),
4606
4643
  __param(2, PubSub()),
4607
4644
  __metadata("design:type", Function),
4608
4645
  __metadata("design:paramtypes", [RunDynamicViewInput, Object, PubSubEngine]),
4609
4646
  __metadata("design:returntype", Promise)
4610
- ], mjBizAppsOrdersOrderAdjustmentAllocationResolver.prototype, "RunmjBizAppsOrdersOrderAdjustmentAllocationDynamicView", null);
4647
+ ], mjBizAppsOrdersExternalCustomerResolver.prototype, "RunmjBizAppsOrdersExternalCustomerDynamicView", null);
4611
4648
  __decorate([
4612
- Query(() => mjBizAppsOrdersOrderAdjustmentAllocation_, { nullable: true }),
4649
+ Query(() => mjBizAppsOrdersExternalCustomer_, { nullable: true }),
4613
4650
  __param(0, Arg('ID', () => String)),
4614
4651
  __param(1, Ctx()),
4615
4652
  __param(2, PubSub()),
4616
4653
  __metadata("design:type", Function),
4617
4654
  __metadata("design:paramtypes", [String, Object, PubSubEngine]),
4618
4655
  __metadata("design:returntype", Promise)
4619
- ], mjBizAppsOrdersOrderAdjustmentAllocationResolver.prototype, "mjBizAppsOrdersOrderAdjustmentAllocation", null);
4656
+ ], mjBizAppsOrdersExternalCustomerResolver.prototype, "mjBizAppsOrdersExternalCustomer", null);
4620
4657
  __decorate([
4621
- Mutation(() => mjBizAppsOrdersOrderAdjustmentAllocation_),
4622
- __param(0, Arg('input', () => CreatemjBizAppsOrdersOrderAdjustmentAllocationInput)),
4658
+ Mutation(() => mjBizAppsOrdersExternalCustomer_),
4659
+ __param(0, Arg('input', () => CreatemjBizAppsOrdersExternalCustomerInput)),
4623
4660
  __param(1, Ctx()),
4624
4661
  __param(2, PubSub()),
4625
4662
  __metadata("design:type", Function),
4626
- __metadata("design:paramtypes", [CreatemjBizAppsOrdersOrderAdjustmentAllocationInput, Object, PubSubEngine]),
4663
+ __metadata("design:paramtypes", [CreatemjBizAppsOrdersExternalCustomerInput, Object, PubSubEngine]),
4627
4664
  __metadata("design:returntype", Promise)
4628
- ], mjBizAppsOrdersOrderAdjustmentAllocationResolver.prototype, "CreatemjBizAppsOrdersOrderAdjustmentAllocation", null);
4665
+ ], mjBizAppsOrdersExternalCustomerResolver.prototype, "CreatemjBizAppsOrdersExternalCustomer", null);
4629
4666
  __decorate([
4630
- Mutation(() => mjBizAppsOrdersOrderAdjustmentAllocation_),
4631
- __param(0, Arg('input', () => UpdatemjBizAppsOrdersOrderAdjustmentAllocationInput)),
4667
+ Mutation(() => mjBizAppsOrdersExternalCustomer_),
4668
+ __param(0, Arg('input', () => UpdatemjBizAppsOrdersExternalCustomerInput)),
4632
4669
  __param(1, Ctx()),
4633
4670
  __param(2, PubSub()),
4634
4671
  __metadata("design:type", Function),
4635
- __metadata("design:paramtypes", [UpdatemjBizAppsOrdersOrderAdjustmentAllocationInput, Object, PubSubEngine]),
4672
+ __metadata("design:paramtypes", [UpdatemjBizAppsOrdersExternalCustomerInput, Object, PubSubEngine]),
4636
4673
  __metadata("design:returntype", Promise)
4637
- ], mjBizAppsOrdersOrderAdjustmentAllocationResolver.prototype, "UpdatemjBizAppsOrdersOrderAdjustmentAllocation", null);
4674
+ ], mjBizAppsOrdersExternalCustomerResolver.prototype, "UpdatemjBizAppsOrdersExternalCustomer", null);
4638
4675
  __decorate([
4639
- Mutation(() => mjBizAppsOrdersOrderAdjustmentAllocation_),
4676
+ Mutation(() => mjBizAppsOrdersExternalCustomer_),
4640
4677
  __param(0, Arg('ID', () => String)),
4641
4678
  __param(1, Arg('options___', () => DeleteOptionsInput)),
4642
4679
  __param(2, Ctx()),
@@ -4644,370 +4681,464 @@ __decorate([
4644
4681
  __metadata("design:type", Function),
4645
4682
  __metadata("design:paramtypes", [String, DeleteOptionsInput, Object, PubSubEngine]),
4646
4683
  __metadata("design:returntype", Promise)
4647
- ], mjBizAppsOrdersOrderAdjustmentAllocationResolver.prototype, "DeletemjBizAppsOrdersOrderAdjustmentAllocation", null);
4648
- mjBizAppsOrdersOrderAdjustmentAllocationResolver = __decorate([
4649
- Resolver(mjBizAppsOrdersOrderAdjustmentAllocation_)
4650
- ], mjBizAppsOrdersOrderAdjustmentAllocationResolver);
4651
- export { mjBizAppsOrdersOrderAdjustmentAllocationResolver };
4684
+ ], mjBizAppsOrdersExternalCustomerResolver.prototype, "DeletemjBizAppsOrdersExternalCustomer", null);
4685
+ mjBizAppsOrdersExternalCustomerResolver = __decorate([
4686
+ Resolver(mjBizAppsOrdersExternalCustomer_)
4687
+ ], mjBizAppsOrdersExternalCustomerResolver);
4688
+ export { mjBizAppsOrdersExternalCustomerResolver };
4652
4689
  //****************************************************************************
4653
- // ENTITY CLASS for MJ_BizApps_Orders: Order Adjustments
4690
+ // ENTITY CLASS for MJ_BizApps_Orders: External Invoices
4654
4691
  //****************************************************************************
4655
- let mjBizAppsOrdersOrderAdjustment_ = class mjBizAppsOrdersOrderAdjustment_ {
4692
+ let mjBizAppsOrdersExternalInvoice_ = class mjBizAppsOrdersExternalInvoice_ {
4656
4693
  };
4657
4694
  __decorate([
4658
4695
  Field(),
4659
4696
  MaxLength(36),
4660
4697
  __metadata("design:type", String)
4661
- ], mjBizAppsOrdersOrderAdjustment_.prototype, "ID", void 0);
4698
+ ], mjBizAppsOrdersExternalInvoice_.prototype, "ID", void 0);
4662
4699
  __decorate([
4663
- Field({ nullable: true }),
4700
+ Field({ description: `The provider row that names the rail and the company whose Bill.com organisation this invoice lives in.` }),
4664
4701
  MaxLength(36),
4665
4702
  __metadata("design:type", String)
4666
- ], mjBizAppsOrdersOrderAdjustment_.prototype, "OrderHeaderID", void 0);
4703
+ ], mjBizAppsOrdersExternalInvoice_.prototype, "PaymentProviderID", void 0);
4667
4704
  __decorate([
4668
- Field({ nullable: true, description: `The line reduced. NULL means order-level, in which case OrderAdjustmentAllocation distributes it across lines.` }),
4705
+ Field({ description: `The order this unit bills.` }),
4669
4706
  MaxLength(36),
4670
4707
  __metadata("design:type", String)
4671
- ], mjBizAppsOrdersOrderAdjustment_.prototype, "OrderLineID", void 0);
4708
+ ], mjBizAppsOrdersExternalInvoice_.prototype, "OrderHeaderID", void 0);
4672
4709
  __decorate([
4673
- Field({ nullable: true, description: `The promotion redeemed. NULL means a manual discount, which then requires a Reason and a SalesAuthority.` }),
4710
+ Field({ description: `The selling company of the DOCUMENT (one per company on a split order), not necessarily the order header's company.` }),
4674
4711
  MaxLength(36),
4675
4712
  __metadata("design:type", String)
4676
- ], mjBizAppsOrdersOrderAdjustment_.prototype, "PromotionID", void 0);
4713
+ ], mjBizAppsOrdersExternalInvoice_.prototype, "CompanyID", void 0);
4677
4714
  __decorate([
4678
- Field({ nullable: true }),
4715
+ Field({ nullable: true, description: `The instalment this unit is, when the order is billed on a schedule. NULL for an order billed as a whole.` }),
4679
4716
  MaxLength(36),
4680
4717
  __metadata("design:type", String)
4681
- ], mjBizAppsOrdersOrderAdjustment_.prototype, "PromotionCodeID", void 0);
4718
+ ], mjBizAppsOrdersExternalInvoice_.prototype, "OrderHeaderPaymentScheduleID", void 0);
4682
4719
  __decorate([
4683
- Field(() => Float, { nullable: true, description: `Always POSITIVE - it is a reduction, and the direction is carried by what the pipeline does with it rather than by the stored sign.` }),
4720
+ Field({ description: `Our frozen document number, sent as the rail's invoice number: ORD-1234, ORD-1234-2, ORD-1234-B2.` }),
4721
+ MaxLength(40),
4722
+ __metadata("design:type", String)
4723
+ ], mjBizAppsOrdersExternalInvoice_.prototype, "DocumentNumber", void 0);
4724
+ __decorate([
4725
+ Field(() => Float, { description: `What the unit bills, which the rail's lines must total to the cent.` }),
4684
4726
  __metadata("design:type", Number)
4685
- ], mjBizAppsOrdersOrderAdjustment_.prototype, "Amount", void 0);
4727
+ ], mjBizAppsOrdersExternalInvoice_.prototype, "Amount", void 0);
4686
4728
  __decorate([
4687
- Field(() => Int, { nullable: true }),
4729
+ Field({ nullable: true, description: `Due date sent to the rail; NULL means on receipt.` }),
4730
+ __metadata("design:type", Date)
4731
+ ], mjBizAppsOrdersExternalInvoice_.prototype, "DueDate", void 0);
4732
+ __decorate([
4733
+ Field({ description: `Sending (claim written, rail not yet confirmed), Sent (rail holds it), Canceled (archived on the rail), Failed (rail refused or the total did not tie).` }),
4734
+ MaxLength(20),
4735
+ __metadata("design:type", String)
4736
+ ], mjBizAppsOrdersExternalInvoice_.prototype, "Status", void 0);
4737
+ __decorate([
4738
+ Field({ nullable: true, description: `The rail's customer id the invoice was issued to (Bill.com 0cu…).` }),
4739
+ MaxLength(100),
4740
+ __metadata("design:type", String)
4741
+ ], mjBizAppsOrdersExternalInvoice_.prototype, "ExternalCustomerRef", void 0);
4742
+ __decorate([
4743
+ Field({ nullable: true, description: `The rail's invoice id (Bill.com 00e…). NULL while Sending or Failed.` }),
4744
+ MaxLength(100),
4745
+ __metadata("design:type", String)
4746
+ ], mjBizAppsOrdersExternalInvoice_.prototype, "ExternalInvoiceRef", void 0);
4747
+ __decorate([
4748
+ Field(() => Float, { nullable: true, description: `The rail's total on read-back after create; must equal Amount or the send is failed and the rail invoice archived.` }),
4688
4749
  __metadata("design:type", Number)
4689
- ], mjBizAppsOrdersOrderAdjustment_.prototype, "Sequence", void 0);
4750
+ ], mjBizAppsOrdersExternalInvoice_.prototype, "ExternalTotal", void 0);
4690
4751
  __decorate([
4691
- Field({ nullable: true, description: `Why this discount was given. Required when no promotion is named.` }),
4752
+ Field(() => Float, { nullable: true, description: `The rail's last-seen amount still due, net of applied and scheduled payments.` }),
4753
+ __metadata("design:type", Number)
4754
+ ], mjBizAppsOrdersExternalInvoice_.prototype, "ExternalDueAmount", void 0);
4755
+ __decorate([
4756
+ Field({ nullable: true, description: `The rail's last-seen invoice status, verbatim.` }),
4757
+ MaxLength(40),
4692
4758
  __metadata("design:type", String)
4693
- ], mjBizAppsOrdersOrderAdjustment_.prototype, "Reason", void 0);
4759
+ ], mjBizAppsOrdersExternalInvoice_.prototype, "ExternalStatus", void 0);
4694
4760
  __decorate([
4695
- Field({ nullable: true }),
4696
- MaxLength(36),
4761
+ Field({ nullable: true, description: `When the rail confirmed the invoice. The audit fact: unsent is SentAt IS NULL.` }),
4762
+ __metadata("design:type", Date)
4763
+ ], mjBizAppsOrdersExternalInvoice_.prototype, "SentAt", void 0);
4764
+ __decorate([
4765
+ Field({ nullable: true, description: `When the rail invoice was archived from here.` }),
4766
+ __metadata("design:type", Date)
4767
+ ], mjBizAppsOrdersExternalInvoice_.prototype, "CanceledAt", void 0);
4768
+ __decorate([
4769
+ Field({ nullable: true, description: `Why it was cancelled, as typed by the person who did it.` }),
4770
+ MaxLength(500),
4697
4771
  __metadata("design:type", String)
4698
- ], mjBizAppsOrdersOrderAdjustment_.prototype, "AppliedByUserID", void 0);
4772
+ ], mjBizAppsOrdersExternalInvoice_.prototype, "CancelReason", void 0);
4699
4773
  __decorate([
4700
- Field({ nullable: true }),
4774
+ Field({ nullable: true, description: `When ExternalTotal/ExternalDueAmount/ExternalStatus were last refreshed from the rail.` }),
4701
4775
  __metadata("design:type", Date)
4702
- ], mjBizAppsOrdersOrderAdjustment_.prototype, "AppliedAt", void 0);
4776
+ ], mjBizAppsOrdersExternalInvoice_.prototype, "LastSyncedAt", void 0);
4703
4777
  __decorate([
4704
- Field({ nullable: true, description: `Which SalesAuthority permitted a manual discount. Stamped so that lowering a rep's limit later does not retroactively make past discounts look unauthorized.` }),
4778
+ Field({ nullable: true, description: `The rail's or our last refusal, for a Failed or stuck Sending row.` }),
4779
+ __metadata("design:type", String)
4780
+ ], mjBizAppsOrdersExternalInvoice_.prototype, "LastError", void 0);
4781
+ __decorate([
4782
+ Field({ nullable: true, description: `Who asked for the send (a person, or the scheduler's context user).` }),
4705
4783
  MaxLength(36),
4706
4784
  __metadata("design:type", String)
4707
- ], mjBizAppsOrdersOrderAdjustment_.prototype, "AuthorizedBySalesAuthorityID", void 0);
4785
+ ], mjBizAppsOrdersExternalInvoice_.prototype, "IssuedByUserID", void 0);
4708
4786
  __decorate([
4709
- Field({ nullable: true, description: `Who approved a discount exceeding the applying user's authority. Over-limit discounts ESCALATE rather than being refused - a hard refusal is what pushes people to record the discount as something else.` }),
4787
+ Field({ description: `Persisted computed: OrderHeaderPaymentScheduleID or the zero GUID, so the live-unit unique index can include a nullable key.` }),
4710
4788
  MaxLength(36),
4711
4789
  __metadata("design:type", String)
4712
- ], mjBizAppsOrdersOrderAdjustment_.prototype, "ApprovedByUserID", void 0);
4790
+ ], mjBizAppsOrdersExternalInvoice_.prototype, "UnitScheduleKey", void 0);
4713
4791
  __decorate([
4714
- Field({ nullable: true }),
4792
+ Field(),
4715
4793
  __metadata("design:type", Date)
4716
- ], mjBizAppsOrdersOrderAdjustment_.prototype, "ApprovedAt", void 0);
4794
+ ], mjBizAppsOrdersExternalInvoice_.prototype, "_mj__CreatedAt", void 0);
4717
4795
  __decorate([
4718
4796
  Field(),
4719
4797
  __metadata("design:type", Date)
4720
- ], mjBizAppsOrdersOrderAdjustment_.prototype, "_mj__CreatedAt", void 0);
4798
+ ], mjBizAppsOrdersExternalInvoice_.prototype, "_mj__UpdatedAt", void 0);
4721
4799
  __decorate([
4722
4800
  Field(),
4723
- __metadata("design:type", Date)
4724
- ], mjBizAppsOrdersOrderAdjustment_.prototype, "_mj__UpdatedAt", void 0);
4801
+ MaxLength(200),
4802
+ __metadata("design:type", String)
4803
+ ], mjBizAppsOrdersExternalInvoice_.prototype, "PaymentProvider", void 0);
4725
4804
  __decorate([
4726
- Field({ nullable: true }),
4805
+ Field(),
4727
4806
  MaxLength(40),
4728
4807
  __metadata("design:type", String)
4729
- ], mjBizAppsOrdersOrderAdjustment_.prototype, "OrderHeader", void 0);
4808
+ ], mjBizAppsOrdersExternalInvoice_.prototype, "OrderHeader", void 0);
4730
4809
  __decorate([
4731
- Field({ nullable: true }),
4732
- MaxLength(200),
4810
+ Field(),
4811
+ MaxLength(50),
4733
4812
  __metadata("design:type", String)
4734
- ], mjBizAppsOrdersOrderAdjustment_.prototype, "Promotion", void 0);
4813
+ ], mjBizAppsOrdersExternalInvoice_.prototype, "Company", void 0);
4735
4814
  __decorate([
4736
4815
  Field({ nullable: true }),
4737
- MaxLength(60),
4816
+ MaxLength(100),
4738
4817
  __metadata("design:type", String)
4739
- ], mjBizAppsOrdersOrderAdjustment_.prototype, "PromotionCode", void 0);
4740
- __decorate([
4741
- Field(() => [String], { nullable: true, description: `Field-level security: when non-null, the fields on this entity the calling user may read. Any other field arriving as null was withheld by the server rather than genuinely empty. Null for callers with no field restrictions.` }),
4742
- __metadata("design:type", Array)
4743
- ], mjBizAppsOrdersOrderAdjustment_.prototype, "ReadableFields___", void 0);
4744
- mjBizAppsOrdersOrderAdjustment_ = __decorate([
4745
- 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.` })
4746
- ], mjBizAppsOrdersOrderAdjustment_);
4747
- export { mjBizAppsOrdersOrderAdjustment_ };
4818
+ ], mjBizAppsOrdersExternalInvoice_.prototype, "IssuedByUser", void 0);
4819
+ mjBizAppsOrdersExternalInvoice_ = __decorate([
4820
+ ObjectType({ description: `One attempt to place a billing unit — (order, selling company, instalment or none) — on an external AR rail such as Bill.com. Written as Sending before the rail is called, then Sent with the rail\'s invoice id, or Failed with the reason, or Canceled. The authoritative invoice-to-order mapping the payment poller matches on; never matched by ExternalDocumentNumber.` })
4821
+ ], mjBizAppsOrdersExternalInvoice_);
4822
+ export { mjBizAppsOrdersExternalInvoice_ };
4748
4823
  //****************************************************************************
4749
- // INPUT TYPE for MJ_BizApps_Orders: Order Adjustments
4824
+ // INPUT TYPE for MJ_BizApps_Orders: External Invoices
4750
4825
  //****************************************************************************
4751
- let CreatemjBizAppsOrdersOrderAdjustmentInput = class CreatemjBizAppsOrdersOrderAdjustmentInput {
4826
+ let CreatemjBizAppsOrdersExternalInvoiceInput = class CreatemjBizAppsOrdersExternalInvoiceInput {
4752
4827
  };
4753
4828
  __decorate([
4754
4829
  Field({ nullable: true }),
4755
4830
  __metadata("design:type", String)
4756
- ], CreatemjBizAppsOrdersOrderAdjustmentInput.prototype, "ID", void 0);
4831
+ ], CreatemjBizAppsOrdersExternalInvoiceInput.prototype, "ID", void 0);
4757
4832
  __decorate([
4758
4833
  Field({ nullable: true }),
4759
4834
  __metadata("design:type", String)
4760
- ], CreatemjBizAppsOrdersOrderAdjustmentInput.prototype, "OrderHeaderID", void 0);
4835
+ ], CreatemjBizAppsOrdersExternalInvoiceInput.prototype, "PaymentProviderID", void 0);
4761
4836
  __decorate([
4762
4837
  Field({ nullable: true }),
4763
4838
  __metadata("design:type", String)
4764
- ], CreatemjBizAppsOrdersOrderAdjustmentInput.prototype, "OrderLineID", void 0);
4839
+ ], CreatemjBizAppsOrdersExternalInvoiceInput.prototype, "OrderHeaderID", void 0);
4765
4840
  __decorate([
4766
4841
  Field({ nullable: true }),
4767
4842
  __metadata("design:type", String)
4768
- ], CreatemjBizAppsOrdersOrderAdjustmentInput.prototype, "PromotionID", void 0);
4843
+ ], CreatemjBizAppsOrdersExternalInvoiceInput.prototype, "CompanyID", void 0);
4769
4844
  __decorate([
4770
4845
  Field({ nullable: true }),
4771
4846
  __metadata("design:type", String)
4772
- ], CreatemjBizAppsOrdersOrderAdjustmentInput.prototype, "PromotionCodeID", void 0);
4847
+ ], CreatemjBizAppsOrdersExternalInvoiceInput.prototype, "OrderHeaderPaymentScheduleID", void 0);
4848
+ __decorate([
4849
+ Field({ nullable: true }),
4850
+ __metadata("design:type", String)
4851
+ ], CreatemjBizAppsOrdersExternalInvoiceInput.prototype, "DocumentNumber", void 0);
4773
4852
  __decorate([
4774
4853
  Field(() => Float, { nullable: true }),
4775
4854
  __metadata("design:type", Number)
4776
- ], CreatemjBizAppsOrdersOrderAdjustmentInput.prototype, "Amount", void 0);
4855
+ ], CreatemjBizAppsOrdersExternalInvoiceInput.prototype, "Amount", void 0);
4777
4856
  __decorate([
4778
- Field(() => Int, { nullable: true }),
4779
- __metadata("design:type", Number)
4780
- ], CreatemjBizAppsOrdersOrderAdjustmentInput.prototype, "Sequence", void 0);
4857
+ Field({ nullable: true }),
4858
+ __metadata("design:type", Date)
4859
+ ], CreatemjBizAppsOrdersExternalInvoiceInput.prototype, "DueDate", void 0);
4781
4860
  __decorate([
4782
4861
  Field({ nullable: true }),
4783
4862
  __metadata("design:type", String)
4784
- ], CreatemjBizAppsOrdersOrderAdjustmentInput.prototype, "Reason", void 0);
4863
+ ], CreatemjBizAppsOrdersExternalInvoiceInput.prototype, "Status", void 0);
4785
4864
  __decorate([
4786
4865
  Field({ nullable: true }),
4787
4866
  __metadata("design:type", String)
4788
- ], CreatemjBizAppsOrdersOrderAdjustmentInput.prototype, "AppliedByUserID", void 0);
4867
+ ], CreatemjBizAppsOrdersExternalInvoiceInput.prototype, "ExternalCustomerRef", void 0);
4789
4868
  __decorate([
4790
4869
  Field({ nullable: true }),
4791
- __metadata("design:type", Date)
4792
- ], CreatemjBizAppsOrdersOrderAdjustmentInput.prototype, "AppliedAt", void 0);
4870
+ __metadata("design:type", String)
4871
+ ], CreatemjBizAppsOrdersExternalInvoiceInput.prototype, "ExternalInvoiceRef", void 0);
4872
+ __decorate([
4873
+ Field(() => Float, { nullable: true }),
4874
+ __metadata("design:type", Number)
4875
+ ], CreatemjBizAppsOrdersExternalInvoiceInput.prototype, "ExternalTotal", void 0);
4876
+ __decorate([
4877
+ Field(() => Float, { nullable: true }),
4878
+ __metadata("design:type", Number)
4879
+ ], CreatemjBizAppsOrdersExternalInvoiceInput.prototype, "ExternalDueAmount", void 0);
4793
4880
  __decorate([
4794
4881
  Field({ nullable: true }),
4795
4882
  __metadata("design:type", String)
4796
- ], CreatemjBizAppsOrdersOrderAdjustmentInput.prototype, "AuthorizedBySalesAuthorityID", void 0);
4883
+ ], CreatemjBizAppsOrdersExternalInvoiceInput.prototype, "ExternalStatus", void 0);
4884
+ __decorate([
4885
+ Field({ nullable: true }),
4886
+ __metadata("design:type", Date)
4887
+ ], CreatemjBizAppsOrdersExternalInvoiceInput.prototype, "SentAt", void 0);
4888
+ __decorate([
4889
+ Field({ nullable: true }),
4890
+ __metadata("design:type", Date)
4891
+ ], CreatemjBizAppsOrdersExternalInvoiceInput.prototype, "CanceledAt", void 0);
4797
4892
  __decorate([
4798
4893
  Field({ nullable: true }),
4799
4894
  __metadata("design:type", String)
4800
- ], CreatemjBizAppsOrdersOrderAdjustmentInput.prototype, "ApprovedByUserID", void 0);
4895
+ ], CreatemjBizAppsOrdersExternalInvoiceInput.prototype, "CancelReason", void 0);
4801
4896
  __decorate([
4802
4897
  Field({ nullable: true }),
4803
4898
  __metadata("design:type", Date)
4804
- ], CreatemjBizAppsOrdersOrderAdjustmentInput.prototype, "ApprovedAt", void 0);
4899
+ ], CreatemjBizAppsOrdersExternalInvoiceInput.prototype, "LastSyncedAt", void 0);
4900
+ __decorate([
4901
+ Field({ nullable: true }),
4902
+ __metadata("design:type", String)
4903
+ ], CreatemjBizAppsOrdersExternalInvoiceInput.prototype, "LastError", void 0);
4904
+ __decorate([
4905
+ Field({ nullable: true }),
4906
+ __metadata("design:type", String)
4907
+ ], CreatemjBizAppsOrdersExternalInvoiceInput.prototype, "IssuedByUserID", void 0);
4805
4908
  __decorate([
4806
4909
  Field(() => RestoreContextInput, { nullable: true }),
4807
4910
  __metadata("design:type", RestoreContextInput)
4808
- ], CreatemjBizAppsOrdersOrderAdjustmentInput.prototype, "RestoreContext___", void 0);
4809
- CreatemjBizAppsOrdersOrderAdjustmentInput = __decorate([
4911
+ ], CreatemjBizAppsOrdersExternalInvoiceInput.prototype, "RestoreContext___", void 0);
4912
+ CreatemjBizAppsOrdersExternalInvoiceInput = __decorate([
4810
4913
  InputType()
4811
- ], CreatemjBizAppsOrdersOrderAdjustmentInput);
4812
- export { CreatemjBizAppsOrdersOrderAdjustmentInput };
4914
+ ], CreatemjBizAppsOrdersExternalInvoiceInput);
4915
+ export { CreatemjBizAppsOrdersExternalInvoiceInput };
4813
4916
  //****************************************************************************
4814
- // INPUT TYPE for MJ_BizApps_Orders: Order Adjustments
4917
+ // INPUT TYPE for MJ_BizApps_Orders: External Invoices
4815
4918
  //****************************************************************************
4816
- let UpdatemjBizAppsOrdersOrderAdjustmentInput = class UpdatemjBizAppsOrdersOrderAdjustmentInput {
4919
+ let UpdatemjBizAppsOrdersExternalInvoiceInput = class UpdatemjBizAppsOrdersExternalInvoiceInput {
4817
4920
  };
4818
4921
  __decorate([
4819
4922
  Field(),
4820
4923
  __metadata("design:type", String)
4821
- ], UpdatemjBizAppsOrdersOrderAdjustmentInput.prototype, "ID", void 0);
4924
+ ], UpdatemjBizAppsOrdersExternalInvoiceInput.prototype, "ID", void 0);
4822
4925
  __decorate([
4823
4926
  Field({ nullable: true }),
4824
4927
  __metadata("design:type", String)
4825
- ], UpdatemjBizAppsOrdersOrderAdjustmentInput.prototype, "OrderHeaderID", void 0);
4928
+ ], UpdatemjBizAppsOrdersExternalInvoiceInput.prototype, "PaymentProviderID", void 0);
4826
4929
  __decorate([
4827
4930
  Field({ nullable: true }),
4828
4931
  __metadata("design:type", String)
4829
- ], UpdatemjBizAppsOrdersOrderAdjustmentInput.prototype, "OrderLineID", void 0);
4932
+ ], UpdatemjBizAppsOrdersExternalInvoiceInput.prototype, "OrderHeaderID", void 0);
4830
4933
  __decorate([
4831
4934
  Field({ nullable: true }),
4832
4935
  __metadata("design:type", String)
4833
- ], UpdatemjBizAppsOrdersOrderAdjustmentInput.prototype, "PromotionID", void 0);
4936
+ ], UpdatemjBizAppsOrdersExternalInvoiceInput.prototype, "CompanyID", void 0);
4834
4937
  __decorate([
4835
4938
  Field({ nullable: true }),
4836
4939
  __metadata("design:type", String)
4837
- ], UpdatemjBizAppsOrdersOrderAdjustmentInput.prototype, "PromotionCodeID", void 0);
4940
+ ], UpdatemjBizAppsOrdersExternalInvoiceInput.prototype, "OrderHeaderPaymentScheduleID", void 0);
4941
+ __decorate([
4942
+ Field({ nullable: true }),
4943
+ __metadata("design:type", String)
4944
+ ], UpdatemjBizAppsOrdersExternalInvoiceInput.prototype, "DocumentNumber", void 0);
4838
4945
  __decorate([
4839
4946
  Field(() => Float, { nullable: true }),
4840
4947
  __metadata("design:type", Number)
4841
- ], UpdatemjBizAppsOrdersOrderAdjustmentInput.prototype, "Amount", void 0);
4948
+ ], UpdatemjBizAppsOrdersExternalInvoiceInput.prototype, "Amount", void 0);
4842
4949
  __decorate([
4843
- Field(() => Int, { nullable: true }),
4844
- __metadata("design:type", Number)
4845
- ], UpdatemjBizAppsOrdersOrderAdjustmentInput.prototype, "Sequence", void 0);
4950
+ Field({ nullable: true }),
4951
+ __metadata("design:type", Date)
4952
+ ], UpdatemjBizAppsOrdersExternalInvoiceInput.prototype, "DueDate", void 0);
4846
4953
  __decorate([
4847
4954
  Field({ nullable: true }),
4848
4955
  __metadata("design:type", String)
4849
- ], UpdatemjBizAppsOrdersOrderAdjustmentInput.prototype, "Reason", void 0);
4956
+ ], UpdatemjBizAppsOrdersExternalInvoiceInput.prototype, "Status", void 0);
4850
4957
  __decorate([
4851
4958
  Field({ nullable: true }),
4852
4959
  __metadata("design:type", String)
4853
- ], UpdatemjBizAppsOrdersOrderAdjustmentInput.prototype, "AppliedByUserID", void 0);
4960
+ ], UpdatemjBizAppsOrdersExternalInvoiceInput.prototype, "ExternalCustomerRef", void 0);
4854
4961
  __decorate([
4855
4962
  Field({ nullable: true }),
4856
- __metadata("design:type", Date)
4857
- ], UpdatemjBizAppsOrdersOrderAdjustmentInput.prototype, "AppliedAt", void 0);
4963
+ __metadata("design:type", String)
4964
+ ], UpdatemjBizAppsOrdersExternalInvoiceInput.prototype, "ExternalInvoiceRef", void 0);
4965
+ __decorate([
4966
+ Field(() => Float, { nullable: true }),
4967
+ __metadata("design:type", Number)
4968
+ ], UpdatemjBizAppsOrdersExternalInvoiceInput.prototype, "ExternalTotal", void 0);
4969
+ __decorate([
4970
+ Field(() => Float, { nullable: true }),
4971
+ __metadata("design:type", Number)
4972
+ ], UpdatemjBizAppsOrdersExternalInvoiceInput.prototype, "ExternalDueAmount", void 0);
4858
4973
  __decorate([
4859
4974
  Field({ nullable: true }),
4860
4975
  __metadata("design:type", String)
4861
- ], UpdatemjBizAppsOrdersOrderAdjustmentInput.prototype, "AuthorizedBySalesAuthorityID", void 0);
4976
+ ], UpdatemjBizAppsOrdersExternalInvoiceInput.prototype, "ExternalStatus", void 0);
4977
+ __decorate([
4978
+ Field({ nullable: true }),
4979
+ __metadata("design:type", Date)
4980
+ ], UpdatemjBizAppsOrdersExternalInvoiceInput.prototype, "SentAt", void 0);
4981
+ __decorate([
4982
+ Field({ nullable: true }),
4983
+ __metadata("design:type", Date)
4984
+ ], UpdatemjBizAppsOrdersExternalInvoiceInput.prototype, "CanceledAt", void 0);
4862
4985
  __decorate([
4863
4986
  Field({ nullable: true }),
4864
4987
  __metadata("design:type", String)
4865
- ], UpdatemjBizAppsOrdersOrderAdjustmentInput.prototype, "ApprovedByUserID", void 0);
4988
+ ], UpdatemjBizAppsOrdersExternalInvoiceInput.prototype, "CancelReason", void 0);
4866
4989
  __decorate([
4867
4990
  Field({ nullable: true }),
4868
4991
  __metadata("design:type", Date)
4869
- ], UpdatemjBizAppsOrdersOrderAdjustmentInput.prototype, "ApprovedAt", void 0);
4992
+ ], UpdatemjBizAppsOrdersExternalInvoiceInput.prototype, "LastSyncedAt", void 0);
4993
+ __decorate([
4994
+ Field({ nullable: true }),
4995
+ __metadata("design:type", String)
4996
+ ], UpdatemjBizAppsOrdersExternalInvoiceInput.prototype, "LastError", void 0);
4997
+ __decorate([
4998
+ Field({ nullable: true }),
4999
+ __metadata("design:type", String)
5000
+ ], UpdatemjBizAppsOrdersExternalInvoiceInput.prototype, "IssuedByUserID", void 0);
4870
5001
  __decorate([
4871
5002
  Field(() => [KeyValuePairInput], { nullable: true }),
4872
5003
  __metadata("design:type", Array)
4873
- ], UpdatemjBizAppsOrdersOrderAdjustmentInput.prototype, "OldValues___", void 0);
5004
+ ], UpdatemjBizAppsOrdersExternalInvoiceInput.prototype, "OldValues___", void 0);
4874
5005
  __decorate([
4875
5006
  Field(() => RestoreContextInput, { nullable: true }),
4876
5007
  __metadata("design:type", RestoreContextInput)
4877
- ], UpdatemjBizAppsOrdersOrderAdjustmentInput.prototype, "RestoreContext___", void 0);
4878
- UpdatemjBizAppsOrdersOrderAdjustmentInput = __decorate([
5008
+ ], UpdatemjBizAppsOrdersExternalInvoiceInput.prototype, "RestoreContext___", void 0);
5009
+ UpdatemjBizAppsOrdersExternalInvoiceInput = __decorate([
4879
5010
  InputType()
4880
- ], UpdatemjBizAppsOrdersOrderAdjustmentInput);
4881
- export { UpdatemjBizAppsOrdersOrderAdjustmentInput };
5011
+ ], UpdatemjBizAppsOrdersExternalInvoiceInput);
5012
+ export { UpdatemjBizAppsOrdersExternalInvoiceInput };
4882
5013
  //****************************************************************************
4883
- // RESOLVER for MJ_BizApps_Orders: Order Adjustments
5014
+ // RESOLVER for MJ_BizApps_Orders: External Invoices
4884
5015
  //****************************************************************************
4885
- let RunmjBizAppsOrdersOrderAdjustmentViewResult = class RunmjBizAppsOrdersOrderAdjustmentViewResult {
5016
+ let RunmjBizAppsOrdersExternalInvoiceViewResult = class RunmjBizAppsOrdersExternalInvoiceViewResult {
4886
5017
  };
4887
5018
  __decorate([
4888
- Field(() => [mjBizAppsOrdersOrderAdjustment_]),
5019
+ Field(() => [mjBizAppsOrdersExternalInvoice_]),
4889
5020
  __metadata("design:type", Array)
4890
- ], RunmjBizAppsOrdersOrderAdjustmentViewResult.prototype, "Results", void 0);
5021
+ ], RunmjBizAppsOrdersExternalInvoiceViewResult.prototype, "Results", void 0);
4891
5022
  __decorate([
4892
5023
  Field(() => String, { nullable: true }),
4893
5024
  __metadata("design:type", String)
4894
- ], RunmjBizAppsOrdersOrderAdjustmentViewResult.prototype, "UserViewRunID", void 0);
5025
+ ], RunmjBizAppsOrdersExternalInvoiceViewResult.prototype, "UserViewRunID", void 0);
4895
5026
  __decorate([
4896
5027
  Field(() => Int, { nullable: true }),
4897
5028
  __metadata("design:type", Number)
4898
- ], RunmjBizAppsOrdersOrderAdjustmentViewResult.prototype, "RowCount", void 0);
5029
+ ], RunmjBizAppsOrdersExternalInvoiceViewResult.prototype, "RowCount", void 0);
4899
5030
  __decorate([
4900
5031
  Field(() => Int, { nullable: true }),
4901
5032
  __metadata("design:type", Number)
4902
- ], RunmjBizAppsOrdersOrderAdjustmentViewResult.prototype, "TotalRowCount", void 0);
5033
+ ], RunmjBizAppsOrdersExternalInvoiceViewResult.prototype, "TotalRowCount", void 0);
4903
5034
  __decorate([
4904
5035
  Field(() => Int, { nullable: true }),
4905
5036
  __metadata("design:type", Number)
4906
- ], RunmjBizAppsOrdersOrderAdjustmentViewResult.prototype, "ExecutionTime", void 0);
5037
+ ], RunmjBizAppsOrdersExternalInvoiceViewResult.prototype, "ExecutionTime", void 0);
4907
5038
  __decorate([
4908
5039
  Field({ nullable: true }),
4909
5040
  __metadata("design:type", String)
4910
- ], RunmjBizAppsOrdersOrderAdjustmentViewResult.prototype, "ErrorMessage", void 0);
5041
+ ], RunmjBizAppsOrdersExternalInvoiceViewResult.prototype, "ErrorMessage", void 0);
4911
5042
  __decorate([
4912
5043
  Field(() => Boolean, { nullable: false }),
4913
5044
  __metadata("design:type", Boolean)
4914
- ], RunmjBizAppsOrdersOrderAdjustmentViewResult.prototype, "Success", void 0);
4915
- RunmjBizAppsOrdersOrderAdjustmentViewResult = __decorate([
5045
+ ], RunmjBizAppsOrdersExternalInvoiceViewResult.prototype, "Success", void 0);
5046
+ RunmjBizAppsOrdersExternalInvoiceViewResult = __decorate([
4916
5047
  ObjectType()
4917
- ], RunmjBizAppsOrdersOrderAdjustmentViewResult);
4918
- export { RunmjBizAppsOrdersOrderAdjustmentViewResult };
4919
- let mjBizAppsOrdersOrderAdjustmentResolver = class mjBizAppsOrdersOrderAdjustmentResolver extends ResolverBase {
4920
- async RunmjBizAppsOrdersOrderAdjustmentViewByID(input, { providers, userPayload }, pubSub) {
5048
+ ], RunmjBizAppsOrdersExternalInvoiceViewResult);
5049
+ export { RunmjBizAppsOrdersExternalInvoiceViewResult };
5050
+ let mjBizAppsOrdersExternalInvoiceResolver = class mjBizAppsOrdersExternalInvoiceResolver extends ResolverBase {
5051
+ async RunmjBizAppsOrdersExternalInvoiceViewByID(input, { providers, userPayload }, pubSub) {
4921
5052
  const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
4922
5053
  return super.RunViewByIDGeneric(input, provider, userPayload, pubSub);
4923
5054
  }
4924
- async RunmjBizAppsOrdersOrderAdjustmentViewByName(input, { providers, userPayload }, pubSub) {
5055
+ async RunmjBizAppsOrdersExternalInvoiceViewByName(input, { providers, userPayload }, pubSub) {
4925
5056
  const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
4926
5057
  return super.RunViewByNameGeneric(input, provider, userPayload, pubSub);
4927
5058
  }
4928
- async RunmjBizAppsOrdersOrderAdjustmentDynamicView(input, { providers, userPayload }, pubSub) {
5059
+ async RunmjBizAppsOrdersExternalInvoiceDynamicView(input, { providers, userPayload }, pubSub) {
4929
5060
  const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
4930
- input.EntityName = 'MJ_BizApps_Orders: Order Adjustments';
5061
+ input.EntityName = 'MJ_BizApps_Orders: External Invoices';
4931
5062
  return super.RunDynamicViewGeneric(input, provider, userPayload, pubSub);
4932
5063
  }
4933
- async mjBizAppsOrdersOrderAdjustment(ID, { userPayload, providers }, pubSub) {
4934
- this.CheckUserReadPermissions('MJ_BizApps_Orders: Order Adjustments', userPayload);
5064
+ async mjBizAppsOrdersExternalInvoice(ID, { userPayload, providers }, pubSub) {
5065
+ this.CheckUserReadPermissions('MJ_BizApps_Orders: External Invoices', userPayload);
4935
5066
  const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
4936
- const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView('__mj_BizAppsOrders', 'vwOrderAdjustments')} WHERE ${provider.QuoteIdentifier('ID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ_BizApps_Orders: Order Adjustments', userPayload, EntityPermissionType.Read, 'AND');
5067
+ const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView('__mj_BizAppsOrders', 'vwExternalInvoices')} WHERE ${provider.QuoteIdentifier('ID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ_BizApps_Orders: External Invoices', userPayload, EntityPermissionType.Read, 'AND');
4937
5068
  const rows = await provider.ExecuteSQL(sSQL, [ID], undefined, this.GetUserFromPayload(userPayload));
4938
- const result = await this.MapFieldNamesToCodeNames('MJ_BizApps_Orders: Order Adjustments', rows && rows.length > 0 ? rows[0] : null, this.GetUserFromPayload(userPayload));
5069
+ const result = await this.MapFieldNamesToCodeNames('MJ_BizApps_Orders: External Invoices', rows && rows.length > 0 ? rows[0] : null, this.GetUserFromPayload(userPayload));
4939
5070
  return result;
4940
5071
  }
4941
- async CreatemjBizAppsOrdersOrderAdjustment(input, { providers, userPayload }, pubSub) {
5072
+ async CreatemjBizAppsOrdersExternalInvoice(input, { providers, userPayload }, pubSub) {
4942
5073
  const provider = GetReadWriteProvider(providers);
4943
- return this.CreateRecord('MJ_BizApps_Orders: Order Adjustments', input, provider, userPayload, pubSub);
5074
+ return this.CreateRecord('MJ_BizApps_Orders: External Invoices', input, provider, userPayload, pubSub);
4944
5075
  }
4945
- async UpdatemjBizAppsOrdersOrderAdjustment(input, { providers, userPayload }, pubSub) {
5076
+ async UpdatemjBizAppsOrdersExternalInvoice(input, { providers, userPayload }, pubSub) {
4946
5077
  const provider = GetReadWriteProvider(providers);
4947
- return this.UpdateRecord('MJ_BizApps_Orders: Order Adjustments', input, provider, userPayload, pubSub);
5078
+ return this.UpdateRecord('MJ_BizApps_Orders: External Invoices', input, provider, userPayload, pubSub);
4948
5079
  }
4949
- async DeletemjBizAppsOrdersOrderAdjustment(ID, options, { providers, userPayload }, pubSub) {
5080
+ async DeletemjBizAppsOrdersExternalInvoice(ID, options, { providers, userPayload }, pubSub) {
4950
5081
  const provider = GetReadWriteProvider(providers);
4951
5082
  const key = new CompositeKey([{ FieldName: 'ID', Value: ID }]);
4952
- return this.DeleteRecord('MJ_BizApps_Orders: Order Adjustments', key, options, provider, userPayload, pubSub);
5083
+ return this.DeleteRecord('MJ_BizApps_Orders: External Invoices', key, options, provider, userPayload, pubSub);
4953
5084
  }
4954
5085
  };
4955
5086
  __decorate([
4956
- Query(() => RunmjBizAppsOrdersOrderAdjustmentViewResult),
5087
+ Query(() => RunmjBizAppsOrdersExternalInvoiceViewResult),
4957
5088
  __param(0, Arg('input', () => RunViewByIDInput)),
4958
5089
  __param(1, Ctx()),
4959
5090
  __param(2, PubSub()),
4960
5091
  __metadata("design:type", Function),
4961
5092
  __metadata("design:paramtypes", [RunViewByIDInput, Object, PubSubEngine]),
4962
5093
  __metadata("design:returntype", Promise)
4963
- ], mjBizAppsOrdersOrderAdjustmentResolver.prototype, "RunmjBizAppsOrdersOrderAdjustmentViewByID", null);
5094
+ ], mjBizAppsOrdersExternalInvoiceResolver.prototype, "RunmjBizAppsOrdersExternalInvoiceViewByID", null);
4964
5095
  __decorate([
4965
- Query(() => RunmjBizAppsOrdersOrderAdjustmentViewResult),
5096
+ Query(() => RunmjBizAppsOrdersExternalInvoiceViewResult),
4966
5097
  __param(0, Arg('input', () => RunViewByNameInput)),
4967
5098
  __param(1, Ctx()),
4968
5099
  __param(2, PubSub()),
4969
5100
  __metadata("design:type", Function),
4970
5101
  __metadata("design:paramtypes", [RunViewByNameInput, Object, PubSubEngine]),
4971
5102
  __metadata("design:returntype", Promise)
4972
- ], mjBizAppsOrdersOrderAdjustmentResolver.prototype, "RunmjBizAppsOrdersOrderAdjustmentViewByName", null);
5103
+ ], mjBizAppsOrdersExternalInvoiceResolver.prototype, "RunmjBizAppsOrdersExternalInvoiceViewByName", null);
4973
5104
  __decorate([
4974
- Query(() => RunmjBizAppsOrdersOrderAdjustmentViewResult),
5105
+ Query(() => RunmjBizAppsOrdersExternalInvoiceViewResult),
4975
5106
  __param(0, Arg('input', () => RunDynamicViewInput)),
4976
5107
  __param(1, Ctx()),
4977
5108
  __param(2, PubSub()),
4978
5109
  __metadata("design:type", Function),
4979
5110
  __metadata("design:paramtypes", [RunDynamicViewInput, Object, PubSubEngine]),
4980
5111
  __metadata("design:returntype", Promise)
4981
- ], mjBizAppsOrdersOrderAdjustmentResolver.prototype, "RunmjBizAppsOrdersOrderAdjustmentDynamicView", null);
5112
+ ], mjBizAppsOrdersExternalInvoiceResolver.prototype, "RunmjBizAppsOrdersExternalInvoiceDynamicView", null);
4982
5113
  __decorate([
4983
- Query(() => mjBizAppsOrdersOrderAdjustment_, { nullable: true }),
5114
+ Query(() => mjBizAppsOrdersExternalInvoice_, { nullable: true }),
4984
5115
  __param(0, Arg('ID', () => String)),
4985
5116
  __param(1, Ctx()),
4986
5117
  __param(2, PubSub()),
4987
5118
  __metadata("design:type", Function),
4988
5119
  __metadata("design:paramtypes", [String, Object, PubSubEngine]),
4989
5120
  __metadata("design:returntype", Promise)
4990
- ], mjBizAppsOrdersOrderAdjustmentResolver.prototype, "mjBizAppsOrdersOrderAdjustment", null);
5121
+ ], mjBizAppsOrdersExternalInvoiceResolver.prototype, "mjBizAppsOrdersExternalInvoice", null);
4991
5122
  __decorate([
4992
- Mutation(() => mjBizAppsOrdersOrderAdjustment_),
4993
- __param(0, Arg('input', () => CreatemjBizAppsOrdersOrderAdjustmentInput)),
5123
+ Mutation(() => mjBizAppsOrdersExternalInvoice_),
5124
+ __param(0, Arg('input', () => CreatemjBizAppsOrdersExternalInvoiceInput)),
4994
5125
  __param(1, Ctx()),
4995
5126
  __param(2, PubSub()),
4996
5127
  __metadata("design:type", Function),
4997
- __metadata("design:paramtypes", [CreatemjBizAppsOrdersOrderAdjustmentInput, Object, PubSubEngine]),
5128
+ __metadata("design:paramtypes", [CreatemjBizAppsOrdersExternalInvoiceInput, Object, PubSubEngine]),
4998
5129
  __metadata("design:returntype", Promise)
4999
- ], mjBizAppsOrdersOrderAdjustmentResolver.prototype, "CreatemjBizAppsOrdersOrderAdjustment", null);
5130
+ ], mjBizAppsOrdersExternalInvoiceResolver.prototype, "CreatemjBizAppsOrdersExternalInvoice", null);
5000
5131
  __decorate([
5001
- Mutation(() => mjBizAppsOrdersOrderAdjustment_),
5002
- __param(0, Arg('input', () => UpdatemjBizAppsOrdersOrderAdjustmentInput)),
5132
+ Mutation(() => mjBizAppsOrdersExternalInvoice_),
5133
+ __param(0, Arg('input', () => UpdatemjBizAppsOrdersExternalInvoiceInput)),
5003
5134
  __param(1, Ctx()),
5004
5135
  __param(2, PubSub()),
5005
5136
  __metadata("design:type", Function),
5006
- __metadata("design:paramtypes", [UpdatemjBizAppsOrdersOrderAdjustmentInput, Object, PubSubEngine]),
5137
+ __metadata("design:paramtypes", [UpdatemjBizAppsOrdersExternalInvoiceInput, Object, PubSubEngine]),
5007
5138
  __metadata("design:returntype", Promise)
5008
- ], mjBizAppsOrdersOrderAdjustmentResolver.prototype, "UpdatemjBizAppsOrdersOrderAdjustment", null);
5139
+ ], mjBizAppsOrdersExternalInvoiceResolver.prototype, "UpdatemjBizAppsOrdersExternalInvoice", null);
5009
5140
  __decorate([
5010
- Mutation(() => mjBizAppsOrdersOrderAdjustment_),
5141
+ Mutation(() => mjBizAppsOrdersExternalInvoice_),
5011
5142
  __param(0, Arg('ID', () => String)),
5012
5143
  __param(1, Arg('options___', () => DeleteOptionsInput)),
5013
5144
  __param(2, Ctx()),
@@ -5015,173 +5146,1173 @@ __decorate([
5015
5146
  __metadata("design:type", Function),
5016
5147
  __metadata("design:paramtypes", [String, DeleteOptionsInput, Object, PubSubEngine]),
5017
5148
  __metadata("design:returntype", Promise)
5018
- ], mjBizAppsOrdersOrderAdjustmentResolver.prototype, "DeletemjBizAppsOrdersOrderAdjustment", null);
5019
- mjBizAppsOrdersOrderAdjustmentResolver = __decorate([
5020
- Resolver(mjBizAppsOrdersOrderAdjustment_)
5021
- ], mjBizAppsOrdersOrderAdjustmentResolver);
5022
- export { mjBizAppsOrdersOrderAdjustmentResolver };
5149
+ ], mjBizAppsOrdersExternalInvoiceResolver.prototype, "DeletemjBizAppsOrdersExternalInvoice", null);
5150
+ mjBizAppsOrdersExternalInvoiceResolver = __decorate([
5151
+ Resolver(mjBizAppsOrdersExternalInvoice_)
5152
+ ], mjBizAppsOrdersExternalInvoiceResolver);
5153
+ export { mjBizAppsOrdersExternalInvoiceResolver };
5023
5154
  //****************************************************************************
5024
- // ENTITY CLASS for MJ_BizApps_Orders: Order Charge Allocations
5155
+ // ENTITY CLASS for MJ_BizApps_Orders: External Payments
5025
5156
  //****************************************************************************
5026
- let mjBizAppsOrdersOrderChargeAllocation_ = class mjBizAppsOrdersOrderChargeAllocation_ {
5157
+ let mjBizAppsOrdersExternalPayment_ = class mjBizAppsOrdersExternalPayment_ {
5027
5158
  };
5028
5159
  __decorate([
5029
5160
  Field(),
5030
5161
  MaxLength(36),
5031
5162
  __metadata("design:type", String)
5032
- ], mjBizAppsOrdersOrderChargeAllocation_.prototype, "ID", void 0);
5163
+ ], mjBizAppsOrdersExternalPayment_.prototype, "ID", void 0);
5033
5164
  __decorate([
5034
- Field({ nullable: true }),
5165
+ Field({ description: `The provider row (rail + company) the payment was read from.` }),
5035
5166
  MaxLength(36),
5036
5167
  __metadata("design:type", String)
5037
- ], mjBizAppsOrdersOrderChargeAllocation_.prototype, "OrderChargeID", void 0);
5168
+ ], mjBizAppsOrdersExternalPayment_.prototype, "PaymentProviderID", void 0);
5038
5169
  __decorate([
5039
- Field({ nullable: true }),
5040
- MaxLength(36),
5170
+ Field({ description: `The rail's payment id (Bill.com 0rp…). Unique per provider.` }),
5171
+ MaxLength(100),
5041
5172
  __metadata("design:type", String)
5042
- ], mjBizAppsOrdersOrderChargeAllocation_.prototype, "OrderLineID", void 0);
5173
+ ], mjBizAppsOrdersExternalPayment_.prototype, "ExternalPaymentRef", void 0);
5043
5174
  __decorate([
5044
- Field(() => Float, { nullable: true }),
5175
+ Field({ nullable: true, description: `The rail's customer id the payment came from.` }),
5176
+ MaxLength(100),
5177
+ __metadata("design:type", String)
5178
+ ], mjBizAppsOrdersExternalPayment_.prototype, "ExternalCustomerRef", void 0);
5179
+ __decorate([
5180
+ Field(() => Float, { description: `The payment's gross amount as the rail reports it.` }),
5045
5181
  __metadata("design:type", Number)
5046
- ], mjBizAppsOrdersOrderChargeAllocation_.prototype, "Amount", void 0);
5182
+ ], mjBizAppsOrdersExternalPayment_.prototype, "Amount", void 0);
5183
+ __decorate([
5184
+ Field(() => Float, { description: `The part the rail has not applied to any invoice (over-payment or unlinked). Stays on the rail as the customer's credit.` }),
5185
+ __metadata("design:type", Number)
5186
+ ], mjBizAppsOrdersExternalPayment_.prototype, "UnappliedAmount", void 0);
5187
+ __decorate([
5188
+ Field({ nullable: true, description: `When the rail says funds moved.` }),
5189
+ __metadata("design:type", Date)
5190
+ ], mjBizAppsOrdersExternalPayment_.prototype, "PaymentDate", void 0);
5191
+ __decorate([
5192
+ Field({ nullable: true, description: `The rail's status string, verbatim, as last seen.` }),
5193
+ MaxLength(40),
5194
+ __metadata("design:type", String)
5195
+ ], mjBizAppsOrdersExternalPayment_.prototype, "ExternalStatus", void 0);
5196
+ __decorate([
5197
+ Field({ nullable: true, description: `The rail's updatedTime as last seen — the watermark candidate.` }),
5198
+ __metadata("design:type", Date)
5199
+ ], mjBizAppsOrdersExternalPayment_.prototype, "ExternalUpdatedAt", void 0);
5200
+ __decorate([
5201
+ Field({ description: `Captured, Held (pending or unknown status), Unmatched (an invoice we did not issue), Refused (Orders.CapturePayment refused it — a split-company order, an ambiguous payer, a configuration fault), Ignored (nothing to do, or set aside by a person), Reapplied (captured, and the rail has since applied it to different invoices), ReversalNeeded (captured, and the rail now reports it reversed).` }),
5202
+ MaxLength(20),
5203
+ __metadata("design:type", String)
5204
+ ], mjBizAppsOrdersExternalPayment_.prototype, "Disposition", void 0);
5205
+ __decorate([
5206
+ Field({ nullable: true, description: `Why, in words a person can act on.` }),
5207
+ MaxLength(500),
5208
+ __metadata("design:type", String)
5209
+ ], mjBizAppsOrdersExternalPayment_.prototype, "DispositionReason", void 0);
5210
+ __decorate([
5211
+ Field({ nullable: true, description: `The Orders payment created for a Captured row.` }),
5212
+ MaxLength(36),
5213
+ __metadata("design:type", String)
5214
+ ], mjBizAppsOrdersExternalPayment_.prototype, "PaymentHeaderID", void 0);
5215
+ __decorate([
5216
+ Field({ nullable: true, description: `The rail's record as received, JSON, for the audit trail.` }),
5217
+ __metadata("design:type", String)
5218
+ ], mjBizAppsOrdersExternalPayment_.prototype, "Payload", void 0);
5219
+ __decorate([
5220
+ Field({ description: `First poll that saw this payment.` }),
5221
+ __metadata("design:type", Date)
5222
+ ], mjBizAppsOrdersExternalPayment_.prototype, "FirstSeenAt", void 0);
5223
+ __decorate([
5224
+ Field({ description: `Most recent poll that saw this payment.` }),
5225
+ __metadata("design:type", Date)
5226
+ ], mjBizAppsOrdersExternalPayment_.prototype, "LastSeenAt", void 0);
5047
5227
  __decorate([
5048
5228
  Field(),
5049
5229
  __metadata("design:type", Date)
5050
- ], mjBizAppsOrdersOrderChargeAllocation_.prototype, "_mj__CreatedAt", void 0);
5230
+ ], mjBizAppsOrdersExternalPayment_.prototype, "_mj__CreatedAt", void 0);
5051
5231
  __decorate([
5052
5232
  Field(),
5053
5233
  __metadata("design:type", Date)
5054
- ], mjBizAppsOrdersOrderChargeAllocation_.prototype, "_mj__UpdatedAt", void 0);
5234
+ ], mjBizAppsOrdersExternalPayment_.prototype, "_mj__UpdatedAt", void 0);
5055
5235
  __decorate([
5056
- Field(() => [String], { nullable: true, description: `Field-level security: when non-null, the fields on this entity the calling user may read. Any other field arriving as null was withheld by the server rather than genuinely empty. Null for callers with no field restrictions.` }),
5057
- __metadata("design:type", Array)
5058
- ], mjBizAppsOrdersOrderChargeAllocation_.prototype, "ReadableFields___", void 0);
5059
- mjBizAppsOrdersOrderChargeAllocation_ = __decorate([
5060
- ObjectType({ description: `Which lines a charge belongs to. Needed for tax (per line), GL (per line\'s company) and returns (refunding a line refunds its share of the charge). The same shape as OrderAdjustmentAllocation, deliberately.` })
5061
- ], mjBizAppsOrdersOrderChargeAllocation_);
5062
- export { mjBizAppsOrdersOrderChargeAllocation_ };
5236
+ Field(),
5237
+ MaxLength(200),
5238
+ __metadata("design:type", String)
5239
+ ], mjBizAppsOrdersExternalPayment_.prototype, "PaymentProvider", void 0);
5240
+ __decorate([
5241
+ Field({ nullable: true }),
5242
+ MaxLength(40),
5243
+ __metadata("design:type", String)
5244
+ ], mjBizAppsOrdersExternalPayment_.prototype, "PaymentHeader", void 0);
5245
+ mjBizAppsOrdersExternalPayment_ = __decorate([
5246
+ ObjectType({ description: `Every receivable payment the poller has seen on an external AR rail (Bill.com), and what it did with it. Captured rows name the PaymentHeader they created; Held, Unmatched and ReversalNeeded rows are the exceptions worklist. The idempotency guarantee itself is PaymentHeader.IdempotencyKey; this is the lookup in front of it and the audit trail.` })
5247
+ ], mjBizAppsOrdersExternalPayment_);
5248
+ export { mjBizAppsOrdersExternalPayment_ };
5063
5249
  //****************************************************************************
5064
- // INPUT TYPE for MJ_BizApps_Orders: Order Charge Allocations
5250
+ // INPUT TYPE for MJ_BizApps_Orders: External Payments
5065
5251
  //****************************************************************************
5066
- let CreatemjBizAppsOrdersOrderChargeAllocationInput = class CreatemjBizAppsOrdersOrderChargeAllocationInput {
5252
+ let CreatemjBizAppsOrdersExternalPaymentInput = class CreatemjBizAppsOrdersExternalPaymentInput {
5067
5253
  };
5068
5254
  __decorate([
5069
5255
  Field({ nullable: true }),
5070
5256
  __metadata("design:type", String)
5071
- ], CreatemjBizAppsOrdersOrderChargeAllocationInput.prototype, "ID", void 0);
5257
+ ], CreatemjBizAppsOrdersExternalPaymentInput.prototype, "ID", void 0);
5072
5258
  __decorate([
5073
5259
  Field({ nullable: true }),
5074
5260
  __metadata("design:type", String)
5075
- ], CreatemjBizAppsOrdersOrderChargeAllocationInput.prototype, "OrderChargeID", void 0);
5261
+ ], CreatemjBizAppsOrdersExternalPaymentInput.prototype, "PaymentProviderID", void 0);
5076
5262
  __decorate([
5077
5263
  Field({ nullable: true }),
5078
5264
  __metadata("design:type", String)
5079
- ], CreatemjBizAppsOrdersOrderChargeAllocationInput.prototype, "OrderLineID", void 0);
5265
+ ], CreatemjBizAppsOrdersExternalPaymentInput.prototype, "ExternalPaymentRef", void 0);
5266
+ __decorate([
5267
+ Field({ nullable: true }),
5268
+ __metadata("design:type", String)
5269
+ ], CreatemjBizAppsOrdersExternalPaymentInput.prototype, "ExternalCustomerRef", void 0);
5080
5270
  __decorate([
5081
5271
  Field(() => Float, { nullable: true }),
5082
5272
  __metadata("design:type", Number)
5083
- ], CreatemjBizAppsOrdersOrderChargeAllocationInput.prototype, "Amount", void 0);
5273
+ ], CreatemjBizAppsOrdersExternalPaymentInput.prototype, "Amount", void 0);
5274
+ __decorate([
5275
+ Field(() => Float, { nullable: true }),
5276
+ __metadata("design:type", Number)
5277
+ ], CreatemjBizAppsOrdersExternalPaymentInput.prototype, "UnappliedAmount", void 0);
5278
+ __decorate([
5279
+ Field({ nullable: true }),
5280
+ __metadata("design:type", Date)
5281
+ ], CreatemjBizAppsOrdersExternalPaymentInput.prototype, "PaymentDate", void 0);
5282
+ __decorate([
5283
+ Field({ nullable: true }),
5284
+ __metadata("design:type", String)
5285
+ ], CreatemjBizAppsOrdersExternalPaymentInput.prototype, "ExternalStatus", void 0);
5286
+ __decorate([
5287
+ Field({ nullable: true }),
5288
+ __metadata("design:type", Date)
5289
+ ], CreatemjBizAppsOrdersExternalPaymentInput.prototype, "ExternalUpdatedAt", void 0);
5290
+ __decorate([
5291
+ Field({ nullable: true }),
5292
+ __metadata("design:type", String)
5293
+ ], CreatemjBizAppsOrdersExternalPaymentInput.prototype, "Disposition", void 0);
5294
+ __decorate([
5295
+ Field({ nullable: true }),
5296
+ __metadata("design:type", String)
5297
+ ], CreatemjBizAppsOrdersExternalPaymentInput.prototype, "DispositionReason", void 0);
5298
+ __decorate([
5299
+ Field({ nullable: true }),
5300
+ __metadata("design:type", String)
5301
+ ], CreatemjBizAppsOrdersExternalPaymentInput.prototype, "PaymentHeaderID", void 0);
5302
+ __decorate([
5303
+ Field({ nullable: true }),
5304
+ __metadata("design:type", String)
5305
+ ], CreatemjBizAppsOrdersExternalPaymentInput.prototype, "Payload", void 0);
5306
+ __decorate([
5307
+ Field({ nullable: true }),
5308
+ __metadata("design:type", Date)
5309
+ ], CreatemjBizAppsOrdersExternalPaymentInput.prototype, "FirstSeenAt", void 0);
5310
+ __decorate([
5311
+ Field({ nullable: true }),
5312
+ __metadata("design:type", Date)
5313
+ ], CreatemjBizAppsOrdersExternalPaymentInput.prototype, "LastSeenAt", void 0);
5084
5314
  __decorate([
5085
5315
  Field(() => RestoreContextInput, { nullable: true }),
5086
5316
  __metadata("design:type", RestoreContextInput)
5087
- ], CreatemjBizAppsOrdersOrderChargeAllocationInput.prototype, "RestoreContext___", void 0);
5088
- CreatemjBizAppsOrdersOrderChargeAllocationInput = __decorate([
5317
+ ], CreatemjBizAppsOrdersExternalPaymentInput.prototype, "RestoreContext___", void 0);
5318
+ CreatemjBizAppsOrdersExternalPaymentInput = __decorate([
5089
5319
  InputType()
5090
- ], CreatemjBizAppsOrdersOrderChargeAllocationInput);
5091
- export { CreatemjBizAppsOrdersOrderChargeAllocationInput };
5320
+ ], CreatemjBizAppsOrdersExternalPaymentInput);
5321
+ export { CreatemjBizAppsOrdersExternalPaymentInput };
5092
5322
  //****************************************************************************
5093
- // INPUT TYPE for MJ_BizApps_Orders: Order Charge Allocations
5323
+ // INPUT TYPE for MJ_BizApps_Orders: External Payments
5094
5324
  //****************************************************************************
5095
- let UpdatemjBizAppsOrdersOrderChargeAllocationInput = class UpdatemjBizAppsOrdersOrderChargeAllocationInput {
5325
+ let UpdatemjBizAppsOrdersExternalPaymentInput = class UpdatemjBizAppsOrdersExternalPaymentInput {
5096
5326
  };
5097
5327
  __decorate([
5098
5328
  Field(),
5099
5329
  __metadata("design:type", String)
5100
- ], UpdatemjBizAppsOrdersOrderChargeAllocationInput.prototype, "ID", void 0);
5330
+ ], UpdatemjBizAppsOrdersExternalPaymentInput.prototype, "ID", void 0);
5101
5331
  __decorate([
5102
5332
  Field({ nullable: true }),
5103
5333
  __metadata("design:type", String)
5104
- ], UpdatemjBizAppsOrdersOrderChargeAllocationInput.prototype, "OrderChargeID", void 0);
5334
+ ], UpdatemjBizAppsOrdersExternalPaymentInput.prototype, "PaymentProviderID", void 0);
5105
5335
  __decorate([
5106
5336
  Field({ nullable: true }),
5107
5337
  __metadata("design:type", String)
5108
- ], UpdatemjBizAppsOrdersOrderChargeAllocationInput.prototype, "OrderLineID", void 0);
5338
+ ], UpdatemjBizAppsOrdersExternalPaymentInput.prototype, "ExternalPaymentRef", void 0);
5339
+ __decorate([
5340
+ Field({ nullable: true }),
5341
+ __metadata("design:type", String)
5342
+ ], UpdatemjBizAppsOrdersExternalPaymentInput.prototype, "ExternalCustomerRef", void 0);
5109
5343
  __decorate([
5110
5344
  Field(() => Float, { nullable: true }),
5111
5345
  __metadata("design:type", Number)
5112
- ], UpdatemjBizAppsOrdersOrderChargeAllocationInput.prototype, "Amount", void 0);
5346
+ ], UpdatemjBizAppsOrdersExternalPaymentInput.prototype, "Amount", void 0);
5347
+ __decorate([
5348
+ Field(() => Float, { nullable: true }),
5349
+ __metadata("design:type", Number)
5350
+ ], UpdatemjBizAppsOrdersExternalPaymentInput.prototype, "UnappliedAmount", void 0);
5351
+ __decorate([
5352
+ Field({ nullable: true }),
5353
+ __metadata("design:type", Date)
5354
+ ], UpdatemjBizAppsOrdersExternalPaymentInput.prototype, "PaymentDate", void 0);
5355
+ __decorate([
5356
+ Field({ nullable: true }),
5357
+ __metadata("design:type", String)
5358
+ ], UpdatemjBizAppsOrdersExternalPaymentInput.prototype, "ExternalStatus", void 0);
5359
+ __decorate([
5360
+ Field({ nullable: true }),
5361
+ __metadata("design:type", Date)
5362
+ ], UpdatemjBizAppsOrdersExternalPaymentInput.prototype, "ExternalUpdatedAt", void 0);
5363
+ __decorate([
5364
+ Field({ nullable: true }),
5365
+ __metadata("design:type", String)
5366
+ ], UpdatemjBizAppsOrdersExternalPaymentInput.prototype, "Disposition", void 0);
5367
+ __decorate([
5368
+ Field({ nullable: true }),
5369
+ __metadata("design:type", String)
5370
+ ], UpdatemjBizAppsOrdersExternalPaymentInput.prototype, "DispositionReason", void 0);
5371
+ __decorate([
5372
+ Field({ nullable: true }),
5373
+ __metadata("design:type", String)
5374
+ ], UpdatemjBizAppsOrdersExternalPaymentInput.prototype, "PaymentHeaderID", void 0);
5375
+ __decorate([
5376
+ Field({ nullable: true }),
5377
+ __metadata("design:type", String)
5378
+ ], UpdatemjBizAppsOrdersExternalPaymentInput.prototype, "Payload", void 0);
5379
+ __decorate([
5380
+ Field({ nullable: true }),
5381
+ __metadata("design:type", Date)
5382
+ ], UpdatemjBizAppsOrdersExternalPaymentInput.prototype, "FirstSeenAt", void 0);
5383
+ __decorate([
5384
+ Field({ nullable: true }),
5385
+ __metadata("design:type", Date)
5386
+ ], UpdatemjBizAppsOrdersExternalPaymentInput.prototype, "LastSeenAt", void 0);
5113
5387
  __decorate([
5114
5388
  Field(() => [KeyValuePairInput], { nullable: true }),
5115
5389
  __metadata("design:type", Array)
5116
- ], UpdatemjBizAppsOrdersOrderChargeAllocationInput.prototype, "OldValues___", void 0);
5390
+ ], UpdatemjBizAppsOrdersExternalPaymentInput.prototype, "OldValues___", void 0);
5117
5391
  __decorate([
5118
5392
  Field(() => RestoreContextInput, { nullable: true }),
5119
5393
  __metadata("design:type", RestoreContextInput)
5120
- ], UpdatemjBizAppsOrdersOrderChargeAllocationInput.prototype, "RestoreContext___", void 0);
5121
- UpdatemjBizAppsOrdersOrderChargeAllocationInput = __decorate([
5394
+ ], UpdatemjBizAppsOrdersExternalPaymentInput.prototype, "RestoreContext___", void 0);
5395
+ UpdatemjBizAppsOrdersExternalPaymentInput = __decorate([
5122
5396
  InputType()
5123
- ], UpdatemjBizAppsOrdersOrderChargeAllocationInput);
5124
- export { UpdatemjBizAppsOrdersOrderChargeAllocationInput };
5397
+ ], UpdatemjBizAppsOrdersExternalPaymentInput);
5398
+ export { UpdatemjBizAppsOrdersExternalPaymentInput };
5125
5399
  //****************************************************************************
5126
- // RESOLVER for MJ_BizApps_Orders: Order Charge Allocations
5400
+ // RESOLVER for MJ_BizApps_Orders: External Payments
5127
5401
  //****************************************************************************
5128
- let RunmjBizAppsOrdersOrderChargeAllocationViewResult = class RunmjBizAppsOrdersOrderChargeAllocationViewResult {
5402
+ let RunmjBizAppsOrdersExternalPaymentViewResult = class RunmjBizAppsOrdersExternalPaymentViewResult {
5129
5403
  };
5130
5404
  __decorate([
5131
- Field(() => [mjBizAppsOrdersOrderChargeAllocation_]),
5405
+ Field(() => [mjBizAppsOrdersExternalPayment_]),
5132
5406
  __metadata("design:type", Array)
5133
- ], RunmjBizAppsOrdersOrderChargeAllocationViewResult.prototype, "Results", void 0);
5407
+ ], RunmjBizAppsOrdersExternalPaymentViewResult.prototype, "Results", void 0);
5134
5408
  __decorate([
5135
5409
  Field(() => String, { nullable: true }),
5136
5410
  __metadata("design:type", String)
5137
- ], RunmjBizAppsOrdersOrderChargeAllocationViewResult.prototype, "UserViewRunID", void 0);
5411
+ ], RunmjBizAppsOrdersExternalPaymentViewResult.prototype, "UserViewRunID", void 0);
5138
5412
  __decorate([
5139
5413
  Field(() => Int, { nullable: true }),
5140
5414
  __metadata("design:type", Number)
5141
- ], RunmjBizAppsOrdersOrderChargeAllocationViewResult.prototype, "RowCount", void 0);
5415
+ ], RunmjBizAppsOrdersExternalPaymentViewResult.prototype, "RowCount", void 0);
5142
5416
  __decorate([
5143
5417
  Field(() => Int, { nullable: true }),
5144
5418
  __metadata("design:type", Number)
5145
- ], RunmjBizAppsOrdersOrderChargeAllocationViewResult.prototype, "TotalRowCount", void 0);
5419
+ ], RunmjBizAppsOrdersExternalPaymentViewResult.prototype, "TotalRowCount", void 0);
5146
5420
  __decorate([
5147
5421
  Field(() => Int, { nullable: true }),
5148
5422
  __metadata("design:type", Number)
5149
- ], RunmjBizAppsOrdersOrderChargeAllocationViewResult.prototype, "ExecutionTime", void 0);
5423
+ ], RunmjBizAppsOrdersExternalPaymentViewResult.prototype, "ExecutionTime", void 0);
5150
5424
  __decorate([
5151
5425
  Field({ nullable: true }),
5152
5426
  __metadata("design:type", String)
5153
- ], RunmjBizAppsOrdersOrderChargeAllocationViewResult.prototype, "ErrorMessage", void 0);
5427
+ ], RunmjBizAppsOrdersExternalPaymentViewResult.prototype, "ErrorMessage", void 0);
5154
5428
  __decorate([
5155
5429
  Field(() => Boolean, { nullable: false }),
5156
5430
  __metadata("design:type", Boolean)
5157
- ], RunmjBizAppsOrdersOrderChargeAllocationViewResult.prototype, "Success", void 0);
5158
- RunmjBizAppsOrdersOrderChargeAllocationViewResult = __decorate([
5431
+ ], RunmjBizAppsOrdersExternalPaymentViewResult.prototype, "Success", void 0);
5432
+ RunmjBizAppsOrdersExternalPaymentViewResult = __decorate([
5159
5433
  ObjectType()
5160
- ], RunmjBizAppsOrdersOrderChargeAllocationViewResult);
5161
- export { RunmjBizAppsOrdersOrderChargeAllocationViewResult };
5162
- let mjBizAppsOrdersOrderChargeAllocationResolver = class mjBizAppsOrdersOrderChargeAllocationResolver extends ResolverBase {
5163
- async RunmjBizAppsOrdersOrderChargeAllocationViewByID(input, { providers, userPayload }, pubSub) {
5434
+ ], RunmjBizAppsOrdersExternalPaymentViewResult);
5435
+ export { RunmjBizAppsOrdersExternalPaymentViewResult };
5436
+ let mjBizAppsOrdersExternalPaymentResolver = class mjBizAppsOrdersExternalPaymentResolver extends ResolverBase {
5437
+ async RunmjBizAppsOrdersExternalPaymentViewByID(input, { providers, userPayload }, pubSub) {
5164
5438
  const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
5165
5439
  return super.RunViewByIDGeneric(input, provider, userPayload, pubSub);
5166
5440
  }
5167
- async RunmjBizAppsOrdersOrderChargeAllocationViewByName(input, { providers, userPayload }, pubSub) {
5441
+ async RunmjBizAppsOrdersExternalPaymentViewByName(input, { providers, userPayload }, pubSub) {
5168
5442
  const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
5169
5443
  return super.RunViewByNameGeneric(input, provider, userPayload, pubSub);
5170
5444
  }
5171
- async RunmjBizAppsOrdersOrderChargeAllocationDynamicView(input, { providers, userPayload }, pubSub) {
5445
+ async RunmjBizAppsOrdersExternalPaymentDynamicView(input, { providers, userPayload }, pubSub) {
5172
5446
  const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
5173
- input.EntityName = 'MJ_BizApps_Orders: Order Charge Allocations';
5447
+ input.EntityName = 'MJ_BizApps_Orders: External Payments';
5174
5448
  return super.RunDynamicViewGeneric(input, provider, userPayload, pubSub);
5175
5449
  }
5176
- async mjBizAppsOrdersOrderChargeAllocation(ID, { userPayload, providers }, pubSub) {
5177
- this.CheckUserReadPermissions('MJ_BizApps_Orders: Order Charge Allocations', userPayload);
5450
+ async mjBizAppsOrdersExternalPayment(ID, { userPayload, providers }, pubSub) {
5451
+ this.CheckUserReadPermissions('MJ_BizApps_Orders: External Payments', userPayload);
5178
5452
  const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
5179
- const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView('__mj_BizAppsOrders', 'vwOrderChargeAllocations')} WHERE ${provider.QuoteIdentifier('ID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ_BizApps_Orders: Order Charge Allocations', userPayload, EntityPermissionType.Read, 'AND');
5453
+ const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView('__mj_BizAppsOrders', 'vwExternalPayments')} WHERE ${provider.QuoteIdentifier('ID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ_BizApps_Orders: External Payments', userPayload, EntityPermissionType.Read, 'AND');
5180
5454
  const rows = await provider.ExecuteSQL(sSQL, [ID], undefined, this.GetUserFromPayload(userPayload));
5181
- const result = await this.MapFieldNamesToCodeNames('MJ_BizApps_Orders: Order Charge Allocations', rows && rows.length > 0 ? rows[0] : null, this.GetUserFromPayload(userPayload));
5455
+ const result = await this.MapFieldNamesToCodeNames('MJ_BizApps_Orders: External Payments', rows && rows.length > 0 ? rows[0] : null, this.GetUserFromPayload(userPayload));
5182
5456
  return result;
5183
5457
  }
5184
- async CreatemjBizAppsOrdersOrderChargeAllocation(input, { providers, userPayload }, pubSub) {
5458
+ async CreatemjBizAppsOrdersExternalPayment(input, { providers, userPayload }, pubSub) {
5459
+ const provider = GetReadWriteProvider(providers);
5460
+ return this.CreateRecord('MJ_BizApps_Orders: External Payments', input, provider, userPayload, pubSub);
5461
+ }
5462
+ async UpdatemjBizAppsOrdersExternalPayment(input, { providers, userPayload }, pubSub) {
5463
+ const provider = GetReadWriteProvider(providers);
5464
+ return this.UpdateRecord('MJ_BizApps_Orders: External Payments', input, provider, userPayload, pubSub);
5465
+ }
5466
+ async DeletemjBizAppsOrdersExternalPayment(ID, options, { providers, userPayload }, pubSub) {
5467
+ const provider = GetReadWriteProvider(providers);
5468
+ const key = new CompositeKey([{ FieldName: 'ID', Value: ID }]);
5469
+ return this.DeleteRecord('MJ_BizApps_Orders: External Payments', key, options, provider, userPayload, pubSub);
5470
+ }
5471
+ };
5472
+ __decorate([
5473
+ Query(() => RunmjBizAppsOrdersExternalPaymentViewResult),
5474
+ __param(0, Arg('input', () => RunViewByIDInput)),
5475
+ __param(1, Ctx()),
5476
+ __param(2, PubSub()),
5477
+ __metadata("design:type", Function),
5478
+ __metadata("design:paramtypes", [RunViewByIDInput, Object, PubSubEngine]),
5479
+ __metadata("design:returntype", Promise)
5480
+ ], mjBizAppsOrdersExternalPaymentResolver.prototype, "RunmjBizAppsOrdersExternalPaymentViewByID", null);
5481
+ __decorate([
5482
+ Query(() => RunmjBizAppsOrdersExternalPaymentViewResult),
5483
+ __param(0, Arg('input', () => RunViewByNameInput)),
5484
+ __param(1, Ctx()),
5485
+ __param(2, PubSub()),
5486
+ __metadata("design:type", Function),
5487
+ __metadata("design:paramtypes", [RunViewByNameInput, Object, PubSubEngine]),
5488
+ __metadata("design:returntype", Promise)
5489
+ ], mjBizAppsOrdersExternalPaymentResolver.prototype, "RunmjBizAppsOrdersExternalPaymentViewByName", null);
5490
+ __decorate([
5491
+ Query(() => RunmjBizAppsOrdersExternalPaymentViewResult),
5492
+ __param(0, Arg('input', () => RunDynamicViewInput)),
5493
+ __param(1, Ctx()),
5494
+ __param(2, PubSub()),
5495
+ __metadata("design:type", Function),
5496
+ __metadata("design:paramtypes", [RunDynamicViewInput, Object, PubSubEngine]),
5497
+ __metadata("design:returntype", Promise)
5498
+ ], mjBizAppsOrdersExternalPaymentResolver.prototype, "RunmjBizAppsOrdersExternalPaymentDynamicView", null);
5499
+ __decorate([
5500
+ Query(() => mjBizAppsOrdersExternalPayment_, { nullable: true }),
5501
+ __param(0, Arg('ID', () => String)),
5502
+ __param(1, Ctx()),
5503
+ __param(2, PubSub()),
5504
+ __metadata("design:type", Function),
5505
+ __metadata("design:paramtypes", [String, Object, PubSubEngine]),
5506
+ __metadata("design:returntype", Promise)
5507
+ ], mjBizAppsOrdersExternalPaymentResolver.prototype, "mjBizAppsOrdersExternalPayment", null);
5508
+ __decorate([
5509
+ Mutation(() => mjBizAppsOrdersExternalPayment_),
5510
+ __param(0, Arg('input', () => CreatemjBizAppsOrdersExternalPaymentInput)),
5511
+ __param(1, Ctx()),
5512
+ __param(2, PubSub()),
5513
+ __metadata("design:type", Function),
5514
+ __metadata("design:paramtypes", [CreatemjBizAppsOrdersExternalPaymentInput, Object, PubSubEngine]),
5515
+ __metadata("design:returntype", Promise)
5516
+ ], mjBizAppsOrdersExternalPaymentResolver.prototype, "CreatemjBizAppsOrdersExternalPayment", null);
5517
+ __decorate([
5518
+ Mutation(() => mjBizAppsOrdersExternalPayment_),
5519
+ __param(0, Arg('input', () => UpdatemjBizAppsOrdersExternalPaymentInput)),
5520
+ __param(1, Ctx()),
5521
+ __param(2, PubSub()),
5522
+ __metadata("design:type", Function),
5523
+ __metadata("design:paramtypes", [UpdatemjBizAppsOrdersExternalPaymentInput, Object, PubSubEngine]),
5524
+ __metadata("design:returntype", Promise)
5525
+ ], mjBizAppsOrdersExternalPaymentResolver.prototype, "UpdatemjBizAppsOrdersExternalPayment", null);
5526
+ __decorate([
5527
+ Mutation(() => mjBizAppsOrdersExternalPayment_),
5528
+ __param(0, Arg('ID', () => String)),
5529
+ __param(1, Arg('options___', () => DeleteOptionsInput)),
5530
+ __param(2, Ctx()),
5531
+ __param(3, PubSub()),
5532
+ __metadata("design:type", Function),
5533
+ __metadata("design:paramtypes", [String, DeleteOptionsInput, Object, PubSubEngine]),
5534
+ __metadata("design:returntype", Promise)
5535
+ ], mjBizAppsOrdersExternalPaymentResolver.prototype, "DeletemjBizAppsOrdersExternalPayment", null);
5536
+ mjBizAppsOrdersExternalPaymentResolver = __decorate([
5537
+ Resolver(mjBizAppsOrdersExternalPayment_)
5538
+ ], mjBizAppsOrdersExternalPaymentResolver);
5539
+ export { mjBizAppsOrdersExternalPaymentResolver };
5540
+ //****************************************************************************
5541
+ // ENTITY CLASS for MJ_BizApps_Orders: Order Adjustment Allocations
5542
+ //****************************************************************************
5543
+ let mjBizAppsOrdersOrderAdjustmentAllocation_ = class mjBizAppsOrdersOrderAdjustmentAllocation_ {
5544
+ };
5545
+ __decorate([
5546
+ Field(),
5547
+ MaxLength(36),
5548
+ __metadata("design:type", String)
5549
+ ], mjBizAppsOrdersOrderAdjustmentAllocation_.prototype, "ID", void 0);
5550
+ __decorate([
5551
+ Field({ nullable: true }),
5552
+ MaxLength(36),
5553
+ __metadata("design:type", String)
5554
+ ], mjBizAppsOrdersOrderAdjustmentAllocation_.prototype, "OrderAdjustmentID", void 0);
5555
+ __decorate([
5556
+ Field({ nullable: true }),
5557
+ MaxLength(36),
5558
+ __metadata("design:type", String)
5559
+ ], mjBizAppsOrdersOrderAdjustmentAllocation_.prototype, "OrderLineID", void 0);
5560
+ __decorate([
5561
+ Field(() => Float, { nullable: true }),
5562
+ __metadata("design:type", Number)
5563
+ ], mjBizAppsOrdersOrderAdjustmentAllocation_.prototype, "Amount", void 0);
5564
+ __decorate([
5565
+ Field(),
5566
+ __metadata("design:type", Date)
5567
+ ], mjBizAppsOrdersOrderAdjustmentAllocation_.prototype, "_mj__CreatedAt", void 0);
5568
+ __decorate([
5569
+ Field(),
5570
+ __metadata("design:type", Date)
5571
+ ], mjBizAppsOrdersOrderAdjustmentAllocation_.prototype, "_mj__UpdatedAt", void 0);
5572
+ __decorate([
5573
+ Field(() => [String], { nullable: true, description: `Field-level security: when non-null, the fields on this entity the calling user may read. Any other field arriving as null was withheld by the server rather than genuinely empty. Null for callers with no field restrictions.` }),
5574
+ __metadata("design:type", Array)
5575
+ ], mjBizAppsOrdersOrderAdjustmentAllocation_.prototype, "ReadableFields___", void 0);
5576
+ mjBizAppsOrdersOrderAdjustmentAllocation_ = __decorate([
5577
+ ObjectType({ description: `Which lines an adjustment reduces, and by how much. Mandatory rather than optional: tax and GL are per line, and on a multi-company order this split decides WHOSE revenue is reduced. A line-level adjustment gets one row; an order-level one gets several, pro-rata by line value with the largest line absorbing the rounding remainder.` })
5578
+ ], mjBizAppsOrdersOrderAdjustmentAllocation_);
5579
+ export { mjBizAppsOrdersOrderAdjustmentAllocation_ };
5580
+ //****************************************************************************
5581
+ // INPUT TYPE for MJ_BizApps_Orders: Order Adjustment Allocations
5582
+ //****************************************************************************
5583
+ let CreatemjBizAppsOrdersOrderAdjustmentAllocationInput = class CreatemjBizAppsOrdersOrderAdjustmentAllocationInput {
5584
+ };
5585
+ __decorate([
5586
+ Field({ nullable: true }),
5587
+ __metadata("design:type", String)
5588
+ ], CreatemjBizAppsOrdersOrderAdjustmentAllocationInput.prototype, "ID", void 0);
5589
+ __decorate([
5590
+ Field({ nullable: true }),
5591
+ __metadata("design:type", String)
5592
+ ], CreatemjBizAppsOrdersOrderAdjustmentAllocationInput.prototype, "OrderAdjustmentID", void 0);
5593
+ __decorate([
5594
+ Field({ nullable: true }),
5595
+ __metadata("design:type", String)
5596
+ ], CreatemjBizAppsOrdersOrderAdjustmentAllocationInput.prototype, "OrderLineID", void 0);
5597
+ __decorate([
5598
+ Field(() => Float, { nullable: true }),
5599
+ __metadata("design:type", Number)
5600
+ ], CreatemjBizAppsOrdersOrderAdjustmentAllocationInput.prototype, "Amount", void 0);
5601
+ __decorate([
5602
+ Field(() => RestoreContextInput, { nullable: true }),
5603
+ __metadata("design:type", RestoreContextInput)
5604
+ ], CreatemjBizAppsOrdersOrderAdjustmentAllocationInput.prototype, "RestoreContext___", void 0);
5605
+ CreatemjBizAppsOrdersOrderAdjustmentAllocationInput = __decorate([
5606
+ InputType()
5607
+ ], CreatemjBizAppsOrdersOrderAdjustmentAllocationInput);
5608
+ export { CreatemjBizAppsOrdersOrderAdjustmentAllocationInput };
5609
+ //****************************************************************************
5610
+ // INPUT TYPE for MJ_BizApps_Orders: Order Adjustment Allocations
5611
+ //****************************************************************************
5612
+ let UpdatemjBizAppsOrdersOrderAdjustmentAllocationInput = class UpdatemjBizAppsOrdersOrderAdjustmentAllocationInput {
5613
+ };
5614
+ __decorate([
5615
+ Field(),
5616
+ __metadata("design:type", String)
5617
+ ], UpdatemjBizAppsOrdersOrderAdjustmentAllocationInput.prototype, "ID", void 0);
5618
+ __decorate([
5619
+ Field({ nullable: true }),
5620
+ __metadata("design:type", String)
5621
+ ], UpdatemjBizAppsOrdersOrderAdjustmentAllocationInput.prototype, "OrderAdjustmentID", void 0);
5622
+ __decorate([
5623
+ Field({ nullable: true }),
5624
+ __metadata("design:type", String)
5625
+ ], UpdatemjBizAppsOrdersOrderAdjustmentAllocationInput.prototype, "OrderLineID", void 0);
5626
+ __decorate([
5627
+ Field(() => Float, { nullable: true }),
5628
+ __metadata("design:type", Number)
5629
+ ], UpdatemjBizAppsOrdersOrderAdjustmentAllocationInput.prototype, "Amount", void 0);
5630
+ __decorate([
5631
+ Field(() => [KeyValuePairInput], { nullable: true }),
5632
+ __metadata("design:type", Array)
5633
+ ], UpdatemjBizAppsOrdersOrderAdjustmentAllocationInput.prototype, "OldValues___", void 0);
5634
+ __decorate([
5635
+ Field(() => RestoreContextInput, { nullable: true }),
5636
+ __metadata("design:type", RestoreContextInput)
5637
+ ], UpdatemjBizAppsOrdersOrderAdjustmentAllocationInput.prototype, "RestoreContext___", void 0);
5638
+ UpdatemjBizAppsOrdersOrderAdjustmentAllocationInput = __decorate([
5639
+ InputType()
5640
+ ], UpdatemjBizAppsOrdersOrderAdjustmentAllocationInput);
5641
+ export { UpdatemjBizAppsOrdersOrderAdjustmentAllocationInput };
5642
+ //****************************************************************************
5643
+ // RESOLVER for MJ_BizApps_Orders: Order Adjustment Allocations
5644
+ //****************************************************************************
5645
+ let RunmjBizAppsOrdersOrderAdjustmentAllocationViewResult = class RunmjBizAppsOrdersOrderAdjustmentAllocationViewResult {
5646
+ };
5647
+ __decorate([
5648
+ Field(() => [mjBizAppsOrdersOrderAdjustmentAllocation_]),
5649
+ __metadata("design:type", Array)
5650
+ ], RunmjBizAppsOrdersOrderAdjustmentAllocationViewResult.prototype, "Results", void 0);
5651
+ __decorate([
5652
+ Field(() => String, { nullable: true }),
5653
+ __metadata("design:type", String)
5654
+ ], RunmjBizAppsOrdersOrderAdjustmentAllocationViewResult.prototype, "UserViewRunID", void 0);
5655
+ __decorate([
5656
+ Field(() => Int, { nullable: true }),
5657
+ __metadata("design:type", Number)
5658
+ ], RunmjBizAppsOrdersOrderAdjustmentAllocationViewResult.prototype, "RowCount", void 0);
5659
+ __decorate([
5660
+ Field(() => Int, { nullable: true }),
5661
+ __metadata("design:type", Number)
5662
+ ], RunmjBizAppsOrdersOrderAdjustmentAllocationViewResult.prototype, "TotalRowCount", void 0);
5663
+ __decorate([
5664
+ Field(() => Int, { nullable: true }),
5665
+ __metadata("design:type", Number)
5666
+ ], RunmjBizAppsOrdersOrderAdjustmentAllocationViewResult.prototype, "ExecutionTime", void 0);
5667
+ __decorate([
5668
+ Field({ nullable: true }),
5669
+ __metadata("design:type", String)
5670
+ ], RunmjBizAppsOrdersOrderAdjustmentAllocationViewResult.prototype, "ErrorMessage", void 0);
5671
+ __decorate([
5672
+ Field(() => Boolean, { nullable: false }),
5673
+ __metadata("design:type", Boolean)
5674
+ ], RunmjBizAppsOrdersOrderAdjustmentAllocationViewResult.prototype, "Success", void 0);
5675
+ RunmjBizAppsOrdersOrderAdjustmentAllocationViewResult = __decorate([
5676
+ ObjectType()
5677
+ ], RunmjBizAppsOrdersOrderAdjustmentAllocationViewResult);
5678
+ export { RunmjBizAppsOrdersOrderAdjustmentAllocationViewResult };
5679
+ let mjBizAppsOrdersOrderAdjustmentAllocationResolver = class mjBizAppsOrdersOrderAdjustmentAllocationResolver extends ResolverBase {
5680
+ async RunmjBizAppsOrdersOrderAdjustmentAllocationViewByID(input, { providers, userPayload }, pubSub) {
5681
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
5682
+ return super.RunViewByIDGeneric(input, provider, userPayload, pubSub);
5683
+ }
5684
+ async RunmjBizAppsOrdersOrderAdjustmentAllocationViewByName(input, { providers, userPayload }, pubSub) {
5685
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
5686
+ return super.RunViewByNameGeneric(input, provider, userPayload, pubSub);
5687
+ }
5688
+ async RunmjBizAppsOrdersOrderAdjustmentAllocationDynamicView(input, { providers, userPayload }, pubSub) {
5689
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
5690
+ input.EntityName = 'MJ_BizApps_Orders: Order Adjustment Allocations';
5691
+ return super.RunDynamicViewGeneric(input, provider, userPayload, pubSub);
5692
+ }
5693
+ async mjBizAppsOrdersOrderAdjustmentAllocation(ID, { userPayload, providers }, pubSub) {
5694
+ this.CheckUserReadPermissions('MJ_BizApps_Orders: Order Adjustment Allocations', userPayload);
5695
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
5696
+ const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView('__mj_BizAppsOrders', 'vwOrderAdjustmentAllocations')} WHERE ${provider.QuoteIdentifier('ID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ_BizApps_Orders: Order Adjustment Allocations', userPayload, EntityPermissionType.Read, 'AND');
5697
+ const rows = await provider.ExecuteSQL(sSQL, [ID], undefined, this.GetUserFromPayload(userPayload));
5698
+ const result = await this.MapFieldNamesToCodeNames('MJ_BizApps_Orders: Order Adjustment Allocations', rows && rows.length > 0 ? rows[0] : null, this.GetUserFromPayload(userPayload));
5699
+ return result;
5700
+ }
5701
+ async CreatemjBizAppsOrdersOrderAdjustmentAllocation(input, { providers, userPayload }, pubSub) {
5702
+ const provider = GetReadWriteProvider(providers);
5703
+ return this.CreateRecord('MJ_BizApps_Orders: Order Adjustment Allocations', input, provider, userPayload, pubSub);
5704
+ }
5705
+ async UpdatemjBizAppsOrdersOrderAdjustmentAllocation(input, { providers, userPayload }, pubSub) {
5706
+ const provider = GetReadWriteProvider(providers);
5707
+ return this.UpdateRecord('MJ_BizApps_Orders: Order Adjustment Allocations', input, provider, userPayload, pubSub);
5708
+ }
5709
+ async DeletemjBizAppsOrdersOrderAdjustmentAllocation(ID, options, { providers, userPayload }, pubSub) {
5710
+ const provider = GetReadWriteProvider(providers);
5711
+ const key = new CompositeKey([{ FieldName: 'ID', Value: ID }]);
5712
+ return this.DeleteRecord('MJ_BizApps_Orders: Order Adjustment Allocations', key, options, provider, userPayload, pubSub);
5713
+ }
5714
+ };
5715
+ __decorate([
5716
+ Query(() => RunmjBizAppsOrdersOrderAdjustmentAllocationViewResult),
5717
+ __param(0, Arg('input', () => RunViewByIDInput)),
5718
+ __param(1, Ctx()),
5719
+ __param(2, PubSub()),
5720
+ __metadata("design:type", Function),
5721
+ __metadata("design:paramtypes", [RunViewByIDInput, Object, PubSubEngine]),
5722
+ __metadata("design:returntype", Promise)
5723
+ ], mjBizAppsOrdersOrderAdjustmentAllocationResolver.prototype, "RunmjBizAppsOrdersOrderAdjustmentAllocationViewByID", null);
5724
+ __decorate([
5725
+ Query(() => RunmjBizAppsOrdersOrderAdjustmentAllocationViewResult),
5726
+ __param(0, Arg('input', () => RunViewByNameInput)),
5727
+ __param(1, Ctx()),
5728
+ __param(2, PubSub()),
5729
+ __metadata("design:type", Function),
5730
+ __metadata("design:paramtypes", [RunViewByNameInput, Object, PubSubEngine]),
5731
+ __metadata("design:returntype", Promise)
5732
+ ], mjBizAppsOrdersOrderAdjustmentAllocationResolver.prototype, "RunmjBizAppsOrdersOrderAdjustmentAllocationViewByName", null);
5733
+ __decorate([
5734
+ Query(() => RunmjBizAppsOrdersOrderAdjustmentAllocationViewResult),
5735
+ __param(0, Arg('input', () => RunDynamicViewInput)),
5736
+ __param(1, Ctx()),
5737
+ __param(2, PubSub()),
5738
+ __metadata("design:type", Function),
5739
+ __metadata("design:paramtypes", [RunDynamicViewInput, Object, PubSubEngine]),
5740
+ __metadata("design:returntype", Promise)
5741
+ ], mjBizAppsOrdersOrderAdjustmentAllocationResolver.prototype, "RunmjBizAppsOrdersOrderAdjustmentAllocationDynamicView", null);
5742
+ __decorate([
5743
+ Query(() => mjBizAppsOrdersOrderAdjustmentAllocation_, { nullable: true }),
5744
+ __param(0, Arg('ID', () => String)),
5745
+ __param(1, Ctx()),
5746
+ __param(2, PubSub()),
5747
+ __metadata("design:type", Function),
5748
+ __metadata("design:paramtypes", [String, Object, PubSubEngine]),
5749
+ __metadata("design:returntype", Promise)
5750
+ ], mjBizAppsOrdersOrderAdjustmentAllocationResolver.prototype, "mjBizAppsOrdersOrderAdjustmentAllocation", null);
5751
+ __decorate([
5752
+ Mutation(() => mjBizAppsOrdersOrderAdjustmentAllocation_),
5753
+ __param(0, Arg('input', () => CreatemjBizAppsOrdersOrderAdjustmentAllocationInput)),
5754
+ __param(1, Ctx()),
5755
+ __param(2, PubSub()),
5756
+ __metadata("design:type", Function),
5757
+ __metadata("design:paramtypes", [CreatemjBizAppsOrdersOrderAdjustmentAllocationInput, Object, PubSubEngine]),
5758
+ __metadata("design:returntype", Promise)
5759
+ ], mjBizAppsOrdersOrderAdjustmentAllocationResolver.prototype, "CreatemjBizAppsOrdersOrderAdjustmentAllocation", null);
5760
+ __decorate([
5761
+ Mutation(() => mjBizAppsOrdersOrderAdjustmentAllocation_),
5762
+ __param(0, Arg('input', () => UpdatemjBizAppsOrdersOrderAdjustmentAllocationInput)),
5763
+ __param(1, Ctx()),
5764
+ __param(2, PubSub()),
5765
+ __metadata("design:type", Function),
5766
+ __metadata("design:paramtypes", [UpdatemjBizAppsOrdersOrderAdjustmentAllocationInput, Object, PubSubEngine]),
5767
+ __metadata("design:returntype", Promise)
5768
+ ], mjBizAppsOrdersOrderAdjustmentAllocationResolver.prototype, "UpdatemjBizAppsOrdersOrderAdjustmentAllocation", null);
5769
+ __decorate([
5770
+ Mutation(() => mjBizAppsOrdersOrderAdjustmentAllocation_),
5771
+ __param(0, Arg('ID', () => String)),
5772
+ __param(1, Arg('options___', () => DeleteOptionsInput)),
5773
+ __param(2, Ctx()),
5774
+ __param(3, PubSub()),
5775
+ __metadata("design:type", Function),
5776
+ __metadata("design:paramtypes", [String, DeleteOptionsInput, Object, PubSubEngine]),
5777
+ __metadata("design:returntype", Promise)
5778
+ ], mjBizAppsOrdersOrderAdjustmentAllocationResolver.prototype, "DeletemjBizAppsOrdersOrderAdjustmentAllocation", null);
5779
+ mjBizAppsOrdersOrderAdjustmentAllocationResolver = __decorate([
5780
+ Resolver(mjBizAppsOrdersOrderAdjustmentAllocation_)
5781
+ ], mjBizAppsOrdersOrderAdjustmentAllocationResolver);
5782
+ export { mjBizAppsOrdersOrderAdjustmentAllocationResolver };
5783
+ //****************************************************************************
5784
+ // ENTITY CLASS for MJ_BizApps_Orders: Order Adjustments
5785
+ //****************************************************************************
5786
+ let mjBizAppsOrdersOrderAdjustment_ = class mjBizAppsOrdersOrderAdjustment_ {
5787
+ };
5788
+ __decorate([
5789
+ Field(),
5790
+ MaxLength(36),
5791
+ __metadata("design:type", String)
5792
+ ], mjBizAppsOrdersOrderAdjustment_.prototype, "ID", void 0);
5793
+ __decorate([
5794
+ Field({ nullable: true }),
5795
+ MaxLength(36),
5796
+ __metadata("design:type", String)
5797
+ ], mjBizAppsOrdersOrderAdjustment_.prototype, "OrderHeaderID", void 0);
5798
+ __decorate([
5799
+ Field({ nullable: true, description: `The line reduced. NULL means order-level, in which case OrderAdjustmentAllocation distributes it across lines.` }),
5800
+ MaxLength(36),
5801
+ __metadata("design:type", String)
5802
+ ], mjBizAppsOrdersOrderAdjustment_.prototype, "OrderLineID", void 0);
5803
+ __decorate([
5804
+ Field({ nullable: true, description: `The promotion redeemed. NULL means a manual discount, which then requires a Reason and a SalesAuthority.` }),
5805
+ MaxLength(36),
5806
+ __metadata("design:type", String)
5807
+ ], mjBizAppsOrdersOrderAdjustment_.prototype, "PromotionID", void 0);
5808
+ __decorate([
5809
+ Field({ nullable: true }),
5810
+ MaxLength(36),
5811
+ __metadata("design:type", String)
5812
+ ], mjBizAppsOrdersOrderAdjustment_.prototype, "PromotionCodeID", void 0);
5813
+ __decorate([
5814
+ Field(() => Float, { nullable: true, description: `Always POSITIVE - it is a reduction, and the direction is carried by what the pipeline does with it rather than by the stored sign.` }),
5815
+ __metadata("design:type", Number)
5816
+ ], mjBizAppsOrdersOrderAdjustment_.prototype, "Amount", void 0);
5817
+ __decorate([
5818
+ Field(() => Int, { nullable: true }),
5819
+ __metadata("design:type", Number)
5820
+ ], mjBizAppsOrdersOrderAdjustment_.prototype, "Sequence", void 0);
5821
+ __decorate([
5822
+ Field({ nullable: true, description: `Why this discount was given. Required when no promotion is named.` }),
5823
+ __metadata("design:type", String)
5824
+ ], mjBizAppsOrdersOrderAdjustment_.prototype, "Reason", void 0);
5825
+ __decorate([
5826
+ Field({ nullable: true }),
5827
+ MaxLength(36),
5828
+ __metadata("design:type", String)
5829
+ ], mjBizAppsOrdersOrderAdjustment_.prototype, "AppliedByUserID", void 0);
5830
+ __decorate([
5831
+ Field({ nullable: true }),
5832
+ __metadata("design:type", Date)
5833
+ ], mjBizAppsOrdersOrderAdjustment_.prototype, "AppliedAt", void 0);
5834
+ __decorate([
5835
+ Field({ nullable: true, description: `Which SalesAuthority permitted a manual discount. Stamped so that lowering a rep's limit later does not retroactively make past discounts look unauthorized.` }),
5836
+ MaxLength(36),
5837
+ __metadata("design:type", String)
5838
+ ], mjBizAppsOrdersOrderAdjustment_.prototype, "AuthorizedBySalesAuthorityID", void 0);
5839
+ __decorate([
5840
+ Field({ nullable: true, description: `Who approved a discount exceeding the applying user's authority. Over-limit discounts ESCALATE rather than being refused - a hard refusal is what pushes people to record the discount as something else.` }),
5841
+ MaxLength(36),
5842
+ __metadata("design:type", String)
5843
+ ], mjBizAppsOrdersOrderAdjustment_.prototype, "ApprovedByUserID", void 0);
5844
+ __decorate([
5845
+ Field({ nullable: true }),
5846
+ __metadata("design:type", Date)
5847
+ ], mjBizAppsOrdersOrderAdjustment_.prototype, "ApprovedAt", void 0);
5848
+ __decorate([
5849
+ Field(),
5850
+ __metadata("design:type", Date)
5851
+ ], mjBizAppsOrdersOrderAdjustment_.prototype, "_mj__CreatedAt", void 0);
5852
+ __decorate([
5853
+ Field(),
5854
+ __metadata("design:type", Date)
5855
+ ], mjBizAppsOrdersOrderAdjustment_.prototype, "_mj__UpdatedAt", void 0);
5856
+ __decorate([
5857
+ Field({ nullable: true }),
5858
+ MaxLength(40),
5859
+ __metadata("design:type", String)
5860
+ ], mjBizAppsOrdersOrderAdjustment_.prototype, "OrderHeader", void 0);
5861
+ __decorate([
5862
+ Field({ nullable: true }),
5863
+ MaxLength(200),
5864
+ __metadata("design:type", String)
5865
+ ], mjBizAppsOrdersOrderAdjustment_.prototype, "Promotion", void 0);
5866
+ __decorate([
5867
+ Field({ nullable: true }),
5868
+ MaxLength(60),
5869
+ __metadata("design:type", String)
5870
+ ], mjBizAppsOrdersOrderAdjustment_.prototype, "PromotionCode", void 0);
5871
+ __decorate([
5872
+ Field(() => [String], { nullable: true, description: `Field-level security: when non-null, the fields on this entity the calling user may read. Any other field arriving as null was withheld by the server rather than genuinely empty. Null for callers with no field restrictions.` }),
5873
+ __metadata("design:type", Array)
5874
+ ], mjBizAppsOrdersOrderAdjustment_.prototype, "ReadableFields___", void 0);
5875
+ mjBizAppsOrdersOrderAdjustment_ = __decorate([
5876
+ 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.` })
5877
+ ], mjBizAppsOrdersOrderAdjustment_);
5878
+ export { mjBizAppsOrdersOrderAdjustment_ };
5879
+ //****************************************************************************
5880
+ // INPUT TYPE for MJ_BizApps_Orders: Order Adjustments
5881
+ //****************************************************************************
5882
+ let CreatemjBizAppsOrdersOrderAdjustmentInput = class CreatemjBizAppsOrdersOrderAdjustmentInput {
5883
+ };
5884
+ __decorate([
5885
+ Field({ nullable: true }),
5886
+ __metadata("design:type", String)
5887
+ ], CreatemjBizAppsOrdersOrderAdjustmentInput.prototype, "ID", void 0);
5888
+ __decorate([
5889
+ Field({ nullable: true }),
5890
+ __metadata("design:type", String)
5891
+ ], CreatemjBizAppsOrdersOrderAdjustmentInput.prototype, "OrderHeaderID", void 0);
5892
+ __decorate([
5893
+ Field({ nullable: true }),
5894
+ __metadata("design:type", String)
5895
+ ], CreatemjBizAppsOrdersOrderAdjustmentInput.prototype, "OrderLineID", void 0);
5896
+ __decorate([
5897
+ Field({ nullable: true }),
5898
+ __metadata("design:type", String)
5899
+ ], CreatemjBizAppsOrdersOrderAdjustmentInput.prototype, "PromotionID", void 0);
5900
+ __decorate([
5901
+ Field({ nullable: true }),
5902
+ __metadata("design:type", String)
5903
+ ], CreatemjBizAppsOrdersOrderAdjustmentInput.prototype, "PromotionCodeID", void 0);
5904
+ __decorate([
5905
+ Field(() => Float, { nullable: true }),
5906
+ __metadata("design:type", Number)
5907
+ ], CreatemjBizAppsOrdersOrderAdjustmentInput.prototype, "Amount", void 0);
5908
+ __decorate([
5909
+ Field(() => Int, { nullable: true }),
5910
+ __metadata("design:type", Number)
5911
+ ], CreatemjBizAppsOrdersOrderAdjustmentInput.prototype, "Sequence", void 0);
5912
+ __decorate([
5913
+ Field({ nullable: true }),
5914
+ __metadata("design:type", String)
5915
+ ], CreatemjBizAppsOrdersOrderAdjustmentInput.prototype, "Reason", void 0);
5916
+ __decorate([
5917
+ Field({ nullable: true }),
5918
+ __metadata("design:type", String)
5919
+ ], CreatemjBizAppsOrdersOrderAdjustmentInput.prototype, "AppliedByUserID", void 0);
5920
+ __decorate([
5921
+ Field({ nullable: true }),
5922
+ __metadata("design:type", Date)
5923
+ ], CreatemjBizAppsOrdersOrderAdjustmentInput.prototype, "AppliedAt", void 0);
5924
+ __decorate([
5925
+ Field({ nullable: true }),
5926
+ __metadata("design:type", String)
5927
+ ], CreatemjBizAppsOrdersOrderAdjustmentInput.prototype, "AuthorizedBySalesAuthorityID", void 0);
5928
+ __decorate([
5929
+ Field({ nullable: true }),
5930
+ __metadata("design:type", String)
5931
+ ], CreatemjBizAppsOrdersOrderAdjustmentInput.prototype, "ApprovedByUserID", void 0);
5932
+ __decorate([
5933
+ Field({ nullable: true }),
5934
+ __metadata("design:type", Date)
5935
+ ], CreatemjBizAppsOrdersOrderAdjustmentInput.prototype, "ApprovedAt", void 0);
5936
+ __decorate([
5937
+ Field(() => RestoreContextInput, { nullable: true }),
5938
+ __metadata("design:type", RestoreContextInput)
5939
+ ], CreatemjBizAppsOrdersOrderAdjustmentInput.prototype, "RestoreContext___", void 0);
5940
+ CreatemjBizAppsOrdersOrderAdjustmentInput = __decorate([
5941
+ InputType()
5942
+ ], CreatemjBizAppsOrdersOrderAdjustmentInput);
5943
+ export { CreatemjBizAppsOrdersOrderAdjustmentInput };
5944
+ //****************************************************************************
5945
+ // INPUT TYPE for MJ_BizApps_Orders: Order Adjustments
5946
+ //****************************************************************************
5947
+ let UpdatemjBizAppsOrdersOrderAdjustmentInput = class UpdatemjBizAppsOrdersOrderAdjustmentInput {
5948
+ };
5949
+ __decorate([
5950
+ Field(),
5951
+ __metadata("design:type", String)
5952
+ ], UpdatemjBizAppsOrdersOrderAdjustmentInput.prototype, "ID", void 0);
5953
+ __decorate([
5954
+ Field({ nullable: true }),
5955
+ __metadata("design:type", String)
5956
+ ], UpdatemjBizAppsOrdersOrderAdjustmentInput.prototype, "OrderHeaderID", void 0);
5957
+ __decorate([
5958
+ Field({ nullable: true }),
5959
+ __metadata("design:type", String)
5960
+ ], UpdatemjBizAppsOrdersOrderAdjustmentInput.prototype, "OrderLineID", void 0);
5961
+ __decorate([
5962
+ Field({ nullable: true }),
5963
+ __metadata("design:type", String)
5964
+ ], UpdatemjBizAppsOrdersOrderAdjustmentInput.prototype, "PromotionID", void 0);
5965
+ __decorate([
5966
+ Field({ nullable: true }),
5967
+ __metadata("design:type", String)
5968
+ ], UpdatemjBizAppsOrdersOrderAdjustmentInput.prototype, "PromotionCodeID", void 0);
5969
+ __decorate([
5970
+ Field(() => Float, { nullable: true }),
5971
+ __metadata("design:type", Number)
5972
+ ], UpdatemjBizAppsOrdersOrderAdjustmentInput.prototype, "Amount", void 0);
5973
+ __decorate([
5974
+ Field(() => Int, { nullable: true }),
5975
+ __metadata("design:type", Number)
5976
+ ], UpdatemjBizAppsOrdersOrderAdjustmentInput.prototype, "Sequence", void 0);
5977
+ __decorate([
5978
+ Field({ nullable: true }),
5979
+ __metadata("design:type", String)
5980
+ ], UpdatemjBizAppsOrdersOrderAdjustmentInput.prototype, "Reason", void 0);
5981
+ __decorate([
5982
+ Field({ nullable: true }),
5983
+ __metadata("design:type", String)
5984
+ ], UpdatemjBizAppsOrdersOrderAdjustmentInput.prototype, "AppliedByUserID", void 0);
5985
+ __decorate([
5986
+ Field({ nullable: true }),
5987
+ __metadata("design:type", Date)
5988
+ ], UpdatemjBizAppsOrdersOrderAdjustmentInput.prototype, "AppliedAt", void 0);
5989
+ __decorate([
5990
+ Field({ nullable: true }),
5991
+ __metadata("design:type", String)
5992
+ ], UpdatemjBizAppsOrdersOrderAdjustmentInput.prototype, "AuthorizedBySalesAuthorityID", void 0);
5993
+ __decorate([
5994
+ Field({ nullable: true }),
5995
+ __metadata("design:type", String)
5996
+ ], UpdatemjBizAppsOrdersOrderAdjustmentInput.prototype, "ApprovedByUserID", void 0);
5997
+ __decorate([
5998
+ Field({ nullable: true }),
5999
+ __metadata("design:type", Date)
6000
+ ], UpdatemjBizAppsOrdersOrderAdjustmentInput.prototype, "ApprovedAt", void 0);
6001
+ __decorate([
6002
+ Field(() => [KeyValuePairInput], { nullable: true }),
6003
+ __metadata("design:type", Array)
6004
+ ], UpdatemjBizAppsOrdersOrderAdjustmentInput.prototype, "OldValues___", void 0);
6005
+ __decorate([
6006
+ Field(() => RestoreContextInput, { nullable: true }),
6007
+ __metadata("design:type", RestoreContextInput)
6008
+ ], UpdatemjBizAppsOrdersOrderAdjustmentInput.prototype, "RestoreContext___", void 0);
6009
+ UpdatemjBizAppsOrdersOrderAdjustmentInput = __decorate([
6010
+ InputType()
6011
+ ], UpdatemjBizAppsOrdersOrderAdjustmentInput);
6012
+ export { UpdatemjBizAppsOrdersOrderAdjustmentInput };
6013
+ //****************************************************************************
6014
+ // RESOLVER for MJ_BizApps_Orders: Order Adjustments
6015
+ //****************************************************************************
6016
+ let RunmjBizAppsOrdersOrderAdjustmentViewResult = class RunmjBizAppsOrdersOrderAdjustmentViewResult {
6017
+ };
6018
+ __decorate([
6019
+ Field(() => [mjBizAppsOrdersOrderAdjustment_]),
6020
+ __metadata("design:type", Array)
6021
+ ], RunmjBizAppsOrdersOrderAdjustmentViewResult.prototype, "Results", void 0);
6022
+ __decorate([
6023
+ Field(() => String, { nullable: true }),
6024
+ __metadata("design:type", String)
6025
+ ], RunmjBizAppsOrdersOrderAdjustmentViewResult.prototype, "UserViewRunID", void 0);
6026
+ __decorate([
6027
+ Field(() => Int, { nullable: true }),
6028
+ __metadata("design:type", Number)
6029
+ ], RunmjBizAppsOrdersOrderAdjustmentViewResult.prototype, "RowCount", void 0);
6030
+ __decorate([
6031
+ Field(() => Int, { nullable: true }),
6032
+ __metadata("design:type", Number)
6033
+ ], RunmjBizAppsOrdersOrderAdjustmentViewResult.prototype, "TotalRowCount", void 0);
6034
+ __decorate([
6035
+ Field(() => Int, { nullable: true }),
6036
+ __metadata("design:type", Number)
6037
+ ], RunmjBizAppsOrdersOrderAdjustmentViewResult.prototype, "ExecutionTime", void 0);
6038
+ __decorate([
6039
+ Field({ nullable: true }),
6040
+ __metadata("design:type", String)
6041
+ ], RunmjBizAppsOrdersOrderAdjustmentViewResult.prototype, "ErrorMessage", void 0);
6042
+ __decorate([
6043
+ Field(() => Boolean, { nullable: false }),
6044
+ __metadata("design:type", Boolean)
6045
+ ], RunmjBizAppsOrdersOrderAdjustmentViewResult.prototype, "Success", void 0);
6046
+ RunmjBizAppsOrdersOrderAdjustmentViewResult = __decorate([
6047
+ ObjectType()
6048
+ ], RunmjBizAppsOrdersOrderAdjustmentViewResult);
6049
+ export { RunmjBizAppsOrdersOrderAdjustmentViewResult };
6050
+ let mjBizAppsOrdersOrderAdjustmentResolver = class mjBizAppsOrdersOrderAdjustmentResolver extends ResolverBase {
6051
+ async RunmjBizAppsOrdersOrderAdjustmentViewByID(input, { providers, userPayload }, pubSub) {
6052
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
6053
+ return super.RunViewByIDGeneric(input, provider, userPayload, pubSub);
6054
+ }
6055
+ async RunmjBizAppsOrdersOrderAdjustmentViewByName(input, { providers, userPayload }, pubSub) {
6056
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
6057
+ return super.RunViewByNameGeneric(input, provider, userPayload, pubSub);
6058
+ }
6059
+ async RunmjBizAppsOrdersOrderAdjustmentDynamicView(input, { providers, userPayload }, pubSub) {
6060
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
6061
+ input.EntityName = 'MJ_BizApps_Orders: Order Adjustments';
6062
+ return super.RunDynamicViewGeneric(input, provider, userPayload, pubSub);
6063
+ }
6064
+ async mjBizAppsOrdersOrderAdjustment(ID, { userPayload, providers }, pubSub) {
6065
+ this.CheckUserReadPermissions('MJ_BizApps_Orders: Order Adjustments', userPayload);
6066
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
6067
+ const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView('__mj_BizAppsOrders', 'vwOrderAdjustments')} WHERE ${provider.QuoteIdentifier('ID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ_BizApps_Orders: Order Adjustments', userPayload, EntityPermissionType.Read, 'AND');
6068
+ const rows = await provider.ExecuteSQL(sSQL, [ID], undefined, this.GetUserFromPayload(userPayload));
6069
+ const result = await this.MapFieldNamesToCodeNames('MJ_BizApps_Orders: Order Adjustments', rows && rows.length > 0 ? rows[0] : null, this.GetUserFromPayload(userPayload));
6070
+ return result;
6071
+ }
6072
+ async CreatemjBizAppsOrdersOrderAdjustment(input, { providers, userPayload }, pubSub) {
6073
+ const provider = GetReadWriteProvider(providers);
6074
+ return this.CreateRecord('MJ_BizApps_Orders: Order Adjustments', input, provider, userPayload, pubSub);
6075
+ }
6076
+ async UpdatemjBizAppsOrdersOrderAdjustment(input, { providers, userPayload }, pubSub) {
6077
+ const provider = GetReadWriteProvider(providers);
6078
+ return this.UpdateRecord('MJ_BizApps_Orders: Order Adjustments', input, provider, userPayload, pubSub);
6079
+ }
6080
+ async DeletemjBizAppsOrdersOrderAdjustment(ID, options, { providers, userPayload }, pubSub) {
6081
+ const provider = GetReadWriteProvider(providers);
6082
+ const key = new CompositeKey([{ FieldName: 'ID', Value: ID }]);
6083
+ return this.DeleteRecord('MJ_BizApps_Orders: Order Adjustments', key, options, provider, userPayload, pubSub);
6084
+ }
6085
+ };
6086
+ __decorate([
6087
+ Query(() => RunmjBizAppsOrdersOrderAdjustmentViewResult),
6088
+ __param(0, Arg('input', () => RunViewByIDInput)),
6089
+ __param(1, Ctx()),
6090
+ __param(2, PubSub()),
6091
+ __metadata("design:type", Function),
6092
+ __metadata("design:paramtypes", [RunViewByIDInput, Object, PubSubEngine]),
6093
+ __metadata("design:returntype", Promise)
6094
+ ], mjBizAppsOrdersOrderAdjustmentResolver.prototype, "RunmjBizAppsOrdersOrderAdjustmentViewByID", null);
6095
+ __decorate([
6096
+ Query(() => RunmjBizAppsOrdersOrderAdjustmentViewResult),
6097
+ __param(0, Arg('input', () => RunViewByNameInput)),
6098
+ __param(1, Ctx()),
6099
+ __param(2, PubSub()),
6100
+ __metadata("design:type", Function),
6101
+ __metadata("design:paramtypes", [RunViewByNameInput, Object, PubSubEngine]),
6102
+ __metadata("design:returntype", Promise)
6103
+ ], mjBizAppsOrdersOrderAdjustmentResolver.prototype, "RunmjBizAppsOrdersOrderAdjustmentViewByName", null);
6104
+ __decorate([
6105
+ Query(() => RunmjBizAppsOrdersOrderAdjustmentViewResult),
6106
+ __param(0, Arg('input', () => RunDynamicViewInput)),
6107
+ __param(1, Ctx()),
6108
+ __param(2, PubSub()),
6109
+ __metadata("design:type", Function),
6110
+ __metadata("design:paramtypes", [RunDynamicViewInput, Object, PubSubEngine]),
6111
+ __metadata("design:returntype", Promise)
6112
+ ], mjBizAppsOrdersOrderAdjustmentResolver.prototype, "RunmjBizAppsOrdersOrderAdjustmentDynamicView", null);
6113
+ __decorate([
6114
+ Query(() => mjBizAppsOrdersOrderAdjustment_, { nullable: true }),
6115
+ __param(0, Arg('ID', () => String)),
6116
+ __param(1, Ctx()),
6117
+ __param(2, PubSub()),
6118
+ __metadata("design:type", Function),
6119
+ __metadata("design:paramtypes", [String, Object, PubSubEngine]),
6120
+ __metadata("design:returntype", Promise)
6121
+ ], mjBizAppsOrdersOrderAdjustmentResolver.prototype, "mjBizAppsOrdersOrderAdjustment", null);
6122
+ __decorate([
6123
+ Mutation(() => mjBizAppsOrdersOrderAdjustment_),
6124
+ __param(0, Arg('input', () => CreatemjBizAppsOrdersOrderAdjustmentInput)),
6125
+ __param(1, Ctx()),
6126
+ __param(2, PubSub()),
6127
+ __metadata("design:type", Function),
6128
+ __metadata("design:paramtypes", [CreatemjBizAppsOrdersOrderAdjustmentInput, Object, PubSubEngine]),
6129
+ __metadata("design:returntype", Promise)
6130
+ ], mjBizAppsOrdersOrderAdjustmentResolver.prototype, "CreatemjBizAppsOrdersOrderAdjustment", null);
6131
+ __decorate([
6132
+ Mutation(() => mjBizAppsOrdersOrderAdjustment_),
6133
+ __param(0, Arg('input', () => UpdatemjBizAppsOrdersOrderAdjustmentInput)),
6134
+ __param(1, Ctx()),
6135
+ __param(2, PubSub()),
6136
+ __metadata("design:type", Function),
6137
+ __metadata("design:paramtypes", [UpdatemjBizAppsOrdersOrderAdjustmentInput, Object, PubSubEngine]),
6138
+ __metadata("design:returntype", Promise)
6139
+ ], mjBizAppsOrdersOrderAdjustmentResolver.prototype, "UpdatemjBizAppsOrdersOrderAdjustment", null);
6140
+ __decorate([
6141
+ Mutation(() => mjBizAppsOrdersOrderAdjustment_),
6142
+ __param(0, Arg('ID', () => String)),
6143
+ __param(1, Arg('options___', () => DeleteOptionsInput)),
6144
+ __param(2, Ctx()),
6145
+ __param(3, PubSub()),
6146
+ __metadata("design:type", Function),
6147
+ __metadata("design:paramtypes", [String, DeleteOptionsInput, Object, PubSubEngine]),
6148
+ __metadata("design:returntype", Promise)
6149
+ ], mjBizAppsOrdersOrderAdjustmentResolver.prototype, "DeletemjBizAppsOrdersOrderAdjustment", null);
6150
+ mjBizAppsOrdersOrderAdjustmentResolver = __decorate([
6151
+ Resolver(mjBizAppsOrdersOrderAdjustment_)
6152
+ ], mjBizAppsOrdersOrderAdjustmentResolver);
6153
+ export { mjBizAppsOrdersOrderAdjustmentResolver };
6154
+ //****************************************************************************
6155
+ // ENTITY CLASS for MJ_BizApps_Orders: Order Charge Allocations
6156
+ //****************************************************************************
6157
+ let mjBizAppsOrdersOrderChargeAllocation_ = class mjBizAppsOrdersOrderChargeAllocation_ {
6158
+ };
6159
+ __decorate([
6160
+ Field(),
6161
+ MaxLength(36),
6162
+ __metadata("design:type", String)
6163
+ ], mjBizAppsOrdersOrderChargeAllocation_.prototype, "ID", void 0);
6164
+ __decorate([
6165
+ Field({ nullable: true }),
6166
+ MaxLength(36),
6167
+ __metadata("design:type", String)
6168
+ ], mjBizAppsOrdersOrderChargeAllocation_.prototype, "OrderChargeID", void 0);
6169
+ __decorate([
6170
+ Field({ nullable: true }),
6171
+ MaxLength(36),
6172
+ __metadata("design:type", String)
6173
+ ], mjBizAppsOrdersOrderChargeAllocation_.prototype, "OrderLineID", void 0);
6174
+ __decorate([
6175
+ Field(() => Float, { nullable: true }),
6176
+ __metadata("design:type", Number)
6177
+ ], mjBizAppsOrdersOrderChargeAllocation_.prototype, "Amount", void 0);
6178
+ __decorate([
6179
+ Field(),
6180
+ __metadata("design:type", Date)
6181
+ ], mjBizAppsOrdersOrderChargeAllocation_.prototype, "_mj__CreatedAt", void 0);
6182
+ __decorate([
6183
+ Field(),
6184
+ __metadata("design:type", Date)
6185
+ ], mjBizAppsOrdersOrderChargeAllocation_.prototype, "_mj__UpdatedAt", void 0);
6186
+ __decorate([
6187
+ Field(() => [String], { nullable: true, description: `Field-level security: when non-null, the fields on this entity the calling user may read. Any other field arriving as null was withheld by the server rather than genuinely empty. Null for callers with no field restrictions.` }),
6188
+ __metadata("design:type", Array)
6189
+ ], mjBizAppsOrdersOrderChargeAllocation_.prototype, "ReadableFields___", void 0);
6190
+ mjBizAppsOrdersOrderChargeAllocation_ = __decorate([
6191
+ ObjectType({ description: `Which lines a charge belongs to. Needed for tax (per line), GL (per line\'s company) and returns (refunding a line refunds its share of the charge). The same shape as OrderAdjustmentAllocation, deliberately.` })
6192
+ ], mjBizAppsOrdersOrderChargeAllocation_);
6193
+ export { mjBizAppsOrdersOrderChargeAllocation_ };
6194
+ //****************************************************************************
6195
+ // INPUT TYPE for MJ_BizApps_Orders: Order Charge Allocations
6196
+ //****************************************************************************
6197
+ let CreatemjBizAppsOrdersOrderChargeAllocationInput = class CreatemjBizAppsOrdersOrderChargeAllocationInput {
6198
+ };
6199
+ __decorate([
6200
+ Field({ nullable: true }),
6201
+ __metadata("design:type", String)
6202
+ ], CreatemjBizAppsOrdersOrderChargeAllocationInput.prototype, "ID", void 0);
6203
+ __decorate([
6204
+ Field({ nullable: true }),
6205
+ __metadata("design:type", String)
6206
+ ], CreatemjBizAppsOrdersOrderChargeAllocationInput.prototype, "OrderChargeID", void 0);
6207
+ __decorate([
6208
+ Field({ nullable: true }),
6209
+ __metadata("design:type", String)
6210
+ ], CreatemjBizAppsOrdersOrderChargeAllocationInput.prototype, "OrderLineID", void 0);
6211
+ __decorate([
6212
+ Field(() => Float, { nullable: true }),
6213
+ __metadata("design:type", Number)
6214
+ ], CreatemjBizAppsOrdersOrderChargeAllocationInput.prototype, "Amount", void 0);
6215
+ __decorate([
6216
+ Field(() => RestoreContextInput, { nullable: true }),
6217
+ __metadata("design:type", RestoreContextInput)
6218
+ ], CreatemjBizAppsOrdersOrderChargeAllocationInput.prototype, "RestoreContext___", void 0);
6219
+ CreatemjBizAppsOrdersOrderChargeAllocationInput = __decorate([
6220
+ InputType()
6221
+ ], CreatemjBizAppsOrdersOrderChargeAllocationInput);
6222
+ export { CreatemjBizAppsOrdersOrderChargeAllocationInput };
6223
+ //****************************************************************************
6224
+ // INPUT TYPE for MJ_BizApps_Orders: Order Charge Allocations
6225
+ //****************************************************************************
6226
+ let UpdatemjBizAppsOrdersOrderChargeAllocationInput = class UpdatemjBizAppsOrdersOrderChargeAllocationInput {
6227
+ };
6228
+ __decorate([
6229
+ Field(),
6230
+ __metadata("design:type", String)
6231
+ ], UpdatemjBizAppsOrdersOrderChargeAllocationInput.prototype, "ID", void 0);
6232
+ __decorate([
6233
+ Field({ nullable: true }),
6234
+ __metadata("design:type", String)
6235
+ ], UpdatemjBizAppsOrdersOrderChargeAllocationInput.prototype, "OrderChargeID", void 0);
6236
+ __decorate([
6237
+ Field({ nullable: true }),
6238
+ __metadata("design:type", String)
6239
+ ], UpdatemjBizAppsOrdersOrderChargeAllocationInput.prototype, "OrderLineID", void 0);
6240
+ __decorate([
6241
+ Field(() => Float, { nullable: true }),
6242
+ __metadata("design:type", Number)
6243
+ ], UpdatemjBizAppsOrdersOrderChargeAllocationInput.prototype, "Amount", void 0);
6244
+ __decorate([
6245
+ Field(() => [KeyValuePairInput], { nullable: true }),
6246
+ __metadata("design:type", Array)
6247
+ ], UpdatemjBizAppsOrdersOrderChargeAllocationInput.prototype, "OldValues___", void 0);
6248
+ __decorate([
6249
+ Field(() => RestoreContextInput, { nullable: true }),
6250
+ __metadata("design:type", RestoreContextInput)
6251
+ ], UpdatemjBizAppsOrdersOrderChargeAllocationInput.prototype, "RestoreContext___", void 0);
6252
+ UpdatemjBizAppsOrdersOrderChargeAllocationInput = __decorate([
6253
+ InputType()
6254
+ ], UpdatemjBizAppsOrdersOrderChargeAllocationInput);
6255
+ export { UpdatemjBizAppsOrdersOrderChargeAllocationInput };
6256
+ //****************************************************************************
6257
+ // RESOLVER for MJ_BizApps_Orders: Order Charge Allocations
6258
+ //****************************************************************************
6259
+ let RunmjBizAppsOrdersOrderChargeAllocationViewResult = class RunmjBizAppsOrdersOrderChargeAllocationViewResult {
6260
+ };
6261
+ __decorate([
6262
+ Field(() => [mjBizAppsOrdersOrderChargeAllocation_]),
6263
+ __metadata("design:type", Array)
6264
+ ], RunmjBizAppsOrdersOrderChargeAllocationViewResult.prototype, "Results", void 0);
6265
+ __decorate([
6266
+ Field(() => String, { nullable: true }),
6267
+ __metadata("design:type", String)
6268
+ ], RunmjBizAppsOrdersOrderChargeAllocationViewResult.prototype, "UserViewRunID", void 0);
6269
+ __decorate([
6270
+ Field(() => Int, { nullable: true }),
6271
+ __metadata("design:type", Number)
6272
+ ], RunmjBizAppsOrdersOrderChargeAllocationViewResult.prototype, "RowCount", void 0);
6273
+ __decorate([
6274
+ Field(() => Int, { nullable: true }),
6275
+ __metadata("design:type", Number)
6276
+ ], RunmjBizAppsOrdersOrderChargeAllocationViewResult.prototype, "TotalRowCount", void 0);
6277
+ __decorate([
6278
+ Field(() => Int, { nullable: true }),
6279
+ __metadata("design:type", Number)
6280
+ ], RunmjBizAppsOrdersOrderChargeAllocationViewResult.prototype, "ExecutionTime", void 0);
6281
+ __decorate([
6282
+ Field({ nullable: true }),
6283
+ __metadata("design:type", String)
6284
+ ], RunmjBizAppsOrdersOrderChargeAllocationViewResult.prototype, "ErrorMessage", void 0);
6285
+ __decorate([
6286
+ Field(() => Boolean, { nullable: false }),
6287
+ __metadata("design:type", Boolean)
6288
+ ], RunmjBizAppsOrdersOrderChargeAllocationViewResult.prototype, "Success", void 0);
6289
+ RunmjBizAppsOrdersOrderChargeAllocationViewResult = __decorate([
6290
+ ObjectType()
6291
+ ], RunmjBizAppsOrdersOrderChargeAllocationViewResult);
6292
+ export { RunmjBizAppsOrdersOrderChargeAllocationViewResult };
6293
+ let mjBizAppsOrdersOrderChargeAllocationResolver = class mjBizAppsOrdersOrderChargeAllocationResolver extends ResolverBase {
6294
+ async RunmjBizAppsOrdersOrderChargeAllocationViewByID(input, { providers, userPayload }, pubSub) {
6295
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
6296
+ return super.RunViewByIDGeneric(input, provider, userPayload, pubSub);
6297
+ }
6298
+ async RunmjBizAppsOrdersOrderChargeAllocationViewByName(input, { providers, userPayload }, pubSub) {
6299
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
6300
+ return super.RunViewByNameGeneric(input, provider, userPayload, pubSub);
6301
+ }
6302
+ async RunmjBizAppsOrdersOrderChargeAllocationDynamicView(input, { providers, userPayload }, pubSub) {
6303
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
6304
+ input.EntityName = 'MJ_BizApps_Orders: Order Charge Allocations';
6305
+ return super.RunDynamicViewGeneric(input, provider, userPayload, pubSub);
6306
+ }
6307
+ async mjBizAppsOrdersOrderChargeAllocation(ID, { userPayload, providers }, pubSub) {
6308
+ this.CheckUserReadPermissions('MJ_BizApps_Orders: Order Charge Allocations', userPayload);
6309
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
6310
+ const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView('__mj_BizAppsOrders', 'vwOrderChargeAllocations')} WHERE ${provider.QuoteIdentifier('ID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ_BizApps_Orders: Order Charge Allocations', userPayload, EntityPermissionType.Read, 'AND');
6311
+ const rows = await provider.ExecuteSQL(sSQL, [ID], undefined, this.GetUserFromPayload(userPayload));
6312
+ const result = await this.MapFieldNamesToCodeNames('MJ_BizApps_Orders: Order Charge Allocations', rows && rows.length > 0 ? rows[0] : null, this.GetUserFromPayload(userPayload));
6313
+ return result;
6314
+ }
6315
+ async CreatemjBizAppsOrdersOrderChargeAllocation(input, { providers, userPayload }, pubSub) {
5185
6316
  const provider = GetReadWriteProvider(providers);
5186
6317
  return this.CreateRecord('MJ_BizApps_Orders: Order Charge Allocations', input, provider, userPayload, pubSub);
5187
6318
  }
@@ -6546,6 +7677,11 @@ __decorate([
6546
7677
  Field({ nullable: true, description: `The ship-to address as it was when the order was first confirmed: JSON with AddressID, Line1, Line2, Line3, City, StateProvince, PostalCode and Country. NULL until the order is confirmed. Written once and never changed (trg_OrderHeader_AddressFrozenAfterConfirm, 51015). Reporting and invoicing read this on a confirmed order instead of the live Address row.` }),
6547
7678
  __metadata("design:type", String)
6548
7679
  ], mjBizAppsOrdersOrderHeader_.prototype, "ShipToAddressSnapshot", void 0);
7680
+ __decorate([
7681
+ Field({ nullable: true, description: `The user whose save first confirmed (booked) this order, stamped from that save's context user in the same write as ConfirmedAt. A booking made by an unattended process, such as a renewal job, records the user that process runs as. NULL until the order is confirmed, and NULL on orders confirmed before this column existed, whose confirmer is not known. Never changes once ConfirmedAt is set (trg_OrderHeader_ConfirmedByFrozenAfterBooking, 51017).` }),
7682
+ MaxLength(36),
7683
+ __metadata("design:type", String)
7684
+ ], mjBizAppsOrdersOrderHeader_.prototype, "ConfirmedByUserID", void 0);
6549
7685
  __decorate([
6550
7686
  Field({ nullable: true }),
6551
7687
  MaxLength(50),
@@ -6616,6 +7752,11 @@ __decorate([
6616
7752
  MaxLength(100),
6617
7753
  __metadata("design:type", String)
6618
7754
  ], mjBizAppsOrdersOrderHeader_.prototype, "SourceCheckoutWidget", void 0);
7755
+ __decorate([
7756
+ Field({ nullable: true }),
7757
+ MaxLength(100),
7758
+ __metadata("design:type", String)
7759
+ ], mjBizAppsOrdersOrderHeader_.prototype, "ConfirmedByUser", void 0);
6619
7760
  __decorate([
6620
7761
  Field(() => Float, { nullable: true }),
6621
7762
  __metadata("design:type", Number)
@@ -6797,6 +7938,10 @@ __decorate([
6797
7938
  Field({ nullable: true }),
6798
7939
  __metadata("design:type", String)
6799
7940
  ], CreatemjBizAppsOrdersOrderHeaderInput.prototype, "ShipToAddressSnapshot", void 0);
7941
+ __decorate([
7942
+ Field({ nullable: true }),
7943
+ __metadata("design:type", String)
7944
+ ], CreatemjBizAppsOrdersOrderHeaderInput.prototype, "ConfirmedByUserID", void 0);
6800
7945
  __decorate([
6801
7946
  Field(() => RestoreContextInput, { nullable: true }),
6802
7947
  __metadata("design:type", RestoreContextInput)
@@ -6937,164 +8082,422 @@ __decorate([
6937
8082
  __decorate([
6938
8083
  Field({ nullable: true }),
6939
8084
  __metadata("design:type", String)
6940
- ], UpdatemjBizAppsOrdersOrderHeaderInput.prototype, "Origin", void 0);
8085
+ ], UpdatemjBizAppsOrdersOrderHeaderInput.prototype, "Origin", void 0);
8086
+ __decorate([
8087
+ Field({ nullable: true }),
8088
+ __metadata("design:type", String)
8089
+ ], UpdatemjBizAppsOrdersOrderHeaderInput.prototype, "SourceCheckoutWidgetID", void 0);
8090
+ __decorate([
8091
+ Field({ nullable: true }),
8092
+ __metadata("design:type", String)
8093
+ ], UpdatemjBizAppsOrdersOrderHeaderInput.prototype, "FulfillmentStatus", void 0);
8094
+ __decorate([
8095
+ Field({ nullable: true }),
8096
+ __metadata("design:type", String)
8097
+ ], UpdatemjBizAppsOrdersOrderHeaderInput.prototype, "BillToAddressSnapshot", void 0);
8098
+ __decorate([
8099
+ Field({ nullable: true }),
8100
+ __metadata("design:type", String)
8101
+ ], UpdatemjBizAppsOrdersOrderHeaderInput.prototype, "ShipToAddressSnapshot", void 0);
8102
+ __decorate([
8103
+ Field({ nullable: true }),
8104
+ __metadata("design:type", String)
8105
+ ], UpdatemjBizAppsOrdersOrderHeaderInput.prototype, "ConfirmedByUserID", void 0);
8106
+ __decorate([
8107
+ Field(() => [KeyValuePairInput], { nullable: true }),
8108
+ __metadata("design:type", Array)
8109
+ ], UpdatemjBizAppsOrdersOrderHeaderInput.prototype, "OldValues___", void 0);
8110
+ __decorate([
8111
+ Field(() => RestoreContextInput, { nullable: true }),
8112
+ __metadata("design:type", RestoreContextInput)
8113
+ ], UpdatemjBizAppsOrdersOrderHeaderInput.prototype, "RestoreContext___", void 0);
8114
+ UpdatemjBizAppsOrdersOrderHeaderInput = __decorate([
8115
+ InputType()
8116
+ ], UpdatemjBizAppsOrdersOrderHeaderInput);
8117
+ export { UpdatemjBizAppsOrdersOrderHeaderInput };
8118
+ //****************************************************************************
8119
+ // RESOLVER for MJ_BizApps_Orders: Order Headers
8120
+ //****************************************************************************
8121
+ let RunmjBizAppsOrdersOrderHeaderViewResult = class RunmjBizAppsOrdersOrderHeaderViewResult {
8122
+ };
8123
+ __decorate([
8124
+ Field(() => [mjBizAppsOrdersOrderHeader_]),
8125
+ __metadata("design:type", Array)
8126
+ ], RunmjBizAppsOrdersOrderHeaderViewResult.prototype, "Results", void 0);
8127
+ __decorate([
8128
+ Field(() => String, { nullable: true }),
8129
+ __metadata("design:type", String)
8130
+ ], RunmjBizAppsOrdersOrderHeaderViewResult.prototype, "UserViewRunID", void 0);
8131
+ __decorate([
8132
+ Field(() => Int, { nullable: true }),
8133
+ __metadata("design:type", Number)
8134
+ ], RunmjBizAppsOrdersOrderHeaderViewResult.prototype, "RowCount", void 0);
8135
+ __decorate([
8136
+ Field(() => Int, { nullable: true }),
8137
+ __metadata("design:type", Number)
8138
+ ], RunmjBizAppsOrdersOrderHeaderViewResult.prototype, "TotalRowCount", void 0);
8139
+ __decorate([
8140
+ Field(() => Int, { nullable: true }),
8141
+ __metadata("design:type", Number)
8142
+ ], RunmjBizAppsOrdersOrderHeaderViewResult.prototype, "ExecutionTime", void 0);
8143
+ __decorate([
8144
+ Field({ nullable: true }),
8145
+ __metadata("design:type", String)
8146
+ ], RunmjBizAppsOrdersOrderHeaderViewResult.prototype, "ErrorMessage", void 0);
8147
+ __decorate([
8148
+ Field(() => Boolean, { nullable: false }),
8149
+ __metadata("design:type", Boolean)
8150
+ ], RunmjBizAppsOrdersOrderHeaderViewResult.prototype, "Success", void 0);
8151
+ RunmjBizAppsOrdersOrderHeaderViewResult = __decorate([
8152
+ ObjectType()
8153
+ ], RunmjBizAppsOrdersOrderHeaderViewResult);
8154
+ export { RunmjBizAppsOrdersOrderHeaderViewResult };
8155
+ let mjBizAppsOrdersOrderHeaderResolver = class mjBizAppsOrdersOrderHeaderResolver extends ResolverBase {
8156
+ async RunmjBizAppsOrdersOrderHeaderViewByID(input, { providers, userPayload }, pubSub) {
8157
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
8158
+ return super.RunViewByIDGeneric(input, provider, userPayload, pubSub);
8159
+ }
8160
+ async RunmjBizAppsOrdersOrderHeaderViewByName(input, { providers, userPayload }, pubSub) {
8161
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
8162
+ return super.RunViewByNameGeneric(input, provider, userPayload, pubSub);
8163
+ }
8164
+ async RunmjBizAppsOrdersOrderHeaderDynamicView(input, { providers, userPayload }, pubSub) {
8165
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
8166
+ input.EntityName = 'MJ_BizApps_Orders: Order Headers';
8167
+ return super.RunDynamicViewGeneric(input, provider, userPayload, pubSub);
8168
+ }
8169
+ async mjBizAppsOrdersOrderHeader(ID, { userPayload, providers }, pubSub) {
8170
+ this.CheckUserReadPermissions('MJ_BizApps_Orders: Order Headers', userPayload);
8171
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
8172
+ 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');
8173
+ const rows = await provider.ExecuteSQL(sSQL, [ID], undefined, this.GetUserFromPayload(userPayload));
8174
+ const result = await this.MapFieldNamesToCodeNames('MJ_BizApps_Orders: Order Headers', rows && rows.length > 0 ? rows[0] : null, this.GetUserFromPayload(userPayload));
8175
+ return result;
8176
+ }
8177
+ async CreatemjBizAppsOrdersOrderHeader(input, { providers, userPayload }, pubSub) {
8178
+ const provider = GetReadWriteProvider(providers);
8179
+ return this.CreateRecord('MJ_BizApps_Orders: Order Headers', input, provider, userPayload, pubSub);
8180
+ }
8181
+ async UpdatemjBizAppsOrdersOrderHeader(input, { providers, userPayload }, pubSub) {
8182
+ const provider = GetReadWriteProvider(providers);
8183
+ return this.UpdateRecord('MJ_BizApps_Orders: Order Headers', input, provider, userPayload, pubSub);
8184
+ }
8185
+ async DeletemjBizAppsOrdersOrderHeader(ID, options, { providers, userPayload }, pubSub) {
8186
+ const provider = GetReadWriteProvider(providers);
8187
+ const key = new CompositeKey([{ FieldName: 'ID', Value: ID }]);
8188
+ return this.DeleteRecord('MJ_BizApps_Orders: Order Headers', key, options, provider, userPayload, pubSub);
8189
+ }
8190
+ };
8191
+ __decorate([
8192
+ Query(() => RunmjBizAppsOrdersOrderHeaderViewResult),
8193
+ __param(0, Arg('input', () => RunViewByIDInput)),
8194
+ __param(1, Ctx()),
8195
+ __param(2, PubSub()),
8196
+ __metadata("design:type", Function),
8197
+ __metadata("design:paramtypes", [RunViewByIDInput, Object, PubSubEngine]),
8198
+ __metadata("design:returntype", Promise)
8199
+ ], mjBizAppsOrdersOrderHeaderResolver.prototype, "RunmjBizAppsOrdersOrderHeaderViewByID", null);
8200
+ __decorate([
8201
+ Query(() => RunmjBizAppsOrdersOrderHeaderViewResult),
8202
+ __param(0, Arg('input', () => RunViewByNameInput)),
8203
+ __param(1, Ctx()),
8204
+ __param(2, PubSub()),
8205
+ __metadata("design:type", Function),
8206
+ __metadata("design:paramtypes", [RunViewByNameInput, Object, PubSubEngine]),
8207
+ __metadata("design:returntype", Promise)
8208
+ ], mjBizAppsOrdersOrderHeaderResolver.prototype, "RunmjBizAppsOrdersOrderHeaderViewByName", null);
8209
+ __decorate([
8210
+ Query(() => RunmjBizAppsOrdersOrderHeaderViewResult),
8211
+ __param(0, Arg('input', () => RunDynamicViewInput)),
8212
+ __param(1, Ctx()),
8213
+ __param(2, PubSub()),
8214
+ __metadata("design:type", Function),
8215
+ __metadata("design:paramtypes", [RunDynamicViewInput, Object, PubSubEngine]),
8216
+ __metadata("design:returntype", Promise)
8217
+ ], mjBizAppsOrdersOrderHeaderResolver.prototype, "RunmjBizAppsOrdersOrderHeaderDynamicView", null);
8218
+ __decorate([
8219
+ Query(() => mjBizAppsOrdersOrderHeader_, { nullable: true }),
8220
+ __param(0, Arg('ID', () => String)),
8221
+ __param(1, Ctx()),
8222
+ __param(2, PubSub()),
8223
+ __metadata("design:type", Function),
8224
+ __metadata("design:paramtypes", [String, Object, PubSubEngine]),
8225
+ __metadata("design:returntype", Promise)
8226
+ ], mjBizAppsOrdersOrderHeaderResolver.prototype, "mjBizAppsOrdersOrderHeader", null);
8227
+ __decorate([
8228
+ Mutation(() => mjBizAppsOrdersOrderHeader_),
8229
+ __param(0, Arg('input', () => CreatemjBizAppsOrdersOrderHeaderInput)),
8230
+ __param(1, Ctx()),
8231
+ __param(2, PubSub()),
8232
+ __metadata("design:type", Function),
8233
+ __metadata("design:paramtypes", [CreatemjBizAppsOrdersOrderHeaderInput, Object, PubSubEngine]),
8234
+ __metadata("design:returntype", Promise)
8235
+ ], mjBizAppsOrdersOrderHeaderResolver.prototype, "CreatemjBizAppsOrdersOrderHeader", null);
8236
+ __decorate([
8237
+ Mutation(() => mjBizAppsOrdersOrderHeader_),
8238
+ __param(0, Arg('input', () => UpdatemjBizAppsOrdersOrderHeaderInput)),
8239
+ __param(1, Ctx()),
8240
+ __param(2, PubSub()),
8241
+ __metadata("design:type", Function),
8242
+ __metadata("design:paramtypes", [UpdatemjBizAppsOrdersOrderHeaderInput, Object, PubSubEngine]),
8243
+ __metadata("design:returntype", Promise)
8244
+ ], mjBizAppsOrdersOrderHeaderResolver.prototype, "UpdatemjBizAppsOrdersOrderHeader", null);
8245
+ __decorate([
8246
+ Mutation(() => mjBizAppsOrdersOrderHeader_),
8247
+ __param(0, Arg('ID', () => String)),
8248
+ __param(1, Arg('options___', () => DeleteOptionsInput)),
8249
+ __param(2, Ctx()),
8250
+ __param(3, PubSub()),
8251
+ __metadata("design:type", Function),
8252
+ __metadata("design:paramtypes", [String, DeleteOptionsInput, Object, PubSubEngine]),
8253
+ __metadata("design:returntype", Promise)
8254
+ ], mjBizAppsOrdersOrderHeaderResolver.prototype, "DeletemjBizAppsOrdersOrderHeader", null);
8255
+ mjBizAppsOrdersOrderHeaderResolver = __decorate([
8256
+ Resolver(mjBizAppsOrdersOrderHeader_)
8257
+ ], mjBizAppsOrdersOrderHeaderResolver);
8258
+ export { mjBizAppsOrdersOrderHeaderResolver };
8259
+ //****************************************************************************
8260
+ // ENTITY CLASS for MJ_BizApps_Orders: Order Line Dimensions
8261
+ //****************************************************************************
8262
+ let mjBizAppsOrdersOrderLineDimension_ = class mjBizAppsOrdersOrderLineDimension_ {
8263
+ };
8264
+ __decorate([
8265
+ Field(),
8266
+ MaxLength(36),
8267
+ __metadata("design:type", String)
8268
+ ], mjBizAppsOrdersOrderLineDimension_.prototype, "ID", void 0);
8269
+ __decorate([
8270
+ Field({ nullable: true }),
8271
+ MaxLength(36),
8272
+ __metadata("design:type", String)
8273
+ ], mjBizAppsOrdersOrderLineDimension_.prototype, "OrderLineID", void 0);
8274
+ __decorate([
8275
+ Field({ nullable: true, description: `FK to __mj_BizAppsAccounting.Dimension.` }),
8276
+ MaxLength(36),
8277
+ __metadata("design:type", String)
8278
+ ], mjBizAppsOrdersOrderLineDimension_.prototype, "DimensionID", void 0);
8279
+ __decorate([
8280
+ Field({ nullable: true, description: `FK to __mj_BizAppsAccounting.DimensionValue.` }),
8281
+ MaxLength(36),
8282
+ __metadata("design:type", String)
8283
+ ], mjBizAppsOrdersOrderLineDimension_.prototype, "DimensionValueID", void 0);
8284
+ __decorate([
8285
+ Field(),
8286
+ __metadata("design:type", Date)
8287
+ ], mjBizAppsOrdersOrderLineDimension_.prototype, "_mj__CreatedAt", void 0);
8288
+ __decorate([
8289
+ Field(),
8290
+ __metadata("design:type", Date)
8291
+ ], mjBizAppsOrdersOrderLineDimension_.prototype, "_mj__UpdatedAt", void 0);
8292
+ __decorate([
8293
+ Field({ nullable: true }),
8294
+ MaxLength(100),
8295
+ __metadata("design:type", String)
8296
+ ], mjBizAppsOrdersOrderLineDimension_.prototype, "Dimension", void 0);
8297
+ __decorate([
8298
+ Field({ nullable: true }),
8299
+ MaxLength(200),
8300
+ __metadata("design:type", String)
8301
+ ], mjBizAppsOrdersOrderLineDimension_.prototype, "DimensionValue", void 0);
8302
+ __decorate([
8303
+ Field(() => [String], { nullable: true, description: `Field-level security: when non-null, the fields on this entity the calling user may read. Any other field arriving as null was withheld by the server rather than genuinely empty. Null for callers with no field restrictions.` }),
8304
+ __metadata("design:type", Array)
8305
+ ], mjBizAppsOrdersOrderLineDimension_.prototype, "ReadableFields___", void 0);
8306
+ mjBizAppsOrdersOrderLineDimension_ = __decorate([
8307
+ ObjectType({ description: `Analytical dimension tag on an order line (one value per dimension). Soft refs to __mj_BizAppsAccounting Dimension/DimensionValue; the booking draft propagates tags onto JE lines for batch-dimension detail.` })
8308
+ ], mjBizAppsOrdersOrderLineDimension_);
8309
+ export { mjBizAppsOrdersOrderLineDimension_ };
8310
+ //****************************************************************************
8311
+ // INPUT TYPE for MJ_BizApps_Orders: Order Line Dimensions
8312
+ //****************************************************************************
8313
+ let CreatemjBizAppsOrdersOrderLineDimensionInput = class CreatemjBizAppsOrdersOrderLineDimensionInput {
8314
+ };
8315
+ __decorate([
8316
+ Field({ nullable: true }),
8317
+ __metadata("design:type", String)
8318
+ ], CreatemjBizAppsOrdersOrderLineDimensionInput.prototype, "ID", void 0);
8319
+ __decorate([
8320
+ Field({ nullable: true }),
8321
+ __metadata("design:type", String)
8322
+ ], CreatemjBizAppsOrdersOrderLineDimensionInput.prototype, "OrderLineID", void 0);
8323
+ __decorate([
8324
+ Field({ nullable: true }),
8325
+ __metadata("design:type", String)
8326
+ ], CreatemjBizAppsOrdersOrderLineDimensionInput.prototype, "DimensionID", void 0);
8327
+ __decorate([
8328
+ Field({ nullable: true }),
8329
+ __metadata("design:type", String)
8330
+ ], CreatemjBizAppsOrdersOrderLineDimensionInput.prototype, "DimensionValueID", void 0);
6941
8331
  __decorate([
6942
- Field({ nullable: true }),
8332
+ Field(() => RestoreContextInput, { nullable: true }),
8333
+ __metadata("design:type", RestoreContextInput)
8334
+ ], CreatemjBizAppsOrdersOrderLineDimensionInput.prototype, "RestoreContext___", void 0);
8335
+ CreatemjBizAppsOrdersOrderLineDimensionInput = __decorate([
8336
+ InputType()
8337
+ ], CreatemjBizAppsOrdersOrderLineDimensionInput);
8338
+ export { CreatemjBizAppsOrdersOrderLineDimensionInput };
8339
+ //****************************************************************************
8340
+ // INPUT TYPE for MJ_BizApps_Orders: Order Line Dimensions
8341
+ //****************************************************************************
8342
+ let UpdatemjBizAppsOrdersOrderLineDimensionInput = class UpdatemjBizAppsOrdersOrderLineDimensionInput {
8343
+ };
8344
+ __decorate([
8345
+ Field(),
6943
8346
  __metadata("design:type", String)
6944
- ], UpdatemjBizAppsOrdersOrderHeaderInput.prototype, "SourceCheckoutWidgetID", void 0);
8347
+ ], UpdatemjBizAppsOrdersOrderLineDimensionInput.prototype, "ID", void 0);
6945
8348
  __decorate([
6946
8349
  Field({ nullable: true }),
6947
8350
  __metadata("design:type", String)
6948
- ], UpdatemjBizAppsOrdersOrderHeaderInput.prototype, "FulfillmentStatus", void 0);
8351
+ ], UpdatemjBizAppsOrdersOrderLineDimensionInput.prototype, "OrderLineID", void 0);
6949
8352
  __decorate([
6950
8353
  Field({ nullable: true }),
6951
8354
  __metadata("design:type", String)
6952
- ], UpdatemjBizAppsOrdersOrderHeaderInput.prototype, "BillToAddressSnapshot", void 0);
8355
+ ], UpdatemjBizAppsOrdersOrderLineDimensionInput.prototype, "DimensionID", void 0);
6953
8356
  __decorate([
6954
8357
  Field({ nullable: true }),
6955
8358
  __metadata("design:type", String)
6956
- ], UpdatemjBizAppsOrdersOrderHeaderInput.prototype, "ShipToAddressSnapshot", void 0);
8359
+ ], UpdatemjBizAppsOrdersOrderLineDimensionInput.prototype, "DimensionValueID", void 0);
6957
8360
  __decorate([
6958
8361
  Field(() => [KeyValuePairInput], { nullable: true }),
6959
8362
  __metadata("design:type", Array)
6960
- ], UpdatemjBizAppsOrdersOrderHeaderInput.prototype, "OldValues___", void 0);
8363
+ ], UpdatemjBizAppsOrdersOrderLineDimensionInput.prototype, "OldValues___", void 0);
6961
8364
  __decorate([
6962
8365
  Field(() => RestoreContextInput, { nullable: true }),
6963
8366
  __metadata("design:type", RestoreContextInput)
6964
- ], UpdatemjBizAppsOrdersOrderHeaderInput.prototype, "RestoreContext___", void 0);
6965
- UpdatemjBizAppsOrdersOrderHeaderInput = __decorate([
8367
+ ], UpdatemjBizAppsOrdersOrderLineDimensionInput.prototype, "RestoreContext___", void 0);
8368
+ UpdatemjBizAppsOrdersOrderLineDimensionInput = __decorate([
6966
8369
  InputType()
6967
- ], UpdatemjBizAppsOrdersOrderHeaderInput);
6968
- export { UpdatemjBizAppsOrdersOrderHeaderInput };
8370
+ ], UpdatemjBizAppsOrdersOrderLineDimensionInput);
8371
+ export { UpdatemjBizAppsOrdersOrderLineDimensionInput };
6969
8372
  //****************************************************************************
6970
- // RESOLVER for MJ_BizApps_Orders: Order Headers
8373
+ // RESOLVER for MJ_BizApps_Orders: Order Line Dimensions
6971
8374
  //****************************************************************************
6972
- let RunmjBizAppsOrdersOrderHeaderViewResult = class RunmjBizAppsOrdersOrderHeaderViewResult {
8375
+ let RunmjBizAppsOrdersOrderLineDimensionViewResult = class RunmjBizAppsOrdersOrderLineDimensionViewResult {
6973
8376
  };
6974
8377
  __decorate([
6975
- Field(() => [mjBizAppsOrdersOrderHeader_]),
8378
+ Field(() => [mjBizAppsOrdersOrderLineDimension_]),
6976
8379
  __metadata("design:type", Array)
6977
- ], RunmjBizAppsOrdersOrderHeaderViewResult.prototype, "Results", void 0);
8380
+ ], RunmjBizAppsOrdersOrderLineDimensionViewResult.prototype, "Results", void 0);
6978
8381
  __decorate([
6979
8382
  Field(() => String, { nullable: true }),
6980
8383
  __metadata("design:type", String)
6981
- ], RunmjBizAppsOrdersOrderHeaderViewResult.prototype, "UserViewRunID", void 0);
8384
+ ], RunmjBizAppsOrdersOrderLineDimensionViewResult.prototype, "UserViewRunID", void 0);
6982
8385
  __decorate([
6983
8386
  Field(() => Int, { nullable: true }),
6984
8387
  __metadata("design:type", Number)
6985
- ], RunmjBizAppsOrdersOrderHeaderViewResult.prototype, "RowCount", void 0);
8388
+ ], RunmjBizAppsOrdersOrderLineDimensionViewResult.prototype, "RowCount", void 0);
6986
8389
  __decorate([
6987
8390
  Field(() => Int, { nullable: true }),
6988
8391
  __metadata("design:type", Number)
6989
- ], RunmjBizAppsOrdersOrderHeaderViewResult.prototype, "TotalRowCount", void 0);
8392
+ ], RunmjBizAppsOrdersOrderLineDimensionViewResult.prototype, "TotalRowCount", void 0);
6990
8393
  __decorate([
6991
8394
  Field(() => Int, { nullable: true }),
6992
8395
  __metadata("design:type", Number)
6993
- ], RunmjBizAppsOrdersOrderHeaderViewResult.prototype, "ExecutionTime", void 0);
8396
+ ], RunmjBizAppsOrdersOrderLineDimensionViewResult.prototype, "ExecutionTime", void 0);
6994
8397
  __decorate([
6995
8398
  Field({ nullable: true }),
6996
8399
  __metadata("design:type", String)
6997
- ], RunmjBizAppsOrdersOrderHeaderViewResult.prototype, "ErrorMessage", void 0);
8400
+ ], RunmjBizAppsOrdersOrderLineDimensionViewResult.prototype, "ErrorMessage", void 0);
6998
8401
  __decorate([
6999
8402
  Field(() => Boolean, { nullable: false }),
7000
8403
  __metadata("design:type", Boolean)
7001
- ], RunmjBizAppsOrdersOrderHeaderViewResult.prototype, "Success", void 0);
7002
- RunmjBizAppsOrdersOrderHeaderViewResult = __decorate([
8404
+ ], RunmjBizAppsOrdersOrderLineDimensionViewResult.prototype, "Success", void 0);
8405
+ RunmjBizAppsOrdersOrderLineDimensionViewResult = __decorate([
7003
8406
  ObjectType()
7004
- ], RunmjBizAppsOrdersOrderHeaderViewResult);
7005
- export { RunmjBizAppsOrdersOrderHeaderViewResult };
7006
- let mjBizAppsOrdersOrderHeaderResolver = class mjBizAppsOrdersOrderHeaderResolver extends ResolverBase {
7007
- async RunmjBizAppsOrdersOrderHeaderViewByID(input, { providers, userPayload }, pubSub) {
8407
+ ], RunmjBizAppsOrdersOrderLineDimensionViewResult);
8408
+ export { RunmjBizAppsOrdersOrderLineDimensionViewResult };
8409
+ let mjBizAppsOrdersOrderLineDimensionResolver = class mjBizAppsOrdersOrderLineDimensionResolver extends ResolverBase {
8410
+ async RunmjBizAppsOrdersOrderLineDimensionViewByID(input, { providers, userPayload }, pubSub) {
7008
8411
  const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
7009
8412
  return super.RunViewByIDGeneric(input, provider, userPayload, pubSub);
7010
8413
  }
7011
- async RunmjBizAppsOrdersOrderHeaderViewByName(input, { providers, userPayload }, pubSub) {
8414
+ async RunmjBizAppsOrdersOrderLineDimensionViewByName(input, { providers, userPayload }, pubSub) {
7012
8415
  const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
7013
8416
  return super.RunViewByNameGeneric(input, provider, userPayload, pubSub);
7014
8417
  }
7015
- async RunmjBizAppsOrdersOrderHeaderDynamicView(input, { providers, userPayload }, pubSub) {
8418
+ async RunmjBizAppsOrdersOrderLineDimensionDynamicView(input, { providers, userPayload }, pubSub) {
7016
8419
  const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
7017
- input.EntityName = 'MJ_BizApps_Orders: Order Headers';
8420
+ input.EntityName = 'MJ_BizApps_Orders: Order Line Dimensions';
7018
8421
  return super.RunDynamicViewGeneric(input, provider, userPayload, pubSub);
7019
8422
  }
7020
- async mjBizAppsOrdersOrderHeader(ID, { userPayload, providers }, pubSub) {
7021
- this.CheckUserReadPermissions('MJ_BizApps_Orders: Order Headers', userPayload);
8423
+ async mjBizAppsOrdersOrderLineDimension(ID, { userPayload, providers }, pubSub) {
8424
+ this.CheckUserReadPermissions('MJ_BizApps_Orders: Order Line Dimensions', userPayload);
7022
8425
  const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
7023
- 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');
8426
+ const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView('__mj_BizAppsOrders', 'vwOrderLineDimensions')} WHERE ${provider.QuoteIdentifier('ID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ_BizApps_Orders: Order Line Dimensions', userPayload, EntityPermissionType.Read, 'AND');
7024
8427
  const rows = await provider.ExecuteSQL(sSQL, [ID], undefined, this.GetUserFromPayload(userPayload));
7025
- const result = await this.MapFieldNamesToCodeNames('MJ_BizApps_Orders: Order Headers', rows && rows.length > 0 ? rows[0] : null, this.GetUserFromPayload(userPayload));
8428
+ const result = await this.MapFieldNamesToCodeNames('MJ_BizApps_Orders: Order Line Dimensions', rows && rows.length > 0 ? rows[0] : null, this.GetUserFromPayload(userPayload));
7026
8429
  return result;
7027
8430
  }
7028
- async CreatemjBizAppsOrdersOrderHeader(input, { providers, userPayload }, pubSub) {
8431
+ async CreatemjBizAppsOrdersOrderLineDimension(input, { providers, userPayload }, pubSub) {
7029
8432
  const provider = GetReadWriteProvider(providers);
7030
- return this.CreateRecord('MJ_BizApps_Orders: Order Headers', input, provider, userPayload, pubSub);
8433
+ return this.CreateRecord('MJ_BizApps_Orders: Order Line Dimensions', input, provider, userPayload, pubSub);
7031
8434
  }
7032
- async UpdatemjBizAppsOrdersOrderHeader(input, { providers, userPayload }, pubSub) {
8435
+ async UpdatemjBizAppsOrdersOrderLineDimension(input, { providers, userPayload }, pubSub) {
7033
8436
  const provider = GetReadWriteProvider(providers);
7034
- return this.UpdateRecord('MJ_BizApps_Orders: Order Headers', input, provider, userPayload, pubSub);
8437
+ return this.UpdateRecord('MJ_BizApps_Orders: Order Line Dimensions', input, provider, userPayload, pubSub);
7035
8438
  }
7036
- async DeletemjBizAppsOrdersOrderHeader(ID, options, { providers, userPayload }, pubSub) {
8439
+ async DeletemjBizAppsOrdersOrderLineDimension(ID, options, { providers, userPayload }, pubSub) {
7037
8440
  const provider = GetReadWriteProvider(providers);
7038
8441
  const key = new CompositeKey([{ FieldName: 'ID', Value: ID }]);
7039
- return this.DeleteRecord('MJ_BizApps_Orders: Order Headers', key, options, provider, userPayload, pubSub);
8442
+ return this.DeleteRecord('MJ_BizApps_Orders: Order Line Dimensions', key, options, provider, userPayload, pubSub);
7040
8443
  }
7041
8444
  };
7042
8445
  __decorate([
7043
- Query(() => RunmjBizAppsOrdersOrderHeaderViewResult),
8446
+ Query(() => RunmjBizAppsOrdersOrderLineDimensionViewResult),
7044
8447
  __param(0, Arg('input', () => RunViewByIDInput)),
7045
8448
  __param(1, Ctx()),
7046
8449
  __param(2, PubSub()),
7047
8450
  __metadata("design:type", Function),
7048
8451
  __metadata("design:paramtypes", [RunViewByIDInput, Object, PubSubEngine]),
7049
8452
  __metadata("design:returntype", Promise)
7050
- ], mjBizAppsOrdersOrderHeaderResolver.prototype, "RunmjBizAppsOrdersOrderHeaderViewByID", null);
8453
+ ], mjBizAppsOrdersOrderLineDimensionResolver.prototype, "RunmjBizAppsOrdersOrderLineDimensionViewByID", null);
7051
8454
  __decorate([
7052
- Query(() => RunmjBizAppsOrdersOrderHeaderViewResult),
8455
+ Query(() => RunmjBizAppsOrdersOrderLineDimensionViewResult),
7053
8456
  __param(0, Arg('input', () => RunViewByNameInput)),
7054
8457
  __param(1, Ctx()),
7055
8458
  __param(2, PubSub()),
7056
8459
  __metadata("design:type", Function),
7057
8460
  __metadata("design:paramtypes", [RunViewByNameInput, Object, PubSubEngine]),
7058
8461
  __metadata("design:returntype", Promise)
7059
- ], mjBizAppsOrdersOrderHeaderResolver.prototype, "RunmjBizAppsOrdersOrderHeaderViewByName", null);
8462
+ ], mjBizAppsOrdersOrderLineDimensionResolver.prototype, "RunmjBizAppsOrdersOrderLineDimensionViewByName", null);
7060
8463
  __decorate([
7061
- Query(() => RunmjBizAppsOrdersOrderHeaderViewResult),
8464
+ Query(() => RunmjBizAppsOrdersOrderLineDimensionViewResult),
7062
8465
  __param(0, Arg('input', () => RunDynamicViewInput)),
7063
8466
  __param(1, Ctx()),
7064
8467
  __param(2, PubSub()),
7065
8468
  __metadata("design:type", Function),
7066
8469
  __metadata("design:paramtypes", [RunDynamicViewInput, Object, PubSubEngine]),
7067
8470
  __metadata("design:returntype", Promise)
7068
- ], mjBizAppsOrdersOrderHeaderResolver.prototype, "RunmjBizAppsOrdersOrderHeaderDynamicView", null);
8471
+ ], mjBizAppsOrdersOrderLineDimensionResolver.prototype, "RunmjBizAppsOrdersOrderLineDimensionDynamicView", null);
7069
8472
  __decorate([
7070
- Query(() => mjBizAppsOrdersOrderHeader_, { nullable: true }),
8473
+ Query(() => mjBizAppsOrdersOrderLineDimension_, { nullable: true }),
7071
8474
  __param(0, Arg('ID', () => String)),
7072
8475
  __param(1, Ctx()),
7073
8476
  __param(2, PubSub()),
7074
8477
  __metadata("design:type", Function),
7075
8478
  __metadata("design:paramtypes", [String, Object, PubSubEngine]),
7076
8479
  __metadata("design:returntype", Promise)
7077
- ], mjBizAppsOrdersOrderHeaderResolver.prototype, "mjBizAppsOrdersOrderHeader", null);
8480
+ ], mjBizAppsOrdersOrderLineDimensionResolver.prototype, "mjBizAppsOrdersOrderLineDimension", null);
7078
8481
  __decorate([
7079
- Mutation(() => mjBizAppsOrdersOrderHeader_),
7080
- __param(0, Arg('input', () => CreatemjBizAppsOrdersOrderHeaderInput)),
8482
+ Mutation(() => mjBizAppsOrdersOrderLineDimension_),
8483
+ __param(0, Arg('input', () => CreatemjBizAppsOrdersOrderLineDimensionInput)),
7081
8484
  __param(1, Ctx()),
7082
8485
  __param(2, PubSub()),
7083
8486
  __metadata("design:type", Function),
7084
- __metadata("design:paramtypes", [CreatemjBizAppsOrdersOrderHeaderInput, Object, PubSubEngine]),
8487
+ __metadata("design:paramtypes", [CreatemjBizAppsOrdersOrderLineDimensionInput, Object, PubSubEngine]),
7085
8488
  __metadata("design:returntype", Promise)
7086
- ], mjBizAppsOrdersOrderHeaderResolver.prototype, "CreatemjBizAppsOrdersOrderHeader", null);
8489
+ ], mjBizAppsOrdersOrderLineDimensionResolver.prototype, "CreatemjBizAppsOrdersOrderLineDimension", null);
7087
8490
  __decorate([
7088
- Mutation(() => mjBizAppsOrdersOrderHeader_),
7089
- __param(0, Arg('input', () => UpdatemjBizAppsOrdersOrderHeaderInput)),
8491
+ Mutation(() => mjBizAppsOrdersOrderLineDimension_),
8492
+ __param(0, Arg('input', () => UpdatemjBizAppsOrdersOrderLineDimensionInput)),
7090
8493
  __param(1, Ctx()),
7091
8494
  __param(2, PubSub()),
7092
8495
  __metadata("design:type", Function),
7093
- __metadata("design:paramtypes", [UpdatemjBizAppsOrdersOrderHeaderInput, Object, PubSubEngine]),
8496
+ __metadata("design:paramtypes", [UpdatemjBizAppsOrdersOrderLineDimensionInput, Object, PubSubEngine]),
7094
8497
  __metadata("design:returntype", Promise)
7095
- ], mjBizAppsOrdersOrderHeaderResolver.prototype, "UpdatemjBizAppsOrdersOrderHeader", null);
8498
+ ], mjBizAppsOrdersOrderLineDimensionResolver.prototype, "UpdatemjBizAppsOrdersOrderLineDimension", null);
7096
8499
  __decorate([
7097
- Mutation(() => mjBizAppsOrdersOrderHeader_),
8500
+ Mutation(() => mjBizAppsOrdersOrderLineDimension_),
7098
8501
  __param(0, Arg('ID', () => String)),
7099
8502
  __param(1, Arg('options___', () => DeleteOptionsInput)),
7100
8503
  __param(2, Ctx()),
@@ -7102,253 +8505,310 @@ __decorate([
7102
8505
  __metadata("design:type", Function),
7103
8506
  __metadata("design:paramtypes", [String, DeleteOptionsInput, Object, PubSubEngine]),
7104
8507
  __metadata("design:returntype", Promise)
7105
- ], mjBizAppsOrdersOrderHeaderResolver.prototype, "DeletemjBizAppsOrdersOrderHeader", null);
7106
- mjBizAppsOrdersOrderHeaderResolver = __decorate([
7107
- Resolver(mjBizAppsOrdersOrderHeader_)
7108
- ], mjBizAppsOrdersOrderHeaderResolver);
7109
- export { mjBizAppsOrdersOrderHeaderResolver };
8508
+ ], mjBizAppsOrdersOrderLineDimensionResolver.prototype, "DeletemjBizAppsOrdersOrderLineDimension", null);
8509
+ mjBizAppsOrdersOrderLineDimensionResolver = __decorate([
8510
+ Resolver(mjBizAppsOrdersOrderLineDimension_)
8511
+ ], mjBizAppsOrdersOrderLineDimensionResolver);
8512
+ export { mjBizAppsOrdersOrderLineDimensionResolver };
7110
8513
  //****************************************************************************
7111
- // ENTITY CLASS for MJ_BizApps_Orders: Order Line Dimensions
8514
+ // ENTITY CLASS for MJ_BizApps_Orders: Order Line Price Components
7112
8515
  //****************************************************************************
7113
- let mjBizAppsOrdersOrderLineDimension_ = class mjBizAppsOrdersOrderLineDimension_ {
8516
+ let mjBizAppsOrdersOrderLinePriceComponent_ = class mjBizAppsOrdersOrderLinePriceComponent_ {
7114
8517
  };
7115
8518
  __decorate([
7116
8519
  Field(),
7117
8520
  MaxLength(36),
7118
8521
  __metadata("design:type", String)
7119
- ], mjBizAppsOrdersOrderLineDimension_.prototype, "ID", void 0);
8522
+ ], mjBizAppsOrdersOrderLinePriceComponent_.prototype, "ID", void 0);
7120
8523
  __decorate([
7121
8524
  Field({ nullable: true }),
7122
8525
  MaxLength(36),
7123
8526
  __metadata("design:type", String)
7124
- ], mjBizAppsOrdersOrderLineDimension_.prototype, "OrderLineID", void 0);
8527
+ ], mjBizAppsOrdersOrderLinePriceComponent_.prototype, "OrderLineID", void 0);
7125
8528
  __decorate([
7126
- Field({ nullable: true, description: `FK to __mj_BizAppsAccounting.Dimension.` }),
7127
- MaxLength(36),
8529
+ Field(() => Int, { nullable: true }),
8530
+ __metadata("design:type", Number)
8531
+ ], mjBizAppsOrdersOrderLinePriceComponent_.prototype, "Sequence", void 0);
8532
+ __decorate([
8533
+ Field({ nullable: true, description: `Base | Rule | Adjustment | Charge | Tax - which pipeline stage produced this component.` }),
8534
+ MaxLength(20),
7128
8535
  __metadata("design:type", String)
7129
- ], mjBizAppsOrdersOrderLineDimension_.prototype, "DimensionID", void 0);
8536
+ ], mjBizAppsOrdersOrderLinePriceComponent_.prototype, "ComponentType", void 0);
7130
8537
  __decorate([
7131
- Field({ nullable: true, description: `FK to __mj_BizAppsAccounting.DimensionValue.` }),
8538
+ Field({ nullable: true }),
8539
+ MaxLength(200),
8540
+ __metadata("design:type", String)
8541
+ ], mjBizAppsOrdersOrderLinePriceComponent_.prototype, "Label", void 0);
8542
+ __decorate([
8543
+ Field(() => Float, { nullable: true, description: `SIGNED: negative for a discount, positive for a charge.` }),
8544
+ __metadata("design:type", Number)
8545
+ ], mjBizAppsOrdersOrderLinePriceComponent_.prototype, "Amount", void 0);
8546
+ __decorate([
8547
+ Field(() => Float, { nullable: true, description: `The line total after this component, so the decomposition reads top to bottom.` }),
8548
+ __metadata("design:type", Number)
8549
+ ], mjBizAppsOrdersOrderLinePriceComponent_.prototype, "RunningTotal", void 0);
8550
+ __decorate([
8551
+ Field({ nullable: true, description: `The MJ Entity of whatever produced this component. Set together with SourceRecordID, or neither.` }),
7132
8552
  MaxLength(36),
7133
8553
  __metadata("design:type", String)
7134
- ], mjBizAppsOrdersOrderLineDimension_.prototype, "DimensionValueID", void 0);
8554
+ ], mjBizAppsOrdersOrderLinePriceComponent_.prototype, "SourceEntityID", void 0);
8555
+ __decorate([
8556
+ Field({ nullable: true, description: `Primary key of the producing record, as text. A soft reference by nature - it points at whichever table the stage used.` }),
8557
+ MaxLength(400),
8558
+ __metadata("design:type", String)
8559
+ ], mjBizAppsOrdersOrderLinePriceComponent_.prototype, "SourceRecordID", void 0);
7135
8560
  __decorate([
7136
8561
  Field(),
7137
8562
  __metadata("design:type", Date)
7138
- ], mjBizAppsOrdersOrderLineDimension_.prototype, "_mj__CreatedAt", void 0);
8563
+ ], mjBizAppsOrdersOrderLinePriceComponent_.prototype, "_mj__CreatedAt", void 0);
7139
8564
  __decorate([
7140
8565
  Field(),
7141
8566
  __metadata("design:type", Date)
7142
- ], mjBizAppsOrdersOrderLineDimension_.prototype, "_mj__UpdatedAt", void 0);
7143
- __decorate([
7144
- Field({ nullable: true }),
7145
- MaxLength(100),
7146
- __metadata("design:type", String)
7147
- ], mjBizAppsOrdersOrderLineDimension_.prototype, "Dimension", void 0);
8567
+ ], mjBizAppsOrdersOrderLinePriceComponent_.prototype, "_mj__UpdatedAt", void 0);
7148
8568
  __decorate([
7149
8569
  Field({ nullable: true }),
7150
- MaxLength(200),
8570
+ MaxLength(255),
7151
8571
  __metadata("design:type", String)
7152
- ], mjBizAppsOrdersOrderLineDimension_.prototype, "DimensionValue", void 0);
8572
+ ], mjBizAppsOrdersOrderLinePriceComponent_.prototype, "SourceEntity", void 0);
7153
8573
  __decorate([
7154
8574
  Field(() => [String], { nullable: true, description: `Field-level security: when non-null, the fields on this entity the calling user may read. Any other field arriving as null was withheld by the server rather than genuinely empty. Null for callers with no field restrictions.` }),
7155
8575
  __metadata("design:type", Array)
7156
- ], mjBizAppsOrdersOrderLineDimension_.prototype, "ReadableFields___", void 0);
7157
- mjBizAppsOrdersOrderLineDimension_ = __decorate([
7158
- ObjectType({ description: `Analytical dimension tag on an order line (one value per dimension). Soft refs to __mj_BizAppsAccounting Dimension/DimensionValue; the booking draft propagates tags onto JE lines for batch-dimension detail.` })
7159
- ], mjBizAppsOrdersOrderLineDimension_);
7160
- export { mjBizAppsOrdersOrderLineDimension_ };
8576
+ ], mjBizAppsOrdersOrderLinePriceComponent_.prototype, "ReadableFields___", void 0);
8577
+ mjBizAppsOrdersOrderLinePriceComponent_ = __decorate([
8578
+ ObjectType({ description: `How a line\'s total was arrived at, one row per pipeline stage with a running total. Pricing disputes are inevitable and \'the system computed it\' is not an answer to a customer or an auditor. Provenance uses the polymorphic origin pair so a component can point at a ProductPrice, a Promotion, an OrderCharge or a TaxRate without a column per source type.` })
8579
+ ], mjBizAppsOrdersOrderLinePriceComponent_);
8580
+ export { mjBizAppsOrdersOrderLinePriceComponent_ };
7161
8581
  //****************************************************************************
7162
- // INPUT TYPE for MJ_BizApps_Orders: Order Line Dimensions
8582
+ // INPUT TYPE for MJ_BizApps_Orders: Order Line Price Components
7163
8583
  //****************************************************************************
7164
- let CreatemjBizAppsOrdersOrderLineDimensionInput = class CreatemjBizAppsOrdersOrderLineDimensionInput {
8584
+ let CreatemjBizAppsOrdersOrderLinePriceComponentInput = class CreatemjBizAppsOrdersOrderLinePriceComponentInput {
7165
8585
  };
7166
8586
  __decorate([
7167
8587
  Field({ nullable: true }),
7168
8588
  __metadata("design:type", String)
7169
- ], CreatemjBizAppsOrdersOrderLineDimensionInput.prototype, "ID", void 0);
8589
+ ], CreatemjBizAppsOrdersOrderLinePriceComponentInput.prototype, "ID", void 0);
7170
8590
  __decorate([
7171
8591
  Field({ nullable: true }),
7172
8592
  __metadata("design:type", String)
7173
- ], CreatemjBizAppsOrdersOrderLineDimensionInput.prototype, "OrderLineID", void 0);
8593
+ ], CreatemjBizAppsOrdersOrderLinePriceComponentInput.prototype, "OrderLineID", void 0);
8594
+ __decorate([
8595
+ Field(() => Int, { nullable: true }),
8596
+ __metadata("design:type", Number)
8597
+ ], CreatemjBizAppsOrdersOrderLinePriceComponentInput.prototype, "Sequence", void 0);
7174
8598
  __decorate([
7175
8599
  Field({ nullable: true }),
7176
8600
  __metadata("design:type", String)
7177
- ], CreatemjBizAppsOrdersOrderLineDimensionInput.prototype, "DimensionID", void 0);
8601
+ ], CreatemjBizAppsOrdersOrderLinePriceComponentInput.prototype, "ComponentType", void 0);
7178
8602
  __decorate([
7179
8603
  Field({ nullable: true }),
7180
8604
  __metadata("design:type", String)
7181
- ], CreatemjBizAppsOrdersOrderLineDimensionInput.prototype, "DimensionValueID", void 0);
8605
+ ], CreatemjBizAppsOrdersOrderLinePriceComponentInput.prototype, "Label", void 0);
8606
+ __decorate([
8607
+ Field(() => Float, { nullable: true }),
8608
+ __metadata("design:type", Number)
8609
+ ], CreatemjBizAppsOrdersOrderLinePriceComponentInput.prototype, "Amount", void 0);
8610
+ __decorate([
8611
+ Field(() => Float, { nullable: true }),
8612
+ __metadata("design:type", Number)
8613
+ ], CreatemjBizAppsOrdersOrderLinePriceComponentInput.prototype, "RunningTotal", void 0);
8614
+ __decorate([
8615
+ Field({ nullable: true }),
8616
+ __metadata("design:type", String)
8617
+ ], CreatemjBizAppsOrdersOrderLinePriceComponentInput.prototype, "SourceEntityID", void 0);
8618
+ __decorate([
8619
+ Field({ nullable: true }),
8620
+ __metadata("design:type", String)
8621
+ ], CreatemjBizAppsOrdersOrderLinePriceComponentInput.prototype, "SourceRecordID", void 0);
7182
8622
  __decorate([
7183
8623
  Field(() => RestoreContextInput, { nullable: true }),
7184
8624
  __metadata("design:type", RestoreContextInput)
7185
- ], CreatemjBizAppsOrdersOrderLineDimensionInput.prototype, "RestoreContext___", void 0);
7186
- CreatemjBizAppsOrdersOrderLineDimensionInput = __decorate([
8625
+ ], CreatemjBizAppsOrdersOrderLinePriceComponentInput.prototype, "RestoreContext___", void 0);
8626
+ CreatemjBizAppsOrdersOrderLinePriceComponentInput = __decorate([
7187
8627
  InputType()
7188
- ], CreatemjBizAppsOrdersOrderLineDimensionInput);
7189
- export { CreatemjBizAppsOrdersOrderLineDimensionInput };
8628
+ ], CreatemjBizAppsOrdersOrderLinePriceComponentInput);
8629
+ export { CreatemjBizAppsOrdersOrderLinePriceComponentInput };
7190
8630
  //****************************************************************************
7191
- // INPUT TYPE for MJ_BizApps_Orders: Order Line Dimensions
8631
+ // INPUT TYPE for MJ_BizApps_Orders: Order Line Price Components
7192
8632
  //****************************************************************************
7193
- let UpdatemjBizAppsOrdersOrderLineDimensionInput = class UpdatemjBizAppsOrdersOrderLineDimensionInput {
8633
+ let UpdatemjBizAppsOrdersOrderLinePriceComponentInput = class UpdatemjBizAppsOrdersOrderLinePriceComponentInput {
7194
8634
  };
7195
8635
  __decorate([
7196
8636
  Field(),
7197
8637
  __metadata("design:type", String)
7198
- ], UpdatemjBizAppsOrdersOrderLineDimensionInput.prototype, "ID", void 0);
8638
+ ], UpdatemjBizAppsOrdersOrderLinePriceComponentInput.prototype, "ID", void 0);
8639
+ __decorate([
8640
+ Field({ nullable: true }),
8641
+ __metadata("design:type", String)
8642
+ ], UpdatemjBizAppsOrdersOrderLinePriceComponentInput.prototype, "OrderLineID", void 0);
8643
+ __decorate([
8644
+ Field(() => Int, { nullable: true }),
8645
+ __metadata("design:type", Number)
8646
+ ], UpdatemjBizAppsOrdersOrderLinePriceComponentInput.prototype, "Sequence", void 0);
8647
+ __decorate([
8648
+ Field({ nullable: true }),
8649
+ __metadata("design:type", String)
8650
+ ], UpdatemjBizAppsOrdersOrderLinePriceComponentInput.prototype, "ComponentType", void 0);
7199
8651
  __decorate([
7200
8652
  Field({ nullable: true }),
7201
8653
  __metadata("design:type", String)
7202
- ], UpdatemjBizAppsOrdersOrderLineDimensionInput.prototype, "OrderLineID", void 0);
8654
+ ], UpdatemjBizAppsOrdersOrderLinePriceComponentInput.prototype, "Label", void 0);
8655
+ __decorate([
8656
+ Field(() => Float, { nullable: true }),
8657
+ __metadata("design:type", Number)
8658
+ ], UpdatemjBizAppsOrdersOrderLinePriceComponentInput.prototype, "Amount", void 0);
8659
+ __decorate([
8660
+ Field(() => Float, { nullable: true }),
8661
+ __metadata("design:type", Number)
8662
+ ], UpdatemjBizAppsOrdersOrderLinePriceComponentInput.prototype, "RunningTotal", void 0);
7203
8663
  __decorate([
7204
8664
  Field({ nullable: true }),
7205
8665
  __metadata("design:type", String)
7206
- ], UpdatemjBizAppsOrdersOrderLineDimensionInput.prototype, "DimensionID", void 0);
8666
+ ], UpdatemjBizAppsOrdersOrderLinePriceComponentInput.prototype, "SourceEntityID", void 0);
7207
8667
  __decorate([
7208
8668
  Field({ nullable: true }),
7209
8669
  __metadata("design:type", String)
7210
- ], UpdatemjBizAppsOrdersOrderLineDimensionInput.prototype, "DimensionValueID", void 0);
8670
+ ], UpdatemjBizAppsOrdersOrderLinePriceComponentInput.prototype, "SourceRecordID", void 0);
7211
8671
  __decorate([
7212
8672
  Field(() => [KeyValuePairInput], { nullable: true }),
7213
8673
  __metadata("design:type", Array)
7214
- ], UpdatemjBizAppsOrdersOrderLineDimensionInput.prototype, "OldValues___", void 0);
8674
+ ], UpdatemjBizAppsOrdersOrderLinePriceComponentInput.prototype, "OldValues___", void 0);
7215
8675
  __decorate([
7216
8676
  Field(() => RestoreContextInput, { nullable: true }),
7217
8677
  __metadata("design:type", RestoreContextInput)
7218
- ], UpdatemjBizAppsOrdersOrderLineDimensionInput.prototype, "RestoreContext___", void 0);
7219
- UpdatemjBizAppsOrdersOrderLineDimensionInput = __decorate([
8678
+ ], UpdatemjBizAppsOrdersOrderLinePriceComponentInput.prototype, "RestoreContext___", void 0);
8679
+ UpdatemjBizAppsOrdersOrderLinePriceComponentInput = __decorate([
7220
8680
  InputType()
7221
- ], UpdatemjBizAppsOrdersOrderLineDimensionInput);
7222
- export { UpdatemjBizAppsOrdersOrderLineDimensionInput };
8681
+ ], UpdatemjBizAppsOrdersOrderLinePriceComponentInput);
8682
+ export { UpdatemjBizAppsOrdersOrderLinePriceComponentInput };
7223
8683
  //****************************************************************************
7224
- // RESOLVER for MJ_BizApps_Orders: Order Line Dimensions
8684
+ // RESOLVER for MJ_BizApps_Orders: Order Line Price Components
7225
8685
  //****************************************************************************
7226
- let RunmjBizAppsOrdersOrderLineDimensionViewResult = class RunmjBizAppsOrdersOrderLineDimensionViewResult {
8686
+ let RunmjBizAppsOrdersOrderLinePriceComponentViewResult = class RunmjBizAppsOrdersOrderLinePriceComponentViewResult {
7227
8687
  };
7228
8688
  __decorate([
7229
- Field(() => [mjBizAppsOrdersOrderLineDimension_]),
8689
+ Field(() => [mjBizAppsOrdersOrderLinePriceComponent_]),
7230
8690
  __metadata("design:type", Array)
7231
- ], RunmjBizAppsOrdersOrderLineDimensionViewResult.prototype, "Results", void 0);
8691
+ ], RunmjBizAppsOrdersOrderLinePriceComponentViewResult.prototype, "Results", void 0);
7232
8692
  __decorate([
7233
8693
  Field(() => String, { nullable: true }),
7234
8694
  __metadata("design:type", String)
7235
- ], RunmjBizAppsOrdersOrderLineDimensionViewResult.prototype, "UserViewRunID", void 0);
8695
+ ], RunmjBizAppsOrdersOrderLinePriceComponentViewResult.prototype, "UserViewRunID", void 0);
7236
8696
  __decorate([
7237
8697
  Field(() => Int, { nullable: true }),
7238
8698
  __metadata("design:type", Number)
7239
- ], RunmjBizAppsOrdersOrderLineDimensionViewResult.prototype, "RowCount", void 0);
8699
+ ], RunmjBizAppsOrdersOrderLinePriceComponentViewResult.prototype, "RowCount", void 0);
7240
8700
  __decorate([
7241
8701
  Field(() => Int, { nullable: true }),
7242
8702
  __metadata("design:type", Number)
7243
- ], RunmjBizAppsOrdersOrderLineDimensionViewResult.prototype, "TotalRowCount", void 0);
8703
+ ], RunmjBizAppsOrdersOrderLinePriceComponentViewResult.prototype, "TotalRowCount", void 0);
7244
8704
  __decorate([
7245
8705
  Field(() => Int, { nullable: true }),
7246
8706
  __metadata("design:type", Number)
7247
- ], RunmjBizAppsOrdersOrderLineDimensionViewResult.prototype, "ExecutionTime", void 0);
8707
+ ], RunmjBizAppsOrdersOrderLinePriceComponentViewResult.prototype, "ExecutionTime", void 0);
7248
8708
  __decorate([
7249
8709
  Field({ nullable: true }),
7250
8710
  __metadata("design:type", String)
7251
- ], RunmjBizAppsOrdersOrderLineDimensionViewResult.prototype, "ErrorMessage", void 0);
8711
+ ], RunmjBizAppsOrdersOrderLinePriceComponentViewResult.prototype, "ErrorMessage", void 0);
7252
8712
  __decorate([
7253
8713
  Field(() => Boolean, { nullable: false }),
7254
8714
  __metadata("design:type", Boolean)
7255
- ], RunmjBizAppsOrdersOrderLineDimensionViewResult.prototype, "Success", void 0);
7256
- RunmjBizAppsOrdersOrderLineDimensionViewResult = __decorate([
8715
+ ], RunmjBizAppsOrdersOrderLinePriceComponentViewResult.prototype, "Success", void 0);
8716
+ RunmjBizAppsOrdersOrderLinePriceComponentViewResult = __decorate([
7257
8717
  ObjectType()
7258
- ], RunmjBizAppsOrdersOrderLineDimensionViewResult);
7259
- export { RunmjBizAppsOrdersOrderLineDimensionViewResult };
7260
- let mjBizAppsOrdersOrderLineDimensionResolver = class mjBizAppsOrdersOrderLineDimensionResolver extends ResolverBase {
7261
- async RunmjBizAppsOrdersOrderLineDimensionViewByID(input, { providers, userPayload }, pubSub) {
8718
+ ], RunmjBizAppsOrdersOrderLinePriceComponentViewResult);
8719
+ export { RunmjBizAppsOrdersOrderLinePriceComponentViewResult };
8720
+ let mjBizAppsOrdersOrderLinePriceComponentResolver = class mjBizAppsOrdersOrderLinePriceComponentResolver extends ResolverBase {
8721
+ async RunmjBizAppsOrdersOrderLinePriceComponentViewByID(input, { providers, userPayload }, pubSub) {
7262
8722
  const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
7263
8723
  return super.RunViewByIDGeneric(input, provider, userPayload, pubSub);
7264
8724
  }
7265
- async RunmjBizAppsOrdersOrderLineDimensionViewByName(input, { providers, userPayload }, pubSub) {
8725
+ async RunmjBizAppsOrdersOrderLinePriceComponentViewByName(input, { providers, userPayload }, pubSub) {
7266
8726
  const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
7267
8727
  return super.RunViewByNameGeneric(input, provider, userPayload, pubSub);
7268
8728
  }
7269
- async RunmjBizAppsOrdersOrderLineDimensionDynamicView(input, { providers, userPayload }, pubSub) {
8729
+ async RunmjBizAppsOrdersOrderLinePriceComponentDynamicView(input, { providers, userPayload }, pubSub) {
7270
8730
  const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
7271
- input.EntityName = 'MJ_BizApps_Orders: Order Line Dimensions';
8731
+ input.EntityName = 'MJ_BizApps_Orders: Order Line Price Components';
7272
8732
  return super.RunDynamicViewGeneric(input, provider, userPayload, pubSub);
7273
8733
  }
7274
- async mjBizAppsOrdersOrderLineDimension(ID, { userPayload, providers }, pubSub) {
7275
- this.CheckUserReadPermissions('MJ_BizApps_Orders: Order Line Dimensions', userPayload);
8734
+ async mjBizAppsOrdersOrderLinePriceComponent(ID, { userPayload, providers }, pubSub) {
8735
+ this.CheckUserReadPermissions('MJ_BizApps_Orders: Order Line Price Components', userPayload);
7276
8736
  const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
7277
- const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView('__mj_BizAppsOrders', 'vwOrderLineDimensions')} WHERE ${provider.QuoteIdentifier('ID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ_BizApps_Orders: Order Line Dimensions', userPayload, EntityPermissionType.Read, 'AND');
8737
+ const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView('__mj_BizAppsOrders', 'vwOrderLinePriceComponents')} WHERE ${provider.QuoteIdentifier('ID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ_BizApps_Orders: Order Line Price Components', userPayload, EntityPermissionType.Read, 'AND');
7278
8738
  const rows = await provider.ExecuteSQL(sSQL, [ID], undefined, this.GetUserFromPayload(userPayload));
7279
- const result = await this.MapFieldNamesToCodeNames('MJ_BizApps_Orders: Order Line Dimensions', rows && rows.length > 0 ? rows[0] : null, this.GetUserFromPayload(userPayload));
8739
+ const result = await this.MapFieldNamesToCodeNames('MJ_BizApps_Orders: Order Line Price Components', rows && rows.length > 0 ? rows[0] : null, this.GetUserFromPayload(userPayload));
7280
8740
  return result;
7281
8741
  }
7282
- async CreatemjBizAppsOrdersOrderLineDimension(input, { providers, userPayload }, pubSub) {
8742
+ async CreatemjBizAppsOrdersOrderLinePriceComponent(input, { providers, userPayload }, pubSub) {
7283
8743
  const provider = GetReadWriteProvider(providers);
7284
- return this.CreateRecord('MJ_BizApps_Orders: Order Line Dimensions', input, provider, userPayload, pubSub);
8744
+ return this.CreateRecord('MJ_BizApps_Orders: Order Line Price Components', input, provider, userPayload, pubSub);
7285
8745
  }
7286
- async UpdatemjBizAppsOrdersOrderLineDimension(input, { providers, userPayload }, pubSub) {
8746
+ async UpdatemjBizAppsOrdersOrderLinePriceComponent(input, { providers, userPayload }, pubSub) {
7287
8747
  const provider = GetReadWriteProvider(providers);
7288
- return this.UpdateRecord('MJ_BizApps_Orders: Order Line Dimensions', input, provider, userPayload, pubSub);
8748
+ return this.UpdateRecord('MJ_BizApps_Orders: Order Line Price Components', input, provider, userPayload, pubSub);
7289
8749
  }
7290
- async DeletemjBizAppsOrdersOrderLineDimension(ID, options, { providers, userPayload }, pubSub) {
8750
+ async DeletemjBizAppsOrdersOrderLinePriceComponent(ID, options, { providers, userPayload }, pubSub) {
7291
8751
  const provider = GetReadWriteProvider(providers);
7292
8752
  const key = new CompositeKey([{ FieldName: 'ID', Value: ID }]);
7293
- return this.DeleteRecord('MJ_BizApps_Orders: Order Line Dimensions', key, options, provider, userPayload, pubSub);
8753
+ return this.DeleteRecord('MJ_BizApps_Orders: Order Line Price Components', key, options, provider, userPayload, pubSub);
7294
8754
  }
7295
8755
  };
7296
8756
  __decorate([
7297
- Query(() => RunmjBizAppsOrdersOrderLineDimensionViewResult),
8757
+ Query(() => RunmjBizAppsOrdersOrderLinePriceComponentViewResult),
7298
8758
  __param(0, Arg('input', () => RunViewByIDInput)),
7299
8759
  __param(1, Ctx()),
7300
8760
  __param(2, PubSub()),
7301
8761
  __metadata("design:type", Function),
7302
8762
  __metadata("design:paramtypes", [RunViewByIDInput, Object, PubSubEngine]),
7303
8763
  __metadata("design:returntype", Promise)
7304
- ], mjBizAppsOrdersOrderLineDimensionResolver.prototype, "RunmjBizAppsOrdersOrderLineDimensionViewByID", null);
8764
+ ], mjBizAppsOrdersOrderLinePriceComponentResolver.prototype, "RunmjBizAppsOrdersOrderLinePriceComponentViewByID", null);
7305
8765
  __decorate([
7306
- Query(() => RunmjBizAppsOrdersOrderLineDimensionViewResult),
8766
+ Query(() => RunmjBizAppsOrdersOrderLinePriceComponentViewResult),
7307
8767
  __param(0, Arg('input', () => RunViewByNameInput)),
7308
8768
  __param(1, Ctx()),
7309
8769
  __param(2, PubSub()),
7310
8770
  __metadata("design:type", Function),
7311
8771
  __metadata("design:paramtypes", [RunViewByNameInput, Object, PubSubEngine]),
7312
8772
  __metadata("design:returntype", Promise)
7313
- ], mjBizAppsOrdersOrderLineDimensionResolver.prototype, "RunmjBizAppsOrdersOrderLineDimensionViewByName", null);
8773
+ ], mjBizAppsOrdersOrderLinePriceComponentResolver.prototype, "RunmjBizAppsOrdersOrderLinePriceComponentViewByName", null);
7314
8774
  __decorate([
7315
- Query(() => RunmjBizAppsOrdersOrderLineDimensionViewResult),
8775
+ Query(() => RunmjBizAppsOrdersOrderLinePriceComponentViewResult),
7316
8776
  __param(0, Arg('input', () => RunDynamicViewInput)),
7317
8777
  __param(1, Ctx()),
7318
8778
  __param(2, PubSub()),
7319
8779
  __metadata("design:type", Function),
7320
8780
  __metadata("design:paramtypes", [RunDynamicViewInput, Object, PubSubEngine]),
7321
8781
  __metadata("design:returntype", Promise)
7322
- ], mjBizAppsOrdersOrderLineDimensionResolver.prototype, "RunmjBizAppsOrdersOrderLineDimensionDynamicView", null);
8782
+ ], mjBizAppsOrdersOrderLinePriceComponentResolver.prototype, "RunmjBizAppsOrdersOrderLinePriceComponentDynamicView", null);
7323
8783
  __decorate([
7324
- Query(() => mjBizAppsOrdersOrderLineDimension_, { nullable: true }),
8784
+ Query(() => mjBizAppsOrdersOrderLinePriceComponent_, { nullable: true }),
7325
8785
  __param(0, Arg('ID', () => String)),
7326
8786
  __param(1, Ctx()),
7327
8787
  __param(2, PubSub()),
7328
8788
  __metadata("design:type", Function),
7329
8789
  __metadata("design:paramtypes", [String, Object, PubSubEngine]),
7330
8790
  __metadata("design:returntype", Promise)
7331
- ], mjBizAppsOrdersOrderLineDimensionResolver.prototype, "mjBizAppsOrdersOrderLineDimension", null);
8791
+ ], mjBizAppsOrdersOrderLinePriceComponentResolver.prototype, "mjBizAppsOrdersOrderLinePriceComponent", null);
7332
8792
  __decorate([
7333
- Mutation(() => mjBizAppsOrdersOrderLineDimension_),
7334
- __param(0, Arg('input', () => CreatemjBizAppsOrdersOrderLineDimensionInput)),
8793
+ Mutation(() => mjBizAppsOrdersOrderLinePriceComponent_),
8794
+ __param(0, Arg('input', () => CreatemjBizAppsOrdersOrderLinePriceComponentInput)),
7335
8795
  __param(1, Ctx()),
7336
8796
  __param(2, PubSub()),
7337
8797
  __metadata("design:type", Function),
7338
- __metadata("design:paramtypes", [CreatemjBizAppsOrdersOrderLineDimensionInput, Object, PubSubEngine]),
8798
+ __metadata("design:paramtypes", [CreatemjBizAppsOrdersOrderLinePriceComponentInput, Object, PubSubEngine]),
7339
8799
  __metadata("design:returntype", Promise)
7340
- ], mjBizAppsOrdersOrderLineDimensionResolver.prototype, "CreatemjBizAppsOrdersOrderLineDimension", null);
8800
+ ], mjBizAppsOrdersOrderLinePriceComponentResolver.prototype, "CreatemjBizAppsOrdersOrderLinePriceComponent", null);
7341
8801
  __decorate([
7342
- Mutation(() => mjBizAppsOrdersOrderLineDimension_),
7343
- __param(0, Arg('input', () => UpdatemjBizAppsOrdersOrderLineDimensionInput)),
8802
+ Mutation(() => mjBizAppsOrdersOrderLinePriceComponent_),
8803
+ __param(0, Arg('input', () => UpdatemjBizAppsOrdersOrderLinePriceComponentInput)),
7344
8804
  __param(1, Ctx()),
7345
8805
  __param(2, PubSub()),
7346
8806
  __metadata("design:type", Function),
7347
- __metadata("design:paramtypes", [UpdatemjBizAppsOrdersOrderLineDimensionInput, Object, PubSubEngine]),
8807
+ __metadata("design:paramtypes", [UpdatemjBizAppsOrdersOrderLinePriceComponentInput, Object, PubSubEngine]),
7348
8808
  __metadata("design:returntype", Promise)
7349
- ], mjBizAppsOrdersOrderLineDimensionResolver.prototype, "UpdatemjBizAppsOrdersOrderLineDimension", null);
8809
+ ], mjBizAppsOrdersOrderLinePriceComponentResolver.prototype, "UpdatemjBizAppsOrdersOrderLinePriceComponent", null);
7350
8810
  __decorate([
7351
- Mutation(() => mjBizAppsOrdersOrderLineDimension_),
8811
+ Mutation(() => mjBizAppsOrdersOrderLinePriceComponent_),
7352
8812
  __param(0, Arg('ID', () => String)),
7353
8813
  __param(1, Arg('options___', () => DeleteOptionsInput)),
7354
8814
  __param(2, Ctx()),
@@ -7356,310 +8816,397 @@ __decorate([
7356
8816
  __metadata("design:type", Function),
7357
8817
  __metadata("design:paramtypes", [String, DeleteOptionsInput, Object, PubSubEngine]),
7358
8818
  __metadata("design:returntype", Promise)
7359
- ], mjBizAppsOrdersOrderLineDimensionResolver.prototype, "DeletemjBizAppsOrdersOrderLineDimension", null);
7360
- mjBizAppsOrdersOrderLineDimensionResolver = __decorate([
7361
- Resolver(mjBizAppsOrdersOrderLineDimension_)
7362
- ], mjBizAppsOrdersOrderLineDimensionResolver);
7363
- export { mjBizAppsOrdersOrderLineDimensionResolver };
8819
+ ], mjBizAppsOrdersOrderLinePriceComponentResolver.prototype, "DeletemjBizAppsOrdersOrderLinePriceComponent", null);
8820
+ mjBizAppsOrdersOrderLinePriceComponentResolver = __decorate([
8821
+ Resolver(mjBizAppsOrdersOrderLinePriceComponent_)
8822
+ ], mjBizAppsOrdersOrderLinePriceComponentResolver);
8823
+ export { mjBizAppsOrdersOrderLinePriceComponentResolver };
7364
8824
  //****************************************************************************
7365
- // ENTITY CLASS for MJ_BizApps_Orders: Order Line Price Components
8825
+ // ENTITY CLASS for MJ_BizApps_Orders: Order Line Progress Measurements
7366
8826
  //****************************************************************************
7367
- let mjBizAppsOrdersOrderLinePriceComponent_ = class mjBizAppsOrdersOrderLinePriceComponent_ {
8827
+ let mjBizAppsOrdersOrderLineProgressMeasurement_ = class mjBizAppsOrdersOrderLineProgressMeasurement_ {
7368
8828
  };
7369
8829
  __decorate([
7370
8830
  Field(),
7371
8831
  MaxLength(36),
7372
8832
  __metadata("design:type", String)
7373
- ], mjBizAppsOrdersOrderLinePriceComponent_.prototype, "ID", void 0);
8833
+ ], mjBizAppsOrdersOrderLineProgressMeasurement_.prototype, "ID", void 0);
7374
8834
  __decorate([
7375
- Field({ nullable: true }),
8835
+ Field({ description: `The percentage-of-completion order line this observation is about.` }),
7376
8836
  MaxLength(36),
7377
8837
  __metadata("design:type", String)
7378
- ], mjBizAppsOrdersOrderLinePriceComponent_.prototype, "OrderLineID", void 0);
8838
+ ], mjBizAppsOrdersOrderLineProgressMeasurement_.prototype, "OrderLineID", void 0);
7379
8839
  __decorate([
7380
- Field(() => Int, { nullable: true }),
8840
+ Field({ description: `The date this observation governs — the period it belongs to on the close calendar. One observation per line per date (UQ_OLPM_Period); it is also the recognition entry's EffectiveDate.` }),
8841
+ __metadata("design:type", Date)
8842
+ ], mjBizAppsOrdersOrderLineProgressMeasurement_.prototype, "MeasurementDate", void 0);
8843
+ __decorate([
8844
+ Field(() => Float, { description: `CUMULATIVE fraction earned to date, 0..1. Not the increment: the entry is target (LineTotalNet × PercentComplete) minus what is already recognised.` }),
7381
8845
  __metadata("design:type", Number)
7382
- ], mjBizAppsOrdersOrderLinePriceComponent_.prototype, "Sequence", void 0);
8846
+ ], mjBizAppsOrdersOrderLineProgressMeasurement_.prototype, "PercentComplete", void 0);
7383
8847
  __decorate([
7384
- Field({ nullable: true, description: `Base | Rule | Adjustment | Charge | Tax - which pipeline stage produced this component.` }),
7385
- MaxLength(20),
8848
+ Field({ description: `The ProgressRecognitionDriver that produced the percent — ManualAttestation is the one that ships. Whatever the method, a named person signs the observation and the attestation is what posts.` }),
8849
+ MaxLength(40),
7386
8850
  __metadata("design:type", String)
7387
- ], mjBizAppsOrdersOrderLinePriceComponent_.prototype, "ComponentType", void 0);
8851
+ ], mjBizAppsOrdersOrderLineProgressMeasurement_.prototype, "MethodCode", void 0);
7388
8852
  __decorate([
7389
- Field({ nullable: true }),
7390
- MaxLength(200),
8853
+ Field(() => Float, { nullable: true, description: `Optional quantitative input behind the percent (cost incurred, units delivered), kept for audit. PercentComplete drives the entry regardless.` }),
8854
+ __metadata("design:type", Number)
8855
+ ], mjBizAppsOrdersOrderLineProgressMeasurement_.prototype, "MeasureNumerator", void 0);
8856
+ __decorate([
8857
+ Field(() => Float, { nullable: true, description: `Optional quantitative denominator behind the percent (estimated total cost, total units), kept for audit.` }),
8858
+ __metadata("design:type", Number)
8859
+ ], mjBizAppsOrdersOrderLineProgressMeasurement_.prototype, "MeasureDenominator", void 0);
8860
+ __decorate([
8861
+ Field({ nullable: true, description: `Who signed this observation. Every recognition entry names the observation and the person who signed it.` }),
8862
+ MaxLength(36),
7391
8863
  __metadata("design:type", String)
7392
- ], mjBizAppsOrdersOrderLinePriceComponent_.prototype, "Label", void 0);
8864
+ ], mjBizAppsOrdersOrderLineProgressMeasurement_.prototype, "AttestedByUserID", void 0);
7393
8865
  __decorate([
7394
- Field(() => Float, { nullable: true, description: `SIGNED: negative for a discount, positive for a charge.` }),
8866
+ Field({ nullable: true, description: `Where a derived number came from, when it was derived (entity). NULL for a plain attestation.` }),
8867
+ MaxLength(36),
8868
+ __metadata("design:type", String)
8869
+ ], mjBizAppsOrdersOrderLineProgressMeasurement_.prototype, "SourceEntityID", void 0);
8870
+ __decorate([
8871
+ Field({ nullable: true, description: `Where a derived number came from, when it was derived (record). NULL for a plain attestation.` }),
8872
+ MaxLength(400),
8873
+ __metadata("design:type", String)
8874
+ ], mjBizAppsOrdersOrderLineProgressMeasurement_.prototype, "SourceRecordID", void 0);
8875
+ __decorate([
8876
+ Field({ nullable: true, description: `Free text from the signer.` }),
8877
+ __metadata("design:type", String)
8878
+ ], mjBizAppsOrdersOrderLineProgressMeasurement_.prototype, "Notes", void 0);
8879
+ __decorate([
8880
+ Field(() => Float, { nullable: true, description: `Revenue recognised on the line before this observation posted. Materialised for the audit chain; agrees with the sum of posted recognition entries for the line.` }),
7395
8881
  __metadata("design:type", Number)
7396
- ], mjBizAppsOrdersOrderLinePriceComponent_.prototype, "Amount", void 0);
8882
+ ], mjBizAppsOrdersOrderLineProgressMeasurement_.prototype, "RecognizedToDateBefore", void 0);
7397
8883
  __decorate([
7398
- Field(() => Float, { nullable: true, description: `The line total after this component, so the decomposition reads top to bottom.` }),
8884
+ Field(() => Float, { nullable: true, description: `Revenue recognised on the line after this observation posted: LineTotalNet × PercentComplete, rounded to the cent. At 100% it is the line amount exactly.` }),
7399
8885
  __metadata("design:type", Number)
7400
- ], mjBizAppsOrdersOrderLinePriceComponent_.prototype, "RunningTotal", void 0);
8886
+ ], mjBizAppsOrdersOrderLineProgressMeasurement_.prototype, "RecognizedToDateAfter", void 0);
7401
8887
  __decorate([
7402
- Field({ nullable: true, description: `The MJ Entity of whatever produced this component. Set together with SourceRecordID, or neither.` }),
8888
+ Field(() => Float, { nullable: true, description: `The delta this observation posted: After − Before. NEGATIVE on a backward slide (the entry is mirrored, Dr Sales / Cr Deferred Revenue). Zero when the observation moved nothing, in which case no entry was written.` }),
8889
+ __metadata("design:type", Number)
8890
+ ], mjBizAppsOrdersOrderLineProgressMeasurement_.prototype, "RecognitionAmount", void 0);
8891
+ __decorate([
8892
+ Field({ nullable: true, description: `The RevenueRecognition journal entry this observation produced. Soft reference into accounting. NULL when the delta was zero.` }),
7403
8893
  MaxLength(36),
7404
8894
  __metadata("design:type", String)
7405
- ], mjBizAppsOrdersOrderLinePriceComponent_.prototype, "SourceEntityID", void 0);
8895
+ ], mjBizAppsOrdersOrderLineProgressMeasurement_.prototype, "JournalEntryID", void 0);
7406
8896
  __decorate([
7407
- Field({ nullable: true, description: `Primary key of the producing record, as text. A soft reference by nature - it points at whichever table the stage used.` }),
7408
- MaxLength(400),
8897
+ Field({ description: `Draft | Posted. Orders.RecordProgress writes Posted rows; a Posted row is immutable (trigger). Draft is reserved for an observation saved before it is posted.` }),
8898
+ MaxLength(20),
7409
8899
  __metadata("design:type", String)
7410
- ], mjBizAppsOrdersOrderLinePriceComponent_.prototype, "SourceRecordID", void 0);
8900
+ ], mjBizAppsOrdersOrderLineProgressMeasurement_.prototype, "Status", void 0);
7411
8901
  __decorate([
7412
8902
  Field(),
7413
8903
  __metadata("design:type", Date)
7414
- ], mjBizAppsOrdersOrderLinePriceComponent_.prototype, "_mj__CreatedAt", void 0);
8904
+ ], mjBizAppsOrdersOrderLineProgressMeasurement_.prototype, "_mj__CreatedAt", void 0);
7415
8905
  __decorate([
7416
8906
  Field(),
7417
8907
  __metadata("design:type", Date)
7418
- ], mjBizAppsOrdersOrderLinePriceComponent_.prototype, "_mj__UpdatedAt", void 0);
8908
+ ], mjBizAppsOrdersOrderLineProgressMeasurement_.prototype, "_mj__UpdatedAt", void 0);
7419
8909
  __decorate([
7420
8910
  Field({ nullable: true }),
7421
- MaxLength(255),
8911
+ MaxLength(100),
7422
8912
  __metadata("design:type", String)
7423
- ], mjBizAppsOrdersOrderLinePriceComponent_.prototype, "SourceEntity", void 0);
8913
+ ], mjBizAppsOrdersOrderLineProgressMeasurement_.prototype, "AttestedByUser", void 0);
7424
8914
  __decorate([
7425
- Field(() => [String], { nullable: true, description: `Field-level security: when non-null, the fields on this entity the calling user may read. Any other field arriving as null was withheld by the server rather than genuinely empty. Null for callers with no field restrictions.` }),
7426
- __metadata("design:type", Array)
7427
- ], mjBizAppsOrdersOrderLinePriceComponent_.prototype, "ReadableFields___", void 0);
7428
- mjBizAppsOrdersOrderLinePriceComponent_ = __decorate([
7429
- ObjectType({ description: `How a line\'s total was arrived at, one row per pipeline stage with a running total. Pricing disputes are inevitable and \'the system computed it\' is not an answer to a customer or an auditor. Provenance uses the polymorphic origin pair so a component can point at a ProductPrice, a Promotion, an OrderCharge or a TaxRate without a column per source type.` })
7430
- ], mjBizAppsOrdersOrderLinePriceComponent_);
7431
- export { mjBizAppsOrdersOrderLinePriceComponent_ };
8915
+ Field({ nullable: true }),
8916
+ MaxLength(255),
8917
+ __metadata("design:type", String)
8918
+ ], mjBizAppsOrdersOrderLineProgressMeasurement_.prototype, "SourceEntity", void 0);
8919
+ mjBizAppsOrdersOrderLineProgressMeasurement_ = __decorate([
8920
+ ObjectType({ description: `One attested progress observation on a percentage-of-completion order line (D90). PercentComplete is CUMULATIVE; Orders.RecordProgress posts the difference between the target it implies and what is already recognised, so a backward slide reverses through the same subtraction. A Posted row is immutable — corrections happen forward, in the next observation.` })
8921
+ ], mjBizAppsOrdersOrderLineProgressMeasurement_);
8922
+ export { mjBizAppsOrdersOrderLineProgressMeasurement_ };
7432
8923
  //****************************************************************************
7433
- // INPUT TYPE for MJ_BizApps_Orders: Order Line Price Components
8924
+ // INPUT TYPE for MJ_BizApps_Orders: Order Line Progress Measurements
7434
8925
  //****************************************************************************
7435
- let CreatemjBizAppsOrdersOrderLinePriceComponentInput = class CreatemjBizAppsOrdersOrderLinePriceComponentInput {
8926
+ let CreatemjBizAppsOrdersOrderLineProgressMeasurementInput = class CreatemjBizAppsOrdersOrderLineProgressMeasurementInput {
7436
8927
  };
7437
8928
  __decorate([
7438
8929
  Field({ nullable: true }),
7439
8930
  __metadata("design:type", String)
7440
- ], CreatemjBizAppsOrdersOrderLinePriceComponentInput.prototype, "ID", void 0);
8931
+ ], CreatemjBizAppsOrdersOrderLineProgressMeasurementInput.prototype, "ID", void 0);
7441
8932
  __decorate([
7442
8933
  Field({ nullable: true }),
7443
8934
  __metadata("design:type", String)
7444
- ], CreatemjBizAppsOrdersOrderLinePriceComponentInput.prototype, "OrderLineID", void 0);
8935
+ ], CreatemjBizAppsOrdersOrderLineProgressMeasurementInput.prototype, "OrderLineID", void 0);
7445
8936
  __decorate([
7446
- Field(() => Int, { nullable: true }),
8937
+ Field({ nullable: true }),
8938
+ __metadata("design:type", Date)
8939
+ ], CreatemjBizAppsOrdersOrderLineProgressMeasurementInput.prototype, "MeasurementDate", void 0);
8940
+ __decorate([
8941
+ Field(() => Float, { nullable: true }),
7447
8942
  __metadata("design:type", Number)
7448
- ], CreatemjBizAppsOrdersOrderLinePriceComponentInput.prototype, "Sequence", void 0);
8943
+ ], CreatemjBizAppsOrdersOrderLineProgressMeasurementInput.prototype, "PercentComplete", void 0);
7449
8944
  __decorate([
7450
8945
  Field({ nullable: true }),
7451
8946
  __metadata("design:type", String)
7452
- ], CreatemjBizAppsOrdersOrderLinePriceComponentInput.prototype, "ComponentType", void 0);
8947
+ ], CreatemjBizAppsOrdersOrderLineProgressMeasurementInput.prototype, "MethodCode", void 0);
8948
+ __decorate([
8949
+ Field(() => Float, { nullable: true }),
8950
+ __metadata("design:type", Number)
8951
+ ], CreatemjBizAppsOrdersOrderLineProgressMeasurementInput.prototype, "MeasureNumerator", void 0);
8952
+ __decorate([
8953
+ Field(() => Float, { nullable: true }),
8954
+ __metadata("design:type", Number)
8955
+ ], CreatemjBizAppsOrdersOrderLineProgressMeasurementInput.prototype, "MeasureDenominator", void 0);
7453
8956
  __decorate([
7454
8957
  Field({ nullable: true }),
7455
8958
  __metadata("design:type", String)
7456
- ], CreatemjBizAppsOrdersOrderLinePriceComponentInput.prototype, "Label", void 0);
8959
+ ], CreatemjBizAppsOrdersOrderLineProgressMeasurementInput.prototype, "AttestedByUserID", void 0);
8960
+ __decorate([
8961
+ Field({ nullable: true }),
8962
+ __metadata("design:type", String)
8963
+ ], CreatemjBizAppsOrdersOrderLineProgressMeasurementInput.prototype, "SourceEntityID", void 0);
8964
+ __decorate([
8965
+ Field({ nullable: true }),
8966
+ __metadata("design:type", String)
8967
+ ], CreatemjBizAppsOrdersOrderLineProgressMeasurementInput.prototype, "SourceRecordID", void 0);
8968
+ __decorate([
8969
+ Field({ nullable: true }),
8970
+ __metadata("design:type", String)
8971
+ ], CreatemjBizAppsOrdersOrderLineProgressMeasurementInput.prototype, "Notes", void 0);
7457
8972
  __decorate([
7458
8973
  Field(() => Float, { nullable: true }),
7459
8974
  __metadata("design:type", Number)
7460
- ], CreatemjBizAppsOrdersOrderLinePriceComponentInput.prototype, "Amount", void 0);
8975
+ ], CreatemjBizAppsOrdersOrderLineProgressMeasurementInput.prototype, "RecognizedToDateBefore", void 0);
7461
8976
  __decorate([
7462
8977
  Field(() => Float, { nullable: true }),
7463
8978
  __metadata("design:type", Number)
7464
- ], CreatemjBizAppsOrdersOrderLinePriceComponentInput.prototype, "RunningTotal", void 0);
8979
+ ], CreatemjBizAppsOrdersOrderLineProgressMeasurementInput.prototype, "RecognizedToDateAfter", void 0);
8980
+ __decorate([
8981
+ Field(() => Float, { nullable: true }),
8982
+ __metadata("design:type", Number)
8983
+ ], CreatemjBizAppsOrdersOrderLineProgressMeasurementInput.prototype, "RecognitionAmount", void 0);
7465
8984
  __decorate([
7466
8985
  Field({ nullable: true }),
7467
8986
  __metadata("design:type", String)
7468
- ], CreatemjBizAppsOrdersOrderLinePriceComponentInput.prototype, "SourceEntityID", void 0);
8987
+ ], CreatemjBizAppsOrdersOrderLineProgressMeasurementInput.prototype, "JournalEntryID", void 0);
7469
8988
  __decorate([
7470
8989
  Field({ nullable: true }),
7471
8990
  __metadata("design:type", String)
7472
- ], CreatemjBizAppsOrdersOrderLinePriceComponentInput.prototype, "SourceRecordID", void 0);
8991
+ ], CreatemjBizAppsOrdersOrderLineProgressMeasurementInput.prototype, "Status", void 0);
7473
8992
  __decorate([
7474
8993
  Field(() => RestoreContextInput, { nullable: true }),
7475
8994
  __metadata("design:type", RestoreContextInput)
7476
- ], CreatemjBizAppsOrdersOrderLinePriceComponentInput.prototype, "RestoreContext___", void 0);
7477
- CreatemjBizAppsOrdersOrderLinePriceComponentInput = __decorate([
8995
+ ], CreatemjBizAppsOrdersOrderLineProgressMeasurementInput.prototype, "RestoreContext___", void 0);
8996
+ CreatemjBizAppsOrdersOrderLineProgressMeasurementInput = __decorate([
7478
8997
  InputType()
7479
- ], CreatemjBizAppsOrdersOrderLinePriceComponentInput);
7480
- export { CreatemjBizAppsOrdersOrderLinePriceComponentInput };
8998
+ ], CreatemjBizAppsOrdersOrderLineProgressMeasurementInput);
8999
+ export { CreatemjBizAppsOrdersOrderLineProgressMeasurementInput };
7481
9000
  //****************************************************************************
7482
- // INPUT TYPE for MJ_BizApps_Orders: Order Line Price Components
9001
+ // INPUT TYPE for MJ_BizApps_Orders: Order Line Progress Measurements
7483
9002
  //****************************************************************************
7484
- let UpdatemjBizAppsOrdersOrderLinePriceComponentInput = class UpdatemjBizAppsOrdersOrderLinePriceComponentInput {
9003
+ let UpdatemjBizAppsOrdersOrderLineProgressMeasurementInput = class UpdatemjBizAppsOrdersOrderLineProgressMeasurementInput {
7485
9004
  };
7486
9005
  __decorate([
7487
9006
  Field(),
7488
9007
  __metadata("design:type", String)
7489
- ], UpdatemjBizAppsOrdersOrderLinePriceComponentInput.prototype, "ID", void 0);
9008
+ ], UpdatemjBizAppsOrdersOrderLineProgressMeasurementInput.prototype, "ID", void 0);
7490
9009
  __decorate([
7491
9010
  Field({ nullable: true }),
7492
9011
  __metadata("design:type", String)
7493
- ], UpdatemjBizAppsOrdersOrderLinePriceComponentInput.prototype, "OrderLineID", void 0);
9012
+ ], UpdatemjBizAppsOrdersOrderLineProgressMeasurementInput.prototype, "OrderLineID", void 0);
7494
9013
  __decorate([
7495
- Field(() => Int, { nullable: true }),
9014
+ Field({ nullable: true }),
9015
+ __metadata("design:type", Date)
9016
+ ], UpdatemjBizAppsOrdersOrderLineProgressMeasurementInput.prototype, "MeasurementDate", void 0);
9017
+ __decorate([
9018
+ Field(() => Float, { nullable: true }),
7496
9019
  __metadata("design:type", Number)
7497
- ], UpdatemjBizAppsOrdersOrderLinePriceComponentInput.prototype, "Sequence", void 0);
9020
+ ], UpdatemjBizAppsOrdersOrderLineProgressMeasurementInput.prototype, "PercentComplete", void 0);
7498
9021
  __decorate([
7499
9022
  Field({ nullable: true }),
7500
9023
  __metadata("design:type", String)
7501
- ], UpdatemjBizAppsOrdersOrderLinePriceComponentInput.prototype, "ComponentType", void 0);
9024
+ ], UpdatemjBizAppsOrdersOrderLineProgressMeasurementInput.prototype, "MethodCode", void 0);
9025
+ __decorate([
9026
+ Field(() => Float, { nullable: true }),
9027
+ __metadata("design:type", Number)
9028
+ ], UpdatemjBizAppsOrdersOrderLineProgressMeasurementInput.prototype, "MeasureNumerator", void 0);
9029
+ __decorate([
9030
+ Field(() => Float, { nullable: true }),
9031
+ __metadata("design:type", Number)
9032
+ ], UpdatemjBizAppsOrdersOrderLineProgressMeasurementInput.prototype, "MeasureDenominator", void 0);
7502
9033
  __decorate([
7503
9034
  Field({ nullable: true }),
7504
9035
  __metadata("design:type", String)
7505
- ], UpdatemjBizAppsOrdersOrderLinePriceComponentInput.prototype, "Label", void 0);
9036
+ ], UpdatemjBizAppsOrdersOrderLineProgressMeasurementInput.prototype, "AttestedByUserID", void 0);
9037
+ __decorate([
9038
+ Field({ nullable: true }),
9039
+ __metadata("design:type", String)
9040
+ ], UpdatemjBizAppsOrdersOrderLineProgressMeasurementInput.prototype, "SourceEntityID", void 0);
9041
+ __decorate([
9042
+ Field({ nullable: true }),
9043
+ __metadata("design:type", String)
9044
+ ], UpdatemjBizAppsOrdersOrderLineProgressMeasurementInput.prototype, "SourceRecordID", void 0);
9045
+ __decorate([
9046
+ Field({ nullable: true }),
9047
+ __metadata("design:type", String)
9048
+ ], UpdatemjBizAppsOrdersOrderLineProgressMeasurementInput.prototype, "Notes", void 0);
7506
9049
  __decorate([
7507
9050
  Field(() => Float, { nullable: true }),
7508
9051
  __metadata("design:type", Number)
7509
- ], UpdatemjBizAppsOrdersOrderLinePriceComponentInput.prototype, "Amount", void 0);
9052
+ ], UpdatemjBizAppsOrdersOrderLineProgressMeasurementInput.prototype, "RecognizedToDateBefore", void 0);
7510
9053
  __decorate([
7511
9054
  Field(() => Float, { nullable: true }),
7512
9055
  __metadata("design:type", Number)
7513
- ], UpdatemjBizAppsOrdersOrderLinePriceComponentInput.prototype, "RunningTotal", void 0);
9056
+ ], UpdatemjBizAppsOrdersOrderLineProgressMeasurementInput.prototype, "RecognizedToDateAfter", void 0);
9057
+ __decorate([
9058
+ Field(() => Float, { nullable: true }),
9059
+ __metadata("design:type", Number)
9060
+ ], UpdatemjBizAppsOrdersOrderLineProgressMeasurementInput.prototype, "RecognitionAmount", void 0);
7514
9061
  __decorate([
7515
9062
  Field({ nullable: true }),
7516
9063
  __metadata("design:type", String)
7517
- ], UpdatemjBizAppsOrdersOrderLinePriceComponentInput.prototype, "SourceEntityID", void 0);
9064
+ ], UpdatemjBizAppsOrdersOrderLineProgressMeasurementInput.prototype, "JournalEntryID", void 0);
7518
9065
  __decorate([
7519
9066
  Field({ nullable: true }),
7520
9067
  __metadata("design:type", String)
7521
- ], UpdatemjBizAppsOrdersOrderLinePriceComponentInput.prototype, "SourceRecordID", void 0);
9068
+ ], UpdatemjBizAppsOrdersOrderLineProgressMeasurementInput.prototype, "Status", void 0);
7522
9069
  __decorate([
7523
9070
  Field(() => [KeyValuePairInput], { nullable: true }),
7524
9071
  __metadata("design:type", Array)
7525
- ], UpdatemjBizAppsOrdersOrderLinePriceComponentInput.prototype, "OldValues___", void 0);
9072
+ ], UpdatemjBizAppsOrdersOrderLineProgressMeasurementInput.prototype, "OldValues___", void 0);
7526
9073
  __decorate([
7527
9074
  Field(() => RestoreContextInput, { nullable: true }),
7528
9075
  __metadata("design:type", RestoreContextInput)
7529
- ], UpdatemjBizAppsOrdersOrderLinePriceComponentInput.prototype, "RestoreContext___", void 0);
7530
- UpdatemjBizAppsOrdersOrderLinePriceComponentInput = __decorate([
9076
+ ], UpdatemjBizAppsOrdersOrderLineProgressMeasurementInput.prototype, "RestoreContext___", void 0);
9077
+ UpdatemjBizAppsOrdersOrderLineProgressMeasurementInput = __decorate([
7531
9078
  InputType()
7532
- ], UpdatemjBizAppsOrdersOrderLinePriceComponentInput);
7533
- export { UpdatemjBizAppsOrdersOrderLinePriceComponentInput };
9079
+ ], UpdatemjBizAppsOrdersOrderLineProgressMeasurementInput);
9080
+ export { UpdatemjBizAppsOrdersOrderLineProgressMeasurementInput };
7534
9081
  //****************************************************************************
7535
- // RESOLVER for MJ_BizApps_Orders: Order Line Price Components
9082
+ // RESOLVER for MJ_BizApps_Orders: Order Line Progress Measurements
7536
9083
  //****************************************************************************
7537
- let RunmjBizAppsOrdersOrderLinePriceComponentViewResult = class RunmjBizAppsOrdersOrderLinePriceComponentViewResult {
9084
+ let RunmjBizAppsOrdersOrderLineProgressMeasurementViewResult = class RunmjBizAppsOrdersOrderLineProgressMeasurementViewResult {
7538
9085
  };
7539
9086
  __decorate([
7540
- Field(() => [mjBizAppsOrdersOrderLinePriceComponent_]),
9087
+ Field(() => [mjBizAppsOrdersOrderLineProgressMeasurement_]),
7541
9088
  __metadata("design:type", Array)
7542
- ], RunmjBizAppsOrdersOrderLinePriceComponentViewResult.prototype, "Results", void 0);
9089
+ ], RunmjBizAppsOrdersOrderLineProgressMeasurementViewResult.prototype, "Results", void 0);
7543
9090
  __decorate([
7544
9091
  Field(() => String, { nullable: true }),
7545
9092
  __metadata("design:type", String)
7546
- ], RunmjBizAppsOrdersOrderLinePriceComponentViewResult.prototype, "UserViewRunID", void 0);
9093
+ ], RunmjBizAppsOrdersOrderLineProgressMeasurementViewResult.prototype, "UserViewRunID", void 0);
7547
9094
  __decorate([
7548
9095
  Field(() => Int, { nullable: true }),
7549
9096
  __metadata("design:type", Number)
7550
- ], RunmjBizAppsOrdersOrderLinePriceComponentViewResult.prototype, "RowCount", void 0);
9097
+ ], RunmjBizAppsOrdersOrderLineProgressMeasurementViewResult.prototype, "RowCount", void 0);
7551
9098
  __decorate([
7552
9099
  Field(() => Int, { nullable: true }),
7553
9100
  __metadata("design:type", Number)
7554
- ], RunmjBizAppsOrdersOrderLinePriceComponentViewResult.prototype, "TotalRowCount", void 0);
9101
+ ], RunmjBizAppsOrdersOrderLineProgressMeasurementViewResult.prototype, "TotalRowCount", void 0);
7555
9102
  __decorate([
7556
9103
  Field(() => Int, { nullable: true }),
7557
9104
  __metadata("design:type", Number)
7558
- ], RunmjBizAppsOrdersOrderLinePriceComponentViewResult.prototype, "ExecutionTime", void 0);
9105
+ ], RunmjBizAppsOrdersOrderLineProgressMeasurementViewResult.prototype, "ExecutionTime", void 0);
7559
9106
  __decorate([
7560
9107
  Field({ nullable: true }),
7561
9108
  __metadata("design:type", String)
7562
- ], RunmjBizAppsOrdersOrderLinePriceComponentViewResult.prototype, "ErrorMessage", void 0);
9109
+ ], RunmjBizAppsOrdersOrderLineProgressMeasurementViewResult.prototype, "ErrorMessage", void 0);
7563
9110
  __decorate([
7564
9111
  Field(() => Boolean, { nullable: false }),
7565
9112
  __metadata("design:type", Boolean)
7566
- ], RunmjBizAppsOrdersOrderLinePriceComponentViewResult.prototype, "Success", void 0);
7567
- RunmjBizAppsOrdersOrderLinePriceComponentViewResult = __decorate([
9113
+ ], RunmjBizAppsOrdersOrderLineProgressMeasurementViewResult.prototype, "Success", void 0);
9114
+ RunmjBizAppsOrdersOrderLineProgressMeasurementViewResult = __decorate([
7568
9115
  ObjectType()
7569
- ], RunmjBizAppsOrdersOrderLinePriceComponentViewResult);
7570
- export { RunmjBizAppsOrdersOrderLinePriceComponentViewResult };
7571
- let mjBizAppsOrdersOrderLinePriceComponentResolver = class mjBizAppsOrdersOrderLinePriceComponentResolver extends ResolverBase {
7572
- async RunmjBizAppsOrdersOrderLinePriceComponentViewByID(input, { providers, userPayload }, pubSub) {
9116
+ ], RunmjBizAppsOrdersOrderLineProgressMeasurementViewResult);
9117
+ export { RunmjBizAppsOrdersOrderLineProgressMeasurementViewResult };
9118
+ let mjBizAppsOrdersOrderLineProgressMeasurementResolver = class mjBizAppsOrdersOrderLineProgressMeasurementResolver extends ResolverBase {
9119
+ async RunmjBizAppsOrdersOrderLineProgressMeasurementViewByID(input, { providers, userPayload }, pubSub) {
7573
9120
  const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
7574
9121
  return super.RunViewByIDGeneric(input, provider, userPayload, pubSub);
7575
9122
  }
7576
- async RunmjBizAppsOrdersOrderLinePriceComponentViewByName(input, { providers, userPayload }, pubSub) {
9123
+ async RunmjBizAppsOrdersOrderLineProgressMeasurementViewByName(input, { providers, userPayload }, pubSub) {
7577
9124
  const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
7578
9125
  return super.RunViewByNameGeneric(input, provider, userPayload, pubSub);
7579
9126
  }
7580
- async RunmjBizAppsOrdersOrderLinePriceComponentDynamicView(input, { providers, userPayload }, pubSub) {
9127
+ async RunmjBizAppsOrdersOrderLineProgressMeasurementDynamicView(input, { providers, userPayload }, pubSub) {
7581
9128
  const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
7582
- input.EntityName = 'MJ_BizApps_Orders: Order Line Price Components';
9129
+ input.EntityName = 'MJ_BizApps_Orders: Order Line Progress Measurements';
7583
9130
  return super.RunDynamicViewGeneric(input, provider, userPayload, pubSub);
7584
9131
  }
7585
- async mjBizAppsOrdersOrderLinePriceComponent(ID, { userPayload, providers }, pubSub) {
7586
- this.CheckUserReadPermissions('MJ_BizApps_Orders: Order Line Price Components', userPayload);
9132
+ async mjBizAppsOrdersOrderLineProgressMeasurement(ID, { userPayload, providers }, pubSub) {
9133
+ this.CheckUserReadPermissions('MJ_BizApps_Orders: Order Line Progress Measurements', userPayload);
7587
9134
  const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
7588
- const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView('__mj_BizAppsOrders', 'vwOrderLinePriceComponents')} WHERE ${provider.QuoteIdentifier('ID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ_BizApps_Orders: Order Line Price Components', userPayload, EntityPermissionType.Read, 'AND');
9135
+ const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView('__mj_BizAppsOrders', 'vwOrderLineProgressMeasurements')} WHERE ${provider.QuoteIdentifier('ID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ_BizApps_Orders: Order Line Progress Measurements', userPayload, EntityPermissionType.Read, 'AND');
7589
9136
  const rows = await provider.ExecuteSQL(sSQL, [ID], undefined, this.GetUserFromPayload(userPayload));
7590
- const result = await this.MapFieldNamesToCodeNames('MJ_BizApps_Orders: Order Line Price Components', rows && rows.length > 0 ? rows[0] : null, this.GetUserFromPayload(userPayload));
9137
+ const result = await this.MapFieldNamesToCodeNames('MJ_BizApps_Orders: Order Line Progress Measurements', rows && rows.length > 0 ? rows[0] : null, this.GetUserFromPayload(userPayload));
7591
9138
  return result;
7592
9139
  }
7593
- async CreatemjBizAppsOrdersOrderLinePriceComponent(input, { providers, userPayload }, pubSub) {
9140
+ async CreatemjBizAppsOrdersOrderLineProgressMeasurement(input, { providers, userPayload }, pubSub) {
7594
9141
  const provider = GetReadWriteProvider(providers);
7595
- return this.CreateRecord('MJ_BizApps_Orders: Order Line Price Components', input, provider, userPayload, pubSub);
9142
+ return this.CreateRecord('MJ_BizApps_Orders: Order Line Progress Measurements', input, provider, userPayload, pubSub);
7596
9143
  }
7597
- async UpdatemjBizAppsOrdersOrderLinePriceComponent(input, { providers, userPayload }, pubSub) {
9144
+ async UpdatemjBizAppsOrdersOrderLineProgressMeasurement(input, { providers, userPayload }, pubSub) {
7598
9145
  const provider = GetReadWriteProvider(providers);
7599
- return this.UpdateRecord('MJ_BizApps_Orders: Order Line Price Components', input, provider, userPayload, pubSub);
9146
+ return this.UpdateRecord('MJ_BizApps_Orders: Order Line Progress Measurements', input, provider, userPayload, pubSub);
7600
9147
  }
7601
- async DeletemjBizAppsOrdersOrderLinePriceComponent(ID, options, { providers, userPayload }, pubSub) {
9148
+ async DeletemjBizAppsOrdersOrderLineProgressMeasurement(ID, options, { providers, userPayload }, pubSub) {
7602
9149
  const provider = GetReadWriteProvider(providers);
7603
9150
  const key = new CompositeKey([{ FieldName: 'ID', Value: ID }]);
7604
- return this.DeleteRecord('MJ_BizApps_Orders: Order Line Price Components', key, options, provider, userPayload, pubSub);
9151
+ return this.DeleteRecord('MJ_BizApps_Orders: Order Line Progress Measurements', key, options, provider, userPayload, pubSub);
7605
9152
  }
7606
9153
  };
7607
9154
  __decorate([
7608
- Query(() => RunmjBizAppsOrdersOrderLinePriceComponentViewResult),
9155
+ Query(() => RunmjBizAppsOrdersOrderLineProgressMeasurementViewResult),
7609
9156
  __param(0, Arg('input', () => RunViewByIDInput)),
7610
9157
  __param(1, Ctx()),
7611
9158
  __param(2, PubSub()),
7612
9159
  __metadata("design:type", Function),
7613
9160
  __metadata("design:paramtypes", [RunViewByIDInput, Object, PubSubEngine]),
7614
9161
  __metadata("design:returntype", Promise)
7615
- ], mjBizAppsOrdersOrderLinePriceComponentResolver.prototype, "RunmjBizAppsOrdersOrderLinePriceComponentViewByID", null);
9162
+ ], mjBizAppsOrdersOrderLineProgressMeasurementResolver.prototype, "RunmjBizAppsOrdersOrderLineProgressMeasurementViewByID", null);
7616
9163
  __decorate([
7617
- Query(() => RunmjBizAppsOrdersOrderLinePriceComponentViewResult),
9164
+ Query(() => RunmjBizAppsOrdersOrderLineProgressMeasurementViewResult),
7618
9165
  __param(0, Arg('input', () => RunViewByNameInput)),
7619
9166
  __param(1, Ctx()),
7620
9167
  __param(2, PubSub()),
7621
9168
  __metadata("design:type", Function),
7622
9169
  __metadata("design:paramtypes", [RunViewByNameInput, Object, PubSubEngine]),
7623
9170
  __metadata("design:returntype", Promise)
7624
- ], mjBizAppsOrdersOrderLinePriceComponentResolver.prototype, "RunmjBizAppsOrdersOrderLinePriceComponentViewByName", null);
9171
+ ], mjBizAppsOrdersOrderLineProgressMeasurementResolver.prototype, "RunmjBizAppsOrdersOrderLineProgressMeasurementViewByName", null);
7625
9172
  __decorate([
7626
- Query(() => RunmjBizAppsOrdersOrderLinePriceComponentViewResult),
9173
+ Query(() => RunmjBizAppsOrdersOrderLineProgressMeasurementViewResult),
7627
9174
  __param(0, Arg('input', () => RunDynamicViewInput)),
7628
9175
  __param(1, Ctx()),
7629
9176
  __param(2, PubSub()),
7630
9177
  __metadata("design:type", Function),
7631
9178
  __metadata("design:paramtypes", [RunDynamicViewInput, Object, PubSubEngine]),
7632
9179
  __metadata("design:returntype", Promise)
7633
- ], mjBizAppsOrdersOrderLinePriceComponentResolver.prototype, "RunmjBizAppsOrdersOrderLinePriceComponentDynamicView", null);
9180
+ ], mjBizAppsOrdersOrderLineProgressMeasurementResolver.prototype, "RunmjBizAppsOrdersOrderLineProgressMeasurementDynamicView", null);
7634
9181
  __decorate([
7635
- Query(() => mjBizAppsOrdersOrderLinePriceComponent_, { nullable: true }),
9182
+ Query(() => mjBizAppsOrdersOrderLineProgressMeasurement_, { nullable: true }),
7636
9183
  __param(0, Arg('ID', () => String)),
7637
9184
  __param(1, Ctx()),
7638
9185
  __param(2, PubSub()),
7639
9186
  __metadata("design:type", Function),
7640
9187
  __metadata("design:paramtypes", [String, Object, PubSubEngine]),
7641
9188
  __metadata("design:returntype", Promise)
7642
- ], mjBizAppsOrdersOrderLinePriceComponentResolver.prototype, "mjBizAppsOrdersOrderLinePriceComponent", null);
9189
+ ], mjBizAppsOrdersOrderLineProgressMeasurementResolver.prototype, "mjBizAppsOrdersOrderLineProgressMeasurement", null);
7643
9190
  __decorate([
7644
- Mutation(() => mjBizAppsOrdersOrderLinePriceComponent_),
7645
- __param(0, Arg('input', () => CreatemjBizAppsOrdersOrderLinePriceComponentInput)),
9191
+ Mutation(() => mjBizAppsOrdersOrderLineProgressMeasurement_),
9192
+ __param(0, Arg('input', () => CreatemjBizAppsOrdersOrderLineProgressMeasurementInput)),
7646
9193
  __param(1, Ctx()),
7647
9194
  __param(2, PubSub()),
7648
9195
  __metadata("design:type", Function),
7649
- __metadata("design:paramtypes", [CreatemjBizAppsOrdersOrderLinePriceComponentInput, Object, PubSubEngine]),
9196
+ __metadata("design:paramtypes", [CreatemjBizAppsOrdersOrderLineProgressMeasurementInput, Object, PubSubEngine]),
7650
9197
  __metadata("design:returntype", Promise)
7651
- ], mjBizAppsOrdersOrderLinePriceComponentResolver.prototype, "CreatemjBizAppsOrdersOrderLinePriceComponent", null);
9198
+ ], mjBizAppsOrdersOrderLineProgressMeasurementResolver.prototype, "CreatemjBizAppsOrdersOrderLineProgressMeasurement", null);
7652
9199
  __decorate([
7653
- Mutation(() => mjBizAppsOrdersOrderLinePriceComponent_),
7654
- __param(0, Arg('input', () => UpdatemjBizAppsOrdersOrderLinePriceComponentInput)),
9200
+ Mutation(() => mjBizAppsOrdersOrderLineProgressMeasurement_),
9201
+ __param(0, Arg('input', () => UpdatemjBizAppsOrdersOrderLineProgressMeasurementInput)),
7655
9202
  __param(1, Ctx()),
7656
9203
  __param(2, PubSub()),
7657
9204
  __metadata("design:type", Function),
7658
- __metadata("design:paramtypes", [UpdatemjBizAppsOrdersOrderLinePriceComponentInput, Object, PubSubEngine]),
9205
+ __metadata("design:paramtypes", [UpdatemjBizAppsOrdersOrderLineProgressMeasurementInput, Object, PubSubEngine]),
7659
9206
  __metadata("design:returntype", Promise)
7660
- ], mjBizAppsOrdersOrderLinePriceComponentResolver.prototype, "UpdatemjBizAppsOrdersOrderLinePriceComponent", null);
9207
+ ], mjBizAppsOrdersOrderLineProgressMeasurementResolver.prototype, "UpdatemjBizAppsOrdersOrderLineProgressMeasurement", null);
7661
9208
  __decorate([
7662
- Mutation(() => mjBizAppsOrdersOrderLinePriceComponent_),
9209
+ Mutation(() => mjBizAppsOrdersOrderLineProgressMeasurement_),
7663
9210
  __param(0, Arg('ID', () => String)),
7664
9211
  __param(1, Arg('options___', () => DeleteOptionsInput)),
7665
9212
  __param(2, Ctx()),
@@ -7667,11 +9214,11 @@ __decorate([
7667
9214
  __metadata("design:type", Function),
7668
9215
  __metadata("design:paramtypes", [String, DeleteOptionsInput, Object, PubSubEngine]),
7669
9216
  __metadata("design:returntype", Promise)
7670
- ], mjBizAppsOrdersOrderLinePriceComponentResolver.prototype, "DeletemjBizAppsOrdersOrderLinePriceComponent", null);
7671
- mjBizAppsOrdersOrderLinePriceComponentResolver = __decorate([
7672
- Resolver(mjBizAppsOrdersOrderLinePriceComponent_)
7673
- ], mjBizAppsOrdersOrderLinePriceComponentResolver);
7674
- export { mjBizAppsOrdersOrderLinePriceComponentResolver };
9217
+ ], mjBizAppsOrdersOrderLineProgressMeasurementResolver.prototype, "DeletemjBizAppsOrdersOrderLineProgressMeasurement", null);
9218
+ mjBizAppsOrdersOrderLineProgressMeasurementResolver = __decorate([
9219
+ Resolver(mjBizAppsOrdersOrderLineProgressMeasurement_)
9220
+ ], mjBizAppsOrdersOrderLineProgressMeasurementResolver);
9221
+ export { mjBizAppsOrdersOrderLineProgressMeasurementResolver };
7675
9222
  //****************************************************************************
7676
9223
  // ENTITY CLASS for MJ_BizApps_Orders: Order Lines
7677
9224
  //****************************************************************************
@@ -10288,6 +11835,287 @@ mjBizAppsOrdersPaymentLineResolver = __decorate([
10288
11835
  ], mjBizAppsOrdersPaymentLineResolver);
10289
11836
  export { mjBizAppsOrdersPaymentLineResolver };
10290
11837
  //****************************************************************************
11838
+ // ENTITY CLASS for MJ_BizApps_Orders: Payment Provider Sync States
11839
+ //****************************************************************************
11840
+ let mjBizAppsOrdersPaymentProviderSyncState_ = class mjBizAppsOrdersPaymentProviderSyncState_ {
11841
+ };
11842
+ __decorate([
11843
+ Field(),
11844
+ MaxLength(36),
11845
+ __metadata("design:type", String)
11846
+ ], mjBizAppsOrdersPaymentProviderSyncState_.prototype, "ID", void 0);
11847
+ __decorate([
11848
+ Field({ description: `The provider row (rail + company) this watermark belongs to.` }),
11849
+ MaxLength(36),
11850
+ __metadata("design:type", String)
11851
+ ], mjBizAppsOrdersPaymentProviderSyncState_.prototype, "PaymentProviderID", void 0);
11852
+ __decorate([
11853
+ Field({ description: `The rail object polled, e.g. receivable-payments.` }),
11854
+ MaxLength(100),
11855
+ __metadata("design:type", String)
11856
+ ], mjBizAppsOrdersPaymentProviderSyncState_.prototype, "ObjectName", void 0);
11857
+ __decorate([
11858
+ Field({ nullable: true, description: `The rail's max updatedTime seen on the last clean pass (ISO). The next pass reads from one day before it; dedupe is by payment id.` }),
11859
+ MaxLength(100),
11860
+ __metadata("design:type", String)
11861
+ ], mjBizAppsOrdersPaymentProviderSyncState_.prototype, "Watermark", void 0);
11862
+ __decorate([
11863
+ Field({ nullable: true, description: `When the last pass started.` }),
11864
+ __metadata("design:type", Date)
11865
+ ], mjBizAppsOrdersPaymentProviderSyncState_.prototype, "LastPolledAt", void 0);
11866
+ __decorate([
11867
+ Field({ nullable: true, description: `When the last pass completed without a fault.` }),
11868
+ __metadata("design:type", Date)
11869
+ ], mjBizAppsOrdersPaymentProviderSyncState_.prototype, "LastSucceededAt", void 0);
11870
+ __decorate([
11871
+ Field({ nullable: true, description: `The fault that stopped the last pass, if any.` }),
11872
+ __metadata("design:type", String)
11873
+ ], mjBizAppsOrdersPaymentProviderSyncState_.prototype, "LastError", void 0);
11874
+ __decorate([
11875
+ Field(),
11876
+ __metadata("design:type", Date)
11877
+ ], mjBizAppsOrdersPaymentProviderSyncState_.prototype, "_mj__CreatedAt", void 0);
11878
+ __decorate([
11879
+ Field(),
11880
+ __metadata("design:type", Date)
11881
+ ], mjBizAppsOrdersPaymentProviderSyncState_.prototype, "_mj__UpdatedAt", void 0);
11882
+ __decorate([
11883
+ Field(),
11884
+ MaxLength(200),
11885
+ __metadata("design:type", String)
11886
+ ], mjBizAppsOrdersPaymentProviderSyncState_.prototype, "PaymentProvider", void 0);
11887
+ mjBizAppsOrdersPaymentProviderSyncState_ = __decorate([
11888
+ ObjectType({ description: `Poll watermark and last-run outcome per provider row per rail object (e.g. receivable-payments). Advanced only after a pass completes without a fault.` })
11889
+ ], mjBizAppsOrdersPaymentProviderSyncState_);
11890
+ export { mjBizAppsOrdersPaymentProviderSyncState_ };
11891
+ //****************************************************************************
11892
+ // INPUT TYPE for MJ_BizApps_Orders: Payment Provider Sync States
11893
+ //****************************************************************************
11894
+ let CreatemjBizAppsOrdersPaymentProviderSyncStateInput = class CreatemjBizAppsOrdersPaymentProviderSyncStateInput {
11895
+ };
11896
+ __decorate([
11897
+ Field({ nullable: true }),
11898
+ __metadata("design:type", String)
11899
+ ], CreatemjBizAppsOrdersPaymentProviderSyncStateInput.prototype, "ID", void 0);
11900
+ __decorate([
11901
+ Field({ nullable: true }),
11902
+ __metadata("design:type", String)
11903
+ ], CreatemjBizAppsOrdersPaymentProviderSyncStateInput.prototype, "PaymentProviderID", void 0);
11904
+ __decorate([
11905
+ Field({ nullable: true }),
11906
+ __metadata("design:type", String)
11907
+ ], CreatemjBizAppsOrdersPaymentProviderSyncStateInput.prototype, "ObjectName", void 0);
11908
+ __decorate([
11909
+ Field({ nullable: true }),
11910
+ __metadata("design:type", String)
11911
+ ], CreatemjBizAppsOrdersPaymentProviderSyncStateInput.prototype, "Watermark", void 0);
11912
+ __decorate([
11913
+ Field({ nullable: true }),
11914
+ __metadata("design:type", Date)
11915
+ ], CreatemjBizAppsOrdersPaymentProviderSyncStateInput.prototype, "LastPolledAt", void 0);
11916
+ __decorate([
11917
+ Field({ nullable: true }),
11918
+ __metadata("design:type", Date)
11919
+ ], CreatemjBizAppsOrdersPaymentProviderSyncStateInput.prototype, "LastSucceededAt", void 0);
11920
+ __decorate([
11921
+ Field({ nullable: true }),
11922
+ __metadata("design:type", String)
11923
+ ], CreatemjBizAppsOrdersPaymentProviderSyncStateInput.prototype, "LastError", void 0);
11924
+ __decorate([
11925
+ Field(() => RestoreContextInput, { nullable: true }),
11926
+ __metadata("design:type", RestoreContextInput)
11927
+ ], CreatemjBizAppsOrdersPaymentProviderSyncStateInput.prototype, "RestoreContext___", void 0);
11928
+ CreatemjBizAppsOrdersPaymentProviderSyncStateInput = __decorate([
11929
+ InputType()
11930
+ ], CreatemjBizAppsOrdersPaymentProviderSyncStateInput);
11931
+ export { CreatemjBizAppsOrdersPaymentProviderSyncStateInput };
11932
+ //****************************************************************************
11933
+ // INPUT TYPE for MJ_BizApps_Orders: Payment Provider Sync States
11934
+ //****************************************************************************
11935
+ let UpdatemjBizAppsOrdersPaymentProviderSyncStateInput = class UpdatemjBizAppsOrdersPaymentProviderSyncStateInput {
11936
+ };
11937
+ __decorate([
11938
+ Field(),
11939
+ __metadata("design:type", String)
11940
+ ], UpdatemjBizAppsOrdersPaymentProviderSyncStateInput.prototype, "ID", void 0);
11941
+ __decorate([
11942
+ Field({ nullable: true }),
11943
+ __metadata("design:type", String)
11944
+ ], UpdatemjBizAppsOrdersPaymentProviderSyncStateInput.prototype, "PaymentProviderID", void 0);
11945
+ __decorate([
11946
+ Field({ nullable: true }),
11947
+ __metadata("design:type", String)
11948
+ ], UpdatemjBizAppsOrdersPaymentProviderSyncStateInput.prototype, "ObjectName", void 0);
11949
+ __decorate([
11950
+ Field({ nullable: true }),
11951
+ __metadata("design:type", String)
11952
+ ], UpdatemjBizAppsOrdersPaymentProviderSyncStateInput.prototype, "Watermark", void 0);
11953
+ __decorate([
11954
+ Field({ nullable: true }),
11955
+ __metadata("design:type", Date)
11956
+ ], UpdatemjBizAppsOrdersPaymentProviderSyncStateInput.prototype, "LastPolledAt", void 0);
11957
+ __decorate([
11958
+ Field({ nullable: true }),
11959
+ __metadata("design:type", Date)
11960
+ ], UpdatemjBizAppsOrdersPaymentProviderSyncStateInput.prototype, "LastSucceededAt", void 0);
11961
+ __decorate([
11962
+ Field({ nullable: true }),
11963
+ __metadata("design:type", String)
11964
+ ], UpdatemjBizAppsOrdersPaymentProviderSyncStateInput.prototype, "LastError", void 0);
11965
+ __decorate([
11966
+ Field(() => [KeyValuePairInput], { nullable: true }),
11967
+ __metadata("design:type", Array)
11968
+ ], UpdatemjBizAppsOrdersPaymentProviderSyncStateInput.prototype, "OldValues___", void 0);
11969
+ __decorate([
11970
+ Field(() => RestoreContextInput, { nullable: true }),
11971
+ __metadata("design:type", RestoreContextInput)
11972
+ ], UpdatemjBizAppsOrdersPaymentProviderSyncStateInput.prototype, "RestoreContext___", void 0);
11973
+ UpdatemjBizAppsOrdersPaymentProviderSyncStateInput = __decorate([
11974
+ InputType()
11975
+ ], UpdatemjBizAppsOrdersPaymentProviderSyncStateInput);
11976
+ export { UpdatemjBizAppsOrdersPaymentProviderSyncStateInput };
11977
+ //****************************************************************************
11978
+ // RESOLVER for MJ_BizApps_Orders: Payment Provider Sync States
11979
+ //****************************************************************************
11980
+ let RunmjBizAppsOrdersPaymentProviderSyncStateViewResult = class RunmjBizAppsOrdersPaymentProviderSyncStateViewResult {
11981
+ };
11982
+ __decorate([
11983
+ Field(() => [mjBizAppsOrdersPaymentProviderSyncState_]),
11984
+ __metadata("design:type", Array)
11985
+ ], RunmjBizAppsOrdersPaymentProviderSyncStateViewResult.prototype, "Results", void 0);
11986
+ __decorate([
11987
+ Field(() => String, { nullable: true }),
11988
+ __metadata("design:type", String)
11989
+ ], RunmjBizAppsOrdersPaymentProviderSyncStateViewResult.prototype, "UserViewRunID", void 0);
11990
+ __decorate([
11991
+ Field(() => Int, { nullable: true }),
11992
+ __metadata("design:type", Number)
11993
+ ], RunmjBizAppsOrdersPaymentProviderSyncStateViewResult.prototype, "RowCount", void 0);
11994
+ __decorate([
11995
+ Field(() => Int, { nullable: true }),
11996
+ __metadata("design:type", Number)
11997
+ ], RunmjBizAppsOrdersPaymentProviderSyncStateViewResult.prototype, "TotalRowCount", void 0);
11998
+ __decorate([
11999
+ Field(() => Int, { nullable: true }),
12000
+ __metadata("design:type", Number)
12001
+ ], RunmjBizAppsOrdersPaymentProviderSyncStateViewResult.prototype, "ExecutionTime", void 0);
12002
+ __decorate([
12003
+ Field({ nullable: true }),
12004
+ __metadata("design:type", String)
12005
+ ], RunmjBizAppsOrdersPaymentProviderSyncStateViewResult.prototype, "ErrorMessage", void 0);
12006
+ __decorate([
12007
+ Field(() => Boolean, { nullable: false }),
12008
+ __metadata("design:type", Boolean)
12009
+ ], RunmjBizAppsOrdersPaymentProviderSyncStateViewResult.prototype, "Success", void 0);
12010
+ RunmjBizAppsOrdersPaymentProviderSyncStateViewResult = __decorate([
12011
+ ObjectType()
12012
+ ], RunmjBizAppsOrdersPaymentProviderSyncStateViewResult);
12013
+ export { RunmjBizAppsOrdersPaymentProviderSyncStateViewResult };
12014
+ let mjBizAppsOrdersPaymentProviderSyncStateResolver = class mjBizAppsOrdersPaymentProviderSyncStateResolver extends ResolverBase {
12015
+ async RunmjBizAppsOrdersPaymentProviderSyncStateViewByID(input, { providers, userPayload }, pubSub) {
12016
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
12017
+ return super.RunViewByIDGeneric(input, provider, userPayload, pubSub);
12018
+ }
12019
+ async RunmjBizAppsOrdersPaymentProviderSyncStateViewByName(input, { providers, userPayload }, pubSub) {
12020
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
12021
+ return super.RunViewByNameGeneric(input, provider, userPayload, pubSub);
12022
+ }
12023
+ async RunmjBizAppsOrdersPaymentProviderSyncStateDynamicView(input, { providers, userPayload }, pubSub) {
12024
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
12025
+ input.EntityName = 'MJ_BizApps_Orders: Payment Provider Sync States';
12026
+ return super.RunDynamicViewGeneric(input, provider, userPayload, pubSub);
12027
+ }
12028
+ async mjBizAppsOrdersPaymentProviderSyncState(ID, { userPayload, providers }, pubSub) {
12029
+ this.CheckUserReadPermissions('MJ_BizApps_Orders: Payment Provider Sync States', userPayload);
12030
+ const provider = GetReadOnlyProvider(providers, { allowFallbackToReadWrite: true });
12031
+ const sSQL = `SELECT * FROM ${provider.QuoteSchemaAndView('__mj_BizAppsOrders', 'vwPaymentProviderSyncStates')} WHERE ${provider.QuoteIdentifier('ID')}=${provider.BuildParameterPlaceholder(0)} ` + this.getRowLevelSecurityWhereClause(provider, 'MJ_BizApps_Orders: Payment Provider Sync States', userPayload, EntityPermissionType.Read, 'AND');
12032
+ const rows = await provider.ExecuteSQL(sSQL, [ID], undefined, this.GetUserFromPayload(userPayload));
12033
+ const result = await this.MapFieldNamesToCodeNames('MJ_BizApps_Orders: Payment Provider Sync States', rows && rows.length > 0 ? rows[0] : null, this.GetUserFromPayload(userPayload));
12034
+ return result;
12035
+ }
12036
+ async CreatemjBizAppsOrdersPaymentProviderSyncState(input, { providers, userPayload }, pubSub) {
12037
+ const provider = GetReadWriteProvider(providers);
12038
+ return this.CreateRecord('MJ_BizApps_Orders: Payment Provider Sync States', input, provider, userPayload, pubSub);
12039
+ }
12040
+ async UpdatemjBizAppsOrdersPaymentProviderSyncState(input, { providers, userPayload }, pubSub) {
12041
+ const provider = GetReadWriteProvider(providers);
12042
+ return this.UpdateRecord('MJ_BizApps_Orders: Payment Provider Sync States', input, provider, userPayload, pubSub);
12043
+ }
12044
+ async DeletemjBizAppsOrdersPaymentProviderSyncState(ID, options, { providers, userPayload }, pubSub) {
12045
+ const provider = GetReadWriteProvider(providers);
12046
+ const key = new CompositeKey([{ FieldName: 'ID', Value: ID }]);
12047
+ return this.DeleteRecord('MJ_BizApps_Orders: Payment Provider Sync States', key, options, provider, userPayload, pubSub);
12048
+ }
12049
+ };
12050
+ __decorate([
12051
+ Query(() => RunmjBizAppsOrdersPaymentProviderSyncStateViewResult),
12052
+ __param(0, Arg('input', () => RunViewByIDInput)),
12053
+ __param(1, Ctx()),
12054
+ __param(2, PubSub()),
12055
+ __metadata("design:type", Function),
12056
+ __metadata("design:paramtypes", [RunViewByIDInput, Object, PubSubEngine]),
12057
+ __metadata("design:returntype", Promise)
12058
+ ], mjBizAppsOrdersPaymentProviderSyncStateResolver.prototype, "RunmjBizAppsOrdersPaymentProviderSyncStateViewByID", null);
12059
+ __decorate([
12060
+ Query(() => RunmjBizAppsOrdersPaymentProviderSyncStateViewResult),
12061
+ __param(0, Arg('input', () => RunViewByNameInput)),
12062
+ __param(1, Ctx()),
12063
+ __param(2, PubSub()),
12064
+ __metadata("design:type", Function),
12065
+ __metadata("design:paramtypes", [RunViewByNameInput, Object, PubSubEngine]),
12066
+ __metadata("design:returntype", Promise)
12067
+ ], mjBizAppsOrdersPaymentProviderSyncStateResolver.prototype, "RunmjBizAppsOrdersPaymentProviderSyncStateViewByName", null);
12068
+ __decorate([
12069
+ Query(() => RunmjBizAppsOrdersPaymentProviderSyncStateViewResult),
12070
+ __param(0, Arg('input', () => RunDynamicViewInput)),
12071
+ __param(1, Ctx()),
12072
+ __param(2, PubSub()),
12073
+ __metadata("design:type", Function),
12074
+ __metadata("design:paramtypes", [RunDynamicViewInput, Object, PubSubEngine]),
12075
+ __metadata("design:returntype", Promise)
12076
+ ], mjBizAppsOrdersPaymentProviderSyncStateResolver.prototype, "RunmjBizAppsOrdersPaymentProviderSyncStateDynamicView", null);
12077
+ __decorate([
12078
+ Query(() => mjBizAppsOrdersPaymentProviderSyncState_, { nullable: true }),
12079
+ __param(0, Arg('ID', () => String)),
12080
+ __param(1, Ctx()),
12081
+ __param(2, PubSub()),
12082
+ __metadata("design:type", Function),
12083
+ __metadata("design:paramtypes", [String, Object, PubSubEngine]),
12084
+ __metadata("design:returntype", Promise)
12085
+ ], mjBizAppsOrdersPaymentProviderSyncStateResolver.prototype, "mjBizAppsOrdersPaymentProviderSyncState", null);
12086
+ __decorate([
12087
+ Mutation(() => mjBizAppsOrdersPaymentProviderSyncState_),
12088
+ __param(0, Arg('input', () => CreatemjBizAppsOrdersPaymentProviderSyncStateInput)),
12089
+ __param(1, Ctx()),
12090
+ __param(2, PubSub()),
12091
+ __metadata("design:type", Function),
12092
+ __metadata("design:paramtypes", [CreatemjBizAppsOrdersPaymentProviderSyncStateInput, Object, PubSubEngine]),
12093
+ __metadata("design:returntype", Promise)
12094
+ ], mjBizAppsOrdersPaymentProviderSyncStateResolver.prototype, "CreatemjBizAppsOrdersPaymentProviderSyncState", null);
12095
+ __decorate([
12096
+ Mutation(() => mjBizAppsOrdersPaymentProviderSyncState_),
12097
+ __param(0, Arg('input', () => UpdatemjBizAppsOrdersPaymentProviderSyncStateInput)),
12098
+ __param(1, Ctx()),
12099
+ __param(2, PubSub()),
12100
+ __metadata("design:type", Function),
12101
+ __metadata("design:paramtypes", [UpdatemjBizAppsOrdersPaymentProviderSyncStateInput, Object, PubSubEngine]),
12102
+ __metadata("design:returntype", Promise)
12103
+ ], mjBizAppsOrdersPaymentProviderSyncStateResolver.prototype, "UpdatemjBizAppsOrdersPaymentProviderSyncState", null);
12104
+ __decorate([
12105
+ Mutation(() => mjBizAppsOrdersPaymentProviderSyncState_),
12106
+ __param(0, Arg('ID', () => String)),
12107
+ __param(1, Arg('options___', () => DeleteOptionsInput)),
12108
+ __param(2, Ctx()),
12109
+ __param(3, PubSub()),
12110
+ __metadata("design:type", Function),
12111
+ __metadata("design:paramtypes", [String, DeleteOptionsInput, Object, PubSubEngine]),
12112
+ __metadata("design:returntype", Promise)
12113
+ ], mjBizAppsOrdersPaymentProviderSyncStateResolver.prototype, "DeletemjBizAppsOrdersPaymentProviderSyncState", null);
12114
+ mjBizAppsOrdersPaymentProviderSyncStateResolver = __decorate([
12115
+ Resolver(mjBizAppsOrdersPaymentProviderSyncState_)
12116
+ ], mjBizAppsOrdersPaymentProviderSyncStateResolver);
12117
+ export { mjBizAppsOrdersPaymentProviderSyncStateResolver };
12118
+ //****************************************************************************
10291
12119
  // ENTITY CLASS for MJ_BizApps_Orders: Payment Provider Types
10292
12120
  //****************************************************************************
10293
12121
  let mjBizAppsOrdersPaymentProviderType_ = class mjBizAppsOrdersPaymentProviderType_ {
@@ -10641,6 +12469,11 @@ __decorate([
10641
12469
  Field(() => Boolean, { nullable: true, description: `Whether this provider account is active.` }),
10642
12470
  __metadata("design:type", Boolean)
10643
12471
  ], mjBizAppsOrdersPaymentProvider_.prototype, "IsActive", void 0);
12472
+ __decorate([
12473
+ Field({ nullable: true, description: `The MJ Company Integration whose connector and credential this provider uses (Bill.com). NULL for providers that resolve credentials through CredentialsRef. A pointer, never a secret.` }),
12474
+ MaxLength(36),
12475
+ __metadata("design:type", String)
12476
+ ], mjBizAppsOrdersPaymentProvider_.prototype, "CompanyIntegrationID", void 0);
10644
12477
  __decorate([
10645
12478
  Field(),
10646
12479
  __metadata("design:type", Date)
@@ -10659,6 +12492,11 @@ __decorate([
10659
12492
  MaxLength(50),
10660
12493
  __metadata("design:type", String)
10661
12494
  ], mjBizAppsOrdersPaymentProvider_.prototype, "Company", void 0);
12495
+ __decorate([
12496
+ Field({ nullable: true }),
12497
+ MaxLength(255),
12498
+ __metadata("design:type", String)
12499
+ ], mjBizAppsOrdersPaymentProvider_.prototype, "CompanyIntegration", void 0);
10662
12500
  __decorate([
10663
12501
  Field(() => [String], { nullable: true, description: `Field-level security: when non-null, the fields on this entity the calling user may read. Any other field arriving as null was withheld by the server rather than genuinely empty. Null for callers with no field restrictions.` }),
10664
12502
  __metadata("design:type", Array)
@@ -10700,6 +12538,10 @@ __decorate([
10700
12538
  Field(() => Boolean, { nullable: true }),
10701
12539
  __metadata("design:type", Boolean)
10702
12540
  ], CreatemjBizAppsOrdersPaymentProviderInput.prototype, "IsActive", void 0);
12541
+ __decorate([
12542
+ Field({ nullable: true }),
12543
+ __metadata("design:type", String)
12544
+ ], CreatemjBizAppsOrdersPaymentProviderInput.prototype, "CompanyIntegrationID", void 0);
10703
12545
  __decorate([
10704
12546
  Field(() => RestoreContextInput, { nullable: true }),
10705
12547
  __metadata("design:type", RestoreContextInput)
@@ -10741,6 +12583,10 @@ __decorate([
10741
12583
  Field(() => Boolean, { nullable: true }),
10742
12584
  __metadata("design:type", Boolean)
10743
12585
  ], UpdatemjBizAppsOrdersPaymentProviderInput.prototype, "IsActive", void 0);
12586
+ __decorate([
12587
+ Field({ nullable: true }),
12588
+ __metadata("design:type", String)
12589
+ ], UpdatemjBizAppsOrdersPaymentProviderInput.prototype, "CompanyIntegrationID", void 0);
10744
12590
  __decorate([
10745
12591
  Field(() => [KeyValuePairInput], { nullable: true }),
10746
12592
  __metadata("design:type", Array)
@@ -16408,6 +18254,11 @@ __decorate([
16408
18254
  Field(() => [String], { nullable: true, description: `Field-level security: when non-null, the fields on this entity the calling user may read. Any other field arriving as null was withheld by the server rather than genuinely empty. Null for callers with no field restrictions.` }),
16409
18255
  __metadata("design:type", Array)
16410
18256
  ], mjBizAppsOrdersRevenueRecognitionType_.prototype, "ReadableFields___", void 0);
18257
+ __decorate([
18258
+ Field({ description: `AtBooking: the driver computes the whole schedule at booking and every release entry is written forward-dated then. OnMeasurement: nothing is staged at booking; revenue is recognised by cumulative catch-up as progress observations are recorded (Orders.RecordProgress). A POC type is IsDeferred = 1 with OnMeasurement.` }),
18259
+ MaxLength(20),
18260
+ __metadata("design:type", String)
18261
+ ], mjBizAppsOrdersRevenueRecognitionType_.prototype, "ScheduleBasis", void 0);
16411
18262
  mjBizAppsOrdersRevenueRecognitionType_ = __decorate([
16412
18263
  ObjectType()
16413
18264
  ], mjBizAppsOrdersRevenueRecognitionType_);
@@ -16453,6 +18304,10 @@ __decorate([
16453
18304
  Field(() => Boolean, { nullable: true }),
16454
18305
  __metadata("design:type", Boolean)
16455
18306
  ], CreatemjBizAppsOrdersRevenueRecognitionTypeInput.prototype, "IsActive", void 0);
18307
+ __decorate([
18308
+ Field({ nullable: true }),
18309
+ __metadata("design:type", String)
18310
+ ], CreatemjBizAppsOrdersRevenueRecognitionTypeInput.prototype, "ScheduleBasis", void 0);
16456
18311
  __decorate([
16457
18312
  Field(() => RestoreContextInput, { nullable: true }),
16458
18313
  __metadata("design:type", RestoreContextInput)
@@ -16502,6 +18357,10 @@ __decorate([
16502
18357
  Field(() => Boolean, { nullable: true }),
16503
18358
  __metadata("design:type", Boolean)
16504
18359
  ], UpdatemjBizAppsOrdersRevenueRecognitionTypeInput.prototype, "IsActive", void 0);
18360
+ __decorate([
18361
+ Field({ nullable: true }),
18362
+ __metadata("design:type", String)
18363
+ ], UpdatemjBizAppsOrdersRevenueRecognitionTypeInput.prototype, "ScheduleBasis", void 0);
16505
18364
  __decorate([
16506
18365
  Field(() => [KeyValuePairInput], { nullable: true }),
16507
18366
  __metadata("design:type", Array)