@munchi_oy/core 1.8.3 → 1.8.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/generated/api.ts CHANGED
@@ -23,20 +23,6 @@ import type { RequestArgs } from './base';
23
23
  // @ts-ignore
24
24
  import { BASE_PATH, COLLECTION_FORMATS, BaseAPI, RequiredError } from './base';
25
25
 
26
- /**
27
- *
28
- * @export
29
- * @enum {string}
30
- */
31
-
32
- export const ABLYEVENT = {
33
- Sync: 'sync',
34
- KdsItemStatusSync: 'kds_item_status_sync'
35
- } as const;
36
-
37
- export type ABLYEVENT = typeof ABLYEVENT[keyof typeof ABLYEVENT];
38
-
39
-
40
26
  /**
41
27
  *
42
28
  * @export
@@ -4906,6 +4892,12 @@ export interface GetStationResponseDtoStation {
4906
4892
  * @memberof GetStationResponseDtoStation
4907
4893
  */
4908
4894
  'prefix': string;
4895
+ /**
4896
+ *
4897
+ * @type {object}
4898
+ * @memberof GetStationResponseDtoStation
4899
+ */
4900
+ 'settings'?: object;
4909
4901
  /**
4910
4902
  *
4911
4903
  * @type {object}
@@ -5347,167 +5339,6 @@ export interface ItemPriceDto {
5347
5339
  */
5348
5340
  'priceBreakdown': ItemPriceBreakdownDto;
5349
5341
  }
5350
- /**
5351
- *
5352
- * @export
5353
- * @enum {string}
5354
- */
5355
-
5356
- export const KDSEVENTNAME = {
5357
- OrderCreated: 'order.created',
5358
- OrderReady: 'order.ready',
5359
- OrderReverted: 'order.reverted',
5360
- OrderDeleted: 'order.deleted',
5361
- PrintingOrder: 'printing.order'
5362
- } as const;
5363
-
5364
- export type KDSEVENTNAME = typeof KDSEVENTNAME[keyof typeof KDSEVENTNAME];
5365
-
5366
-
5367
- /**
5368
- *
5369
- * @export
5370
- * @interface KdsCoordinateDto
5371
- */
5372
- export interface KdsCoordinateDto {
5373
- /**
5374
- *
5375
- * @type {string}
5376
- * @memberof KdsCoordinateDto
5377
- */
5378
- 'id': string;
5379
- /**
5380
- *
5381
- * @type {number}
5382
- * @memberof KdsCoordinateDto
5383
- */
5384
- 'lat': number | null;
5385
- /**
5386
- *
5387
- * @type {number}
5388
- * @memberof KdsCoordinateDto
5389
- */
5390
- 'lon': number | null;
5391
- }
5392
- /**
5393
- *
5394
- * @export
5395
- * @interface KdsCustomerDto
5396
- */
5397
- export interface KdsCustomerDto {
5398
- /**
5399
- *
5400
- * @type {string}
5401
- * @memberof KdsCustomerDto
5402
- */
5403
- 'id': string;
5404
- /**
5405
- *
5406
- * @type {string}
5407
- * @memberof KdsCustomerDto
5408
- */
5409
- 'name': string;
5410
- /**
5411
- *
5412
- * @type {string}
5413
- * @memberof KdsCustomerDto
5414
- */
5415
- 'phone': string | null;
5416
- /**
5417
- *
5418
- * @type {string}
5419
- * @memberof KdsCustomerDto
5420
- */
5421
- 'email': string | null;
5422
- }
5423
- /**
5424
- *
5425
- * @export
5426
- * @interface KdsDeliveryDto
5427
- */
5428
- export interface KdsDeliveryDto {
5429
- /**
5430
- *
5431
- * @type {string}
5432
- * @memberof KdsDeliveryDto
5433
- */
5434
- 'id': string;
5435
- /**
5436
- *
5437
- * @type {boolean}
5438
- * @memberof KdsDeliveryDto
5439
- */
5440
- 'selfDelivery': boolean;
5441
- /**
5442
- *
5443
- * @type {string}
5444
- * @memberof KdsDeliveryDto
5445
- */
5446
- 'note': string | null;
5447
- /**
5448
- *
5449
- * @type {DeliveryStatus}
5450
- * @memberof KdsDeliveryDto
5451
- */
5452
- 'status': DeliveryStatus;
5453
- /**
5454
- *
5455
- * @type {DeliveryType}
5456
- * @memberof KdsDeliveryDto
5457
- */
5458
- 'type': DeliveryType;
5459
- /**
5460
- *
5461
- * @type {number}
5462
- * @memberof KdsDeliveryDto
5463
- */
5464
- 'deliveryFee': number;
5465
- /**
5466
- *
5467
- * @type {KdsLocationDto}
5468
- * @memberof KdsDeliveryDto
5469
- */
5470
- 'location': KdsLocationDto | null;
5471
- }
5472
-
5473
-
5474
- /**
5475
- *
5476
- * @export
5477
- * @interface KdsLocationDto
5478
- */
5479
- export interface KdsLocationDto {
5480
- /**
5481
- *
5482
- * @type {string}
5483
- * @memberof KdsLocationDto
5484
- */
5485
- 'id': string;
5486
- /**
5487
- *
5488
- * @type {string}
5489
- * @memberof KdsLocationDto
5490
- */
5491
- 'formatted_address': string | null;
5492
- /**
5493
- *
5494
- * @type {string}
5495
- * @memberof KdsLocationDto
5496
- */
5497
- 'city': string | null;
5498
- /**
5499
- *
5500
- * @type {string}
5501
- * @memberof KdsLocationDto
5502
- */
5503
- 'country': string | null;
5504
- /**
5505
- *
5506
- * @type {KdsCoordinateDto}
5507
- * @memberof KdsLocationDto
5508
- */
5509
- 'coordinates': KdsCoordinateDto | null;
5510
- }
5511
5342
  /**
5512
5343
  *
5513
5344
  * @export
@@ -5646,30 +5477,6 @@ export interface KdsOrderDto {
5646
5477
  * @memberof KdsOrderDto
5647
5478
  */
