@bondsports/types 2.4.7 → 2.4.8-a-1

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 (33) hide show
  1. package/LICENSE.md +0 -0
  2. package/dist/tsconfig.build.tsbuildinfo +1 -1
  3. package/dist/types/cart/dto/cart-item.dto.d.ts +5 -3
  4. package/dist/types/cart/dto/cart-item.dto.js.map +1 -1
  5. package/dist/types/cart/entities/cart-item.entity.d.ts +4 -2
  6. package/dist/types/cart/entities/cart-item.entity.js.map +1 -1
  7. package/dist/types/cart/types/consts/cart.consts.d.ts +0 -2
  8. package/dist/types/cart/types/consts/cart.consts.js +2 -6
  9. package/dist/types/cart/types/consts/cart.consts.js.map +1 -1
  10. package/dist/types/customers/dto/full-customer.dto.d.ts +1 -0
  11. package/dist/types/customers/dto/full-customer.dto.js.map +1 -1
  12. package/dist/types/customers-merge/dto/customers-merge.dto.d.ts +0 -13
  13. package/dist/types/customers-merge/dto/customers-merge.dto.js +1 -6
  14. package/dist/types/customers-merge/dto/customers-merge.dto.js.map +1 -1
  15. package/dist/types/customers-merge/enums/customer-merge-error-codes.enum.d.ts +1 -1
  16. package/dist/types/customers-merge/enums/customer-merge-error-codes.enum.js +2 -2
  17. package/dist/types/customers-merge/enums/customer-merge-error-codes.enum.js.map +1 -1
  18. package/dist/types/customers-merge/types/interfaces.d.ts +12 -0
  19. package/dist/types/employees/types/consts/index.d.ts +2 -0
  20. package/dist/types/employees/types/consts/index.js +7 -1
  21. package/dist/types/employees/types/consts/index.js.map +1 -1
  22. package/dist/types/entity/UserAuthorizations.d.ts +4 -0
  23. package/dist/types/entity/UserAuthorizations.js.map +1 -1
  24. package/dist/types/organization/entities/OrganizationUsers.d.ts +3 -0
  25. package/dist/types/organization/entities/OrganizationUsers.js.map +1 -1
  26. package/dist/types/payment/types/interfaces/discount.interfaces.d.ts +4 -0
  27. package/dist/types/payment/types/interfaces/discount.interfaces.js.map +1 -1
  28. package/dist/types/product-pricing/types/interfaces/product-pricing.interfaces.d.ts +2 -0
  29. package/dist/types/roles/entities/UserRole.d.ts +3 -0
  30. package/dist/types/roles/entities/UserRole.js.map +1 -1
  31. package/dist/types/services/interfaces.service.d.ts +5 -0
  32. package/dist/types/services/interfaces.service.js.map +1 -1
  33. package/package.json +5 -5
@@ -13,8 +13,9 @@ export declare class CartTaxDto extends OrganizationBaseEntityDto {
13
13
  cartId: number;
14
14
  productId: number;
15
15
  price: number;
16
- percentage?: number;
17
- isTaxInclusive?: boolean;
16
+ name: string;
17
+ rate?: number;
18
+ isInclusive?: boolean;
18
19
  }
