@bondsports/types 2.4.88 → 2.4.89-a-2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (25) hide show
  1. package/dist/tsconfig.build.tsbuildinfo +1 -1
  2. package/dist/types/customers/types/consts/customers.consts.d.ts +2 -1
  3. package/dist/types/customers/types/consts/customers.consts.js +3 -2
  4. package/dist/types/customers/types/consts/customers.consts.js.map +1 -1
  5. package/dist/types/customers/types/interfaces.d.ts +1 -0
  6. package/dist/types/gl-codes/dto/gl-code.dto.d.ts +6 -0
  7. package/dist/types/gl-codes/dto/gl-code.dto.js.map +1 -1
  8. package/dist/types/gl-codes/entities/gl-code-to-facility.entity.d.ts +10 -0
  9. package/dist/types/gl-codes/entities/gl-code-to-facility.entity.js +8 -0
  10. package/dist/types/gl-codes/entities/gl-code-to-facility.entity.js.map +1 -0
  11. package/dist/types/gl-codes/entities/gl-code.d.ts +2 -0
  12. package/dist/types/gl-codes/entities/gl-code.js.map +1 -1
  13. package/dist/types/gl-codes/entities/index.d.ts +1 -0
  14. package/dist/types/gl-codes/entities/index.js +1 -0
  15. package/dist/types/gl-codes/entities/index.js.map +1 -1
  16. package/dist/types/gl-codes/types/interfaces/gl-code.interfaces.d.ts +6 -0
  17. package/dist/types/product-pricing/types/consts/product-category.consts.d.ts +39 -39
  18. package/dist/types/product-pricing/types/interfaces/product-creation.interfaces.d.ts +6 -0
  19. package/dist/types/terminal/dto/terminal-actions.dto.d.ts +3 -1
  20. package/dist/types/terminal/dto/terminal-actions.dto.js +9 -2
  21. package/dist/types/terminal/dto/terminal-actions.dto.js.map +1 -1
  22. package/dist/types/terminal/types/consts/terminal-action.consts.d.ts +8 -0
  23. package/dist/types/terminal/types/consts/terminal-action.consts.js +11 -1
  24. package/dist/types/terminal/types/consts/terminal-action.consts.js.map +1 -1
  25. package/package.json +1 -1
@@ -2,5 +2,6 @@ import { CreateCustomerOptions } from '../interfaces';
2
2
  export declare const LIMIT_CUSTOMERS_FETCH_AMOUNT = 1000;
3
3
  export declare const DEFAULT_CREATE_CUSTOMER_OPTIONS: CreateCustomerOptions;
4
4
  export declare const RELATIONS_FOR_ORGANIZATION_USER: string[];
5
- export declare const CUSTOMER_ENTITY_UPDATE_FIELDS: string[];
5
+ export declare const CUSTOMER_ENTITY_UPDATE_FIELDS: ("addressId" | "email" | "phoneNumber" | "firstName" | "lastName")[];
6
+ export declare const CUSTOMER_ORG_SCOPED_UPDATE_FIELDS: "colorCodeId"[];
6
7
  export declare const CUSTOMER_SEARCH_FIELDS: string[];
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.CUSTOMER_SEARCH_FIELDS = exports.CUSTOMER_ENTITY_UPDATE_FIELDS = exports.RELATIONS_FOR_ORGANIZATION_USER = exports.DEFAULT_CREATE_CUSTOMER_OPTIONS = exports.LIMIT_CUSTOMERS_FETCH_AMOUNT = void 0;
3
+ exports.CUSTOMER_SEARCH_FIELDS = exports.CUSTOMER_ORG_SCOPED_UPDATE_FIELDS = exports.CUSTOMER_ENTITY_UPDATE_FIELDS = exports.RELATIONS_FOR_ORGANIZATION_USER = exports.DEFAULT_CREATE_CUSTOMER_OPTIONS = exports.LIMIT_CUSTOMERS_FETCH_AMOUNT = void 0;
4
4
  exports.LIMIT_CUSTOMERS_FETCH_AMOUNT = 1000;