5648
5479
  'updatedAt': string;
5649
- /**
5650
- *
5651
- * @type {KdsCustomerDto}
5652
- * @memberof KdsOrderDto
5653
- */
5654
- 'customer': KdsCustomerDto | null;
5655
- /**
5656
- *
5657
- * @type {KdsDeliveryDto}
5658
- * @memberof KdsOrderDto
5659
- */
5660
- 'delivery': KdsDeliveryDto | null;
5661
- /**
5662
- *
5663
- * @type {KdsPreorderDto}
5664
- * @memberof KdsOrderDto
5665
- */
5666
- 'preorder': KdsPreorderDto | null;
5667
- /**
5668
- *
5669
- * @type {KdsPriceSummaryDto}
5670
- * @memberof KdsOrderDto
5671
- */
5672
- 'priceSummary': KdsPriceSummaryDto | null;
5673
5480
  /**
5674
5481
  *
5675
5482
  * @type {Array<KdsOrderItemDto>}
@@ -5981,73 +5788,6 @@ export interface KdsPaginationDto {
5981
5788
  */
5982
5789
  'hasPreviousPage': boolean;
5983
5790
  }
5984
- /**
5985
- *
5986
- * @export
5987
- * @interface KdsPreorderDto
5988
- */
5989
- export interface KdsPreorderDto {
5990
- /**
5991
- *
5992
- * @type {string}
5993
- * @memberof KdsPreorderDto
5994
- */
5995
- 'id': string;
5996
- /**
5997
- *
5998
- * @type {PreorderStatus}
5999
- * @memberof KdsPreorderDto
6000
- */
6001
- 'status': PreorderStatus;
6002
- /**
6003
- *
6004
- * @type {string}
6005
- * @memberof KdsPreorderDto
6006
- */
6007
- 'preorderTime': string;
6008
- }
6009
-
6010
-
6011
- /**
6012
- *
6013
- * @export
6014
- * @interface KdsPriceSummaryDto
6015
- */
6016
- export interface KdsPriceSummaryDto {
6017
- /**
6018
- *
6019
- * @type {string}
6020
- * @memberof KdsPriceSummaryDto
6021
- */
6022
- 'id': string;
6023
- /**
6024
- *
6025
- * @type {number}
6026
- * @memberof KdsPriceSummaryDto
6027
- */
6028
- 'totalNet': number;
6029
- }
6030
- /**
6031
- *
6032
- * @export
6033
- * @interface KdsPrintingEventDto
6034
- */
6035
- export interface KdsPrintingEventDto {
6036
- /**
6037
- *
6038
- * @type {KDSEVENTNAME}
6039
- * @memberof KdsPrintingEventDto
6040
- */
6041
- 'event': KDSEVENTNAME;
6042
- /**
6043
- *
6044
- * @type {KdsOrderDto}
6045
- * @memberof KdsPrintingEventDto
6046
- */
6047
- 'order': KdsOrderDto;
6048
- }
6049
-
6050
-
6051
5791
  /**
6052
5792
  *
6053
5793
  * @export
@@ -6310,30 +6050,6 @@ export interface KdsReadyOrderResponseDtoOrder {
6310
6050
  * @memberof KdsReadyOrderResponseDtoOrder
6311
6051
  */
