gap-nodejs-sdk 1.0.66 → 1.0.67

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.
@@ -6,5 +6,6 @@ import * as Response from "../types/response";
6
6
  export default class Service extends Base implements ServiceAbstractClass {
7
7
  static API_VERSION: GapApiVersion;
8
8
  static getServiceList(data: Request.GetServiceListRequest): Promise<Response.GetServiceListResponse>;
9
+ static uploadFile(data: Request.UploadFileRequest): Promise<Response.UploadFileResponse>;
9
10
  }
10
11
  //# sourceMappingURL=service.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"service.d.ts","sourceRoot":"","sources":["../../../../src/pos_client_api/1.0.0/api/service.ts"],"names":[],"mappings":"AACA,OAAO,oBAAoB,MAAM,uBAAuB,CAAC;AACzD,OAAO,IAAI,MAAM,oBAAoB,CAAC;AACtC,OAAO,EAAC,aAAa,EAAC,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,OAAO,MAAM,kBAAkB,CAAC;AAC5C,OAAO,KAAK,QAAQ,MAAM,mBAAmB,CAAC;AAG9C,MAAM,CAAC,OAAO,OAAO,OAAQ,SAAQ,IAAK,YAAW,oBAAoB;IACrE,OAAc,WAAW,gBAAoB;WAEzB,cAAc,CAAC,IAAI,EAAE,OAAO,CAAC,qBAAqB,GAAG,OAAO,CAAC,QAAQ,CAAC,sBAAsB,CAAC;CASpH"}
1
+ {"version":3,"file":"service.d.ts","sourceRoot":"","sources":["../../../../src/pos_client_api/1.0.0/api/service.ts"],"names":[],"mappings":"AACA,OAAO,oBAAoB,MAAM,uBAAuB,CAAC;AACzD,OAAO,IAAI,MAAM,oBAAoB,CAAC;AACtC,OAAO,EAAC,aAAa,EAAC,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,OAAO,MAAM,kBAAkB,CAAC;AAC5C,OAAO,KAAK,QAAQ,MAAM,mBAAmB,CAAC;AAI9C,MAAM,CAAC,OAAO,OAAO,OAAQ,SAAQ,IAAK,YAAW,oBAAoB;IACrE,OAAc,WAAW,gBAAoB;WAEzB,cAAc,CAAC,IAAI,EAAE,OAAO,CAAC,qBAAqB,GAAG,OAAO,CAAC,QAAQ,CAAC,sBAAsB,CAAC;WAU7F,UAAU,CAAC,IAAI,EAAE,OAAO,CAAC,iBAAiB,GAAG,OAAO,CAAC,QAAQ,CAAC,kBAAkB,CAAC;CAWxG"}
@@ -3,6 +3,7 @@ import * as posEndpoints from "../endpoints";
3
3
  import Base from "../../../base/Base";
4
4
  import { GapApiVersion } from "../../../base_type";
5
5
  import * as Model from "../models";
6
+ import { objectToFormData } from "../../../utils/form-data";
6
7
  export default class Service extends Base {
7
8
  static getServiceList(data) {
8
9
  var _a;
@@ -14,5 +15,16 @@ export default class Service extends Base {
14
15
  return (((_a = response === null || response === void 0 ? void 0 : response.result) === null || _a === void 0 ? void 0 : _a.data) || []).map(item => Model.ServiceModel(item));
15
16
  });
16
17
  }
18
+ static uploadFile(data) {
19
+ return __awaiter(this, void 0, void 0, function* () {
20
+ const formData = objectToFormData(data);
21
+ console.log(formData);
22
+ const response = yield this.client.post({
23
+ path: posEndpoints.service.UPLOAD_FILE,
24
+ data: data
25
+ });
26
+ return response;
27
+ });
28
+ }
17
29
  }
18
30
  Service.API_VERSION = GapApiVersion.V1;
@@ -1,5 +1,6 @@
1
1
  declare const _default: {
2
2
  GET_SERVICE_LIST: string;
3
+ UPLOAD_FILE: string;
3
4
  };
4
5
  export default _default;
5
6
  //# sourceMappingURL=service.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"service.d.ts","sourceRoot":"","sources":["../../../../src/pos_client_api/1.0.0/endpoints/service.ts"],"names":[],"mappings":";;;AAAA,wBAEC"}