5
5
  exports.DEFAULT_CREATE_CUSTOMER_OPTIONS = {
6
6
  saveCustomer: true,
@@ -8,15 +8,16 @@ exports.DEFAULT_CREATE_CUSTOMER_OPTIONS = {
8
8
  allowExistingCustomer: false,
9
9
  requireNewUser: false,
10
10
  skipCreateCognitoUser: false,
11
+ skipUserProfileSync: false,
11
12
  };
12
13
  exports.RELATIONS_FOR_ORGANIZATION_USER = ['user', 'user.organizationUsers'];
13
14
  exports.CUSTOMER_ENTITY_UPDATE_FIELDS = [
14
15
  'addressId',
15
- 'colorCodeId',
16
16
  'email',
17
17
  'firstName',
18
18
  'lastName',
19
19
  'phoneNumber',
20
20
  ];
21
+ exports.CUSTOMER_ORG_SCOPED_UPDATE_FIELDS = ['colorCodeId'];
21
22
  exports.CUSTOMER_SEARCH_FIELDS = ['firstName', 'lastName', 'name', 'email'];
22
23
  //# sourceMappingURL=customers.consts.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"customers.consts.js","sourceRoot":"","sources":["../../../../../src/types/customers/types/consts/customers.consts.ts"],"names":[],"mappings":";;;AAEa,QAAA,4BAA4B,GAAG,IAAI,CAAC;AAEpC,QAAA,+BAA+B,GAA0B;IACrE,YAAY,EAAE,IAAI;IAClB,wBAAwB,EAAE,IAAI;IAC9B,qBAAqB,EAAE,KAAK;IAC5B,cAAc,EAAE,KAAK;IACrB,qBAAqB,EAAE,KAAK;CAC5B,CAAC;AAEW,QAAA,+BAA+B,GAAG,CAAC,MAAM,EAAE,wBAAwB,CAAC,CAAC;AAErE,QAAA,6BAA6B,GAAG;IAC5C,WAAW;IACX,aAAa;IACb,OAAO;IACP,WAAW;IACX,UAAU;IACV,aAAa;CACb,CAAC;AAEW,QAAA,sBAAsB,GAAG,CAAC,WAAW,EAAE,UAAU,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC"}
1
+ {"version":3,"file":"customers.consts.js","sourceRoot":"","sources":["../../../../../src/types/customers/types/consts/customers.consts.ts"],"names":[],"mappings":";;;AAGa,QAAA,4BAA4B,GAAG,IAAI,CAAC;AAEpC,QAAA,+BAA+B,GAA0B;IACrE,YAAY,EAAE,IAAI;IAClB,wBAAwB,EAAE,IAAI;IAC9B,qBAAqB,EAAE,KAAK;IAC5B,cAAc,EAAE,KAAK;IACrB,qBAAqB,EAAE,KAAK;IAC5B,mBAAmB,EAAE,KAAK;CAC1B,CAAC;AAEW,QAAA,+BAA+B,GAAG,CAAC,MAAM,EAAE,wBAAwB,CAAC,CAAC;AAErE,QAAA,6BAA6B,GAAG;IAC5C,WAAW;IACX,OAAO;IACP,WAAW;IACX,UAAU;IACV,aAAa;CACgB,CAAC;AAElB,QAAA,iCAAiC,GAAG,CAAC,aAAa,CAA8B,CAAC;AAEjF,QAAA,sBAAsB,GAAG,CAAC,WAAW,EAAE,UAAU,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC"}
@@ -35,6 +35,7 @@ export interface CreateCustomerOptions {
35
35
  saveCustomer?: boolean;
36
36
  sendCustomerNotification?: boolean;
37
37
  skipCreateCognitoUser?: boolean;
38
+ skipUserProfileSync?: boolean;
38
39
  }
39
40
  export interface CustomerFamilyMember {
40
41
  id: number;
@@ -14,6 +14,7 @@ export declare class CreateGlCodeDto {
14
14
  resourceType?: GlResourceTypeEnum;
15
15
  productType?: ProductTypesEnum;
16
16
  glTypeId: number;
17
+ facilitiesIds?: number[];
17
18
  }
18
19
  export declare class GlCodeDto extends OrganizationBaseEntityDto {
19
20
  code: string;
@@ -23,6 +24,8 @@ export declare class GlCodeDto extends OrganizationBaseEntityDto {
23
24
  productType?: ProductTypesEnum;
24
25
  updatedAt?: Date;
25
26
  assignedResources?: number;
27
+ facilityIds?: number[];
28
+ isAllFacilities?: boolean;
26
29
  glType: GlTypeDto;
27
30
  }
28
31
  export declare class AccountingCodeDto extends IdDto {
@@ -49,6 +52,7 @@ export declare class GetGlCodesFiltersDto extends PaginationQuery implements IGl
49
52
  resourceTypes?: GlResourceTypeEnum[];
50
53
  productTypes?: ProductTypesEnum[];
51
54
  glTypeIds?: number[];
55
+ facilitiesIds?: number[];
52
56
  orderBy?: GlCodeOrderByEnum;
53
57
  order?: OrderByEnum;
54
58
  expand?: GlCodeExpandEnum[];
@@ -64,6 +68,7 @@ export declare class UpdateGlCodeDto {
64
68
  resourceType?: GlResourceTypeEnum;
65
69
  productType?: ProductTypesEnum;
66
70
  glTypeId?: number;
71
+ facilitiesIds?: number[];
67
72
  }
68
73
  export declare class MassActionUpdateGlCodeDto {
69
74
  label?: string;
@@ -84,4 +89,5 @@ export declare class MassActionGlCodesQueryDto extends MassActionFilterDto imple
84
89
  resourceTypes?: GlResourceTypeEnum[];
85
90
  productTypes?: ProductTypesEnum[];
86
91
  glTypeIds?: number[];
92
+ facilitiesIds?: number[];
87
93
  }
@@ -1 +1 @@
1
- {"version":3,"file":"gl-code.dto.js","sourceRoot":"","sources":["../../../../src/types/gl-codes/dto/gl-code.dto.ts"],"names":[],"mappings":";;;AACA,uDAAoF;AACpF,8EAAyG;AAOzG,MAAa,WAAY,SAAQ,sCAAmB;CAEnD;AAFD,kCAEC;AAED,MAAa,eAAe;CAY3B;AAZD,0CAYC;AAED,MAAa,SAAU,SAAQ,4CAAyB;CAgBvD;AAhBD,8BAgBC;AAED,MAAa,iBAAkB,SAAQ,mBAAK;CAU3C;AAVD,8CAUC;AAED,MAAa,qBAAqB;IAAlC;QAaC,2BAAsB,GAAa,IAAI,CAAC;IAGzC,CAAC;CAAA;AAhBD,sDAgBC;AAED,MAAa,oBAAqB,SAAQ,6BAAe;CAkBxD;AAlBD,oDAkBC;AAED,MAAa,eAAe;CAE3B;AAFD,0CAEC;AAED,MAAa,eAAe;CAc3B;AAdD,0CAcC;AAED,MAAa,yBAAyB;CAUrC;AAVD,8DAUC;AAED,MAAa,gBAAgB;CAE5B;AAFD,4CAEC;AAED,MAAa,gBAAgB;CAE5B;AAFD,4CAEC;AAED,MAAa,yBAA0B,SAAQ,iCAAmB;CAUjE;AAVD,8DAUC"}
1
+ {"version":3,"file":"gl-code.dto.js","sourceRoot":"","sources":["../../../../src/types/gl-codes/dto/gl-code.dto.ts"],"names":[],"mappings":";;;AACA,uDAAoF;AACpF,8EAAyG;AAOzG,MAAa,WAAY,SAAQ,sCAAmB;CAEnD;AAFD,kCAEC;AAED,MAAa,eAAe;CAc3B;AAdD,0CAcC;AAED,MAAa,SAAU,SAAQ,4CAAyB;CAoBvD;AApBD,8BAoBC;AAED,MAAa,iBAAkB,SAAQ,mBAAK;CAU3C;AAVD,8CAUC;AAED,MAAa,qBAAqB;IAAlC;QAaC,2BAAsB,GAAa,IAAI,CAAC;IAGzC,CAAC;CAAA;AAhBD,sDAgBC;AAED,MAAa,oBAAqB,SAAQ,6BAAe;CAoBxD;AApBD,oDAoBC;AAED,MAAa,eAAe;CAE3B;AAFD,0CAEC;AAED,MAAa,eAAe;CAgB3B;AAhBD,0CAgBC;AAED,MAAa,yBAAyB;CAUrC;AAVD,8DAUC;AAED,MAAa,gBAAgB;CAE5B;AAFD,4CAEC;AAED,MAAa,gBAAgB;CAE5B;AAFD,4CAEC;AAED,MAAa,yBAA0B,SAAQ,iCAAmB;CAYjE;AAZD,8DAYC"}
@@ -0,0 +1,10 @@
1
+ import { BondBaseEntity } from '../../entity/BondBaseEntity';
2
+ import { Facility } from '../../facilities/entities/Facility';
3
+ import { GlCode } from './gl-code';
4
+ export declare class GlCodeToFacility extends BondBaseEntity {
5
+ glCodeId: number;
6
+ facilityId: number;
7
+ deletedAt?: Date;
8
+ facility: Facility;
9
+ glCode: GlCode;
10
+ }
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.GlCodeToFacility = void 0;
4
+ const BondBaseEntity_1 = require("../../entity/BondBaseEntity");
5
+ class GlCodeToFacility extends BondBaseEntity_1.BondBaseEntity {
6
+ }
7
+ exports.GlCodeToFacility = GlCodeToFacility;
8
+ //# sourceMappingURL=gl-code-to-facility.entity.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"gl-code-to-facility.entity.js","sourceRoot":"","sources":["../../../../src/types/gl-codes/entities/gl-code-to-facility.entity.ts"],"names":[],"mappings":";;;AAEA,gEAA6D;AAK7D,MAAa,gBAAiB,SAAQ,+BAAc;CAUnD;AAVD,4CAUC"}
@@ -1,6 +1,7 @@
1
1
  import { OrganizationConnectionBaseEntity } from '../../entity/OrganizationConnectionBaseEntity';
2
2
  import { ActivityEnum, ProductTypesEnum } from '../../services/enums.service';
3
3
  import { GlResourceTypeEnum } from '../types/enums/gl-code.enum';
4
+ import { GlCodeToFacility } from './gl-code-to-facility.entity';
4
5
  import { GlType } from './gl-type';
5
6
  export declare class GlCode extends OrganizationConnectionBaseEntity {
6
7
  code: string;
@@ -11,5 +12,6 @@ export declare class GlCode extends OrganizationConnectionBaseEntity {
11
12
  deletedAt?: Date;
12
13
  glTypeId: number;
13
14
  glType: GlType;
15
+ glCodeToFacilities: GlCodeToFacility[];
14
16
  assignedResources?: number;
15
17
  }
@@ -1 +1 @@
1
- {"version":3,"file":"gl-code.js","sourceRoot":"","sources":["../../../../src/types/gl-codes/entities/gl-code.ts"],"names":[],"mappings":";;;AAEA,oGAAiG;AAMjG,MAAa,MAAO,SAAQ,mEAAgC;CAkB3D;AAlBD,wBAkBC"}
1
+ {"version":3,"file":"gl-code.js","sourceRoot":"","sources":["../../../../src/types/gl-codes/entities/gl-code.ts"],"names":[],"mappings":";;;AAEA,oGAAiG;AAOjG,MAAa,MAAO,SAAQ,mEAAgC;CAoB3D;AApBD,wBAoBC"}
@@ -1,3 +1,4 @@
1
+ export * from './gl-code-to-facility.entity';
1
2
  export * from './gl-code';
2
3
  export * from './gl-type';
3
4
  export * from './resource-to-gl';
@@ -14,6 +14,7 @@ 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
+ __exportStar(require("./gl-code-to-facility.entity"), exports);
17
18
  __exportStar(require("./gl-code"), exports);
18
19
  __exportStar(require("./gl-type"), exports);
19
20
  __exportStar(require("./resource-to-gl"), exports);
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/types/gl-codes/entities/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4CAA0B;AAC1B,4CAA0B;AAC1B,mDAAiC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/types/gl-codes/entities/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,+DAA6C;AAC7C,4CAA0B;AAC1B,4CAA0B;AAC1B,mDAAiC"}
@@ -1,12 +1,17 @@
1
1
  import { ActivityEnum, OrderByEnum, ProductTypesEnum, ResourceNameTypeEnum } from '../../../services/enums.service';
2
2
  import { IPagination } from '../../../util/models/interfaces/general.interfaces';
3
3
  import { CreateResourceToGlDto } from '../../dto/resource-to-gl.dto';
4
+ import { GlCodeToFacility } from '../../entities/gl-code-to-facility.entity';
4
5
  import { ResourceToGL } from '../../entities/resource-to-gl';
5
6
  import { GlCodeExpandEnum, GlCodeOrderByEnum, GlResourceTypeEnum } from '../enums/gl-code.enum';
6
7
  export interface filterExistingGlsResult {
7
8
  deleteResourceToGlsIds: number[];
8
9
  newResourceToGls: CreateResourceToGlDto[];
9
10
  }
11
+ export interface IGlCodeFacilityConnectionsDiff {
12
+ connectionIdsToRemove: number[];
13
+ connectionsToAdd: GlCodeToFacility[];
14
+ }
10
15
  export interface IResourcesGLsResult {
11
16
  organizationId: number;
12
17
  resourceId: number;
@@ -15,6 +20,7 @@ export interface IResourcesGLsResult {
15
20
  }
16
21
  export interface IGlCodesFilters extends IPagination {
17
22
  expand?: GlCodeExpandEnum[];
23
+ facilitiesIds?: number[];
18
24
  glTypeIds?: number[];
19
25
  labels?: string[];
20
26
  order?: OrderByEnum;
@@ -230,28 +230,6 @@ declare const _RESERVATION_SETTINGS_TYPE_SCHEMA: z.ZodObject<{
230
230
  };
231
231
  resourceTypes?: [ResourceTypeEnum, ...ResourceTypeEnum[]];
232
232
  approvalRequired?: boolean;
233
- allowResourceSelection?: boolean;
234
- prioritizedResourceAllocation?: Partial<Record<ResourceSubTypeEnum, [number, ...number[]]>>;
235
- bookingDurations?: {
236
- minDuration?: {
237
- amount?: number;
238
- unit?: TimeUnit;
239
- };
240
- maxDuration?: {
241
- amount?: number;
242
- unit?: TimeUnit;
243
- };
244
- durationStep?: {
245
- amount?: number;
246
- unit?: TimeUnit;
247
- };
248
- defaultDuration?: {
249
- amount?: number;
250
- unit?: TimeUnit;
251
- };
252
- };
253
- slotStartTime?: number;
254
- allowOverlappingStartTimes?: boolean;
255
233
  memberships?: [{
256
234
  name?: string;
257
235
  id?: string;
@@ -277,49 +255,49 @@ declare const _RESERVATION_SETTINGS_TYPE_SCHEMA: z.ZodObject<{
277
255
  unit?: TimeUnit;
278
256
  };
279
257
  }[]];
280
- }, {
281
- default?: {
282
- advanceBookingWindow?: {
258
+ allowResourceSelection?: boolean;
259
+ prioritizedResourceAllocation?: Partial<Record<ResourceSubTypeEnum, [number, ...number[]]>>;
260
+ bookingDurations?: {
261
+ minDuration?: {
283
262
  amount?: number;
284
263
  unit?: TimeUnit;
285
264
  };
286
- minimumBookingNotice?: {
265
+ maxDuration?: {
287
266
  amount?: number;
288
267
  unit?: TimeUnit;
289
268
  };
290
- maxBookingHours?: {
269
+ durationStep?: {
291
270
  amount?: number;
292
271
  unit?: TimeUnit;
293
272
  };
294
- maxSequentialBookings?: {
273
+ defaultDuration?: {
295
274
  amount?: number;
296
275
  unit?: TimeUnit;
297
276
  };
298
277
  };
299
- resourceTypes?: [ResourceTypeEnum, ...ResourceTypeEnum[]];
300
- approvalRequired?: boolean;
301
- allowResourceSelection?: boolean;
302
- prioritizedResourceAllocation?: Partial<Record<ResourceSubTypeEnum, [number, ...number[]]>>;
303
- bookingDurations?: {
304
- minDuration?: {
278
+ slotStartTime?: number;
279
+ allowOverlappingStartTimes?: boolean;
280
+ }, {
281
+ default?: {
282
+ advanceBookingWindow?: {
305
283
  amount?: number;
306
284
  unit?: TimeUnit;
307
285
  };
308
- maxDuration?: {
286
+ minimumBookingNotice?: {
309
287
  amount?: number;
310
288
  unit?: TimeUnit;
311
289
  };
312
- durationStep?: {
290
+ maxBookingHours?: {
313
291
  amount?: number;
314
292
  unit?: TimeUnit;
315
293
  };
316
- defaultDuration?: {
294
+ maxSequentialBookings?: {
317
295
  amount?: number;
318
296
  unit?: TimeUnit;
319
297
  };
320
298
  };
321
- slotStartTime?: number;
322
- allowOverlappingStartTimes?: boolean;
299
+ resourceTypes?: [ResourceTypeEnum, ...ResourceTypeEnum[]];
300
+ approvalRequired?: boolean;
323
301
  memberships?: [{
324
302
  name?: string;
325
303
  id?: string;
@@ -345,6 +323,28 @@ declare const _RESERVATION_SETTINGS_TYPE_SCHEMA: z.ZodObject<{
345
323
  unit?: TimeUnit;
346
324
  };
347
325
  }[]];
326
+ allowResourceSelection?: boolean;
327
+ prioritizedResourceAllocation?: Partial<Record<ResourceSubTypeEnum, [number, ...number[]]>>;
328
+ bookingDurations?: {
329
+ minDuration?: {
330
+ amount?: number;
331
+ unit?: TimeUnit;
332
+ };
333
+ maxDuration?: {
334
+ amount?: number;
335
+ unit?: TimeUnit;
336
+ };
337
+ durationStep?: {
338
+ amount?: number;
339
+ unit?: TimeUnit;
340
+ };
341
+ defaultDuration?: {
342
+ amount?: number;
343
+ unit?: TimeUnit;
344
+ };
345
+ };
346
+ slotStartTime?: number;
347
+ allowOverlappingStartTimes?: boolean;
348
348
  }>;
349
349
  declare const _GOODS_SETTINGS_TYPE_SCHEMA: z.ZodObject<{
350
350
  colorCodeId: z.ZodNullable<z.ZodNumber>;
@@ -6,3 +6,9 @@ export interface IGetSourceProductDataResponse {
6
6
  glCodes: ResourceGLsResponseDto[];
7
7
  resourceSettings: ResourceSetting[];
8
8
  }
9
+ export interface ICreateProductOptions {
10
+ skipGls?: boolean;
11
+ skipResources?: boolean;
12
+ skipEntitlements?: boolean;
13
+ skipPaymentPlans?: boolean;
14
+ }
@@ -4,6 +4,7 @@ import { PlatformsEnum } from '../../services/enums.service';
4
4
  import { TerminalActionCancelRequestReasonEnum } from '../types/enums/terminal-action.enums';
5
5
  import { TerminalReaderActionStatusEnum, TerminalReaderActionTypeEnum } from '../types/enums/terminal-readers.enums';
6
6
  import { TerminalPresentPaymentMethodTypeEnum } from './terminal-actions.enums';
7
+ export declare const TERMINAL_IDEMPOTENCY_KEY_MAX_LENGTH = 128;
7
8
  export declare class TerminalPaymentIntentDto {
8
9
  amount: number;
9
10
  customer: string;
@@ -23,7 +24,8 @@ export declare class TerminalProcessSetupIntentOverrideConfigDto {
23
24
  allow_redisplay: 'always' | 'limited' | 'unspecified';
24
25
  }
25
26
  export declare class ProcessTerminalPaymentDto {
26
- paymentIntent: TerminalPaymentIntentDto;
27
+ paymentIntent?: TerminalPaymentIntentDto;
28
+ paymentIntentId?: string;
27
29
  force?: boolean;
28
30
  overrideConfig?: TerminalProcessPaymentOverrideConfigDto;
29
31
  idempotencyKey?: string;
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.TerminalCancelActionResponseDto = exports.TerminalActionResponseDto = exports.TerminalOverrideResultDto = exports.TerminalOverridePreviousActionDto = exports.TerminalActionInitiatedByDto = exports.TerminalActionStateDto = exports.ProcessTerminalRefundDto = exports.ProcessTerminalSetupIntentDto = exports.PresentTerminalPaymentMethodDto = exports.CollectTerminalInputsDto = exports.TerminalCollectInputTypeEnum = exports.CancelTerminalActionDto = exports.ProcessTerminalPaymentDto = exports.TerminalProcessSetupIntentOverrideConfigDto = exports.TerminalProcessPaymentOverrideConfigDto = exports.TerminalProcessPaymentTippingDto = exports.TerminalPaymentIntentDto = void 0;
3
+ exports.TerminalCancelActionResponseDto = exports.TerminalActionResponseDto = exports.TerminalOverrideResultDto = exports.TerminalOverridePreviousActionDto = exports.TerminalActionInitiatedByDto = exports.TerminalActionStateDto = exports.ProcessTerminalRefundDto = exports.ProcessTerminalSetupIntentDto = exports.PresentTerminalPaymentMethodDto = exports.CollectTerminalInputsDto = exports.TerminalCollectInputTypeEnum = exports.CancelTerminalActionDto = exports.ProcessTerminalPaymentDto = exports.TerminalProcessSetupIntentOverrideConfigDto = exports.TerminalProcessPaymentOverrideConfigDto = exports.TerminalProcessPaymentTippingDto = exports.TerminalPaymentIntentDto = exports.TERMINAL_IDEMPOTENCY_KEY_MAX_LENGTH = void 0;
4
4
  const TERMINAL_PAYMENT_METHOD_TYPES_MAX = 10;
5
- const TERMINAL_IDEMPOTENCY_KEY_MAX_LENGTH = 128;
5
+ exports.TERMINAL_IDEMPOTENCY_KEY_MAX_LENGTH = 128;
6
6
  const TERMINAL_CARD_NUMBER_MAX_LENGTH = 19;
7
7
  class TerminalPaymentIntentDto {
8
8
  }
@@ -16,6 +16,13 @@ exports.TerminalProcessPaymentOverrideConfigDto = TerminalProcessPaymentOverride
16
16
  class TerminalProcessSetupIntentOverrideConfigDto {
17
17
  }
18
18
  exports.TerminalProcessSetupIntentOverrideConfigDto = TerminalProcessSetupIntentOverrideConfigDto;
19
+ /**
20
+ * Whether `idempotencyKey`'s validators should run on a process-payment body. They always run when the
21
+ * client supplied a key, and additionally when `paymentIntentId` is set, which makes the key mandatory:
22
+ * a reserved intent id holds the rest of the Stripe key steady across attempts, so without a rotating
23
+ * client key Stripe replays the first attempt's cached response — including its error — for 24 hours.
24
+ */
25
+ const requiresIdempotencyKeyValidation = (dto) => Boolean(dto.paymentIntentId) || dto.idempotencyKey !== undefined;
19
26
  class ProcessTerminalPaymentDto {
20
27
  }
21
28
  exports.ProcessTerminalPaymentDto = ProcessTerminalPaymentDto;
@@ -1 +1 @@
1
- {"version":3,"file":"terminal-actions.dto.js","sourceRoot":"","sources":["../../../../src/types/terminal/dto/terminal-actions.dto.ts"],"names":[],"mappings":";;;AASA,MAAM,iCAAiC,GAAG,EAAE,CAAC;AAC7C,MAAM,mCAAmC,GAAG,GAAG,CAAC;AAChD,MAAM,+BAA+B,GAAG,EAAE,CAAC;AAE3C,MAAa,wBAAwB;CAYpC;AAZD,4DAYC;AAED,MAAa,gCAAgC;CAE5C;AAFD,4EAEC;AAED,MAAa,uCAAuC;CAInD;AAJD,0FAIC;AAED,MAAa,2CAA2C;CAEvD;AAFD,kGAEC;AAED,MAAa,yBAAyB;CAQrC;AARD,8DAQC;AAED,MAAa,uBAAuB;CAEnC;AAFD,0DAEC;AAED,IAAY,4BAGX;AAHD,WAAY,4BAA4B;IACvC,uEAAuC,CAAA;IACvC,+DAA+B,CAAA;AAChC,CAAC,EAHW,4BAA4B,GAA5B,oCAA4B,KAA5B,oCAA4B,QAGvC;AAED,MAAa,wBAAwB;CAIpC;AAJD,4DAIC;AAED,MAAa,+BAA+B;CAM3C;AAND,0EAMC;AAED,MAAa,6BAA6B;CAQzC;AARD,sEAQC;AAED,MAAa,wBAAwB;CAQpC;AARD,4DAQC;AAED,MAAa,sBAAsB;CAIlC;AAJD,wDAIC;AAED,MAAa,4BAA4B;CAMxC;AAND,oEAMC;AAED,MAAa,iCAAiC;CAI7C;AAJD,8EAIC;AAED,MAAa,yBAAyB;CAIrC;AAJD,8DAIC;AAED,MAAa,yBAAyB;CAcrC;AAdD,8DAcC;AAED,MAAa,+BAA+B;CAM3C;AAND,0EAMC"}
1
+ {"version":3,"file":"terminal-actions.dto.js","sourceRoot":"","sources":["../../../../src/types/terminal/dto/terminal-actions.dto.ts"],"names":[],"mappings":";;;AASA,MAAM,iCAAiC,GAAG,EAAE,CAAC;AAChC,QAAA,mCAAmC,GAAG,GAAG,CAAC;AACvD,MAAM,+BAA+B,GAAG,EAAE,CAAC;AAE3C,MAAa,wBAAwB;CAYpC;AAZD,4DAYC;AAED,MAAa,gCAAgC;CAE5C;AAFD,4EAEC;AAED,MAAa,uCAAuC;CAInD;AAJD,0FAIC;AAED,MAAa,2CAA2C;CAEvD;AAFD,kGAEC;AAED;;;;;GAKG;AACH,MAAM,gCAAgC,GAAG,CAAC,GAA8B,EAAW,EAAE,CACpF,OAAO,CAAC,GAAG,CAAC,eAAe,CAAC,IAAI,GAAG,CAAC,cAAc,KAAK,SAAS,CAAC;AAElE,MAAa,yBAAyB;CAUrC;AAVD,8DAUC;AAED,MAAa,uBAAuB;CAEnC;AAFD,0DAEC;AAED,IAAY,4BAGX;AAHD,WAAY,4BAA4B;IACvC,uEAAuC,CAAA;IACvC,+DAA+B,CAAA;AAChC,CAAC,EAHW,4BAA4B,GAA5B,oCAA4B,KAA5B,oCAA4B,QAGvC;AAED,MAAa,wBAAwB;CAIpC;AAJD,4DAIC;AAED,MAAa,+BAA+B;CAM3C;AAND,0EAMC;AAED,MAAa,6BAA6B;CAQzC;AARD,sEAQC;AAED,MAAa,wBAAwB;CAQpC;AARD,4DAQC;AAED,MAAa,sBAAsB;CAIlC;AAJD,wDAIC;AAED,MAAa,4BAA4B;CAMxC;AAND,oEAMC;AAED,MAAa,iCAAiC;CAI7C;AAJD,8EAIC;AAED,MAAa,yBAAyB;CAIrC;AAJD,8DAIC;AAED,MAAa,yBAAyB;CAcrC;AAdD,8DAcC;AAED,MAAa,+BAA+B;CAM3C;AAND,0EAMC"}
@@ -1,3 +1,4 @@
1
+ import Stripe from 'stripe';
1
2
  export declare const ACTIVE_ACTION_TTL_SECONDS = 300;
2
3
  export declare const GHOST_CANCEL_TTL_SECONDS = 300;
3
4
  export declare const GHOST_CANCEL_RETRY_COOLDOWN_MS = 30000;
@@ -6,3 +7,10 @@ export declare const STRIPE_PAYMENT_INTENT_UNEXPECTED_STATE_CODE = "payment_inte
6
7
  export declare const STRIPE_TERMINAL_READER_BUSY_CODE = "terminal_reader_busy";
7
8
  export declare const STRIPE_TERMINAL_READER_OFFLINE_CODE = "terminal_reader_offline";
8
9
  export declare const STRIPE_TERMINAL_READER_TIMEOUT_CODE = "terminal_reader_timeout";
10
+ /**
11
+ * Statuses a PaymentIntent may hold when it is handed to a reader for `process_payment_intent`.
12
+ * A declined charge returns the intent to `requires_payment_method`, so retries stay dispatchable,
13
+ * while `processing`, `requires_capture`, `succeeded`, and `canceled` are all past the point where
14
+ * another reader charge is safe.
15
+ */
16
+ export declare const DISPATCHABLE_PAYMENT_INTENT_STATUSES: ReadonlySet<Stripe.PaymentIntent.Status>;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.STRIPE_TERMINAL_READER_TIMEOUT_CODE = exports.STRIPE_TERMINAL_READER_OFFLINE_CODE = exports.STRIPE_TERMINAL_READER_BUSY_CODE = exports.STRIPE_PAYMENT_INTENT_UNEXPECTED_STATE_CODE = exports.LOCK_TTL_MS = exports.GHOST_CANCEL_RETRY_COOLDOWN_MS = exports.GHOST_CANCEL_TTL_SECONDS = exports.ACTIVE_ACTION_TTL_SECONDS = void 0;
3
+ exports.DISPATCHABLE_PAYMENT_INTENT_STATUSES = exports.STRIPE_TERMINAL_READER_TIMEOUT_CODE = exports.STRIPE_TERMINAL_READER_OFFLINE_CODE = exports.STRIPE_TERMINAL_READER_BUSY_CODE = exports.STRIPE_PAYMENT_INTENT_UNEXPECTED_STATE_CODE = exports.LOCK_TTL_MS = exports.GHOST_CANCEL_RETRY_COOLDOWN_MS = exports.GHOST_CANCEL_TTL_SECONDS = exports.ACTIVE_ACTION_TTL_SECONDS = void 0;
4
4
  exports.ACTIVE_ACTION_TTL_SECONDS = 300;
5
5
  exports.GHOST_CANCEL_TTL_SECONDS = 300;
6
6
  exports.GHOST_CANCEL_RETRY_COOLDOWN_MS = 30000;
@@ -9,4 +9,14 @@ exports.STRIPE_PAYMENT_INTENT_UNEXPECTED_STATE_CODE = 'payment_intent_unexpected
9
9
  exports.STRIPE_TERMINAL_READER_BUSY_CODE = 'terminal_reader_busy';
10
10
  exports.STRIPE_TERMINAL_READER_OFFLINE_CODE = 'terminal_reader_offline';
11
11
  exports.STRIPE_TERMINAL_READER_TIMEOUT_CODE = 'terminal_reader_timeout';
12
+ /**
13
+ * Statuses a PaymentIntent may hold when it is handed to a reader for `process_payment_intent`.
14
+ * A declined charge returns the intent to `requires_payment_method`, so retries stay dispatchable,
15
+ * while `processing`, `requires_capture`, `succeeded`, and `canceled` are all past the point where
16
+ * another reader charge is safe.
17
+ */
18
+ exports.DISPATCHABLE_PAYMENT_INTENT_STATUSES = new Set([
19
+ 'requires_payment_method',
20
+ 'requires_confirmation',
21
+ ]);
12
22
  //# sourceMappingURL=terminal-action.consts.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"terminal-action.consts.js","sourceRoot":"","sources":["../../../../../src/types/terminal/types/consts/terminal-action.consts.ts"],"names":[],"mappings":";;;AAAa,QAAA,yBAAyB,GAAG,GAAG,CAAC;AAEhC,QAAA,wBAAwB,GAAG,GAAG,CAAC;AAE/B,QAAA,8BAA8B,GAAG,KAAM,CAAC;AAExC,QAAA,WAAW,GAAG,KAAM,CAAC;AAErB,QAAA,2CAA2C,GAAG,iCAAiC,CAAC;AAEhF,QAAA,gCAAgC,GAAG,sBAAsB,CAAC;AAE1D,QAAA,mCAAmC,GAAG,yBAAyB,CAAC;AAEhE,QAAA,mCAAmC,GAAG,yBAAyB,CAAC"}
1
+ {"version":3,"file":"terminal-action.consts.js","sourceRoot":"","sources":["../../../../../src/types/terminal/types/consts/terminal-action.consts.ts"],"names":[],"mappings":";;;AAEa,QAAA,yBAAyB,GAAG,GAAG,CAAC;AAEhC,QAAA,wBAAwB,GAAG,GAAG,CAAC;AAE/B,QAAA,8BAA8B,GAAG,KAAM,CAAC;AAExC,QAAA,WAAW,GAAG,KAAM,CAAC;AAErB,QAAA,2CAA2C,GAAG,iCAAiC,CAAC;AAEhF,QAAA,gCAAgC,GAAG,sBAAsB,CAAC;AAE1D,QAAA,mCAAmC,GAAG,yBAAyB,CAAC;AAEhE,QAAA,mCAAmC,GAAG,yBAAyB,CAAC;AAE7E;;;;;GAKG;AACU,QAAA,oCAAoC,GAA6C,IAAI,GAAG,CAAC;IACrG,yBAAyB;IACzB,uBAAuB;CACvB,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bondsports/types",
3
- "version": "2.4.88",
3
+ "version": "2.4.89-a-2",
4
4
  "description": "backend types module for Bond-Sports",
5
5
  "main": "./dist/index.js",
6
6
  "scripts": {