6312
6052
  'updatedAt': string;
6313
- /**
6314
- *
6315
- * @type {KdsCustomerDto}
6316
- * @memberof KdsReadyOrderResponseDtoOrder
6317
- */
6318
- 'customer': KdsCustomerDto | null;
6319
- /**
6320
- *
6321
- * @type {KdsDeliveryDto}
6322
- * @memberof KdsReadyOrderResponseDtoOrder
6323
- */
6324
- 'delivery': KdsDeliveryDto | null;
6325
- /**
6326
- *
6327
- * @type {KdsPreorderDto}
6328
- * @memberof KdsReadyOrderResponseDtoOrder
6329
- */
6330
- 'preorder': KdsPreorderDto | null;
6331
- /**
6332
- *
6333
- * @type {KdsPriceSummaryDto}
6334
- * @memberof KdsReadyOrderResponseDtoOrder
6335
- */
6336
- 'priceSummary': KdsPriceSummaryDto | null;
6337
6053
  /**
6338
6054
  *
6339
6055
  * @type {Array<KdsOrderItemDto>}
@@ -6506,30 +6222,6 @@ export interface KdsRevertOrderResponseDtoOrder {
6506
6222
  * @memberof KdsRevertOrderResponseDtoOrder
6507
6223
  */
6508
6224
  'updatedAt': string;
6509
- /**
6510
- *
6511
- * @type {KdsCustomerDto}
6512
- * @memberof KdsRevertOrderResponseDtoOrder
6513
- */
6514
- 'customer': KdsCustomerDto | null;
6515
- /**
6516
- *
6517
- * @type {KdsDeliveryDto}
6518
- * @memberof KdsRevertOrderResponseDtoOrder
6519
- */
6520
- 'delivery': KdsDeliveryDto | null;
6521
- /**
6522
- *
6523
- * @type {KdsPreorderDto}
6524
- * @memberof KdsRevertOrderResponseDtoOrder
6525
- */
6526
- 'preorder': KdsPreorderDto | null;
6527
- /**
6528
- *
6529
- * @type {KdsPriceSummaryDto}
6530
- * @memberof KdsRevertOrderResponseDtoOrder
6531
- */
6532
- 'priceSummary': KdsPriceSummaryDto | null;
6533
6225
  /**
6534
6226
  *
6535
6227
  * @type {Array<KdsOrderItemDto>}
@@ -14992,8 +14684,7 @@ export const SYNCKEY = {
14992
14684
  PosSession: 'POS_SESSION',
14993
14685
  InvoiceCompanies: 'INVOICE_COMPANIES',
14994
14686
  BusinessTax: 'BUSINESS_TAX',
14995
- Transaction: 'TRANSACTION',
14996
- DiscountsV2: 'DISCOUNTS_V2'
14687
+ Transaction: 'TRANSACTION'
14997
14688
  } as const;
14998
14689
 
14999
14690
  export type SYNCKEY = typeof SYNCKEY[keyof typeof SYNCKEY];
@@ -15477,6 +15168,12 @@ export interface StationDetailsDto {
15477
15168
  * @memberof StationDetailsDto
15478
15169
  */