1
+ {"version":3,"file":"service.d.ts","sourceRoot":"","sources":["../../../../src/pos_client_api/1.0.0/endpoints/service.ts"],"names":[],"mappings":";;;;AAAA,wBAGC"}
@@ -1,3 +1,4 @@
1
1
  export default {
2
2
  GET_SERVICE_LIST: '/v1/pos/service/site/list',
3
+ UPLOAD_FILE: '/v1/pos/service/form/upload',
3
4
  };
@@ -1,2 +1,5 @@
1
1
  export declare type GetServiceListRequest = {};
2
+ export declare type UploadFileRequest = {
3
+ file: File;
4
+ };
2
5
  //# sourceMappingURL=service.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"service.d.ts","sourceRoot":"","sources":["../../../../../src/pos_client_api/1.0.0/types/request/service.ts"],"names":[],"mappings":"AAAA,oBAAY,qBAAqB,GAAG,EAEnC,CAAA"}
1
+ {"version":3,"file":"service.d.ts","sourceRoot":"","sources":["../../../../../src/pos_client_api/1.0.0/types/request/service.ts"],"names":[],"mappings":"AAAA,oBAAY,qBAAqB,GAAG,EAEnC,CAAA;AAED,oBAAY,iBAAiB,GAAG;IAC5B,IAAI,EAAE,IAAI,CAAA;CACb,CAAA"}
@@ -14,4 +14,13 @@ export declare type GetServiceListResponse = Nullable<{
14
14
  web_booking_visible: string;
15
15
  group_id: number;
16
16
  }>;
17
+ export declare type UploadFileResponse = Nullable<{
18
+ name: string;
19
+ type: string;
20
+ size: number;
21
+ base_url: string;
22
+ path: string;
23
+ url: string;
24
+ delete_url: string;
25
+ }[]>;
17
26
  //# sourceMappingURL=service.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"service.d.ts","sourceRoot":"","sources":["../../../../../src/pos_client_api/1.0.0/types/response/service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,QAAQ,EAAC,MAAM,uBAAuB,CAAC;AAE/C,oBAAY,sBAAsB,GAAG,QAAQ,CAAC;IAC1C,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ,SAAS,EAAE,MAAM,CAAA;IACjB,MAAM,EAAE,MAAM,CAAA;IACd,QAAQ,EAAE,MAAM,CAAA;IAChB,WAAW,EAAE,MAAM,CAAA;IACnB,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,MAAM,CAAA;IACZ,WAAW,EAAE,GAAG,CAAA;IAChB,QAAQ,EAAE,MAAM,CAAA;IAChB,WAAW,EAAE,GAAG,CAAA;IAChB,mBAAmB,EAAE,MAAM,CAAA;IAC3B,QAAQ,EAAE,MAAM,CAAA;CACnB,CAAC,CAAA"}
1
+ {"version":3,"file":"service.d.ts","sourceRoot":"","sources":["../../../../../src/pos_client_api/1.0.0/types/response/service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,QAAQ,EAAC,MAAM,uBAAuB,CAAC;AAE/C,oBAAY,sBAAsB,GAAG,QAAQ,CAAC;IAC1C,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ,SAAS,EAAE,MAAM,CAAA;IACjB,MAAM,EAAE,MAAM,CAAA;IACd,QAAQ,EAAE,MAAM,CAAA;IAChB,WAAW,EAAE,MAAM,CAAA;IACnB,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,MAAM,CAAA;IACZ,WAAW,EAAE,GAAG,CAAA;IAChB,QAAQ,EAAE,MAAM,CAAA;IAChB,WAAW,EAAE,GAAG,CAAA;IAChB,mBAAmB,EAAE,MAAM,CAAA;IAC3B,QAAQ,EAAE,MAAM,CAAA;CACnB,CAAC,CAAA;AAEF,oBAAY,kBAAkB,GAAG,QAAQ,CAAC;IACtC,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,CAAA;IACZ,QAAQ,EAAE,MAAM,CAAA;IAChB,IAAI,EAAE,MAAM,CAAA;IACZ,GAAG,EAAE,MAAM,CAAA;IACX,UAAU,EAAE,MAAM,CAAA;CACrB,EAAE,CAAC,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gap-nodejs-sdk",
3
- "version": "1.0.66",
3
+ "version": "1.0.67",
4
4
  "description": "GCI App Platform Library",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",