19
20
  export declare class CartDiscountDto extends OrganizationBaseEntityDto {
20
21
  cartId: number;
@@ -57,7 +58,8 @@ export declare class CartItemDto extends SimpleCartItemDto {
57
58
  status: CartStatusEnum;
58
59
  errors?: string[];
59
60
  ordinal?: number;
60
- taxItem?: CartTaxDto;
61
+ taxId?: number;
62
+ taxItems?: CartTaxDto[];
61
63
  discounts?: CartDiscountDto[];
62
64
  discountSubtotal?: number;
63
65
  children?: CartItemDto[];
@@ -1 +1 @@
1
- {"version":3,"file":"cart-item.dto.js","sourceRoot":"","sources":["../../../../src/types/cart/dto/cart-item.dto.ts"],"names":[],"mappings":";;;AAEA,8EAAoF;AAWpF,MAAa,UAAW,SAAQ,4CAAyB;CAUxD;AAVD,gCAUC;AAED,MAAa,eAAgB,SAAQ,4CAAyB;CA0B7D;AA1BD,0CA0BC;AAED,MAAa,iBAAiB;CAM7B;AAND,8CAMC;AAED,MAAa,mBAAmB;CAI/B;AAJD,kDAIC;AAED,MAAa,iBAAkB,SAAQ,4CAAyB;CAI/D;AAJD,8CAIC;AAED,MAAa,WAAY,SAAQ,iBAAiB;CA0CjD;AA1CD,kCA0CC;AAED,MAAa,eAAe;CAO3B;AAPD,0CAOC;AAED,MAAa,iBAAkB,SAAQ,eAAe;CAGrD;AAHD,8CAGC;AAED,MAAa,cAAe,SAAQ,eAAe;CAUlD;AAVD,wCAUC"}
1
+ {"version":3,"file":"cart-item.dto.js","sourceRoot":"","sources":["../../../../src/types/cart/dto/cart-item.dto.ts"],"names":[],"mappings":";;;AAEA,8EAAoF;AAWpF,MAAa,UAAW,SAAQ,4CAAyB;CAYxD;AAZD,gCAYC;AAED,MAAa,eAAgB,SAAQ,4CAAyB;CA0B7D;AA1BD,0CA0BC;AAED,MAAa,iBAAiB;CAM7B;AAND,8CAMC;AAED,MAAa,mBAAmB;CAI/B;AAJD,kDAIC;AAED,MAAa,iBAAkB,SAAQ,4CAAyB;CAI/D;AAJD,8CAIC;AAED,MAAa,WAAY,SAAQ,iBAAiB;CA4CjD;AA5CD,kCA4CC;AAED,MAAa,eAAe;CAO3B;AAPD,0CAOC;AAED,MAAa,iBAAkB,SAAQ,eAAe;CAGrD;AAHD,8CAGC;AAED,MAAa,cAAe,SAAQ,eAAe;CAUlD;AAVD,wCAUC"}
@@ -9,6 +9,7 @@ import { Reason } from '../../organization/entities/Reason';
9
9
  import { Discount } from '../../payment/entities/Discount';
10
10
  import { DiscountOnEnum } from '../../payment/types/enums/discount.enums';
11
11
  import { Product } from '../../product-pricing/entities/product.entity';
12
+ import { Tax } from '../../taxes/entities/Tax';
12
13
  import { PurchaseResourceDto } from '../../purchase/dto/purchase.dto';
13
14
  import { ProductTypesEnum, ResourceNameTypeEnum } from '../../services/enums.service';
14
15
  import { User } from '../../user/entities/User';
@@ -36,16 +37,17 @@ export declare class CartItem extends OrganizationConnectionBaseEntity {
36
37
  parentOrdinal?: number;
37
38
  unique?: string;
38
39
  percentage?: number;
39
- isTaxInclusive?: boolean;
40
40
  entitlementGroupId?: number;
41
41
  entitlementGroup?: EntitlementGroup;
42
42
  parentId?: number;
43
43
  parent?: CartItem;
44
44
  children?: CartItem[];
45
45
  discounts?: CartItem[];
46
- taxItem?: CartItem;
46
+ taxItems?: CartItem[];
47
47
  discountId?: number;
48
48
  discount?: Discount;
49
+ taxId?: number;
50
+ tax?: Tax;
49
51
  resources?: PurchaseResourceDto[];
50
52
  parentResourceId?: string;
51
53
  parentResourceType?: ResourceNameTypeEnum;
@@ -1 +1 @@
1
- {"version":3,"file":"cart-item.entity.js","sourceRoot":"","sources":["../../../../src/types/cart/entities/cart-item.entity.ts"],"names":[],"mappings":";;;AAQA,oGAAiG;AAcjG,MAAa,QAAS,SAAQ,mEAAgC;CAmG7D;AAnGD,4BAmGC"}
1
+ {"version":3,"file":"cart-item.entity.js","sourceRoot":"","sources":["../../../../src/types/cart/entities/cart-item.entity.ts"],"names":[],"mappings":";;;AAQA,oGAAiG;AAejG,MAAa,QAAS,SAAQ,mEAAgC;CAqG7D;AArGD,4BAqGC"}
@@ -1,4 +1,2 @@
1
1
  import { CartDiscountDto } from '../../dto/cart-item.dto';
2
- import { CartItem } from '../../entities/cart-item.entity';
3
- export declare const uniqueCartTaxTemplate: (cartItem: CartItem) => string;
4
2
  export declare const uniqueCartDiscountTemplate: (discountItem: CartDiscountDto) => string;
@@ -1,12 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.uniqueCartDiscountTemplate = exports.uniqueCartTaxTemplate = void 0;
4
- const uniqueCartTaxTemplate = (cartItem) => {
5
- return `${cartItem.percentage}_${cartItem.isTaxInclusive}`;
6
- };
7
- exports.uniqueCartTaxTemplate = uniqueCartTaxTemplate;
3
+ exports.uniqueCartDiscountTemplate = void 0;
8
4
  const uniqueCartDiscountTemplate = (discountItem) => {
9
- const discountPercentage = `${discountItem.percentage}` ?? '';
5
+ const discountPercentage = `${discountItem.percentage}`;
10
6
  return `${discountItem.discountId}_${discountItem.discount?.type}_${discountPercentage}_${discountItem.actionId}`;
11
7
  };
12
8
  exports.uniqueCartDiscountTemplate = uniqueCartDiscountTemplate;
@@ -1 +1 @@
1
- {"version":3,"file":"cart.consts.js","sourceRoot":"","sources":["../../../../../src/types/cart/types/consts/cart.consts.ts"],"names":[],"mappings":";;;AAGO,MAAM,qBAAqB,GAAG,CAAC,QAAkB,EAAU,EAAE;IACnE,OAAO,GAAG,QAAQ,CAAC,UAAU,IAAI,QAAQ,CAAC,cAAc,EAAE,CAAC;AAC5D,CAAC,CAAC;AAFW,QAAA,qBAAqB,yBAEhC;AAEK,MAAM,0BAA0B,GAAG,CAAC,YAA6B,EAAU,EAAE;IACnF,MAAM,kBAAkB,GAAW,GAAG,YAAY,CAAC,UAAU,EAAE,IAAI,EAAE,CAAC;IAEtE,OAAO,GAAG,YAAY,CAAC,UAAU,IAAI,YAAY,CAAC,QAAQ,EAAE,IAAI,IAAI,kBAAkB,IAAI,YAAY,CAAC,QAAQ,EAAE,CAAC;AACnH,CAAC,CAAC;AAJW,QAAA,0BAA0B,8BAIrC"}
1
+ {"version":3,"file":"cart.consts.js","sourceRoot":"","sources":["../../../../../src/types/cart/types/consts/cart.consts.ts"],"names":[],"mappings":";;;AAEO,MAAM,0BAA0B,GAAG,CAAC,YAA6B,EAAU,EAAE;IACnF,MAAM,kBAAkB,GAAW,GAAG,YAAY,CAAC,UAAU,EAAE,CAAC;IAEhE,OAAO,GAAG,YAAY,CAAC,UAAU,IAAI,YAAY,CAAC,QAAQ,EAAE,IAAI,IAAI,kBAAkB,IAAI,YAAY,CAAC,QAAQ,EAAE,CAAC;AACnH,CAAC,CAAC;AAJW,QAAA,0BAA0B,8BAIrC"}
@@ -40,5 +40,6 @@ export declare class UserExtendedDto extends SimpleUserDto {
40
40
  export declare class CustomerExtendedDto extends BaseCustomerWithRelationsDto {
41
41
  user: UserExtendedDto;
42
42
  organizationId: number;
43
+ isEmployee?: boolean;
43
44
  }
44
45
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"full-customer.dto.js","sourceRoot":"","sources":["../../../../src/types/customers/dto/full-customer.dto.ts"],"names":[],"mappings":";;;AAQA,sDAAwD;AAGxD,mEAAiF;AAEjF,MAAM,4BAA6B,SAAQ,yCAAiB;CAsC3D;AAED;GACG;AACH,MAAa,eAAgB,SAAQ,4BAA4B;CAEhE;AAFD,0CAEC;AAED,MAAa,eAAgB,SAAQ,wBAAa;CAEjD;AAFD,0CAEC;AAED,MAAa,mBAAoB,SAAQ,4BAA4B;CAIpE;AAJD,kDAIC"}
1
+ {"version":3,"file":"full-customer.dto.js","sourceRoot":"","sources":["../../../../src/types/customers/dto/full-customer.dto.ts"],"names":[],"mappings":";;;AAQA,sDAAwD;AAGxD,mEAAiF;AAEjF,MAAM,4BAA6B,SAAQ,yCAAiB;CAsC3D;AAED;GACG;AACH,MAAa,eAAgB,SAAQ,4BAA4B;CAEhE;AAFD,0CAEC;AAED,MAAa,eAAgB,SAAQ,wBAAa;CAEjD;AAFD,0CAEC;AAED,MAAa,mBAAoB,SAAQ,4BAA4B;CAMpE;AAND,kDAMC"}
@@ -32,23 +32,10 @@ export declare class CustomerMergeValidationResultDto {
32
32
  sourceCustomers?: Customer[];
33
33
  targetCustomer?: Customer;
34
34
  }
35
- export declare class CustomerMergeRecordsResultDto {
36
- transferredReservations: number;
37
- transferredInvoices: number;
38
- transferredLineItems: number;
39
- transferredPayments: number;
40
- transferredNotes: number;
41
- transferredEmergencyContacts: number;
42
- transferredPunchPasses: number;
43
- transferredMemberships: number;
44
- transferredStoredCredit: number;
45
- errors: CustomerMergeValidationErrorDto[];
46
- }
47
35
  export declare class CustomerMergeResponseDto {
48
36
  success: boolean;
49
37
  targetId: number;
50
38
  sourcesIds: number[];
51
- transferredRecords?: CustomerMergeRecordsResultDto;
52
39
  updatedCustomer?: SimpleCustomerDto;
53
40
  errors?: CustomerMergeValidationErrorDto[];
54
41
  warnings?: CustomerMergeValidationErrorDto[];
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.MergeFamiliesResponseDto = exports.MergeFamiliesRequestDto = exports.CustomerMergeResponseDto = exports.CustomerMergeRecordsResultDto = exports.CustomerMergeValidationResultDto = exports.CustomerMergeValidationErrorDto = exports.MergeCustomersRequestDto = exports.CustomerFieldsToMergeDto = exports.MergeableFieldsDto = void 0;
3
+ exports.MergeFamiliesResponseDto = exports.MergeFamiliesRequestDto = exports.CustomerMergeResponseDto = exports.CustomerMergeValidationResultDto = exports.CustomerMergeValidationErrorDto = exports.MergeCustomersRequestDto = exports.CustomerFieldsToMergeDto = exports.MergeableFieldsDto = void 0;
4
4
  const general_dto_1 = require("../../dto/general.dto");
5
5
  //#region Request DTOs
6
6
  class MergeableFieldsDto {
@@ -21,11 +21,6 @@ class CustomerMergeValidationResultDto {
21
21
  }
22
22
  exports.CustomerMergeValidationResultDto = CustomerMergeValidationResultDto;
23
23
  //#endregion
24
- //#region Transfer Results DTOs
25
- class CustomerMergeRecordsResultDto {
26
- }
27
- exports.CustomerMergeRecordsResultDto = CustomerMergeRecordsResultDto;
28
- //#endregion
29
24
  //#region Response DTOs
30
25
  class CustomerMergeResponseDto {
31
26
  }
@@ -1 +1 @@
1
- {"version":3,"file":"customers-merge.dto.js","sourceRoot":"","sources":["../../../../src/types/customers-merge/dto/customers-merge.dto.ts"],"names":[],"mappings":";;;AAEA,uDAA+C;AAI/C,sBAAsB;AACtB,MAAa,kBAAkB;CAgB9B;AAhBD,gDAgBC;AAED,MAAa,wBAAwB;CAQpC;AARD,4DAQC;AAED,MAAa,wBAAyB,SAAQ,oBAAM;CAEnD;AAFD,4DAEC;AAED,YAAY;AAEZ,gCAAgC;AAChC,MAAa,+BAA+B;CAI3C;AAJD,0EAIC;AAED,MAAa,gCAAgC;CAU5C;AAVD,4EAUC;AAED,YAAY;AAEZ,+BAA+B;AAC/B,MAAa,6BAA6B;CAoBzC;AApBD,sEAoBC;AAED,YAAY;AAEZ,uBAAuB;AACvB,MAAa,wBAAwB;CAcpC;AAdD,4DAcC;AAED,YAAY;AAEZ,2BAA2B;AAC3B,MAAa,uBAAuB;CAInC;AAJD,0DAIC;AAED,MAAa,wBAAwB;CAQpC;AARD,4DAQC;AAED,YAAY"}
1
+ {"version":3,"file":"customers-merge.dto.js","sourceRoot":"","sources":["../../../../src/types/customers-merge/dto/customers-merge.dto.ts"],"names":[],"mappings":";;;AAEA,uDAA+C;AAI/C,sBAAsB;AACtB,MAAa,kBAAkB;CAgB9B;AAhBD,gDAgBC;AAED,MAAa,wBAAwB;CAQpC;AARD,4DAQC;AAED,MAAa,wBAAyB,SAAQ,oBAAM;CAEnD;AAFD,4DAEC;AAED,YAAY;AAEZ,gCAAgC;AAChC,MAAa,+BAA+B;CAI3C;AAJD,0EAIC;AAED,MAAa,gCAAgC;CAU5C;AAVD,4EAUC;AAED,YAAY;AAEZ,uBAAuB;AACvB,MAAa,wBAAwB;CAYpC;AAZD,4DAYC;AAED,YAAY;AAEZ,2BAA2B;AAC3B,MAAa,uBAAuB;CAInC;AAJD,0DAIC;AAED,MAAa,wBAAwB;CAQpC;AARD,4DAQC;AAED,YAAY"}
@@ -7,12 +7,12 @@ export declare enum CustomerMergeErrorCodes {
7
7
  EMPTY_INPUT = "MERGE_EMPTY_INPUT",
8
8
  CIRCULAR_REFERENCES_INPUT = "MERGE_CIRCULAR_REFERENCES",
9
9
  INVALID_CUSTOMER_TYPES = "MERGE_INVALID_CUSTOMER_TYPES",
10
+ GENERAL_ERROR = "MERGE_GENERAL_ERROR",
10
11
  GET_CUSTOMERS_GENERAL_ERROR = "MERGE_GET_CUSTOMERS_ERROR",
11
12
  SOURCE_CUSTOMERS_MISSING = "MERGE_SOURCE_MISSING",
12
13
  LINKED_USER_MULTI_ORG = "MERGE_USER_MULTI_ORG",
13
14
  TWO_FAMILIES_FOUND = "MERGE_TWO_FAMILIES_FOUND",
14
15
  MULTIPLE_CUSTOMERS_IN_FAMILIES = "MERGE_MULTIPLE_FAMILIES",
15
- EMPLOYEES_PRESENT = "MERGE_EMPLOYEES_PRESENT",
16
16
  DUPLICATE_MEMBERSHIPS = "MERGE_DUPLICATE_MEMBERSHIPS",
17
17
  DUPLICATE_PROGRAMS = "MERGE_DUPLICATE_PROGRAMS",
18
18
  CONFLICTING_REFERABLE_PARTICIPATION = "MERGE_CONFLICTING_REFERABLE_PARTICIPATION"
@@ -12,6 +12,8 @@ var CustomerMergeErrorCodes;
12
12
  CustomerMergeErrorCodes["EMPTY_INPUT"] = "MERGE_EMPTY_INPUT";
13
13
  CustomerMergeErrorCodes["CIRCULAR_REFERENCES_INPUT"] = "MERGE_CIRCULAR_REFERENCES";
14
14
  CustomerMergeErrorCodes["INVALID_CUSTOMER_TYPES"] = "MERGE_INVALID_CUSTOMER_TYPES";
15
+ // General merge operation errors
16
+ CustomerMergeErrorCodes["GENERAL_ERROR"] = "MERGE_GENERAL_ERROR";
15
17
  // Customer retrieval errors
16
18
  CustomerMergeErrorCodes["GET_CUSTOMERS_GENERAL_ERROR"] = "MERGE_GET_CUSTOMERS_ERROR";
17
19
  CustomerMergeErrorCodes["SOURCE_CUSTOMERS_MISSING"] = "MERGE_SOURCE_MISSING";
@@ -20,8 +22,6 @@ var CustomerMergeErrorCodes;
20
22
  // Family validation errors
21
23
  CustomerMergeErrorCodes["TWO_FAMILIES_FOUND"] = "MERGE_TWO_FAMILIES_FOUND";
22
24
  CustomerMergeErrorCodes["MULTIPLE_CUSTOMERS_IN_FAMILIES"] = "MERGE_MULTIPLE_FAMILIES";
23
- // Employee validation errors
24
- CustomerMergeErrorCodes["EMPLOYEES_PRESENT"] = "MERGE_EMPLOYEES_PRESENT";
25
25
  // Membership validation errors
26
26
  CustomerMergeErrorCodes["DUPLICATE_MEMBERSHIPS"] = "MERGE_DUPLICATE_MEMBERSHIPS";
27
27
  // Program validation errors
@@ -1 +1 @@
1
- {"version":3,"file":"customer-merge-error-codes.enum.js","sourceRoot":"","sources":["../../../../src/types/customers-merge/enums/customer-merge-error-codes.enum.ts"],"names":[],"mappings":";;;AAAA;;;;GAIG;AACH,IAAY,uBA4BX;AA5BD,WAAY,uBAAuB;IAClC,0BAA0B;IAC1B,4DAAiC,CAAA;IACjC,kFAAuD,CAAA;IACvD,kFAAuD,CAAA;IAEvD,4BAA4B;IAC5B,oFAAyD,CAAA;IACzD,4EAAiD,CAAA;IAEjD,uCAAuC;IACvC,yEAA8C,CAAA;IAE9C,2BAA2B;IAC3B,0EAA+C,CAAA;IAC/C,qFAA0D,CAAA;IAE1D,6BAA6B;IAC7B,wEAA6C,CAAA;IAE7C,+BAA+B;IAC/B,gFAAqD,CAAA;IAErD,4BAA4B;IAC5B,0EAA+C,CAAA;IAE/C,mCAAmC;IACnC,4GAAiF,CAAA;AAClF,CAAC,EA5BW,uBAAuB,GAAvB,+BAAuB,KAAvB,+BAAuB,QA4BlC"}
1
+ {"version":3,"file":"customer-merge-error-codes.enum.js","sourceRoot":"","sources":["../../../../src/types/customers-merge/enums/customer-merge-error-codes.enum.ts"],"names":[],"mappings":";;;AAAA;;;;GAIG;AACH,IAAY,uBA4BX;AA5BD,WAAY,uBAAuB;IAClC,0BAA0B;IAC1B,4DAAiC,CAAA;IACjC,kFAAuD,CAAA;IACvD,kFAAuD,CAAA;IAEvD,iCAAiC;IACjC,gEAAqC,CAAA;IAErC,4BAA4B;IAC5B,oFAAyD,CAAA;IACzD,4EAAiD,CAAA;IAEjD,uCAAuC;IACvC,yEAA8C,CAAA;IAE9C,2BAA2B;IAC3B,0EAA+C,CAAA;IAC/C,qFAA0D,CAAA;IAE1D,+BAA+B;IAC/B,gFAAqD,CAAA;IAErD,4BAA4B;IAC5B,0EAA+C,CAAA;IAE/C,mCAAmC;IACnC,4GAAiF,CAAA;AAClF,CAAC,EA5BW,uBAAuB,GAAvB,+BAAuB,KAAvB,+BAAuB,QA4BlC"}
@@ -1,3 +1,4 @@
1
+ import { ObjectLiteral, UpdateQueryBuilder } from 'typeorm';
1
2
  import { Customer } from '../../entity/Customer';
2
3
  import { CustomerFieldsToMergeDto } from '../dto/customers-merge.dto';
3
4
  import { CustomerMergeErrorCodes } from '../enums/customer-merge-error-codes.enum';
@@ -52,4 +53,15 @@ export interface IFamilyCustomersIds {
52
53
  sourceCustomerId: number;
53
54
  targetCustomerId: number;
54
55
  }
56
+ /**
57
+ * Optional parameters for reassigning entities during merge operations.
58
+ */
59
+ export interface IReassignEntitiesByIdsOptions<EntityType> {
60
+ /** Optional organization ID for filtering */
61
+ organizationId?: number;
62
+ /** Additional WHERE conditions (object or query builder function) */
63
+ extraConditions?: ObjectLiteral | ((qb: UpdateQueryBuilder<EntityType>) => string);
64
+ /** Whether to soft delete the reassigned entities */
65
+ softDelete?: boolean;
66
+ }
55
67
  export {};
@@ -1,3 +1,5 @@
1
1
  import { CreateEmployeeOptions } from '../../dto/employee.dto';
2
+ import { EmployeeStatus } from '../enums';
2
3
  export declare const DEFAULT_CREATE_EMPLOYEE_OPTIONS: CreateEmployeeOptions;
4
+ export declare const EMPLOYEE_STATUS_PRIORITY: Record<EmployeeStatus, number>;
3
5
  export * from './index';
@@ -14,12 +14,18 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- exports.DEFAULT_CREATE_EMPLOYEE_OPTIONS = void 0;
17
+ exports.EMPLOYEE_STATUS_PRIORITY = exports.DEFAULT_CREATE_EMPLOYEE_OPTIONS = void 0;
18
+ const enums_1 = require("../enums");
18
19
  exports.DEFAULT_CREATE_EMPLOYEE_OPTIONS = {
19
20
  saveCustomer: true,
20
21
  sendCustomerNotification: false,
21
22
  allowExistingCustomer: false,
22
23
  requireNewUser: true,
23
24
  };
25
+ exports.EMPLOYEE_STATUS_PRIORITY = {
26
+ [enums_1.EmployeeStatus.ACTIVE]: 3,
27
+ [enums_1.EmployeeStatus.INACTIVE]: 2,
28
+ [enums_1.EmployeeStatus.PENDING]: 1,
29
+ };
24
30
  __exportStar(require("./index"), exports);
25
31
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/types/employees/types/consts/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAEa,QAAA,+BAA+B,GAA0B;IACrE,YAAY,EAAE,IAAI;IAClB,wBAAwB,EAAE,KAAK;IAC/B,qBAAqB,EAAE,KAAK;IAC5B,cAAc,EAAE,IAAI;CACpB,CAAC;AACF,0CAAwB"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/types/employees/types/consts/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AACA,oCAA0C;AAE7B,QAAA,+BAA+B,GAA0B;IACrE,YAAY,EAAE,IAAI;IAClB,wBAAwB,EAAE,KAAK;IAC/B,qBAAqB,EAAE,KAAK;IAC5B,cAAc,EAAE,IAAI;CACpB,CAAC;AAEW,QAAA,wBAAwB,GAAmC;IACvE,CAAC,sBAAc,CAAC,MAAM,CAAC,EAAE,CAAC;IAC1B,CAAC,sBAAc,CAAC,QAAQ,CAAC,EAAE,CAAC;IAC5B,CAAC,sBAAc,CAAC,OAAO,CAAC,EAAE,CAAC;CAC3B,CAAC;AACF,0CAAwB"}
@@ -1,3 +1,4 @@
1
+ import { CustomerMerge } from '../customers-merge/entities/CustomerMerge';
1
2
  import { UserAuthorizationsTypeEnum } from '../services/enums.service';
2
3
  import { User } from '../user/entities/User';
3
4
  import { BondBaseEntity } from './BondBaseEntity';
@@ -6,4 +7,7 @@ export declare class UserAuthorizations extends BondBaseEntity {
6
7
  userId: number | null;
7
8
  entityType: UserAuthorizationsTypeEnum;
8
9
  user: User;
10
+ deletedAt?: Date;
11
+ mergeId?: number;
12
+ merge?: CustomerMerge;
9
13
  }
@@ -1 +1 @@
1
- {"version":3,"file":"UserAuthorizations.js","sourceRoot":"","sources":["../../../src/types/entity/UserAuthorizations.ts"],"names":[],"mappings":";;;AAKA,qDAAkD;AAElD,MAAa,kBAAmB,SAAQ,+BAAc;CAQrD;AARD,gDAQC"}
1
+ {"version":3,"file":"UserAuthorizations.js","sourceRoot":"","sources":["../../../src/types/entity/UserAuthorizations.ts"],"names":[],"mappings":";;;AAMA,qDAAkD;AAElD,MAAa,kBAAmB,SAAQ,+BAAc;CAcrD;AAdD,gDAcC"}
@@ -1,3 +1,4 @@
1
+ import { CustomerMerge } from '../../customers-merge/entities/CustomerMerge';
1
2
  import { EmployeeStatus } from '../../employees/types/enums';
2
3
  import { BondBaseEntity } from '../../entity/BondBaseEntity';
3
4
  import { User } from '../../user/entities/User';
@@ -10,4 +11,6 @@ export declare class OrganizationUsers extends BondBaseEntity {
10
11
  employmentStartDate?: Date;
11
12
  employmentEndDate?: Date;
12
13
  deletedAt?: Date;
14
+ mergeId?: number;
15
+ merge?: CustomerMerge;
13
16
  }
@@ -1 +1 @@
1
- {"version":3,"file":"OrganizationUsers.js","sourceRoot":"","sources":["../../../../src/types/organization/entities/OrganizationUsers.ts"],"names":[],"mappings":";;;AAGA,gEAA6D;AAG7D,MAAa,iBAAkB,SAAQ,+BAAc;CAiBpD;AAjBD,8CAiBC"}
1
+ {"version":3,"file":"OrganizationUsers.js","sourceRoot":"","sources":["../../../../src/types/organization/entities/OrganizationUsers.ts"],"names":[],"mappings":";;;AAIA,gEAA6D;AAG7D,MAAa,iBAAkB,SAAQ,+BAAc;CAqBpD;AArBD,8CAqBC"}
@@ -5,6 +5,7 @@ import { IProductRelatedProgram } from '../../../programs/types/interfaces/progr
5
5
  import { MembershipTypeEnum } from '../../../services/enums.service';
6
6
  import { CreateNoteDto } from '../../dto/payment.dto';
7
7
  import { DiscountOnEnum } from '../enums/discount.enums';
8
+ import { Tax } from '../../../taxes/entities/Tax';
8
9
  export interface IRoundingSplit {
9
10
  splitAmount: number;
10
11
  splitsNumber: number;
@@ -66,10 +67,13 @@ export declare class IUserItem {
66
67
  product?: Product;
67
68
  totalQuantity?: number;
68
69
  totalPriceWithoutTax?: number;
70
+ subtotal?: number;
69
71
  totalPrice?: number;
70
72
  isTaxInclusive?: boolean;
71
73
  percentage?: number;
74
+ tax?: Tax;
72
75
  taxItem?: IUserItem;
76
+ taxItems?: IUserItem[];
73
77
  }
74
78
  export interface IFindDiscountsOptions {
75
79
  includeGLCodes?: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"discount.interfaces.js","sourceRoot":"","sources":["../../../../../src/types/payment/types/interfaces/discount.interfaces.ts"],"names":[],"mappings":";;;AAGA,+EAA+E;AAE/E,mEAAqE;AAoErE,MAAa,SAAS;CAoBrB;AApBD,8BAoBC"}
1
+ {"version":3,"file":"discount.interfaces.js","sourceRoot":"","sources":["../../../../../src/types/payment/types/interfaces/discount.interfaces.ts"],"names":[],"mappings":";;;AAGA,+EAA+E;AAE/E,mEAAqE;AAqErE,MAAa,SAAS;CA0BrB;AA1BD,8BA0BC"}
@@ -5,6 +5,7 @@ import { Price } from '../../../pricing/entities/Price';
5
5
  import { ProgramTypesEnum } from '../../../programs/types/enums/program.enums';
6
6
  import { ResourceDto } from '../../../resources/dto/resource.dto';
7
7
  import { ActivityEnum, OrderByEnum } from '../../../services/enums.service';
8
+ import { ICalculatedTax } from '../../../services/interfaces.service';
8
9
  import { IPagination } from '../../../util/models/interfaces/general.interfaces';
9
10
  import { Product } from '../../entities/product.entity';
10
11
  import { OrderByProductEnum, ProductExpandEnum } from '../enums/product.enums';
@@ -76,6 +77,7 @@ export interface IFindPriceOfProduct {
76
77
  userId: number;
77
78
  quantity?: number;
78
79
  resources?: ResourceDto[];
80
+ taxes?: ICalculatedTax[];
79
81
  unique?: string;
80
82
  }
81
83
  export interface IGetResourcesProductsOptions {
@@ -1,3 +1,4 @@
1
+ import { CustomerMerge } from '../../customers-merge/entities/CustomerMerge';
1
2
  import { OrganizationConnectionBaseEntity } from '../../entity/OrganizationConnectionBaseEntity';
2
3
  import { User } from '../../user/entities/User';
3
4
  import { Role } from './Role';
@@ -8,4 +9,6 @@ export declare class UserRole extends OrganizationConnectionBaseEntity {
8
9
  facilityId: number;
9
10
  role: Role;
10
11
  user: User;
12
+ mergeId?: number;
13
+ merge?: CustomerMerge;
11
14
  }
@@ -1 +1 @@
1
- {"version":3,"file":"UserRole.js","sourceRoot":"","sources":["../../../../src/types/roles/entities/UserRole.ts"],"names":[],"mappings":";;;AAEA,oGAAiG;AAKjG,MAAa,QAAS,SAAQ,mEAAgC;CAY7D;AAZD,4BAYC"}
1
+ {"version":3,"file":"UserRole.js","sourceRoot":"","sources":["../../../../src/types/roles/entities/UserRole.ts"],"names":[],"mappings":";;;AAGA,oGAAiG;AAKjG,MAAa,QAAS,SAAQ,mEAAgC;CAgB7D;AAhBD,4BAgBC"}
@@ -16,6 +16,7 @@ import { ProgramSeason } from '../programs-seasons/entities/ProgramSeason';
16
16
  import { LevelOfPlayEnum, ProgramTypesEnum } from '../programs/types/enums/program.enums';
17
17
  import { PurchasePaymentDto } from '../purchase/dto/purchase.dto';
18
18
  import { Answer } from '../questionnaires/entities/Answer';
19
+ import { Tax } from '../taxes/entities/Tax';
19
20
  import { SimpleUserDto } from '../user/dto/user.dto';
20
21
  import { AddonTimePeriodEnum, CurrencyEnum, GenderEnum, MembershipStatusEnum, PackageProductsRelationTypeEnum, PaginationTypeEnum, ProductSubTypesEnum, ProductTypesEnum, PurchasedResourceStatusEnum, RegistrationValidationStatusEnum, RegistrationWindowStatusEnum, ResourceNameTypeEnum } from './enums.service';
21
22
  export interface IQuestionAnswerObject {
@@ -118,6 +119,9 @@ export interface IPaginationMeta {
118
119
  totalPages?: number;
119
120
  type?: PaginationTypeEnum;
120
121
  }
122
+ export interface ICalculatedTax extends Tax {
123
+ amount?: number;
124
+ }
121
125
  export interface IPricesOfProductsResults {
122
126
  discountId?: number;
123
127
  groupId?: number;
@@ -133,6 +137,7 @@ export interface IPricesOfProductsResults {
133
137
  priceWithoutTax: number;
134
138
  quantity?: number;
135
139
  tax: number;
140
+ taxes?: ICalculatedTax[];
136
141
  unique?: string;
137
142
  unitPrice: number;
138
143
  }
@@ -1 +1 @@
1
- {"version":3,"file":"interfaces.service.js","sourceRoot":"","sources":["../../../src/types/services/interfaces.service.ts"],"names":[],"mappings":";;;AAIA,6CAAyC;AAUzC,8EAA2E;AAM3E,mDAayB;AA+EzB;GACG;AACH,MAAa,qBAAsB,SAAQ,6BAAa;IAAxD;;QACC,gBAAW,GAAyB,oCAAoB,CAAC,cAAc,CAAC;IAEzE,CAAC;CAAA;AAHD,sDAGC;AAED;GACG;AACH,MAAa,oBAAqB,SAAQ,cAAK;IAA/C;;QACC,gBAAW,GAAyB,oCAAoB,CAAC,KAAK,CAAC;IAEhE,CAAC;CAAA;AAHD,oDAGC"}
1
+ {"version":3,"file":"interfaces.service.js","sourceRoot":"","sources":["../../../src/types/services/interfaces.service.ts"],"names":[],"mappings":";;;AAIA,6CAAyC;AAUzC,8EAA2E;AAO3E,mDAayB;AA+EzB;GACG;AACH,MAAa,qBAAsB,SAAQ,6BAAa;IAAxD;;QACC,gBAAW,GAAyB,oCAAoB,CAAC,cAAc,CAAC;IAEzE,CAAC;CAAA;AAHD,sDAGC;AAED;GACG;AACH,MAAa,oBAAqB,SAAQ,cAAK;IAA/C;;QACC,gBAAW,GAAyB,oCAAoB,CAAC,KAAK,CAAC;IAEhE,CAAC;CAAA;AAHD,oDAGC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bondsports/types",
3
- "version": "2.4.7",
3
+ "version": "2.4.8-a-1",
4
4
  "description": "backend types module for Bond-Sports",
5
5
  "main": "./dist/index.js",
6
6
  "scripts": {
@@ -33,12 +33,12 @@
33
33
  ],
34
34
  "homepage": "https://github.com/Bond-Sports/bondUtils/tree/main/packages/types#readme",
35
35
  "dependencies": {
36
+ "@bondsports/date-time": "^2.4.48",
37
+ "@bondsports/notifications-sdk": "latest",
36
38
  "moment": "^2.29.1",
37
39
  "rimraf": "^3.0.2",
38
40
  "stripe": "9.1.0",
39
- "typeorm": "^0.2.32",
40
- "@bondsports/date-time": "^2.4.48",
41
- "@bondsports/notifications-sdk": "latest"
41
+ "typeorm": "^0.2.32"
42
42
  },
43
43
  "devDependencies": {
44
44
  "@bondsports/eslint-config": "^1.0.2",
@@ -50,5 +50,5 @@
50
50
  "ts-node": "^10.8.0",
51
51
  "typescript": "^4.4.3"
52
52
  },
53
- "gitHead": "178ca9dc5ea5e94b44d765b6663e7a4ad0d19d98"
53
+ "gitHead": "d3316694767c8c6bf1ee8fe02b6c1e1aa65dc95c"
54
54
  }