15479
15170
  'prefix': string;
15171
+ /**
15172
+ *
15173
+ * @type {object}
15174
+ * @memberof StationDetailsDto
15175
+ */
15176
+ 'settings'?: object;
15480
15177
  /**
15481
15178
  *
15482
15179
  * @type {object}
@@ -15568,12 +15265,99 @@ export interface StationDetailsDtoPaymentTerminal {
15568
15265
  */
15569
15266
  export interface StationSyncResponseDto {
15570
15267
  /**
15571
- * A success message indicating the sync was successful
15572
- * @type {string}
15268
+ *
15269
+ * @type {StationSyncResponseDtoStation}
15573
15270
  * @memberof StationSyncResponseDto
15574
15271
  */
15575
- 'message': string;
15272
+ 'station': StationSyncResponseDtoStation;
15273
+ }
15274
+ /**
15275
+ * The synced station data
15276
+ * @export
15277
+ * @interface StationSyncResponseDtoStation
15278
+ */
15279
+ export interface StationSyncResponseDtoStation {
15280
+ /**
15281
+ *
15282
+ * @type {string}
15283
+ * @memberof StationSyncResponseDtoStation
15284
+ */
15285
+ 'id': string;
15286
+ /**
15287
+ *
15288
+ * @type {string}
15289
+ * @memberof StationSyncResponseDtoStation
15290
+ */
15291
+ 'name': string;
15292
+ /**
15293
+ *
15294
+ * @type {string}
15295
+ * @memberof StationSyncResponseDtoStation
15296
+ */
15297
+ 'hardwareId': string;
15298
+ /**
15299
+ *
15300
+ * @type {StationType}
15301
+ * @memberof StationSyncResponseDtoStation
15302
+ */
15303
+ 'type': StationType;
15304
+ /**
15305
+ *
15306
+ * @type {DeviceType}
15307
+ * @memberof StationSyncResponseDtoStation
15308
+ */
15309
+ 'deviceType'?: DeviceType;
15310
+ /**
15311
+ *
15312
+ * @type {Status}
15313
+ * @memberof StationSyncResponseDtoStation
15314
+ */
15315
+ 'status': Status;
15316
+ /**
15317
+ *
15318
+ * @type {number}
15319
+ * @memberof StationSyncResponseDtoStation
15320
+ */
15321
+ 'orderingBusinessId': number;
15322
+ /**
15323
+ *
15324
+ * @type {string}
15325
+ * @memberof StationSyncResponseDtoStation
15326
+ */
15327
+ 'prefix': string;
15328
+ /**
15329
+ *
15330
+ * @type {object}
15331
+ * @memberof StationSyncResponseDtoStation
15332
+ */
15333
+ 'settings'?: object;
15334
+ /**
15335
+ *
15336
+ * @type {object}
15337
+ * @memberof StationSyncResponseDtoStation
15338
+ */
15339
+ 'metadata'?: object;
15340
+ /**
15341
+ * Timestamp when the station record was created.
15342
+ * @type {string}
15343
+ * @memberof StationSyncResponseDtoStation
15344
+ */
15345
+ 'createdAt': string;
15346
+ /**
15347
+ * Timestamp when the station record was last updated.
15348
+ * @type {string}
15349
+ * @memberof StationSyncResponseDtoStation
15350
+ */
15351
+ 'updatedAt': string;
15352
+ /**
15353
+ *
15354
+ * @type {StationDetailsDtoPaymentTerminal}
15355
+ * @memberof StationSyncResponseDtoStation
15356
+ */
15357
+ 'paymentTerminal'?: StationDetailsDtoPaymentTerminal | null;
15576
15358
  }
