@digipair/skill-http 0.91.0-0 → 0.91.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/index.cjs.d.ts ADDED
@@ -0,0 +1 @@
1
+ export * from "./src/index";
package/index.cjs.js ADDED
@@ -0,0 +1,154 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ function _extends() {
6
+ _extends = Object.assign || function assign(target) {
7
+ for(var i = 1; i < arguments.length; i++){
8
+ var source = arguments[i];
9
+ for(var key in source)if (Object.prototype.hasOwnProperty.call(source, key)) target[key] = source[key];
10
+ }
11
+ return target;
12
+ };
13
+ return _extends.apply(this, arguments);
14
+ }
15
+
16
+ let HttpService = class HttpService {
17
+ async call(url, method, data, headers, signal) {
18
+ const requestHeaders = _extends({
19
+ Accept: this.type === 'json' ? 'application/json' : '*/*'
20
+ }, data ? {
21
+ 'Content-Type': 'application/json'
22
+ } : {}, headers);
23
+ let result;
24
+ let body = undefined;
25
+ if (requestHeaders['Content-Type'] === 'application/json') {
26
+ body = JSON.stringify(data);
27
+ } else if (requestHeaders['Content-Type'] === 'application/x-www-form-urlencoded') {
28
+ const params = new URLSearchParams(data);
29
+ body = params.toString();
30
+ } else {
31
+ body = data;
32
+ }
33
+ const response = await fetch(url, {
34
+ signal,
35
+ method,
36
+ headers: requestHeaders,
37
+ body
38
+ });
39
+ if (!response.ok) throw new Error('[SKILL-HTTP] REQUEST FAILED: ' + response.status);
40
+ if (this.type === 'json') {
41
+ result = await response.json();
42
+ } else if (this.type === 'text') {
43
+ result = await response.text();
44
+ } else {
45
+ const arrayBuffer = await response.arrayBuffer();
46
+ const buffer = Buffer.from(arrayBuffer);
47
+ result = buffer.toString('base64');
48
+ }
49
+ return result;
50
+ }
51
+ async create(params, _pinsSettingsList, context) {
52
+ var _context_protected;
53
+ const { path, body = {}, headers = {} } = params;
54
+ return await this.call(path, 'POST', body, headers, (_context_protected = context.protected) == null ? void 0 : _context_protected.signal);
55
+ }
56
+ async read(params, _pinsSettingsList, context) {
57
+ var _context_protected;
58
+ const { path, headers = {} } = params;
59
+ return await this.call(path, 'GET', null, headers, (_context_protected = context.protected) == null ? void 0 : _context_protected.signal);
60
+ }
61
+ async update(params, _pinsSettingsList, context) {
62
+ var _context_protected;
63
+ const { path, body = {}, headers = {} } = params;
64
+ return await this.call(path, 'PUT', body, headers, (_context_protected = context.protected) == null ? void 0 : _context_protected.signal);
65
+ }
66
+ async partialUpdate(params, _pinsSettingsList, context) {
67
+ var _context_protected;
68
+ const { path, body = {}, headers = {} } = params;
69
+ return await this.call(path, 'PATCH', body, headers, (_context_protected = context.protected) == null ? void 0 : _context_protected.signal);
70
+ }
71
+ async remove(params, _pinsSettingsList, context) {
72
+ var _context_protected;
73
+ const { path, headers = {} } = params;
74
+ return await this.call(path, 'DELETE', null, headers, (_context_protected = context.protected) == null ? void 0 : _context_protected.signal);
75
+ }
76
+ async request(params, _pinsSettingsList, context) {
77
+ var _context_protected;
78
+ const { path, method = 'GET', body = null, headers = {} } = params;
79
+ return await this.call(path, method, body, headers, (_context_protected = context.protected) == null ? void 0 : _context_protected.signal);
80
+ }
81
+ async upload(params, _pinsSettingsList, context) {
82
+ var _context_protected;
83
+ const { path, parameters, method = 'POST', headers = {} } = params;
84
+ const formData = typeof window !== 'undefined' ? new FormData() : new (require('form-data'))();
85
+ let result;
86
+ // Ajout des paramètres au FormData
87
+ parameters.forEach((param)=>{
88
+ if (!Array.isArray(param.value)) {
89
+ this.appendParam(formData, param);
90
+ } else {
91
+ param.value.forEach((item)=>{
92
+ this.appendParam(formData, _extends({}, param, {
93
+ value: item
94
+ }));
95
+ });
96
+ }
97
+ });
98
+ const response = await fetch(path, {
99
+ signal: (_context_protected = context.protected) == null ? void 0 : _context_protected.signal,
100
+ method,
101
+ headers: _extends({}, formData.getHeaders(), {
102
+ Accept: this.type === 'json' ? 'application/json' : '*/*'
103
+ }, headers),
104
+ body: formData.getBuffer()
105
+ });
106
+ if (!response.ok) throw new Error('[SKILL-HTTP] REQUEST FAILED: ' + response.status);
107
+ if (this.type === 'json') {
108
+ result = await response.json();
109
+ } else if (this.type === 'text') {
110
+ result = await response.text();
111
+ } else {
112
+ const arrayBuffer = await response.arrayBuffer();
113
+ const buffer = Buffer.from(arrayBuffer);
114
+ result = buffer.toString('base64');
115
+ }
116
+ return result;
117
+ }
118
+ appendParam(formData, param) {
119
+ if (param.type == 'text') {
120
+ formData.append(param.name, param.value);
121
+ } else if (param.type === 'file') {
122
+ // Gestion des fichiers encodés en base64
123
+ const matches = param.value.match(/^data:(.+);base64,(.+)$/);
124
+ if (!matches || matches.length !== 3) {
125
+ throw new Error(`Bad base64 format for ${param.name}`);
126
+ }
127
+ const base64Data = matches[2];
128
+ const buffer = Buffer.from(base64Data, 'base64');
129
+ formData.append(param.name, buffer, {
130
+ filename: param.name + '.' + matches[1].split('/')[1],
131
+ contentType: matches[1]
132
+ });
133
+ }
134
+ }
135
+ constructor(_context, params){
136
+ const { type = 'json' } = params;
137
+ this.type = type;
138
+ }
139
+ };
140
+ const create = (params, pinsSettingsList, context)=>new HttpService(context, params).create(params, pinsSettingsList, context);
141
+ const read = (params, pinsSettingsList, context)=>new HttpService(context, params).read(params, pinsSettingsList, context);
142
+ const update = (params, pinsSettingsList, context)=>new HttpService(context, params).update(params, pinsSettingsList, context);
143
+ const partialUpdate = (params, pinsSettingsList, context)=>new HttpService(context, params).update(params, pinsSettingsList, context);
144
+ const remove = (params, pinsSettingsList, context)=>new HttpService(context, params).remove(params, pinsSettingsList, context);
145
+ const request = (params, pinsSettingsList, context)=>new HttpService(context, params).request(params, pinsSettingsList, context);
146
+ const upload = (params, pinsSettingsList, context)=>new HttpService(context, params).upload(params, pinsSettingsList, context);
147
+
148
+ exports.create = create;
149
+ exports.partialUpdate = partialUpdate;
150
+ exports.read = read;
151
+ exports.remove = remove;
152
+ exports.request = request;
153
+ exports.update = update;
154
+ exports.upload = upload;
package/index.esm.js ADDED
@@ -0,0 +1,144 @@
1
+ function _extends() {
2
+ _extends = Object.assign || function assign(target) {
3
+ for(var i = 1; i < arguments.length; i++){
4
+ var source = arguments[i];
5
+ for(var key in source)if (Object.prototype.hasOwnProperty.call(source, key)) target[key] = source[key];
6
+ }
7
+ return target;
8
+ };
9
+ return _extends.apply(this, arguments);
10
+ }
11
+
12
+ let HttpService = class HttpService {
13
+ async call(url, method, data, headers, signal) {
14
+ const requestHeaders = _extends({
15
+ Accept: this.type === 'json' ? 'application/json' : '*/*'
16
+ }, data ? {
17
+ 'Content-Type': 'application/json'
18
+ } : {}, headers);
19
+ let result;
20
+ let body = undefined;
21
+ if (requestHeaders['Content-Type'] === 'application/json') {
22
+ body = JSON.stringify(data);
23
+ } else if (requestHeaders['Content-Type'] === 'application/x-www-form-urlencoded') {
24
+ const params = new URLSearchParams(data);
25
+ body = params.toString();
26
+ } else {
27
+ body = data;
28
+ }
29
+ const response = await fetch(url, {
30
+ signal,
31
+ method,
32
+ headers: requestHeaders,
33
+ body
34
+ });
35
+ if (!response.ok) throw new Error('[SKILL-HTTP] REQUEST FAILED: ' + response.status);
36
+ if (this.type === 'json') {
37
+ result = await response.json();
38
+ } else if (this.type === 'text') {
39
+ result = await response.text();
40
+ } else {
41
+ const arrayBuffer = await response.arrayBuffer();
42
+ const buffer = Buffer.from(arrayBuffer);
43
+ result = buffer.toString('base64');
44
+ }
45
+ return result;
46
+ }
47
+ async create(params, _pinsSettingsList, context) {
48
+ var _context_protected;
49
+ const { path, body = {}, headers = {} } = params;
50
+ return await this.call(path, 'POST', body, headers, (_context_protected = context.protected) == null ? void 0 : _context_protected.signal);
51
+ }
52
+ async read(params, _pinsSettingsList, context) {
53
+ var _context_protected;
54
+ const { path, headers = {} } = params;
55
+ return await this.call(path, 'GET', null, headers, (_context_protected = context.protected) == null ? void 0 : _context_protected.signal);
56
+ }
57
+ async update(params, _pinsSettingsList, context) {
58
+ var _context_protected;
59
+ const { path, body = {}, headers = {} } = params;
60
+ return await this.call(path, 'PUT', body, headers, (_context_protected = context.protected) == null ? void 0 : _context_protected.signal);
61
+ }
62
+ async partialUpdate(params, _pinsSettingsList, context) {
63
+ var _context_protected;
64
+ const { path, body = {}, headers = {} } = params;
65
+ return await this.call(path, 'PATCH', body, headers, (_context_protected = context.protected) == null ? void 0 : _context_protected.signal);
66
+ }
67
+ async remove(params, _pinsSettingsList, context) {
68
+ var _context_protected;
69
+ const { path, headers = {} } = params;
70
+ return await this.call(path, 'DELETE', null, headers, (_context_protected = context.protected) == null ? void 0 : _context_protected.signal);
71
+ }
72
+ async request(params, _pinsSettingsList, context) {
73
+ var _context_protected;
74
+ const { path, method = 'GET', body = null, headers = {} } = params;
75
+ return await this.call(path, method, body, headers, (_context_protected = context.protected) == null ? void 0 : _context_protected.signal);
76
+ }
77
+ async upload(params, _pinsSettingsList, context) {
78
+ var _context_protected;
79
+ const { path, parameters, method = 'POST', headers = {} } = params;
80
+ const formData = typeof window !== 'undefined' ? new FormData() : new (require('form-data'))();
81
+ let result;
82
+ // Ajout des paramètres au FormData
83
+ parameters.forEach((param)=>{
84
+ if (!Array.isArray(param.value)) {
85
+ this.appendParam(formData, param);
86
+ } else {
87
+ param.value.forEach((item)=>{
88
+ this.appendParam(formData, _extends({}, param, {
89
+ value: item
90
+ }));
91
+ });
92
+ }
93
+ });
94
+ const response = await fetch(path, {
95
+ signal: (_context_protected = context.protected) == null ? void 0 : _context_protected.signal,
96
+ method,
97
+ headers: _extends({}, formData.getHeaders(), {
98
+ Accept: this.type === 'json' ? 'application/json' : '*/*'
99
+ }, headers),
100
+ body: formData.getBuffer()
101
+ });
102
+ if (!response.ok) throw new Error('[SKILL-HTTP] REQUEST FAILED: ' + response.status);
103
+ if (this.type === 'json') {
104
+ result = await response.json();
105
+ } else if (this.type === 'text') {
106
+ result = await response.text();
107
+ } else {
108
+ const arrayBuffer = await response.arrayBuffer();
109
+ const buffer = Buffer.from(arrayBuffer);
110
+ result = buffer.toString('base64');
111
+ }
112
+ return result;
113
+ }
114
+ appendParam(formData, param) {
115
+ if (param.type == 'text') {
116
+ formData.append(param.name, param.value);
117
+ } else if (param.type === 'file') {
118
+ // Gestion des fichiers encodés en base64
119
+ const matches = param.value.match(/^data:(.+);base64,(.+)$/);
120
+ if (!matches || matches.length !== 3) {
121
+ throw new Error(`Bad base64 format for ${param.name}`);
122
+ }
123
+ const base64Data = matches[2];
124
+ const buffer = Buffer.from(base64Data, 'base64');
125
+ formData.append(param.name, buffer, {
126
+ filename: param.name + '.' + matches[1].split('/')[1],
127
+ contentType: matches[1]
128
+ });
129
+ }
130
+ }
131
+ constructor(_context, params){
132
+ const { type = 'json' } = params;
133
+ this.type = type;
134
+ }
135
+ };
136
+ const create = (params, pinsSettingsList, context)=>new HttpService(context, params).create(params, pinsSettingsList, context);
137
+ const read = (params, pinsSettingsList, context)=>new HttpService(context, params).read(params, pinsSettingsList, context);
138
+ const update = (params, pinsSettingsList, context)=>new HttpService(context, params).update(params, pinsSettingsList, context);
139
+ const partialUpdate = (params, pinsSettingsList, context)=>new HttpService(context, params).update(params, pinsSettingsList, context);
140
+ const remove = (params, pinsSettingsList, context)=>new HttpService(context, params).remove(params, pinsSettingsList, context);
141
+ const request = (params, pinsSettingsList, context)=>new HttpService(context, params).request(params, pinsSettingsList, context);
142
+ const upload = (params, pinsSettingsList, context)=>new HttpService(context, params).upload(params, pinsSettingsList, context);
143
+
144
+ export { create, partialUpdate, read, remove, request, update, upload };
@@ -0,0 +1,8 @@
1
+ import { PinsSettings } from '@digipair/engine';
2
+ export declare const create: (params: any, pinsSettingsList: PinsSettings[], context: any) => Promise<any>;
3
+ export declare const read: (params: any, pinsSettingsList: PinsSettings[], context: any) => Promise<any>;
4
+ export declare const update: (params: any, pinsSettingsList: PinsSettings[], context: any) => Promise<any>;
5
+ export declare const partialUpdate: (params: any, pinsSettingsList: PinsSettings[], context: any) => Promise<any>;
6
+ export declare const remove: (params: any, pinsSettingsList: PinsSettings[], context: any) => Promise<any>;
7
+ export declare const request: (params: any, pinsSettingsList: PinsSettings[], context: any) => Promise<any>;
8
+ export declare const upload: (params: any, pinsSettingsList: PinsSettings[], context: any) => Promise<any>;
package/package.json CHANGED
@@ -1,28 +1,15 @@
1
1
  {
2
2
  "name": "@digipair/skill-http",
3
- "version": "0.91.0-0",
4
- "type": "module",
5
- "main": "dist/libs/skill-http/index.cjs.js",
6
- "module": "dist/libs/skill-http/index.esm.js",
7
- "types": "dist/libs/skill-http/index.esm.d.ts",
8
- "exports": {
9
- "./package.json": "./libs/skill-http/package.json",
10
- ".": {
11
- "development": "./dist/libs/skill-http/src/index.ts",
12
- "types": "./dist/libs/skill-http/index.esm.d.ts",
13
- "import": "./dist/libs/skill-http/index.esm.js",
14
- "default": "./dist/libs/skill-http/index.cjs.js"
15
- }
16
- },
3
+ "version": "0.91.0",
17
4
  "keywords": [
18
5
  "digipair",
19
6
  "web",
20
- "service"
7
+ "service",
8
+ "tool"
21
9
  ],
22
- "nx": {
23
- "name": "skill-http"
24
- },
25
10
  "dependencies": {
26
- "@digipair/engine": "0.91.0-0"
27
- }
28
- }
11
+ "form-data": "4.0.1"
12
+ },
13
+ "main": "./index.cjs.js",
14
+ "module": "./index.esm.js"
15
+ }
package/.swcrc DELETED
@@ -1,28 +0,0 @@
1
- {
2
- "jsc": {
3
- "target": "es2017",
4
- "parser": {
5
- "syntax": "typescript",
6
- "decorators": true,
7
- "dynamicImport": true
8
- },
9
- "transform": {
10
- "decoratorMetadata": true,
11
- "legacyDecorator": true
12
- },
13
- "keepClassNames": true,
14
- "externalHelpers": true,
15
- "loose": true
16
- },
17
- "module": {
18
- "type": "es6"
19
- },
20
- "sourceMaps": true,
21
- "exclude": [
22
- "jest.config.ts",
23
- ".*\\.spec.tsx?$",
24
- ".*\\.test.tsx?$",
25
- "./src/jest-setup.ts$",
26
- "./**/jest-setup.ts$"
27
- ]
28
- }
package/README.md DELETED
@@ -1,7 +0,0 @@
1
- # mylib
2
-
3
- This library was generated with [Nx](https://nx.dev).
4
-
5
- ## Building
6
-
7
- Run `nx build mylib` to build the library.
package/eslint.config.mjs DELETED
@@ -1,22 +0,0 @@
1
- import baseConfig from '../../eslint.config.mjs';
2
-
3
- export default [
4
- ...baseConfig,
5
- {
6
- files: ['**/*.json'],
7
- rules: {
8
- '@nx/dependency-checks': [
9
- 'error',
10
- {
11
- ignoredFiles: [
12
- '{projectRoot}/eslint.config.{js,cjs,mjs}',
13
- '{projectRoot}/rollup.config.{js,ts,mjs,mts,cjs,cts}',
14
- ],
15
- },
16
- ],
17
- },
18
- languageOptions: {
19
- parser: await import('jsonc-eslint-parser'),
20
- },
21
- },
22
- ];
package/rollup.config.cjs DELETED
@@ -1,28 +0,0 @@
1
- const { withNx } = require('@nx/rollup/with-nx');
2
-
3
- module.exports = withNx(
4
- {
5
- main: 'libs/skill-http/src/index.ts',
6
- outputPath: 'dist/libs/skill-http',
7
- tsConfig: 'libs/skill-http/tsconfig.lib.json',
8
- compiler: 'swc',
9
- format: ['esm', "cjs"],
10
- assets: [
11
- {
12
- input: 'libs/skill-http/',
13
- glob: 'package.json',
14
- output: '.'
15
- },
16
- {
17
- input: 'libs/skill-http/src/',
18
- glob: '*.json',
19
- output: '.'
20
- }
21
- ]
22
- },
23
- {
24
- // Provide additional rollup configuration here. See: https://rollupjs.org/configuration-options
25
- // e.g.
26
- // output: { sourcemap: true },
27
- }
28
- );
@@ -1 +0,0 @@
1
- declare module 'form-data';
@@ -1,7 +0,0 @@
1
- import { skillHttp } from './skill-http';
2
-
3
- describe('skillHttp', () => {
4
- it('should work', () => {
5
- expect(skillHttp()).toEqual('skill-http');
6
- });
7
- });
@@ -1,172 +0,0 @@
1
- /* eslint-disable @typescript-eslint/no-explicit-any */
2
- /* eslint-disable @typescript-eslint/no-unused-vars */
3
- import { PinsSettings } from '@digipair/engine';
4
-
5
- class HttpService {
6
- private type: string;
7
-
8
- constructor(_context: any, params: any) {
9
- const { type = 'json' } = params;
10
-
11
- this.type = type;
12
- }
13
-
14
- async call(
15
- url: string,
16
- method: string,
17
- data: any,
18
- headers: any,
19
- signal: AbortSignal,
20
- ): Promise<any> {
21
- const requestHeaders = {
22
- Accept: this.type === 'json' ? 'application/json' : '*/*',
23
- ...(data ? { 'Content-Type': 'application/json' } : {}),
24
- ...headers,
25
- };
26
-
27
- let result: any;
28
- let body = undefined;
29
-
30
- if (requestHeaders['Content-Type'] === 'application/json') {
31
- body = JSON.stringify(data);
32
- } else if (requestHeaders['Content-Type'] === 'application/x-www-form-urlencoded') {
33
- const params = new URLSearchParams(data);
34
- body = params.toString();
35
- } else {
36
- body = data;
37
- }
38
-
39
- const response = await fetch(url, {
40
- signal,
41
- method,
42
- headers: requestHeaders,
43
- body,
44
- });
45
- if (!response.ok) throw new Error('[SKILL-HTTP] REQUEST FAILED: ' + response.status);
46
-
47
- if (this.type === 'json') {
48
- result = await response.json();
49
- } else if (this.type === 'text') {
50
- result = await response.text();
51
- } else {
52
- const arrayBuffer = await response.arrayBuffer();
53
- const buffer = Buffer.from(arrayBuffer);
54
- result = buffer.toString('base64');
55
- }
56
-
57
- return result;
58
- }
59
-
60
- async create(params: any, _pinsSettingsList: PinsSettings[], context: any): Promise<any> {
61
- const { path, body = {}, headers = {} } = params;
62
- return await this.call(path, 'POST', body, headers, context.protected?.signal);
63
- }
64
-
65
- async read(params: any, _pinsSettingsList: PinsSettings[], context: any): Promise<any> {
66
- const { path, headers = {} } = params;
67
- return await this.call(path, 'GET', null, headers, context.protected?.signal);
68
- }
69
-
70
- async update(params: any, _pinsSettingsList: PinsSettings[], context: any): Promise<any> {
71
- const { path, body = {}, headers = {} } = params;
72
- return await this.call(path, 'PUT', body, headers, context.protected?.signal);
73
- }
74
-
75
- async partialUpdate(params: any, _pinsSettingsList: PinsSettings[], context: any): Promise<any> {
76
- const { path, body = {}, headers = {} } = params;
77
- return await this.call(path, 'PATCH', body, headers, context.protected?.signal);
78
- }
79
-
80
- async remove(params: any, _pinsSettingsList: PinsSettings[], context: any): Promise<any> {
81
- const { path, headers = {} } = params;
82
- return await this.call(path, 'DELETE', null, headers, context.protected?.signal);
83
- }
84
-
85
- async request(params: any, _pinsSettingsList: PinsSettings[], context: any): Promise<any> {
86
- const { path, method = 'GET', body = null, headers = {} } = params;
87
- return await this.call(path, method, body, headers, context.protected?.signal);
88
- }
89
-
90
- async upload(params: any, _pinsSettingsList: PinsSettings[], context: any): Promise<any> {
91
- const { path, parameters, method = 'POST', headers = {} } = params;
92
- const formData = typeof window !== 'undefined' ? new FormData() : new (require('form-data'))();
93
-
94
- let result: any;
95
-
96
- // Ajout des paramètres au FormData
97
- parameters.forEach((param: any) => {
98
- if (!Array.isArray(param.value)) {
99
- this.appendParam(formData, param);
100
- } else {
101
- param.value.forEach((item: any) => {
102
- this.appendParam(formData, { ...param, value: item });
103
- });
104
- }
105
- });
106
-
107
- const response = await fetch(path, {
108
- signal: context.protected?.signal,
109
- method,
110
- headers: {
111
- ...formData.getHeaders(),
112
- Accept: this.type === 'json' ? 'application/json' : '*/*',
113
- ...headers,
114
- },
115
- body: formData.getBuffer(),
116
- });
117
- if (!response.ok) throw new Error('[SKILL-HTTP] REQUEST FAILED: ' + response.status);
118
-
119
- if (this.type === 'json') {
120
- result = await response.json();
121
- } else if (this.type === 'text') {
122
- result = await response.text();
123
- } else {
124
- const arrayBuffer = await response.arrayBuffer();
125
- const buffer = Buffer.from(arrayBuffer);
126
- result = buffer.toString('base64');
127
- }
128
-
129
- return result;
130
- }
131
-
132
- private appendParam(formData: any, param: any) {
133
- if (param.type == 'text') {
134
- formData.append(param.name, param.value);
135
- } else if (param.type === 'file') {
136
- // Gestion des fichiers encodés en base64
137
- const matches = param.value.match(/^data:(.+);base64,(.+)$/);
138
-
139
- if (!matches || matches.length !== 3) {
140
- throw new Error(`Bad base64 format for ${param.name}`);
141
- }
142
-
143
- const base64Data = matches[2];
144
- const buffer = Buffer.from(base64Data, 'base64');
145
- formData.append(param.name, buffer, {
146
- filename: param.name + '.' + matches[1].split('/')[1],
147
- contentType: matches[1],
148
- });
149
- }
150
- }
151
- }
152
-
153
- export const create = (params: any, pinsSettingsList: PinsSettings[], context: any) =>
154
- new HttpService(context, params).create(params, pinsSettingsList, context);
155
-
156
- export const read = (params: any, pinsSettingsList: PinsSettings[], context: any) =>
157
- new HttpService(context, params).read(params, pinsSettingsList, context);
158
-
159
- export const update = (params: any, pinsSettingsList: PinsSettings[], context: any) =>
160
- new HttpService(context, params).update(params, pinsSettingsList, context);
161
-
162
- export const partialUpdate = (params: any, pinsSettingsList: PinsSettings[], context: any) =>
163
- new HttpService(context, params).update(params, pinsSettingsList, context);
164
-
165
- export const remove = (params: any, pinsSettingsList: PinsSettings[], context: any) =>
166
- new HttpService(context, params).remove(params, pinsSettingsList, context);
167
-
168
- export const request = (params: any, pinsSettingsList: PinsSettings[], context: any) =>
169
- new HttpService(context, params).request(params, pinsSettingsList, context);
170
-
171
- export const upload = (params: any, pinsSettingsList: PinsSettings[], context: any) =>
172
- new HttpService(context, params).upload(params, pinsSettingsList, context);
package/tsconfig.json DELETED
@@ -1,13 +0,0 @@
1
- {
2
- "extends": "../../tsconfig.base.json",
3
- "files": [],
4
- "include": [],
5
- "references": [
6
- {
7
- "path": "../engine"
8
- },
9
- {
10
- "path": "./tsconfig.lib.json"
11
- }
12
- ]
13
- }
package/tsconfig.lib.json DELETED
@@ -1,19 +0,0 @@
1
- {
2
- "extends": "../../tsconfig.base.json",
3
- "compilerOptions": {
4
- "rootDir": "src",
5
- "outDir": "dist",
6
- "tsBuildInfoFile": "dist/tsconfig.lib.tsbuildinfo",
7
- "emitDeclarationOnly": true,
8
- "module": "esnext",
9
- "moduleResolution": "node",
10
- "forceConsistentCasingInFileNames": true,
11
- "types": ["node"]
12
- },
13
- "include": ["src/**/*.ts"],
14
- "references": [
15
- {
16
- "path": "../engine/tsconfig.lib.json"
17
- }
18
- ]
19
- }
File without changes
File without changes
File without changes