@kiminix/tp-client 2.24.0 → 2.26.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/business/apis.d.ts +3 -3
- package/dist/business/apis.js +2 -2
- package/dist/business/types/get-id.d.ts +1 -0
- package/dist/business/types/update-business.d.ts +10 -8
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/utils/patch-utils.d.ts +11 -0
- package/dist/utils/patch-utils.js +2 -0
- package/package.json +1 -1
package/dist/business/apis.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { AllBusiness } from "./types/get-all";
|
|
2
2
|
import { Business } from "./types/get-id";
|
|
3
|
-
import {
|
|
3
|
+
import { PatchBusinessRequest } from "./types/update-business";
|
|
4
4
|
export declare class BusinessAPIs {
|
|
5
5
|
static getAll(timestamp: number, page?: number, size?: number): Promise<AllBusiness[]>;
|
|
6
6
|
static get(identifier: string): Promise<Business | undefined>;
|
|
7
|
-
static
|
|
7
|
+
static patch(props: {
|
|
8
8
|
token: string;
|
|
9
|
-
request:
|
|
9
|
+
request: PatchBusinessRequest;
|
|
10
10
|
}): Promise<void>;
|
|
11
11
|
}
|
package/dist/business/apis.js
CHANGED
|
@@ -87,14 +87,14 @@ var BusinessAPIs = /** @class */ (function () {
|
|
|
87
87
|
});
|
|
88
88
|
});
|
|
89
89
|
};
|
|
90
|
-
BusinessAPIs.
|
|
90
|
+
BusinessAPIs.patch = function (props) {
|
|
91
91
|
return __awaiter(this, void 0, void 0, function () {
|
|
92
92
|
var _this = this;
|
|
93
93
|
return __generator(this, function (_a) {
|
|
94
94
|
return [2 /*return*/, RequestUtils.send(function () { return __awaiter(_this, void 0, void 0, function () {
|
|
95
95
|
return __generator(this, function (_a) {
|
|
96
96
|
switch (_a.label) {
|
|
97
|
-
case 0: return [4 /*yield*/, axios.
|
|
97
|
+
case 0: return [4 /*yield*/, axios.patch(base + "/business", props.request, {
|
|
98
98
|
headers: {
|
|
99
99
|
'Authorization': "".concat(props.token)
|
|
100
100
|
}
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
+
import { Patch } from "../../utils/patch-utils";
|
|
1
2
|
import { OpeningHours, SocialLinks } from "./shared";
|
|
2
|
-
export interface
|
|
3
|
-
name
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
3
|
+
export interface PatchBusinessRequest {
|
|
4
|
+
name?: Patch<string> | undefined;
|
|
5
|
+
identifier?: Patch<string> | undefined;
|
|
6
|
+
address?: Patch<string> | undefined;
|
|
7
|
+
phones?: Patch<string[]> | undefined;
|
|
8
|
+
openingHours?: Patch<OpeningHours> | undefined;
|
|
9
|
+
socialLinks?: Patch<SocialLinks> | undefined;
|
|
10
|
+
googleMapsUrl?: Patch<string> | undefined;
|
|
11
|
+
googleMapsReviewLink?: Patch<string> | undefined;
|
|
10
12
|
}
|
package/dist/index.d.ts
CHANGED
|
@@ -10,6 +10,7 @@ export * from './cashback/index';
|
|
|
10
10
|
export * from './discounts/index';
|
|
11
11
|
export * from './vouchers/index';
|
|
12
12
|
export * from './menus/index';
|
|
13
|
+
export * from './utils/patch-utils';
|
|
13
14
|
export * from './utils/business-utils';
|
|
14
15
|
export * from './utils/date-utils';
|
|
15
16
|
export * from './utils/math-utils';
|
package/dist/index.js
CHANGED