@poweredbysous/storefront-all-sdk 4.12.0 → 4.13.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.cts CHANGED
@@ -591,16 +591,38 @@ interface paths {
591
591
  path?: never;
592
592
  cookie?: never;
593
593
  };
594
- /** @description The store's enabled cloud printers. An empty list: no cloud printing. */
594
+ /**
595
+ * @description The store's enabled cloud printers (an empty list: no cloud printing).
596
+ *
597
+ * Backoffice can add one.
598
+ */
595
599
  get: operations["admin_printing_store_devices"];
596
600
  put?: never;
597
- post?: never;
601
+ /** @description Bind a printer in Sunmi for this store and save it (backoffice only). */
602
+ post: operations["admin_printing_add_store_device"];
598
603
  delete?: never;
599
604
  options?: never;
600
605
  head?: never;
601
606
  patch?: never;
602
607
  trace?: never;
603
608
  };
609
+ "/api/v1/admin/printing/stores/{store_public_id}/devices/{device_id}/": {
610
+ parameters: {
611
+ query?: never;
612
+ header?: never;
613
+ path?: never;
614
+ cookie?: never;
615
+ };
616
+ get?: never;
617
+ put?: never;
618
+ post?: never;
619
+ delete?: never;
620
+ options?: never;
621
+ head?: never;
622
+ /** @description One printer of the store: change its tickets per order (backoffice only). */
623
+ patch: operations["admin_printing_update_store_device"];
624
+ trace?: never;
625
+ };
604
626
  "/api/v1/admin/products/": {
605
627
  parameters: {
606
628
  query?: never;
@@ -10252,6 +10274,9 @@ interface components {
10252
10274
  dismiss_duration?: string | null;
10253
10275
  targeting?: unknown;
10254
10276
  };
10277
+ PatchedPrintDeviceUpdateRequest: {
10278
+ copies?: number;
10279
+ };
10255
10280
  PatchedProductChannelListing: {
10256
10281
  readonly id?: number;
10257
10282
  readonly product_id?: number;
@@ -10496,6 +10521,10 @@ interface components {
10496
10521
  PrintDevice: {
10497
10522
  id: number;
10498
10523
  name: string;
10524
+ /** @description The printer's serial number (Sunmi: the MSN on its label). */
10525
+ device_identifier: string;
10526
+ /** @description Tickets per automatic print. A manual print is always one. */
10527
+ copies: number;
10499
10528
  /**
10500
10529
  * @description `alerting`: the printer recently failed to print and the merchant was emailed. Cleared by its next successful print.
10501
10530
  *
@@ -10505,6 +10534,25 @@ interface components {
10505
10534
  alert_state: components["schemas"]["AlertStateEnum"];
10506
10535
  /** Format: date-time */
10507
10536
  last_seen_at: string | null;
10537
+ /** @description The last online check run by Sous staff: true online, false offline, null never checked. Not live. */
10538
+ online: boolean | null;
10539
+ /**
10540
+ * Format: date-time
10541
+ * @description When that check ran.
10542
+ */
10543
+ online_checked_at: string | null;
10544
+ };
10545
+ /** @description A backoffice user adds a printer to the store in the URL. */
10546
+ PrintDeviceCreateRequest: {
10547
+ /** @description Serial from the printer's label, e.g. N439259A11700. */
10548
+ device_identifier: string;
10549
+ /** @description e.g. "Kitchen" */
10550
+ name: string;
10551
+ /**
10552
+ * @description Tickets per automatic print.
10553
+ * @default 1
10554
+ */
10555
+ copies: number;
10508
10556
  };
10509
10557
  PrintDevicesResponse: {
10510
10558
  devices: components["schemas"]["PrintDevice"][];
@@ -14837,6 +14885,223 @@ interface operations {
14837
14885
  };
14838
14886
  };
14839
14887
  };
14888
+ admin_printing_add_store_device: {
14889
+ parameters: {
14890
+ query?: never;
14891
+ header?: {
14892
+ /** @description Company the request acts on. Ignored for merchant tokens (scoped to their own company); required for admin tokens to select a company. */
14893
+ "X-Sous-Company-Id"?: number;
14894
+ };
14895
+ path: {
14896
+ store_public_id: string;
14897
+ };
14898
+ cookie?: never;
14899
+ };
14900
+ requestBody: {
14901
+ content: {
14902
+ "application/json": components["schemas"]["PrintDeviceCreateRequest"];
14903
+ "application/x-www-form-urlencoded": components["schemas"]["PrintDeviceCreateRequest"];
14904
+ "multipart/form-data": components["schemas"]["PrintDeviceCreateRequest"];
14905
+ };
14906
+ };
14907
+ responses: {
14908
+ 201: {
14909
+ headers: {
14910
+ [name: string]: unknown;
14911
+ };
14912
+ content: {
14913
+ "application/json": components["schemas"]["PrintDevice"];
14914
+ };
14915
+ };
14916
+ /** @description Possible error codes include `VALIDATION_ERROR`. Use `x-error-codes` for machine-readable retryability metadata. */
14917
+ 400: {
14918
+ headers: {
14919
+ [name: string]: unknown;
14920
+ };
14921
+ content: {
14922
+ "application/json": components["schemas"]["APIErrorEnvelope"];
14923
+ };
14924
+ };
14925
+ /** @description Possible error codes include `UNAUTHORIZED`. Use `x-error-codes` for machine-readable retryability metadata. */
14926
+ 401: {
14927
+ headers: {
14928
+ [name: string]: unknown;
14929
+ };
14930
+ content: {
14931
+ "application/json": components["schemas"]["APIErrorEnvelope"];
14932
+ };
14933
+ };
14934
+ /** @description Possible error codes include `FORBIDDEN`. Use `x-error-codes` for machine-readable retryability metadata. */
14935
+ 403: {
14936
+ headers: {
14937
+ [name: string]: unknown;
14938
+ };
14939
+ content: {
14940
+ "application/json": {
14941
+ [key: string]: unknown;
14942
+ };
14943
+ };
14944
+ };
14945
+ /** @description Possible error codes include `NOT_FOUND`. Use `x-error-codes` for machine-readable retryability metadata. */
14946
+ 404: {
14947
+ headers: {
14948
+ [name: string]: unknown;
14949
+ };
14950
+ content: {
14951
+ "application/json": {
14952
+ [key: string]: unknown;
14953
+ };
14954
+ };
14955
+ };
14956
+ 409: {
14957
+ headers: {
14958
+ [name: string]: unknown;
14959
+ };
14960
+ content: {
14961
+ "application/json": {
14962
+ [key: string]: unknown;
14963
+ };
14964
+ };
14965
+ };
14966
+ 422: {
14967
+ headers: {
14968
+ [name: string]: unknown;
14969
+ };
14970
+ content: {
14971
+ "application/json": {
14972
+ [key: string]: unknown;
14973
+ };
14974
+ };
14975
+ };
14976
+ /** @description Possible error codes include `RATE_LIMITED`. Use `x-error-codes` for machine-readable retryability metadata. */
14977
+ 429: {
14978
+ headers: {
14979
+ [name: string]: unknown;
14980
+ };
14981
+ content: {
14982
+ "application/json": components["schemas"]["APIErrorEnvelope"];
14983
+ };
14984
+ };
14985
+ /** @description Possible error codes include `INTERNAL_ERROR`. Use `x-error-codes` for machine-readable retryability metadata. */
14986
+ 500: {
14987
+ headers: {
14988
+ [name: string]: unknown;
14989
+ };
14990
+ content: {
14991
+ "application/json": components["schemas"]["APIErrorEnvelope"];
14992
+ };
14993
+ };
14994
+ 502: {
14995
+ headers: {
14996
+ [name: string]: unknown;
14997
+ };
14998
+ content: {
14999
+ "application/json": {
15000
+ [key: string]: unknown;
15001
+ };
15002
+ };
15003
+ };
15004
+ 503: {
15005
+ headers: {
15006
+ [name: string]: unknown;
15007
+ };
15008
+ content: {
15009
+ "application/json": {
15010
+ [key: string]: unknown;
15011
+ };
15012
+ };
15013
+ };
15014
+ };
15015
+ };
15016
+ admin_printing_update_store_device: {
15017
+ parameters: {
15018
+ query?: never;
15019
+ header?: {
15020
+ /** @description Company the request acts on. Ignored for merchant tokens (scoped to their own company); required for admin tokens to select a company. */
15021
+ "X-Sous-Company-Id"?: number;
15022
+ };
15023
+ path: {
15024
+ device_id: number;
15025
+ store_public_id: string;
15026
+ };
15027
+ cookie?: never;
15028
+ };
15029
+ requestBody?: {
15030
+ content: {
15031
+ "application/json": components["schemas"]["PatchedPrintDeviceUpdateRequest"];
15032
+ "application/x-www-form-urlencoded": components["schemas"]["PatchedPrintDeviceUpdateRequest"];
15033
+ "multipart/form-data": components["schemas"]["PatchedPrintDeviceUpdateRequest"];
15034
+ };
15035
+ };
15036
+ responses: {
15037
+ 200: {
15038
+ headers: {
15039
+ [name: string]: unknown;
15040
+ };
15041
+ content: {
15042
+ "application/json": components["schemas"]["PrintDevice"];
15043
+ };
15044
+ };
15045
+ /** @description Possible error codes include `VALIDATION_ERROR`. Use `x-error-codes` for machine-readable retryability metadata. */
15046
+ 400: {
15047
+ headers: {
15048
+ [name: string]: unknown;
15049
+ };
15050
+ content: {
15051
+ "application/json": components["schemas"]["APIErrorEnvelope"];
15052
+ };
15053
+ };
15054
+ /** @description Possible error codes include `UNAUTHORIZED`. Use `x-error-codes` for machine-readable retryability metadata. */
15055
+ 401: {
15056
+ headers: {
15057
+ [name: string]: unknown;
15058
+ };
15059
+ content: {
15060
+ "application/json": components["schemas"]["APIErrorEnvelope"];
15061
+ };
15062
+ };
15063
+ /** @description Possible error codes include `FORBIDDEN`. Use `x-error-codes` for machine-readable retryability metadata. */
15064
+ 403: {
15065
+ headers: {
15066
+ [name: string]: unknown;
15067
+ };
15068
+ content: {
15069
+ "application/json": {
15070
+ [key: string]: unknown;
15071
+ };
15072
+ };
15073
+ };
15074
+ /** @description Possible error codes include `NOT_FOUND`. Use `x-error-codes` for machine-readable retryability metadata. */
15075
+ 404: {
15076
+ headers: {
15077
+ [name: string]: unknown;
15078
+ };
15079
+ content: {
15080
+ "application/json": {
15081
+ [key: string]: unknown;
15082
+ };
15083
+ };
15084
+ };
15085
+ /** @description Possible error codes include `RATE_LIMITED`. Use `x-error-codes` for machine-readable retryability metadata. */
15086
+ 429: {
15087
+ headers: {
15088
+ [name: string]: unknown;
15089
+ };
15090
+ content: {
15091
+ "application/json": components["schemas"]["APIErrorEnvelope"];
15092
+ };
15093
+ };
15094
+ /** @description Possible error codes include `INTERNAL_ERROR`. Use `x-error-codes` for machine-readable retryability metadata. */
15095
+ 500: {
15096
+ headers: {
15097
+ [name: string]: unknown;
15098
+ };
15099
+ content: {
15100
+ "application/json": components["schemas"]["APIErrorEnvelope"];
15101
+ };
15102
+ };
15103
+ };
15104
+ };
14840
15105
  admin_products_list: {
14841
15106
  parameters: {
14842
15107
  query?: {
package/dist/index.d.ts CHANGED
@@ -591,16 +591,38 @@ interface paths {
591
591
  path?: never;
592
592
  cookie?: never;
593
593
  };
594
- /** @description The store's enabled cloud printers. An empty list: no cloud printing. */
594
+ /**
595
+ * @description The store's enabled cloud printers (an empty list: no cloud printing).
596
+ *
597
+ * Backoffice can add one.
598
+ */
595
599
  get: operations["admin_printing_store_devices"];
596
600
  put?: never;
597
- post?: never;
601
+ /** @description Bind a printer in Sunmi for this store and save it (backoffice only). */
602
+ post: operations["admin_printing_add_store_device"];
598
603
  delete?: never;
599
604
  options?: never;
600
605
  head?: never;
601
606
  patch?: never;
602
607
  trace?: never;
603
608
  };
609
+ "/api/v1/admin/printing/stores/{store_public_id}/devices/{device_id}/": {
610
+ parameters: {
611
+ query?: never;
612
+ header?: never;
613
+ path?: never;
614
+ cookie?: never;
615
+ };
616
+ get?: never;
617
+ put?: never;
618
+ post?: never;
619
+ delete?: never;
620
+ options?: never;
621
+ head?: never;
622
+ /** @description One printer of the store: change its tickets per order (backoffice only). */
623
+ patch: operations["admin_printing_update_store_device"];
624
+ trace?: never;
625
+ };
604
626
  "/api/v1/admin/products/": {
605
627
  parameters: {
606
628
  query?: never;
@@ -10252,6 +10274,9 @@ interface components {
10252
10274
  dismiss_duration?: string | null;
10253
10275
  targeting?: unknown;
10254
10276
  };
10277
+ PatchedPrintDeviceUpdateRequest: {
10278
+ copies?: number;
10279
+ };
10255
10280
  PatchedProductChannelListing: {
10256
10281
  readonly id?: number;
10257
10282
  readonly product_id?: number;
@@ -10496,6 +10521,10 @@ interface components {
10496
10521
  PrintDevice: {
10497
10522
  id: number;
10498
10523
  name: string;
10524
+ /** @description The printer's serial number (Sunmi: the MSN on its label). */
10525
+ device_identifier: string;
10526
+ /** @description Tickets per automatic print. A manual print is always one. */
10527
+ copies: number;
10499
10528
  /**
10500
10529
  * @description `alerting`: the printer recently failed to print and the merchant was emailed. Cleared by its next successful print.
10501
10530
  *
@@ -10505,6 +10534,25 @@ interface components {
10505
10534
  alert_state: components["schemas"]["AlertStateEnum"];
10506
10535
  /** Format: date-time */
10507
10536
  last_seen_at: string | null;
10537
+ /** @description The last online check run by Sous staff: true online, false offline, null never checked. Not live. */
10538
+ online: boolean | null;
10539
+ /**
10540
+ * Format: date-time
10541
+ * @description When that check ran.
10542
+ */
10543
+ online_checked_at: string | null;
10544
+ };
10545
+ /** @description A backoffice user adds a printer to the store in the URL. */
10546
+ PrintDeviceCreateRequest: {
10547
+ /** @description Serial from the printer's label, e.g. N439259A11700. */
10548
+ device_identifier: string;
10549
+ /** @description e.g. "Kitchen" */
10550
+ name: string;
10551
+ /**
10552
+ * @description Tickets per automatic print.
10553
+ * @default 1
10554
+ */
10555
+ copies: number;
10508
10556
  };
10509
10557
  PrintDevicesResponse: {
10510
10558
  devices: components["schemas"]["PrintDevice"][];
@@ -14837,6 +14885,223 @@ interface operations {
14837
14885
  };
14838
14886
  };
14839
14887
  };
14888
+ admin_printing_add_store_device: {
14889
+ parameters: {
14890
+ query?: never;
14891
+ header?: {
14892
+ /** @description Company the request acts on. Ignored for merchant tokens (scoped to their own company); required for admin tokens to select a company. */
14893
+ "X-Sous-Company-Id"?: number;
14894
+ };
14895
+ path: {
14896
+ store_public_id: string;
14897
+ };
14898
+ cookie?: never;
14899
+ };
14900
+ requestBody: {
14901
+ content: {
14902
+ "application/json": components["schemas"]["PrintDeviceCreateRequest"];
14903
+ "application/x-www-form-urlencoded": components["schemas"]["PrintDeviceCreateRequest"];
14904
+ "multipart/form-data": components["schemas"]["PrintDeviceCreateRequest"];
14905
+ };
14906
+ };
14907
+ responses: {
14908
+ 201: {
14909
+ headers: {
14910
+ [name: string]: unknown;
14911
+ };
14912
+ content: {
14913
+ "application/json": components["schemas"]["PrintDevice"];
14914
+ };
14915
+ };
14916
+ /** @description Possible error codes include `VALIDATION_ERROR`. Use `x-error-codes` for machine-readable retryability metadata. */
14917
+ 400: {
14918
+ headers: {
14919
+ [name: string]: unknown;
14920
+ };
14921
+ content: {
14922
+ "application/json": components["schemas"]["APIErrorEnvelope"];
14923
+ };
14924
+ };
14925
+ /** @description Possible error codes include `UNAUTHORIZED`. Use `x-error-codes` for machine-readable retryability metadata. */
14926
+ 401: {
14927
+ headers: {
14928
+ [name: string]: unknown;
14929
+ };
14930
+ content: {
14931
+ "application/json": components["schemas"]["APIErrorEnvelope"];
14932
+ };
14933
+ };
14934
+ /** @description Possible error codes include `FORBIDDEN`. Use `x-error-codes` for machine-readable retryability metadata. */
14935
+ 403: {
14936
+ headers: {
14937
+ [name: string]: unknown;
14938
+ };
14939
+ content: {
14940
+ "application/json": {
14941
+ [key: string]: unknown;
14942
+ };
14943
+ };
14944
+ };
14945
+ /** @description Possible error codes include `NOT_FOUND`. Use `x-error-codes` for machine-readable retryability metadata. */
14946
+ 404: {
14947
+ headers: {
14948
+ [name: string]: unknown;
14949
+ };
14950
+ content: {
14951
+ "application/json": {
14952
+ [key: string]: unknown;
14953
+ };
14954
+ };
14955
+ };
14956
+ 409: {
14957
+ headers: {
14958
+ [name: string]: unknown;
14959
+ };
14960
+ content: {
14961
+ "application/json": {
14962
+ [key: string]: unknown;
14963
+ };
14964
+ };
14965
+ };
14966
+ 422: {
14967
+ headers: {
14968
+ [name: string]: unknown;
14969
+ };
14970
+ content: {
14971
+ "application/json": {
14972
+ [key: string]: unknown;
14973
+ };
14974
+ };
14975
+ };
14976
+ /** @description Possible error codes include `RATE_LIMITED`. Use `x-error-codes` for machine-readable retryability metadata. */
14977
+ 429: {
14978
+ headers: {
14979
+ [name: string]: unknown;
14980
+ };
14981
+ content: {
14982
+ "application/json": components["schemas"]["APIErrorEnvelope"];
14983
+ };
14984
+ };
14985
+ /** @description Possible error codes include `INTERNAL_ERROR`. Use `x-error-codes` for machine-readable retryability metadata. */
14986
+ 500: {
14987
+ headers: {
14988
+ [name: string]: unknown;
14989
+ };
14990
+ content: {
14991
+ "application/json": components["schemas"]["APIErrorEnvelope"];
14992
+ };
14993
+ };
14994
+ 502: {
14995
+ headers: {
14996
+ [name: string]: unknown;
14997
+ };
14998
+ content: {
14999
+ "application/json": {
15000
+ [key: string]: unknown;
15001
+ };
15002
+ };
15003
+ };
15004
+ 503: {
15005
+ headers: {
15006
+ [name: string]: unknown;
15007
+ };
15008
+ content: {
15009
+ "application/json": {
15010
+ [key: string]: unknown;
15011
+ };
15012
+ };
15013
+ };
15014
+ };
15015
+ };
15016
+ admin_printing_update_store_device: {
15017
+ parameters: {
15018
+ query?: never;
15019
+ header?: {
15020
+ /** @description Company the request acts on. Ignored for merchant tokens (scoped to their own company); required for admin tokens to select a company. */
15021
+ "X-Sous-Company-Id"?: number;
15022
+ };
15023
+ path: {
15024
+ device_id: number;
15025
+ store_public_id: string;
15026
+ };
15027
+ cookie?: never;
15028
+ };
15029
+ requestBody?: {
15030
+ content: {
15031
+ "application/json": components["schemas"]["PatchedPrintDeviceUpdateRequest"];
15032
+ "application/x-www-form-urlencoded": components["schemas"]["PatchedPrintDeviceUpdateRequest"];
15033
+ "multipart/form-data": components["schemas"]["PatchedPrintDeviceUpdateRequest"];
15034
+ };
15035
+ };
15036
+ responses: {
15037
+ 200: {
15038
+ headers: {
15039
+ [name: string]: unknown;
15040
+ };
15041
+ content: {
15042
+ "application/json": components["schemas"]["PrintDevice"];
15043
+ };
15044
+ };
15045
+ /** @description Possible error codes include `VALIDATION_ERROR`. Use `x-error-codes` for machine-readable retryability metadata. */
15046
+ 400: {
15047
+ headers: {
15048
+ [name: string]: unknown;
15049
+ };
15050
+ content: {
15051
+ "application/json": components["schemas"]["APIErrorEnvelope"];
15052
+ };
15053
+ };
15054
+ /** @description Possible error codes include `UNAUTHORIZED`. Use `x-error-codes` for machine-readable retryability metadata. */
15055
+ 401: {
15056
+ headers: {
15057
+ [name: string]: unknown;
15058
+ };
15059
+ content: {
15060
+ "application/json": components["schemas"]["APIErrorEnvelope"];
15061
+ };
15062
+ };
15063
+ /** @description Possible error codes include `FORBIDDEN`. Use `x-error-codes` for machine-readable retryability metadata. */
15064
+ 403: {
15065
+ headers: {
15066
+ [name: string]: unknown;
15067
+ };
15068
+ content: {
15069
+ "application/json": {
15070
+ [key: string]: unknown;
15071
+ };
15072
+ };
15073
+ };
15074
+ /** @description Possible error codes include `NOT_FOUND`. Use `x-error-codes` for machine-readable retryability metadata. */
15075
+ 404: {
15076
+ headers: {
15077
+ [name: string]: unknown;
15078
+ };
15079
+ content: {
15080
+ "application/json": {
15081
+ [key: string]: unknown;
15082
+ };
15083
+ };
15084
+ };
15085
+ /** @description Possible error codes include `RATE_LIMITED`. Use `x-error-codes` for machine-readable retryability metadata. */
15086
+ 429: {
15087
+ headers: {
15088
+ [name: string]: unknown;
15089
+ };
15090
+ content: {
15091
+ "application/json": components["schemas"]["APIErrorEnvelope"];
15092
+ };
15093
+ };
15094
+ /** @description Possible error codes include `INTERNAL_ERROR`. Use `x-error-codes` for machine-readable retryability metadata. */
15095
+ 500: {
15096
+ headers: {
15097
+ [name: string]: unknown;
15098
+ };
15099
+ content: {
15100
+ "application/json": components["schemas"]["APIErrorEnvelope"];
15101
+ };
15102
+ };
15103
+ };
15104
+ };
14840
15105
  admin_products_list: {
14841
15106
  parameters: {
14842
15107
  query?: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@poweredbysous/storefront-all-sdk",
3
- "version": "4.12.0",
3
+ "version": "4.13.0",
4
4
  "description": "Type-safe TypeScript SDK for all SOUS Storefront Backend endpoints",
5
5
  "license": "UNLICENSED",
6
6
  "private": false,