15359
+
15360
+
15577
15361
  /**
15578
15362
  *
15579
15363
  * @export
@@ -15827,51 +15611,6 @@ export interface SyncStationDto {
15827
15611
  }
15828
15612
 
15829
15613
 
15830
- /**
15831
- *
15832
- * @export
15833
- * @interface SyncTerminalDto
15834
- */
15835
- export interface SyncTerminalDto {
15836
- /**
15837
- * Hardware ID of the station to connect the terminal to
15838
- * @type {string}
15839
- * @memberof SyncTerminalDto
15840
- */
15841
- 'stationHardwareId': string;
15842
- /**
15843
- * Hardware ID of the payment terminal
15844
- * @type {string}
15845
- * @memberof SyncTerminalDto
15846
- */
15847
- 'terminalId': string;
15848
- /**
15849
- *
15850
- * @type {PaymentProvider}
15851
- * @memberof SyncTerminalDto
15852
- */
15853
- 'provider': PaymentProvider;
15854
- /**
15855
- * Label/name for the terminal
15856
- * @type {string}
15857
- * @memberof SyncTerminalDto
15858
- */
15859
- 'label'?: string;
15860
- /**
15861
- *
15862
- * @type {TerminalConnectionType}
15863
- * @memberof SyncTerminalDto
15864
- */
15865
- 'connectionType'?: TerminalConnectionType;
15866
- /**
15867
- * Business ID that owns the terminal
15868
- * @type {number}
15869
- * @memberof SyncTerminalDto
15870
- */
15871
- 'businessId': number;
15872
- }
15873
-
15874
-
15875
15614
  /**
15876
15615
  *
15877
15616
  * @export
@@ -34762,41 +34501,6 @@ export const StationsApiAxiosParamCreator = function (configuration?: Configurat
34762
34501
  localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
34763
34502
  localVarRequestOptions.data = serializeDataIfNeeded(syncStationDto, localVarRequestOptions, configuration)
34764
34503
 
34765
- return {
34766
- url: toPathString(localVarUrlObj),
34767
- options: localVarRequestOptions,
34768
- };
34769
- },
34770
- /**
34771
- *
34772
- * @param {SyncTerminalDto} syncTerminalDto Connect payment terminal to station
34773
- * @param {*} [options] Override http request option.
34774
- * @throws {RequiredError}
34775
- */
34776
- syncTerminal: async (syncTerminalDto: SyncTerminalDto, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
34777
- // verify required parameter 'syncTerminalDto' is not null or undefined
34778
- assertParamExists('syncTerminal', 'syncTerminalDto', syncTerminalDto)
34779
- const localVarPath = `/api/v1/station/terminal/sync`;
34780
- // use dummy base URL string because the URL constructor only accepts absolute URLs.
34781
- const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
34782
- let baseOptions;
34783
- if (configuration) {
34784
- baseOptions = configuration.baseOptions;
34785
- }
34786
-
34787
- const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
34788
- const localVarHeaderParameter = {} as any;
34789
- const localVarQueryParameter = {} as any;
34790
-
34791
-
34792
-
34793
- localVarHeaderParameter['Content-Type'] = 'application/json';
34794
-
34795
- setSearchParams(localVarUrlObj, localVarQueryParameter);
34796
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
34797
- localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
34798
- localVarRequestOptions.data = serializeDataIfNeeded(syncTerminalDto, localVarRequestOptions, configuration)
34799
-
34800
34504
  return {
34801
34505
  url: toPathString(localVarUrlObj),
34802
34506
  options: localVarRequestOptions,
@@ -34840,16 +34544,6 @@ export const StationsApiFp = function(configuration?: Configuration) {
34840
34544
  const localVarAxiosArgs = await localVarAxiosParamCreator.syncStation(syncStationDto, options);
34841
34545
  return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
34842
34546
  },
34843
- /**
34844
- *
34845
- * @param {SyncTerminalDto} syncTerminalDto Connect payment terminal to station
34846
- * @param {*} [options] Override http request option.
34847
- * @throws {RequiredError}
34848
- */
34849
- async syncTerminal(syncTerminalDto: SyncTerminalDto, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<StationSyncResponseDto>> {
34850
- const localVarAxiosArgs = await localVarAxiosParamCreator.syncTerminal(syncTerminalDto, options);
34851
- return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
34852
- },
34853
34547
  }
34854
34548
  };
34855
34549
 
@@ -34885,15 +34579,6 @@ export const StationsApiFactory = function (configuration?: Configuration, baseP
34885
34579
  syncStation(syncStationDto: SyncStationDto, options?: any): AxiosPromise<StationSyncResponseDto> {
34886
34580
  return localVarFp.syncStation(syncStationDto, options).then((request) => request(axios, basePath));
34887
34581
  },
34888
- /**
34889
- *
34890
- * @param {SyncTerminalDto} syncTerminalDto Connect payment terminal to station
34891
- * @param {*} [options] Override http request option.
34892
- * @throws {RequiredError}
34893
- */
34894
- syncTerminal(syncTerminalDto: SyncTerminalDto, options?: any): AxiosPromise<StationSyncResponseDto> {
34895
- return localVarFp.syncTerminal(syncTerminalDto, options).then((request) => request(axios, basePath));
34896
- },
34897
34582
  };
34898
34583
  };
