@figuredev/orders-sdk
Advanced tools
Comparing version 0.12.102 to 0.12.103
@@ -1,2 +0,2 @@ | ||
import { Maybe } from "fgr-lib-backend/lib/types"; | ||
import { Maybe } from "@figurepos/fgr-lib-backend/lib/types"; | ||
import { InventoryInfoDTO } from "./inventory"; | ||
@@ -7,3 +7,3 @@ import { OrderDTO, OrderPreviewDTO } from "./order"; | ||
import { TillCountDTO, TillDTO } from "./till"; | ||
import { IsoDate, IsoDateTime } from "./types"; | ||
import { FileUploadTypeDTO, IsoDate, IsoDateTime, PreparedFileUploadDTO } from "./types"; | ||
import { UserContext } from "./utils"; | ||
@@ -65,3 +65,4 @@ declare type OrdersClientConfig = { | ||
}): Promise<TillDTO[]>; | ||
getPreparedFileUploadUrl(ctx: UserContext, filename: string, fileType: string, fileUploadType: FileUploadTypeDTO): Promise<PreparedFileUploadDTO | null>; | ||
} | ||
export {}; |
@@ -186,4 +186,20 @@ "use strict"; | ||
} | ||
getPreparedFileUploadUrl(ctx, filename, fileType, fileUploadType) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
const response = yield http_1.createHttpRequest({ | ||
baseURL: this.config.baseUrl, | ||
method: "POST", | ||
url: `/file/prepare`, | ||
headers: this.prepareHeaders(ctx), | ||
data: { | ||
filename: filename, | ||
fileType: fileType, | ||
fileUploadType: fileUploadType, | ||
}, | ||
}); | ||
return response.data; | ||
}); | ||
} | ||
} | ||
exports.OrdersClient = OrdersClient; | ||
//# sourceMappingURL=index.js.map |
@@ -1,2 +0,2 @@ | ||
import { Maybe } from "fgr-lib-backend/lib/types"; | ||
import { Maybe } from "@figurepos/fgr-lib-backend/lib/types"; | ||
import { IsoDateTime } from "./types"; | ||
@@ -3,0 +3,0 @@ export declare type TillCountDTO = { |
@@ -23,1 +23,8 @@ export declare type Maybe<T> = T | null | undefined; | ||
}; | ||
export interface PreparedFileUploadDTO { | ||
signedRequest: string; | ||
url: string; | ||
} | ||
export declare enum FileUploadTypeDTO { | ||
CustomerImport = "customer-import" | ||
} |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.FileUploadTypeDTO = void 0; | ||
var FileUploadTypeDTO; | ||
(function (FileUploadTypeDTO) { | ||
FileUploadTypeDTO["CustomerImport"] = "customer-import"; | ||
})(FileUploadTypeDTO = exports.FileUploadTypeDTO || (exports.FileUploadTypeDTO = {})); | ||
//# sourceMappingURL=types.js.map |
{ | ||
"name": "@figuredev/orders-sdk", | ||
"version": "0.12.102", | ||
"version": "0.12.103", | ||
"license": "ISC", | ||
@@ -5,0 +5,0 @@ "files": [ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
76719
1452