nordlet 0.3.8 → 0.3.9
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/api/resources/account/types/ApiKeysListAccountResponse.d.ts +1 -0
- package/dist/api/resources/agreements/client/Client.d.ts +42 -0
- package/dist/api/resources/agreements/client/Client.js +158 -0
- package/dist/api/resources/agreements/client/requests/SettingsGetAgreementsRequest.d.ts +5 -0
- package/dist/api/resources/agreements/client/requests/SettingsGetAgreementsRequest.js +3 -0
- package/dist/api/resources/agreements/client/requests/SettingsUpdateAgreementsRequest.d.ts +9 -0
- package/dist/api/resources/agreements/client/requests/SettingsUpdateAgreementsRequest.js +3 -0
- package/dist/api/resources/agreements/client/requests/index.d.ts +2 -0
- package/dist/api/resources/agreements/types/SettingsGetAgreementsResponse.d.ts +3 -0
- package/dist/api/resources/agreements/types/SettingsGetAgreementsResponse.js +3 -0
- package/dist/api/resources/agreements/types/SettingsUpdateAgreementsResponse.d.ts +3 -0
- package/dist/api/resources/agreements/types/SettingsUpdateAgreementsResponse.js +3 -0
- package/dist/api/resources/agreements/types/index.d.ts +2 -0
- package/dist/api/resources/agreements/types/index.js +2 -0
- package/dist/api/resources/assets/client/Client.d.ts +42 -0
- package/dist/api/resources/assets/client/Client.js +155 -0
- package/dist/api/resources/assets/client/requests/SettingsGetAssetsRequest.d.ts +5 -0
- package/dist/api/resources/assets/client/requests/SettingsGetAssetsRequest.js +3 -0
- package/dist/api/resources/assets/client/requests/SettingsUpdateAssetsRequest.d.ts +9 -0
- package/dist/api/resources/assets/client/requests/SettingsUpdateAssetsRequest.js +3 -0
- package/dist/api/resources/assets/client/requests/index.d.ts +2 -0
- package/dist/api/resources/assets/types/SettingsGetAssetsResponse.d.ts +3 -0
- package/dist/api/resources/assets/types/SettingsGetAssetsResponse.js +3 -0
- package/dist/api/resources/assets/types/SettingsUpdateAssetsResponse.d.ts +3 -0
- package/dist/api/resources/assets/types/SettingsUpdateAssetsResponse.js +3 -0
- package/dist/api/resources/assets/types/index.d.ts +2 -0
- package/dist/api/resources/assets/types/index.js +2 -0
- package/dist/api/resources/bank/client/Client.d.ts +27 -0
- package/dist/api/resources/bank/client/Client.js +85 -0
- package/dist/api/resources/bank/client/requests/TransactionsMatchManyBankRequest.d.ts +32 -0
- package/dist/api/resources/bank/client/requests/TransactionsMatchManyBankRequest.js +17 -0
- package/dist/api/resources/bank/client/requests/index.d.ts +1 -0
- package/dist/api/resources/bank/client/requests/index.js +3 -1
- package/dist/api/resources/bank/types/TransactionsMatchManyBankResponse.d.ts +23 -0
- package/dist/api/resources/bank/types/TransactionsMatchManyBankResponse.js +11 -0
- package/dist/api/resources/bank/types/index.d.ts +1 -0
- package/dist/api/resources/bank/types/index.js +1 -0
- package/dist/api/resources/capture/client/requests/DocumentsConfirmCaptureRequest.d.ts +2 -0
- package/dist/api/resources/capture/types/DocumentsConfirmCaptureResponse.d.ts +2 -0
- package/dist/api/resources/cash/client/Client.d.ts +71 -2
- package/dist/api/resources/cash/client/Client.js +245 -2
- package/dist/api/resources/cash/client/requests/ExpenseReportsCreateCashRequest.d.ts +30 -0
- package/dist/api/resources/cash/client/requests/ExpenseReportsCreateCashRequest.js +3 -0
- package/dist/api/resources/cash/client/requests/ExpenseReportsGetCashRequest.d.ts +9 -0
- package/dist/api/resources/cash/client/requests/ExpenseReportsGetCashRequest.js +3 -0
- package/dist/api/resources/cash/client/requests/ExpenseReportsListCashRequest.d.ts +48 -0
- package/dist/api/resources/cash/client/requests/ExpenseReportsListCashRequest.js +31 -0
- package/dist/api/resources/cash/client/requests/OrdersCreateCashRequest.d.ts +4 -3
- package/dist/api/resources/cash/client/requests/index.d.ts +3 -0
- package/dist/api/resources/cash/client/requests/index.js +3 -1
- package/dist/api/resources/cash/types/AdvanceHoldersBalancesCashResponse.d.ts +1 -0
- package/dist/api/resources/cash/types/ExpenseReportsCreateCashResponse.d.ts +26 -0
- package/dist/api/resources/cash/types/ExpenseReportsCreateCashResponse.js +3 -0
- package/dist/api/resources/cash/types/ExpenseReportsGetCashResponse.d.ts +26 -0
- package/dist/api/resources/cash/types/ExpenseReportsGetCashResponse.js +3 -0
- package/dist/api/resources/cash/types/ExpenseReportsListCashResponse.d.ts +26 -0
- package/dist/api/resources/cash/types/ExpenseReportsListCashResponse.js +3 -0
- package/dist/api/resources/cash/types/OrdersCreateCashResponse.d.ts +2 -0
- package/dist/api/resources/cash/types/OrdersGetCashResponse.d.ts +2 -0
- package/dist/api/resources/cash/types/OrdersListCashResponse.d.ts +2 -0
- package/dist/api/resources/cash/types/index.d.ts +3 -0
- package/dist/api/resources/cash/types/index.js +3 -0
- package/dist/api/resources/hr/client/Client.d.ts +178 -0
- package/dist/api/resources/hr/client/Client.js +642 -0
- package/dist/api/resources/hr/client/requests/BusinessTripsApproveHrRequest.d.ts +9 -0
- package/dist/api/resources/hr/client/requests/BusinessTripsApproveHrRequest.js +3 -0
- package/dist/api/resources/hr/client/requests/BusinessTripsCreateHrRequest.d.ts +17 -0
- package/dist/api/resources/hr/client/requests/BusinessTripsCreateHrRequest.js +3 -0
- package/dist/api/resources/hr/client/requests/BusinessTripsDeleteHrRequest.d.ts +9 -0
- package/dist/api/resources/hr/client/requests/BusinessTripsDeleteHrRequest.js +3 -0
- package/dist/api/resources/hr/client/requests/BusinessTripsGetHrRequest.d.ts +9 -0
- package/dist/api/resources/hr/client/requests/BusinessTripsGetHrRequest.js +3 -0
- package/dist/api/resources/hr/client/requests/BusinessTripsListHrRequest.d.ts +48 -0
- package/dist/api/resources/hr/client/requests/BusinessTripsListHrRequest.js +31 -0
- package/dist/api/resources/hr/client/requests/PerDiemRatesCreateHrRequest.d.ts +13 -0
- package/dist/api/resources/hr/client/requests/PerDiemRatesCreateHrRequest.js +3 -0
- package/dist/api/resources/hr/client/requests/PerDiemRatesDeleteHrRequest.d.ts +9 -0
- package/dist/api/resources/hr/client/requests/PerDiemRatesDeleteHrRequest.js +3 -0
- package/dist/api/resources/hr/client/requests/PerDiemRatesListHrRequest.d.ts +48 -0
- package/dist/api/resources/hr/client/requests/PerDiemRatesListHrRequest.js +31 -0
- package/dist/api/resources/hr/client/requests/index.d.ts +8 -0
- package/dist/api/resources/hr/client/requests/index.js +5 -1
- package/dist/api/resources/hr/types/BusinessTripsApproveHrResponse.d.ts +22 -0
- package/dist/api/resources/hr/types/BusinessTripsApproveHrResponse.js +11 -0
- package/dist/api/resources/hr/types/BusinessTripsCreateHrResponse.d.ts +22 -0
- package/dist/api/resources/hr/types/BusinessTripsCreateHrResponse.js +11 -0
- package/dist/api/resources/hr/types/BusinessTripsDeleteHrResponse.d.ts +3 -0
- package/dist/api/resources/hr/types/BusinessTripsDeleteHrResponse.js +3 -0
- package/dist/api/resources/hr/types/BusinessTripsGetHrResponse.d.ts +22 -0
- package/dist/api/resources/hr/types/BusinessTripsGetHrResponse.js +11 -0
- package/dist/api/resources/hr/types/BusinessTripsListHrResponse.d.ts +36 -0
- package/dist/api/resources/hr/types/BusinessTripsListHrResponse.js +17 -0
- package/dist/api/resources/hr/types/PerDiemRatesCreateHrResponse.d.ts +7 -0
- package/dist/api/resources/hr/types/PerDiemRatesCreateHrResponse.js +3 -0
- package/dist/api/resources/hr/types/PerDiemRatesDeleteHrResponse.d.ts +3 -0
- package/dist/api/resources/hr/types/PerDiemRatesDeleteHrResponse.js +3 -0
- package/dist/api/resources/hr/types/PerDiemRatesListHrResponse.d.ts +21 -0
- package/dist/api/resources/hr/types/PerDiemRatesListHrResponse.js +3 -0
- package/dist/api/resources/hr/types/index.d.ts +8 -0
- package/dist/api/resources/hr/types/index.js +8 -0
- package/dist/api/resources/ledger/client/requests/PostingRulesUpdateLedgerRequest.d.ts +2 -0
- package/dist/api/resources/ledger/client/requests/PostingRulesUpdateLedgerRequest.js +2 -0
- package/dist/api/resources/partners/client/Client.d.ts +23 -0
- package/dist/api/resources/partners/client/Client.js +78 -0
- package/dist/api/resources/partners/client/requests/MergePartnersRequest.d.ts +11 -0
- package/dist/api/resources/partners/client/requests/MergePartnersRequest.js +3 -0
- package/dist/api/resources/partners/client/requests/index.d.ts +1 -0
- package/dist/api/resources/partners/types/MergePartnersResponse.d.ts +15 -0
- package/dist/api/resources/partners/types/MergePartnersResponse.js +3 -0
- package/dist/api/resources/partners/types/index.d.ts +1 -0
- package/dist/api/resources/partners/types/index.js +1 -0
- package/dist/api/resources/payroll/client/Client.d.ts +23 -0
- package/dist/api/resources/payroll/client/Client.js +81 -0
- package/dist/api/resources/payroll/client/requests/RunsReversePayrollRequest.d.ts +11 -0
- package/dist/api/resources/payroll/client/requests/RunsReversePayrollRequest.js +3 -0
- package/dist/api/resources/payroll/client/requests/index.d.ts +1 -0
- package/dist/api/resources/payroll/types/RunsApprovePayrollResponse.d.ts +4 -0
- package/dist/api/resources/payroll/types/RunsApprovePayrollResponse.js +1 -0
- package/dist/api/resources/payroll/types/RunsCreatePayrollResponse.d.ts +4 -0
- package/dist/api/resources/payroll/types/RunsCreatePayrollResponse.js +1 -0
- package/dist/api/resources/payroll/types/RunsGetPayrollResponse.d.ts +4 -0
- package/dist/api/resources/payroll/types/RunsGetPayrollResponse.js +1 -0
- package/dist/api/resources/payroll/types/RunsListPayrollResponse.d.ts +4 -0
- package/dist/api/resources/payroll/types/RunsListPayrollResponse.js +1 -0
- package/dist/api/resources/payroll/types/RunsReversePayrollResponse.d.ts +51 -0
- package/dist/api/resources/payroll/types/RunsReversePayrollResponse.js +25 -0
- package/dist/api/resources/payroll/types/index.d.ts +1 -0
- package/dist/api/resources/payroll/types/index.js +1 -0
- package/dist/api/resources/pos/client/Client.d.ts +156 -0
- package/dist/api/resources/pos/client/Client.js +541 -0
- package/dist/api/resources/pos/client/requests/ReceiptsCreatePosRequest.d.ts +29 -0
- package/dist/api/resources/pos/client/requests/ReceiptsCreatePosRequest.js +3 -0
- package/dist/api/resources/pos/client/requests/ReceiptsGetPosRequest.d.ts +9 -0
- package/dist/api/resources/pos/client/requests/ReceiptsGetPosRequest.js +3 -0
- package/dist/api/resources/pos/client/requests/ReceiptsListPosRequest.d.ts +48 -0
- package/dist/api/resources/pos/client/requests/ReceiptsListPosRequest.js +31 -0
- package/dist/api/resources/pos/client/requests/ShiftsClosePosRequest.d.ts +13 -0
- package/dist/api/resources/pos/client/requests/ShiftsClosePosRequest.js +3 -0
- package/dist/api/resources/pos/client/requests/ShiftsGetPosRequest.d.ts +9 -0
- package/dist/api/resources/pos/client/requests/ShiftsGetPosRequest.js +3 -0
- package/dist/api/resources/pos/client/requests/ShiftsListPosRequest.d.ts +48 -0
- package/dist/api/resources/pos/client/requests/ShiftsListPosRequest.js +31 -0
- package/dist/api/resources/pos/client/requests/ShiftsOpenPosRequest.d.ts +11 -0
- package/dist/api/resources/pos/client/requests/ShiftsOpenPosRequest.js +3 -0
- package/dist/api/resources/pos/client/requests/index.d.ts +7 -0
- package/dist/api/resources/pos/client/requests/index.js +5 -1
- package/dist/api/resources/pos/types/ReceiptsCreatePosResponse.d.ts +28 -0
- package/dist/api/resources/pos/types/ReceiptsCreatePosResponse.js +3 -0
- package/dist/api/resources/pos/types/ReceiptsGetPosResponse.d.ts +28 -0
- package/dist/api/resources/pos/types/ReceiptsGetPosResponse.js +3 -0
- package/dist/api/resources/pos/types/ReceiptsListPosResponse.d.ts +25 -0
- package/dist/api/resources/pos/types/ReceiptsListPosResponse.js +3 -0
- package/dist/api/resources/pos/types/ShiftsClosePosResponse.d.ts +21 -0
- package/dist/api/resources/pos/types/ShiftsClosePosResponse.js +11 -0
- package/dist/api/resources/pos/types/ShiftsGetPosResponse.d.ts +19 -0
- package/dist/api/resources/pos/types/ShiftsGetPosResponse.js +11 -0
- package/dist/api/resources/pos/types/ShiftsListPosResponse.d.ts +33 -0
- package/dist/api/resources/pos/types/ShiftsListPosResponse.js +17 -0
- package/dist/api/resources/pos/types/ShiftsOpenPosResponse.d.ts +19 -0
- package/dist/api/resources/pos/types/ShiftsOpenPosResponse.js +11 -0
- package/dist/api/resources/pos/types/index.d.ts +7 -0
- package/dist/api/resources/pos/types/index.js +7 -0
- package/dist/api/resources/purchases/client/Client.d.ts +40 -0
- package/dist/api/resources/purchases/client/Client.js +156 -0
- package/dist/api/resources/purchases/client/requests/DeferralsListPurchasesRequest.d.ts +48 -0
- package/dist/api/resources/purchases/client/requests/DeferralsListPurchasesRequest.js +31 -0
- package/dist/api/resources/purchases/client/requests/DeferralsPostPurchasesRequest.d.ts +7 -0
- package/dist/api/resources/purchases/client/requests/DeferralsPostPurchasesRequest.js +3 -0
- package/dist/api/resources/purchases/client/requests/InvoicesCreatePurchasesRequest.d.ts +2 -0
- package/dist/api/resources/purchases/client/requests/InvoicesUpdatePurchasesRequest.d.ts +2 -0
- package/dist/api/resources/purchases/client/requests/OrdersCreatePurchasesRequest.d.ts +2 -0
- package/dist/api/resources/purchases/client/requests/OrdersUpdatePurchasesRequest.d.ts +2 -0
- package/dist/api/resources/purchases/client/requests/index.d.ts +2 -0
- package/dist/api/resources/purchases/client/requests/index.js +3 -1
- package/dist/api/resources/purchases/types/DeferralsListPurchasesResponse.d.ts +34 -0
- package/dist/api/resources/purchases/types/DeferralsListPurchasesResponse.js +18 -0
- package/dist/api/resources/purchases/types/DeferralsPostPurchasesResponse.d.ts +5 -0
- package/dist/api/resources/purchases/types/DeferralsPostPurchasesResponse.js +3 -0
- package/dist/api/resources/purchases/types/InvoicesCreatePurchasesResponse.d.ts +2 -0
- package/dist/api/resources/purchases/types/InvoicesGetPurchasesResponse.d.ts +2 -0
- package/dist/api/resources/purchases/types/InvoicesRegisterPurchasesResponse.d.ts +2 -0
- package/dist/api/resources/purchases/types/InvoicesUpdatePurchasesResponse.d.ts +2 -0
- package/dist/api/resources/purchases/types/index.d.ts +2 -0
- package/dist/api/resources/purchases/types/index.js +2 -0
- package/dist/api/resources/reports/types/AdvanceReconciliationReportsResponse.d.ts +1 -0
- package/dist/api/resources/sales/client/requests/InvoicesIssueSalesRequest.d.ts +1 -0
- package/dist/api/resources/webhooks/client/requests/SubscriptionsCreateWebhooksRequest.d.ts +1 -0
- package/dist/api/resources/webhooks/client/requests/SubscriptionsCreateWebhooksRequest.js +1 -0
- package/dist/api/resources/webhooks/client/requests/SubscriptionsUpdateWebhooksRequest.d.ts +1 -0
- package/dist/api/resources/webhooks/client/requests/SubscriptionsUpdateWebhooksRequest.js +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @example
|
|
3
|
+
* {}
|
|
4
|
+
*/
|
|
5
|
+
export interface ShiftsListPosRequest {
|
|
6
|
+
page?: number;
|
|
7
|
+
pageSize?: number;
|
|
8
|
+
sort?: ShiftsListPosRequest.Sort.Item[];
|
|
9
|
+
filter?: ShiftsListPosRequest.Filter.Item[];
|
|
10
|
+
/** Numeric fields to sum over every row matching the filter (not only the current page) */
|
|
11
|
+
totals?: string[];
|
|
12
|
+
}
|
|
13
|
+
export declare namespace ShiftsListPosRequest {
|
|
14
|
+
type Sort = Sort.Item[];
|
|
15
|
+
namespace Sort {
|
|
16
|
+
interface Item {
|
|
17
|
+
field: string;
|
|
18
|
+
dir?: Item.Dir | undefined;
|
|
19
|
+
}
|
|
20
|
+
namespace Item {
|
|
21
|
+
const Dir: {
|
|
22
|
+
readonly Asc: "asc";
|
|
23
|
+
readonly Desc: "desc";
|
|
24
|
+
};
|
|
25
|
+
type Dir = (typeof Dir)[keyof typeof Dir];
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
type Filter = Filter.Item[];
|
|
29
|
+
namespace Filter {
|
|
30
|
+
interface Item {
|
|
31
|
+
field: string;
|
|
32
|
+
op: Item.Op;
|
|
33
|
+
value: Item.Value;
|
|
34
|
+
}
|
|
35
|
+
namespace Item {
|
|
36
|
+
const Op: {
|
|
37
|
+
readonly Eq: "eq";
|
|
38
|
+
readonly Ne: "ne";
|
|
39
|
+
readonly Contains: "contains";
|
|
40
|
+
readonly Gte: "gte";
|
|
41
|
+
readonly Lte: "lte";
|
|
42
|
+
readonly In: "in";
|
|
43
|
+
};
|
|
44
|
+
type Op = (typeof Op)[keyof typeof Op];
|
|
45
|
+
type Value = string | number | boolean | (string | number)[];
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.ShiftsListPosRequest = void 0;
|
|
5
|
+
var ShiftsListPosRequest;
|
|
6
|
+
(function (ShiftsListPosRequest) {
|
|
7
|
+
let Sort;
|
|
8
|
+
(function (Sort) {
|
|
9
|
+
let Item;
|
|
10
|
+
(function (Item) {
|
|
11
|
+
Item.Dir = {
|
|
12
|
+
Asc: "asc",
|
|
13
|
+
Desc: "desc",
|
|
14
|
+
};
|
|
15
|
+
})(Item = Sort.Item || (Sort.Item = {}));
|
|
16
|
+
})(Sort = ShiftsListPosRequest.Sort || (ShiftsListPosRequest.Sort = {}));
|
|
17
|
+
let Filter;
|
|
18
|
+
(function (Filter) {
|
|
19
|
+
let Item;
|
|
20
|
+
(function (Item) {
|
|
21
|
+
Item.Op = {
|
|
22
|
+
Eq: "eq",
|
|
23
|
+
Ne: "ne",
|
|
24
|
+
Contains: "contains",
|
|
25
|
+
Gte: "gte",
|
|
26
|
+
Lte: "lte",
|
|
27
|
+
In: "in",
|
|
28
|
+
};
|
|
29
|
+
})(Item = Filter.Item || (Filter.Item = {}));
|
|
30
|
+
})(Filter = ShiftsListPosRequest.Filter || (ShiftsListPosRequest.Filter = {}));
|
|
31
|
+
})(ShiftsListPosRequest || (exports.ShiftsListPosRequest = ShiftsListPosRequest = {}));
|
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
export type { DevicesCreatePosRequest } from "./DevicesCreatePosRequest.js";
|
|
2
2
|
export { DevicesListPosRequest } from "./DevicesListPosRequest.js";
|
|
3
3
|
export type { DevicesUpdatePosRequest } from "./DevicesUpdatePosRequest.js";
|
|
4
|
+
export type { ReceiptsCreatePosRequest } from "./ReceiptsCreatePosRequest.js";
|
|
5
|
+
export type { ReceiptsGetPosRequest } from "./ReceiptsGetPosRequest.js";
|
|
6
|
+
export { ReceiptsListPosRequest } from "./ReceiptsListPosRequest.js";
|
|
4
7
|
export type { ReportsCreatePosRequest } from "./ReportsCreatePosRequest.js";
|
|
5
8
|
export type { ReportsGetPosRequest } from "./ReportsGetPosRequest.js";
|
|
6
9
|
export { ReportsListPosRequest } from "./ReportsListPosRequest.js";
|
|
10
|
+
export type { ShiftsClosePosRequest } from "./ShiftsClosePosRequest.js";
|
|
11
|
+
export type { ShiftsGetPosRequest } from "./ShiftsGetPosRequest.js";
|
|
12
|
+
export { ShiftsListPosRequest } from "./ShiftsListPosRequest.js";
|
|
13
|
+
export type { ShiftsOpenPosRequest } from "./ShiftsOpenPosRequest.js";
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ReportsListPosRequest = exports.DevicesListPosRequest = void 0;
|
|
3
|
+
exports.ShiftsListPosRequest = exports.ReportsListPosRequest = exports.ReceiptsListPosRequest = exports.DevicesListPosRequest = void 0;
|
|
4
4
|
var DevicesListPosRequest_js_1 = require("./DevicesListPosRequest.js");
|
|
5
5
|
Object.defineProperty(exports, "DevicesListPosRequest", { enumerable: true, get: function () { return DevicesListPosRequest_js_1.DevicesListPosRequest; } });
|
|
6
|
+
var ReceiptsListPosRequest_js_1 = require("./ReceiptsListPosRequest.js");
|
|
7
|
+
Object.defineProperty(exports, "ReceiptsListPosRequest", { enumerable: true, get: function () { return ReceiptsListPosRequest_js_1.ReceiptsListPosRequest; } });
|
|
6
8
|
var ReportsListPosRequest_js_1 = require("./ReportsListPosRequest.js");
|
|
7
9
|
Object.defineProperty(exports, "ReportsListPosRequest", { enumerable: true, get: function () { return ReportsListPosRequest_js_1.ReportsListPosRequest; } });
|
|
10
|
+
var ShiftsListPosRequest_js_1 = require("./ShiftsListPosRequest.js");
|
|
11
|
+
Object.defineProperty(exports, "ShiftsListPosRequest", { enumerable: true, get: function () { return ShiftsListPosRequest_js_1.ShiftsListPosRequest; } });
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export interface ReceiptsCreatePosResponse {
|
|
2
|
+
id: string;
|
|
3
|
+
shiftId: string;
|
|
4
|
+
number: number;
|
|
5
|
+
netTotal: string;
|
|
6
|
+
vatTotal: string;
|
|
7
|
+
grossTotal: string;
|
|
8
|
+
cashAmount: string;
|
|
9
|
+
cardAmount: string;
|
|
10
|
+
createdAt: string;
|
|
11
|
+
lines: ReceiptsCreatePosResponse.Lines.Item[];
|
|
12
|
+
}
|
|
13
|
+
export declare namespace ReceiptsCreatePosResponse {
|
|
14
|
+
type Lines = Lines.Item[];
|
|
15
|
+
namespace Lines {
|
|
16
|
+
interface Item {
|
|
17
|
+
id: string;
|
|
18
|
+
itemId: string | null;
|
|
19
|
+
description: string;
|
|
20
|
+
quantity: string;
|
|
21
|
+
unitPriceInclVat: string;
|
|
22
|
+
vatRatePercent: string;
|
|
23
|
+
netAmount: string;
|
|
24
|
+
vatAmount: string;
|
|
25
|
+
grossAmount: string;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export interface ReceiptsGetPosResponse {
|
|
2
|
+
id: string;
|
|
3
|
+
shiftId: string;
|
|
4
|
+
number: number;
|
|
5
|
+
netTotal: string;
|
|
6
|
+
vatTotal: string;
|
|
7
|
+
grossTotal: string;
|
|
8
|
+
cashAmount: string;
|
|
9
|
+
cardAmount: string;
|
|
10
|
+
createdAt: string;
|
|
11
|
+
lines: ReceiptsGetPosResponse.Lines.Item[];
|
|
12
|
+
}
|
|
13
|
+
export declare namespace ReceiptsGetPosResponse {
|
|
14
|
+
type Lines = Lines.Item[];
|
|
15
|
+
namespace Lines {
|
|
16
|
+
interface Item {
|
|
17
|
+
id: string;
|
|
18
|
+
itemId: string | null;
|
|
19
|
+
description: string;
|
|
20
|
+
quantity: string;
|
|
21
|
+
unitPriceInclVat: string;
|
|
22
|
+
vatRatePercent: string;
|
|
23
|
+
netAmount: string;
|
|
24
|
+
vatAmount: string;
|
|
25
|
+
grossAmount: string;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export interface ReceiptsListPosResponse {
|
|
2
|
+
rows: ReceiptsListPosResponse.Rows.Item[];
|
|
3
|
+
page: number;
|
|
4
|
+
pageSize: number;
|
|
5
|
+
total: number;
|
|
6
|
+
totals?: Record<string, string> | undefined;
|
|
7
|
+
/** The requested totals split by currency code, present when the listed records carry a currency */
|
|
8
|
+
totalsByCurrency?: Record<string, Record<string, string>> | undefined;
|
|
9
|
+
}
|
|
10
|
+
export declare namespace ReceiptsListPosResponse {
|
|
11
|
+
type Rows = Rows.Item[];
|
|
12
|
+
namespace Rows {
|
|
13
|
+
interface Item {
|
|
14
|
+
id: string;
|
|
15
|
+
shiftId: string;
|
|
16
|
+
number: number;
|
|
17
|
+
netTotal: string;
|
|
18
|
+
vatTotal: string;
|
|
19
|
+
grossTotal: string;
|
|
20
|
+
cashAmount: string;
|
|
21
|
+
cardAmount: string;
|
|
22
|
+
createdAt: string;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export interface ShiftsClosePosResponse {
|
|
2
|
+
id: string;
|
|
3
|
+
deviceId: string;
|
|
4
|
+
warehouseId: string | null;
|
|
5
|
+
status: ShiftsClosePosResponse.Status;
|
|
6
|
+
openingCash: string;
|
|
7
|
+
countedCash: string | null;
|
|
8
|
+
receiptCount: number;
|
|
9
|
+
reportId: string | null;
|
|
10
|
+
openedAt: string;
|
|
11
|
+
closedAt: string | null;
|
|
12
|
+
expectedCash: string;
|
|
13
|
+
cashDifference: string;
|
|
14
|
+
}
|
|
15
|
+
export declare namespace ShiftsClosePosResponse {
|
|
16
|
+
const Status: {
|
|
17
|
+
readonly Open: "open";
|
|
18
|
+
readonly Closed: "closed";
|
|
19
|
+
};
|
|
20
|
+
type Status = (typeof Status)[keyof typeof Status];
|
|
21
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.ShiftsClosePosResponse = void 0;
|
|
5
|
+
var ShiftsClosePosResponse;
|
|
6
|
+
(function (ShiftsClosePosResponse) {
|
|
7
|
+
ShiftsClosePosResponse.Status = {
|
|
8
|
+
Open: "open",
|
|
9
|
+
Closed: "closed",
|
|
10
|
+
};
|
|
11
|
+
})(ShiftsClosePosResponse || (exports.ShiftsClosePosResponse = ShiftsClosePosResponse = {}));
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export interface ShiftsGetPosResponse {
|
|
2
|
+
id: string;
|
|
3
|
+
deviceId: string;
|
|
4
|
+
warehouseId: string | null;
|
|
5
|
+
status: ShiftsGetPosResponse.Status;
|
|
6
|
+
openingCash: string;
|
|
7
|
+
countedCash: string | null;
|
|
8
|
+
receiptCount: number;
|
|
9
|
+
reportId: string | null;
|
|
10
|
+
openedAt: string;
|
|
11
|
+
closedAt: string | null;
|
|
12
|
+
}
|
|
13
|
+
export declare namespace ShiftsGetPosResponse {
|
|
14
|
+
const Status: {
|
|
15
|
+
readonly Open: "open";
|
|
16
|
+
readonly Closed: "closed";
|
|
17
|
+
};
|
|
18
|
+
type Status = (typeof Status)[keyof typeof Status];
|
|
19
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.ShiftsGetPosResponse = void 0;
|
|
5
|
+
var ShiftsGetPosResponse;
|
|
6
|
+
(function (ShiftsGetPosResponse) {
|
|
7
|
+
ShiftsGetPosResponse.Status = {
|
|
8
|
+
Open: "open",
|
|
9
|
+
Closed: "closed",
|
|
10
|
+
};
|
|
11
|
+
})(ShiftsGetPosResponse || (exports.ShiftsGetPosResponse = ShiftsGetPosResponse = {}));
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
export interface ShiftsListPosResponse {
|
|
2
|
+
rows: ShiftsListPosResponse.Rows.Item[];
|
|
3
|
+
page: number;
|
|
4
|
+
pageSize: number;
|
|
5
|
+
total: number;
|
|
6
|
+
totals?: Record<string, string> | undefined;
|
|
7
|
+
/** The requested totals split by currency code, present when the listed records carry a currency */
|
|
8
|
+
totalsByCurrency?: Record<string, Record<string, string>> | undefined;
|
|
9
|
+
}
|
|
10
|
+
export declare namespace ShiftsListPosResponse {
|
|
11
|
+
type Rows = Rows.Item[];
|
|
12
|
+
namespace Rows {
|
|
13
|
+
interface Item {
|
|
14
|
+
id: string;
|
|
15
|
+
deviceId: string;
|
|
16
|
+
warehouseId: string | null;
|
|
17
|
+
status: Item.Status;
|
|
18
|
+
openingCash: string;
|
|
19
|
+
countedCash: string | null;
|
|
20
|
+
receiptCount: number;
|
|
21
|
+
reportId: string | null;
|
|
22
|
+
openedAt: string;
|
|
23
|
+
closedAt: string | null;
|
|
24
|
+
}
|
|
25
|
+
namespace Item {
|
|
26
|
+
const Status: {
|
|
27
|
+
readonly Open: "open";
|
|
28
|
+
readonly Closed: "closed";
|
|
29
|
+
};
|
|
30
|
+
type Status = (typeof Status)[keyof typeof Status];
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.ShiftsListPosResponse = void 0;
|
|
5
|
+
var ShiftsListPosResponse;
|
|
6
|
+
(function (ShiftsListPosResponse) {
|
|
7
|
+
let Rows;
|
|
8
|
+
(function (Rows) {
|
|
9
|
+
let Item;
|
|
10
|
+
(function (Item) {
|
|
11
|
+
Item.Status = {
|
|
12
|
+
Open: "open",
|
|
13
|
+
Closed: "closed",
|
|
14
|
+
};
|
|
15
|
+
})(Item = Rows.Item || (Rows.Item = {}));
|
|
16
|
+
})(Rows = ShiftsListPosResponse.Rows || (ShiftsListPosResponse.Rows = {}));
|
|
17
|
+
})(ShiftsListPosResponse || (exports.ShiftsListPosResponse = ShiftsListPosResponse = {}));
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export interface ShiftsOpenPosResponse {
|
|
2
|
+
id: string;
|
|
3
|
+
deviceId: string;
|
|
4
|
+
warehouseId: string | null;
|
|
5
|
+
status: ShiftsOpenPosResponse.Status;
|
|
6
|
+
openingCash: string;
|
|
7
|
+
countedCash: string | null;
|
|
8
|
+
receiptCount: number;
|
|
9
|
+
reportId: string | null;
|
|
10
|
+
openedAt: string;
|
|
11
|
+
closedAt: string | null;
|
|
12
|
+
}
|
|
13
|
+
export declare namespace ShiftsOpenPosResponse {
|
|
14
|
+
const Status: {
|
|
15
|
+
readonly Open: "open";
|
|
16
|
+
readonly Closed: "closed";
|
|
17
|
+
};
|
|
18
|
+
type Status = (typeof Status)[keyof typeof Status];
|
|
19
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.ShiftsOpenPosResponse = void 0;
|
|
5
|
+
var ShiftsOpenPosResponse;
|
|
6
|
+
(function (ShiftsOpenPosResponse) {
|
|
7
|
+
ShiftsOpenPosResponse.Status = {
|
|
8
|
+
Open: "open",
|
|
9
|
+
Closed: "closed",
|
|
10
|
+
};
|
|
11
|
+
})(ShiftsOpenPosResponse || (exports.ShiftsOpenPosResponse = ShiftsOpenPosResponse = {}));
|
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
export * from "./DevicesCreatePosResponse.js";
|
|
2
2
|
export * from "./DevicesListPosResponse.js";
|
|
3
3
|
export * from "./DevicesUpdatePosResponse.js";
|
|
4
|
+
export * from "./ReceiptsCreatePosResponse.js";
|
|
5
|
+
export * from "./ReceiptsGetPosResponse.js";
|
|
6
|
+
export * from "./ReceiptsListPosResponse.js";
|
|
4
7
|
export * from "./ReportsCreatePosResponse.js";
|
|
5
8
|
export * from "./ReportsGetPosResponse.js";
|
|
6
9
|
export * from "./ReportsListPosResponse.js";
|
|
10
|
+
export * from "./ShiftsClosePosResponse.js";
|
|
11
|
+
export * from "./ShiftsGetPosResponse.js";
|
|
12
|
+
export * from "./ShiftsListPosResponse.js";
|
|
13
|
+
export * from "./ShiftsOpenPosResponse.js";
|
|
@@ -17,6 +17,13 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
17
17
|
__exportStar(require("./DevicesCreatePosResponse.js"), exports);
|
|
18
18
|
__exportStar(require("./DevicesListPosResponse.js"), exports);
|
|
19
19
|
__exportStar(require("./DevicesUpdatePosResponse.js"), exports);
|
|
20
|
+
__exportStar(require("./ReceiptsCreatePosResponse.js"), exports);
|
|
21
|
+
__exportStar(require("./ReceiptsGetPosResponse.js"), exports);
|
|
22
|
+
__exportStar(require("./ReceiptsListPosResponse.js"), exports);
|
|
20
23
|
__exportStar(require("./ReportsCreatePosResponse.js"), exports);
|
|
21
24
|
__exportStar(require("./ReportsGetPosResponse.js"), exports);
|
|
22
25
|
__exportStar(require("./ReportsListPosResponse.js"), exports);
|
|
26
|
+
__exportStar(require("./ShiftsClosePosResponse.js"), exports);
|
|
27
|
+
__exportStar(require("./ShiftsGetPosResponse.js"), exports);
|
|
28
|
+
__exportStar(require("./ShiftsListPosResponse.js"), exports);
|
|
29
|
+
__exportStar(require("./ShiftsOpenPosResponse.js"), exports);
|
|
@@ -123,6 +123,46 @@ export declare class PurchasesClient {
|
|
|
123
123
|
*/
|
|
124
124
|
invoicesRegister(request: NordletApi.InvoicesRegisterPurchasesRequest, requestOptions?: PurchasesClient.RequestOptions): core.HttpResponsePromise<NordletApi.InvoicesRegisterPurchasesResponse>;
|
|
125
125
|
private __invoicesRegister;
|
|
126
|
+
/**
|
|
127
|
+
* @param {NordletApi.DeferralsListPurchasesRequest} request
|
|
128
|
+
* @param {PurchasesClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
129
|
+
*
|
|
130
|
+
* @throws {@link NordletApi.BadRequestError}
|
|
131
|
+
* @throws {@link NordletApi.UnauthorizedError}
|
|
132
|
+
* @throws {@link NordletApi.PaymentRequiredError}
|
|
133
|
+
* @throws {@link NordletApi.ForbiddenError}
|
|
134
|
+
* @throws {@link NordletApi.NotFoundError}
|
|
135
|
+
* @throws {@link NordletApi.ConflictError}
|
|
136
|
+
* @throws {@link NordletApi.ContentTooLargeError}
|
|
137
|
+
* @throws {@link NordletApi.UnprocessableEntityError}
|
|
138
|
+
* @throws {@link NordletApi.TooManyRequestsError}
|
|
139
|
+
* @throws {@link NordletApi.InternalServerError}
|
|
140
|
+
*
|
|
141
|
+
* @example
|
|
142
|
+
* await client.purchases.deferralsList()
|
|
143
|
+
*/
|
|
144
|
+
deferralsList(request?: NordletApi.DeferralsListPurchasesRequest, requestOptions?: PurchasesClient.RequestOptions): core.HttpResponsePromise<NordletApi.DeferralsListPurchasesResponse>;
|
|
145
|
+
private __deferralsList;
|
|
146
|
+
/**
|
|
147
|
+
* @param {NordletApi.DeferralsPostPurchasesRequest} request
|
|
148
|
+
* @param {PurchasesClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
149
|
+
*
|
|
150
|
+
* @throws {@link NordletApi.BadRequestError}
|
|
151
|
+
* @throws {@link NordletApi.UnauthorizedError}
|
|
152
|
+
* @throws {@link NordletApi.PaymentRequiredError}
|
|
153
|
+
* @throws {@link NordletApi.ForbiddenError}
|
|
154
|
+
* @throws {@link NordletApi.NotFoundError}
|
|
155
|
+
* @throws {@link NordletApi.ConflictError}
|
|
156
|
+
* @throws {@link NordletApi.ContentTooLargeError}
|
|
157
|
+
* @throws {@link NordletApi.UnprocessableEntityError}
|
|
158
|
+
* @throws {@link NordletApi.TooManyRequestsError}
|
|
159
|
+
* @throws {@link NordletApi.InternalServerError}
|
|
160
|
+
*
|
|
161
|
+
* @example
|
|
162
|
+
* await client.purchases.deferralsPost()
|
|
163
|
+
*/
|
|
164
|
+
deferralsPost(request?: NordletApi.DeferralsPostPurchasesRequest, requestOptions?: PurchasesClient.RequestOptions): core.HttpResponsePromise<NordletApi.DeferralsPostPurchasesResponse>;
|
|
165
|
+
private __deferralsPost;
|
|
126
166
|
/**
|
|
127
167
|
* @param {NordletApi.InvoicesListPurchasesRequest} request
|
|
128
168
|
* @param {PurchasesClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -450,6 +450,162 @@ class PurchasesClient {
|
|
|
450
450
|
}
|
|
451
451
|
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/v1/purchases/invoices/register");
|
|
452
452
|
}
|
|
453
|
+
/**
|
|
454
|
+
* @param {NordletApi.DeferralsListPurchasesRequest} request
|
|
455
|
+
* @param {PurchasesClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
456
|
+
*
|
|
457
|
+
* @throws {@link NordletApi.BadRequestError}
|
|
458
|
+
* @throws {@link NordletApi.UnauthorizedError}
|
|
459
|
+
* @throws {@link NordletApi.PaymentRequiredError}
|
|
460
|
+
* @throws {@link NordletApi.ForbiddenError}
|
|
461
|
+
* @throws {@link NordletApi.NotFoundError}
|
|
462
|
+
* @throws {@link NordletApi.ConflictError}
|
|
463
|
+
* @throws {@link NordletApi.ContentTooLargeError}
|
|
464
|
+
* @throws {@link NordletApi.UnprocessableEntityError}
|
|
465
|
+
* @throws {@link NordletApi.TooManyRequestsError}
|
|
466
|
+
* @throws {@link NordletApi.InternalServerError}
|
|
467
|
+
*
|
|
468
|
+
* @example
|
|
469
|
+
* await client.purchases.deferralsList()
|
|
470
|
+
*/
|
|
471
|
+
deferralsList(request = {}, requestOptions) {
|
|
472
|
+
return core.HttpResponsePromise.fromPromise(this.__deferralsList(request, requestOptions));
|
|
473
|
+
}
|
|
474
|
+
async __deferralsList(request = {}, requestOptions) {
|
|
475
|
+
const _authRequest = await this._options.authProvider.getAuthRequest();
|
|
476
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, this._options?.headers, requestOptions?.headers);
|
|
477
|
+
const _response = await core.fetcher({
|
|
478
|
+
url: core.url.join((await core.Supplier.get(this._options.baseUrl)) ??
|
|
479
|
+
(await core.Supplier.get(this._options.environment)) ??
|
|
480
|
+
environments.NordletApiEnvironment.Production, "v1/purchases/deferrals/list"),
|
|
481
|
+
method: "POST",
|
|
482
|
+
headers: _headers,
|
|
483
|
+
contentType: "application/json",
|
|
484
|
+
queryString: core.url.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),
|
|
485
|
+
requestType: "json",
|
|
486
|
+
body: (0, requestBody_js_1.mergeAdditionalBodyParameters)(request, requestOptions?.additionalBodyParameters),
|
|
487
|
+
timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,
|
|
488
|
+
maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
|
|
489
|
+
abortSignal: requestOptions?.abortSignal,
|
|
490
|
+
fetchFn: this._options?.fetch,
|
|
491
|
+
logging: this._options.logging,
|
|
492
|
+
});
|
|
493
|
+
if (_response.ok) {
|
|
494
|
+
return {
|
|
495
|
+
data: _response.body,
|
|
496
|
+
rawResponse: _response.rawResponse,
|
|
497
|
+
};
|
|
498
|
+
}
|
|
499
|
+
if (_response.error.reason === "status-code") {
|
|
500
|
+
switch (_response.error.statusCode) {
|
|
501
|
+
case 400:
|
|
502
|
+
throw new NordletApi.BadRequestError(_response.error.body, _response.rawResponse);
|
|
503
|
+
case 401:
|
|
504
|
+
throw new NordletApi.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
505
|
+
case 402:
|
|
506
|
+
throw new NordletApi.PaymentRequiredError(_response.error.body, _response.rawResponse);
|
|
507
|
+
case 403:
|
|
508
|
+
throw new NordletApi.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
509
|
+
case 404:
|
|
510
|
+
throw new NordletApi.NotFoundError(_response.error.body, _response.rawResponse);
|
|
511
|
+
case 409:
|
|
512
|
+
throw new NordletApi.ConflictError(_response.error.body, _response.rawResponse);
|
|
513
|
+
case 413:
|
|
514
|
+
throw new NordletApi.ContentTooLargeError(_response.error.body, _response.rawResponse);
|
|
515
|
+
case 422:
|
|
516
|
+
throw new NordletApi.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
517
|
+
case 429:
|
|
518
|
+
throw new NordletApi.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
519
|
+
case 500:
|
|
520
|
+
throw new NordletApi.InternalServerError(_response.error.body, _response.rawResponse);
|
|
521
|
+
default:
|
|
522
|
+
throw new errors.NordletApiError({
|
|
523
|
+
statusCode: _response.error.statusCode,
|
|
524
|
+
body: _response.error.body,
|
|
525
|
+
rawResponse: _response.rawResponse,
|
|
526
|
+
});
|
|
527
|
+
}
|
|
528
|
+
}
|
|
529
|
+
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/v1/purchases/deferrals/list");
|
|
530
|
+
}
|
|
531
|
+
/**
|
|
532
|
+
* @param {NordletApi.DeferralsPostPurchasesRequest} request
|
|
533
|
+
* @param {PurchasesClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
534
|
+
*
|
|
535
|
+
* @throws {@link NordletApi.BadRequestError}
|
|
536
|
+
* @throws {@link NordletApi.UnauthorizedError}
|
|
537
|
+
* @throws {@link NordletApi.PaymentRequiredError}
|
|
538
|
+
* @throws {@link NordletApi.ForbiddenError}
|
|
539
|
+
* @throws {@link NordletApi.NotFoundError}
|
|
540
|
+
* @throws {@link NordletApi.ConflictError}
|
|
541
|
+
* @throws {@link NordletApi.ContentTooLargeError}
|
|
542
|
+
* @throws {@link NordletApi.UnprocessableEntityError}
|
|
543
|
+
* @throws {@link NordletApi.TooManyRequestsError}
|
|
544
|
+
* @throws {@link NordletApi.InternalServerError}
|
|
545
|
+
*
|
|
546
|
+
* @example
|
|
547
|
+
* await client.purchases.deferralsPost()
|
|
548
|
+
*/
|
|
549
|
+
deferralsPost(request = {}, requestOptions) {
|
|
550
|
+
return core.HttpResponsePromise.fromPromise(this.__deferralsPost(request, requestOptions));
|
|
551
|
+
}
|
|
552
|
+
async __deferralsPost(request = {}, requestOptions) {
|
|
553
|
+
const _authRequest = await this._options.authProvider.getAuthRequest();
|
|
554
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, this._options?.headers, requestOptions?.headers);
|
|
555
|
+
const _response = await core.fetcher({
|
|
556
|
+
url: core.url.join((await core.Supplier.get(this._options.baseUrl)) ??
|
|
557
|
+
(await core.Supplier.get(this._options.environment)) ??
|
|
558
|
+
environments.NordletApiEnvironment.Production, "v1/purchases/deferrals/post"),
|
|
559
|
+
method: "POST",
|
|
560
|
+
headers: _headers,
|
|
561
|
+
contentType: "application/json",
|
|
562
|
+
queryString: core.url.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),
|
|
563
|
+
requestType: "json",
|
|
564
|
+
body: (0, requestBody_js_1.mergeAdditionalBodyParameters)(request, requestOptions?.additionalBodyParameters),
|
|
565
|
+
timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,
|
|
566
|
+
maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
|
|
567
|
+
abortSignal: requestOptions?.abortSignal,
|
|
568
|
+
fetchFn: this._options?.fetch,
|
|
569
|
+
logging: this._options.logging,
|
|
570
|
+
});
|
|
571
|
+
if (_response.ok) {
|
|
572
|
+
return {
|
|
573
|
+
data: _response.body,
|
|
574
|
+
rawResponse: _response.rawResponse,
|
|
575
|
+
};
|
|
576
|
+
}
|
|
577
|
+
if (_response.error.reason === "status-code") {
|
|
578
|
+
switch (_response.error.statusCode) {
|
|
579
|
+
case 400:
|
|
580
|
+
throw new NordletApi.BadRequestError(_response.error.body, _response.rawResponse);
|
|
581
|
+
case 401:
|
|
582
|
+
throw new NordletApi.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
583
|
+
case 402:
|
|
584
|
+
throw new NordletApi.PaymentRequiredError(_response.error.body, _response.rawResponse);
|
|
585
|
+
case 403:
|
|
586
|
+
throw new NordletApi.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
587
|
+
case 404:
|
|
588
|
+
throw new NordletApi.NotFoundError(_response.error.body, _response.rawResponse);
|
|
589
|
+
case 409:
|
|
590
|
+
throw new NordletApi.ConflictError(_response.error.body, _response.rawResponse);
|
|
591
|
+
case 413:
|
|
592
|
+
throw new NordletApi.ContentTooLargeError(_response.error.body, _response.rawResponse);
|
|
593
|
+
case 422:
|
|
594
|
+
throw new NordletApi.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
595
|
+
case 429:
|
|
596
|
+
throw new NordletApi.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
597
|
+
case 500:
|
|
598
|
+
throw new NordletApi.InternalServerError(_response.error.body, _response.rawResponse);
|
|
599
|
+
default:
|
|
600
|
+
throw new errors.NordletApiError({
|
|
601
|
+
statusCode: _response.error.statusCode,
|
|
602
|
+
body: _response.error.body,
|
|
603
|
+
rawResponse: _response.rawResponse,
|
|
604
|
+
});
|
|
605
|
+
}
|
|
606
|
+
}
|
|
607
|
+
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/v1/purchases/deferrals/post");
|
|
608
|
+
}
|
|
453
609
|
/**
|
|
454
610
|
* @param {NordletApi.InvoicesListPurchasesRequest} request
|
|
455
611
|
* @param {PurchasesClient.RequestOptions} requestOptions - Request-specific configuration.
|