34899
34584
 
@@ -34928,15 +34613,6 @@ export interface StationsApiInterface {
34928
34613
  */
34929
34614
  syncStation(syncStationDto: SyncStationDto, options?: AxiosRequestConfig): AxiosPromise<StationSyncResponseDto>;
34930
34615
 
34931
- /**
34932
- *
34933
- * @param {SyncTerminalDto} syncTerminalDto Connect payment terminal to station
34934
- * @param {*} [options] Override http request option.
34935
- * @throws {RequiredError}
34936
- * @memberof StationsApiInterface
34937
- */
34938
- syncTerminal(syncTerminalDto: SyncTerminalDto, options?: AxiosRequestConfig): AxiosPromise<StationSyncResponseDto>;
34939
-
34940
34616
  }
34941
34617
 
34942
34618
  /**
@@ -34976,17 +34652,6 @@ export class StationsApi extends BaseAPI implements StationsApiInterface {
34976
34652
  public syncStation(syncStationDto: SyncStationDto, options?: AxiosRequestConfig) {
34977
34653
  return StationsApiFp(this.configuration).syncStation(syncStationDto, options).then((request) => request(this.axios, this.basePath));
34978
34654
  }
34979
-
34980
- /**
34981
- *
34982
- * @param {SyncTerminalDto} syncTerminalDto Connect payment terminal to station
34983
- * @param {*} [options] Override http request option.
34984
- * @throws {RequiredError}
34985
- * @memberof StationsApi
34986
- */
34987
- public syncTerminal(syncTerminalDto: SyncTerminalDto, options?: AxiosRequestConfig) {
34988
- return StationsApiFp(this.configuration).syncTerminal(syncTerminalDto, options).then((request) => request(this.axios, this.basePath));
34989
- }
34990
34655
  }
34991
34656
 
34992
34657
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@munchi_oy/core",
3
- "version": "1.8.3",
3
+ "version": "1.8.5",
4
4
  "description": "Munchi Core SDK - Core utilities and types",
5
5
  "license": "UNLICENSED",
6
6
  "publishConfig": {
package/src/version.ts CHANGED
@@ -1,3 +1,3 @@
1
1
  // This file is auto-generated. Do not edit manually.
2
2
  // Run 'pnpm version:sync' to update this file.
3
- export const VERSION = "1.8.3";
3
+ export const VERSION = "1.8.5";