@silexpert/core 0.4.31 → 0.4.32

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.
@@ -1,7 +1,7 @@
1
- import { ISocietyPromoCode, CreateSocietyPromoCode } from '../../types';
1
+ import { ISocietyPromoCode, CreateSocietyPromoCode, IPromoCode } from '../../types';
2
2
  import { Resource } from '../Resource';
3
3
  export declare class SocietyPromoCode extends Resource {
4
- get(id: number): Promise<ISocietyPromoCode>;
4
+ get(id: number): Promise<IPromoCode>;
5
5
  create(payload: CreateSocietyPromoCode): Promise<ISocietyPromoCode>;
6
6
  delete(id: number): Promise<void>;
7
7
  }
@@ -1 +1 @@
1
- {"version":3,"file":"SocietyPromoCode.d.ts","sourceRoot":"","sources":["../../../ts/api/resources/SocietyPromoCode.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAC;AACxE,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAEvC,qBAAa,gBAAiB,SAAQ,QAAQ;IAC5C,GAAG,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,iBAAiB,CAAC;IAI3C,MAAM,CAAC,OAAO,EAAE,sBAAsB,GAAG,OAAO,CAAC,iBAAiB,CAAC;IAInE,MAAM,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CAGlC"}
1
+ {"version":3,"file":"SocietyPromoCode.d.ts","sourceRoot":"","sources":["../../../ts/api/resources/SocietyPromoCode.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,sBAAsB,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACpF,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAEvC,qBAAa,gBAAiB,SAAQ,QAAQ;IAC5C,GAAG,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,CAAC;IAIpC,MAAM,CAAC,OAAO,EAAE,sBAAsB,GAAG,OAAO,CAAC,iBAAiB,CAAC;IAInE,MAAM,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CAGlC"}
@@ -1 +1 @@
1
- {"version":3,"file":"SocietyPromoCode.js","sourceRoot":"","sources":["../../../ts/api/resources/SocietyPromoCode.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAEvC,MAAM,OAAO,gBAAiB,SAAQ,QAAQ;IAC5C,GAAG,CAAC,EAAU;QACZ,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,YAAY,EAAE,YAAY,CAAC,CAAC;IACrD,CAAC;IAED,MAAM,CAAC,OAA+B;QACpC,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,oBAAoB,EAAE,OAAO,CAAC,CAAC;IACzD,CAAC;IAED,MAAM,CAAC,EAAU;QACf,OAAO,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,YAAY,EAAE,YAAY,CAAC,CAAC;IACxD,CAAC;CACF","sourcesContent":["import { ISocietyPromoCode, CreateSocietyPromoCode } from '../../types';\nimport { Resource } from '../Resource';\n\nexport class SocietyPromoCode extends Resource {\n get(id: number): Promise<ISocietyPromoCode> {\n return this.axios.$get(`/society/${id}/promoCode`);\n }\n\n create(payload: CreateSocietyPromoCode): Promise<ISocietyPromoCode> {\n return this.axios.$post('/society/promoCode', payload);\n }\n\n delete(id: number): Promise<void> {\n return this.axios.$delete(`/society/${id}/promoCode`);\n }\n}"]}
1
+ {"version":3,"file":"SocietyPromoCode.js","sourceRoot":"","sources":["../../../ts/api/resources/SocietyPromoCode.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAEvC,MAAM,OAAO,gBAAiB,SAAQ,QAAQ;IAC5C,GAAG,CAAC,EAAU;QACZ,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,YAAY,EAAE,YAAY,CAAC,CAAC;IACrD,CAAC;IAED,MAAM,CAAC,OAA+B;QACpC,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,oBAAoB,EAAE,OAAO,CAAC,CAAC;IACzD,CAAC;IAED,MAAM,CAAC,EAAU;QACf,OAAO,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,YAAY,EAAE,YAAY,CAAC,CAAC;IACxD,CAAC;CACF","sourcesContent":["import { ISocietyPromoCode, CreateSocietyPromoCode, IPromoCode } from '../../types';\nimport { Resource } from '../Resource';\n\nexport class SocietyPromoCode extends Resource {\n get(id: number): Promise<IPromoCode> {\n return this.axios.$get(`/society/${id}/promoCode`);\n }\n\n create(payload: CreateSocietyPromoCode): Promise<ISocietyPromoCode> {\n return this.axios.$post('/society/promoCode', payload);\n }\n\n delete(id: number): Promise<void> {\n return this.axios.$delete(`/society/${id}/promoCode`);\n }\n}"]}
@@ -2,10 +2,10 @@ import { Resource } from '../Resource';
2
2
  import { StockEntries, TFile } from '../../types';
3
3
  export declare class Stocks extends Resource {
4
4
  createStocks(idSociety: number, payload: StockEntries): Promise<any>;
5
- createFile(idSociety: number, file: TFile): Promise<any>;
6
- getStocks(idSociety: number, idExercice: number): Promise<any>;
7
- getFiles(idSociety: number): Promise<any>;
8
- downloadFile(idSociety: number, token: string): Promise<any>;
9
- deleteFile(idSociety: number, idFile: number): Promise<any>;
5
+ createFile(file: TFile): Promise<any>;
6
+ getStocks(idExercice: number): Promise<any>;
7
+ getFiles(): Promise<any>;
8
+ downloadFile(token: string): Promise<any>;
9
+ deleteFile(idFile: number): Promise<any>;
10
10
  }
11
11
  //# sourceMappingURL=Stocks.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Stocks.d.ts","sourceRoot":"","sources":["../../../ts/api/resources/Stocks.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAElD,qBAAa,MAAO,SAAQ,QAAQ;IAClC,YAAY,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,GAAG,CAAC;IAIpE,UAAU,CAAC,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,GAAG,OAAO,CAAC,GAAG,CAAC;IAIxD,SAAS,CAAC,SAAS,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC;IAI9D,QAAQ,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC;IAIzC,YAAY,CAAC,SAAS,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC;IAI5D,UAAU,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC;CAG5D"}
1
+ {"version":3,"file":"Stocks.d.ts","sourceRoot":"","sources":["../../../ts/api/resources/Stocks.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAElD,qBAAa,MAAO,SAAQ,QAAQ;IAClC,YAAY,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,GAAG,CAAC;IAIpE,UAAU,CAAC,IAAI,EAAE,KAAK,GAAG,OAAO,CAAC,GAAG,CAAC;IAIrC,SAAS,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC;IAI3C,QAAQ,IAAI,OAAO,CAAC,GAAG,CAAC;IAIxB,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC;IAIzC,UAAU,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC;CAGzC"}
@@ -3,20 +3,20 @@ export class Stocks extends Resource {
3
3
  createStocks(idSociety, payload) {
4
4
  return this.axios.$post(`/stocks/${idSociety}/entries`, payload);
5
5
  }
6
- createFile(idSociety, file) {
7
- return this.axios.$post(`/stocks/${idSociety}/files`, file, { headers: { 'Content-Type': 'multipart/form-data' } });
6
+ createFile(file) {
7
+ return this.axios.$post('/stocks/files', file, { headers: { 'Content-Type': 'multipart/form-data' } });
8
8
  }
9
- getStocks(idSociety, idExercice) {
10
- return this.axios.$get(`/stocks/${idSociety}/entries/${idExercice}`);
9
+ getStocks(idExercice) {
10
+ return this.axios.$get(`/stocks/entries/${idExercice}`);
11
11
  }
12
- getFiles(idSociety) {
13
- return this.axios.$get(`/stocks/${idSociety}/files`);
12
+ getFiles() {
13
+ return this.axios.$get('/stocks/files');
14
14
  }
15
- downloadFile(idSociety, token) {
16
- return this.axios.$get(`/stocks/${idSociety}/files/${token}`, { responseType: 'blob' });
15
+ downloadFile(token) {
16
+ return this.axios.$get(`/stocks/files/${token}`, { responseType: 'blob' });
17
17
  }
18
- deleteFile(idSociety, idFile) {
19
- return this.axios.$delete(`/stocks/${idSociety}/files/${idFile}`);
18
+ deleteFile(idFile) {
19
+ return this.axios.$delete(`/stocks/files/${idFile}`);
20
20
  }
21
21
  }
22
22
  //# sourceMappingURL=Stocks.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Stocks.js","sourceRoot":"","sources":["../../../ts/api/resources/Stocks.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAGvC,MAAM,OAAO,MAAO,SAAQ,QAAQ;IAClC,YAAY,CAAC,SAAiB,EAAE,OAAqB;QACnD,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,WAAW,SAAS,UAAU,EAAE,OAAO,CAAC,CAAC;IACnE,CAAC;IAED,UAAU,CAAC,SAAiB,EAAE,IAAW;QACvC,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,WAAW,SAAS,QAAQ,EAAE,IAAI,EAAE,EAAE,OAAO,EAAE,EAAE,cAAc,EAAE,qBAAqB,EAAE,EAAE,CAAC,CAAC;IACtH,CAAC;IAED,SAAS,CAAC,SAAiB,EAAE,UAAkB;QAC7C,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,WAAW,SAAS,YAAY,UAAU,EAAE,CAAC,CAAC;IACvE,CAAC;IAED,QAAQ,CAAC,SAAiB;QACxB,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,WAAW,SAAS,QAAQ,CAAC,CAAC;IACvD,CAAC;IAED,YAAY,CAAC,SAAiB,EAAE,KAAa;QAC3C,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,WAAW,SAAS,UAAU,KAAK,EAAE,EAAE,EAAE,YAAY,EAAE,MAAM,EAAE,CAAC,CAAC;IAC1F,CAAC;IAED,UAAU,CAAC,SAAiB,EAAE,MAAc;QAC1C,OAAO,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,WAAW,SAAS,UAAU,MAAM,EAAE,CAAC,CAAC;IACpE,CAAC;CACF","sourcesContent":["import { Resource } from '../Resource';\nimport { StockEntries, TFile } from '../../types';\n\nexport class Stocks extends Resource {\n createStocks(idSociety: number, payload: StockEntries): Promise<any> {\n return this.axios.$post(`/stocks/${idSociety}/entries`, payload);\n }\n\n createFile(idSociety: number, file: TFile): Promise<any> {\n return this.axios.$post(`/stocks/${idSociety}/files`, file, { headers: { 'Content-Type': 'multipart/form-data' } });\n }\n\n getStocks(idSociety: number, idExercice: number): Promise<any> {\n return this.axios.$get(`/stocks/${idSociety}/entries/${idExercice}`);\n }\n\n getFiles(idSociety: number): Promise<any> {\n return this.axios.$get(`/stocks/${idSociety}/files`);\n }\n\n downloadFile(idSociety: number, token: string): Promise<any> {\n return this.axios.$get(`/stocks/${idSociety}/files/${token}`, { responseType: 'blob' });\n }\n\n deleteFile(idSociety: number, idFile: number): Promise<any> {\n return this.axios.$delete(`/stocks/${idSociety}/files/${idFile}`);\n }\n}"]}
1
+ {"version":3,"file":"Stocks.js","sourceRoot":"","sources":["../../../ts/api/resources/Stocks.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAGvC,MAAM,OAAO,MAAO,SAAQ,QAAQ;IAClC,YAAY,CAAC,SAAiB,EAAE,OAAqB;QACnD,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,WAAW,SAAS,UAAU,EAAE,OAAO,CAAC,CAAC;IACnE,CAAC;IAED,UAAU,CAAC,IAAW;QACpB,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,eAAe,EAAE,IAAI,EAAE,EAAE,OAAO,EAAE,EAAE,cAAc,EAAE,qBAAqB,EAAE,EAAE,CAAC,CAAC;IACzG,CAAC;IAED,SAAS,CAAC,UAAkB;QAC1B,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,mBAAmB,UAAU,EAAE,CAAC,CAAC;IAC1D,CAAC;IAED,QAAQ;QACN,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;IAC1C,CAAC;IAED,YAAY,CAAC,KAAa;QACxB,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,iBAAiB,KAAK,EAAE,EAAE,EAAE,YAAY,EAAE,MAAM,EAAE,CAAC,CAAC;IAC7E,CAAC;IAED,UAAU,CAAC,MAAc;QACvB,OAAO,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,iBAAiB,MAAM,EAAE,CAAC,CAAC;IACvD,CAAC;CACF","sourcesContent":["import { Resource } from '../Resource';\nimport { StockEntries, TFile } from '../../types';\n\nexport class Stocks extends Resource {\n createStocks(idSociety: number, payload: StockEntries): Promise<any> {\n return this.axios.$post(`/stocks/${idSociety}/entries`, payload);\n }\n\n createFile(file: TFile): Promise<any> {\n return this.axios.$post('/stocks/files', file, { headers: { 'Content-Type': 'multipart/form-data' } });\n }\n\n getStocks(idExercice: number): Promise<any> {\n return this.axios.$get(`/stocks/entries/${idExercice}`);\n }\n\n getFiles(): Promise<any> {\n return this.axios.$get('/stocks/files');\n }\n\n downloadFile(token: string): Promise<any> {\n return this.axios.$get(`/stocks/files/${token}`, { responseType: 'blob' });\n }\n\n deleteFile(idFile: number): Promise<any> {\n return this.axios.$delete(`/stocks/files/${idFile}`);\n }\n}"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../ts/api/resources/SocietyPromoCode.ts"],"names":[],"mappings":";;;;;;;AACA;;AAEM,MAAO,gBAAP,SAAgC,kBAAhC,CAAwC;AAC5C,EAAA,GAAG,CAAC,EAAD,EAAW;AACZ,WAAO,KAAK,KAAL,CAAW,IAAX,CAAgB,YAAY,EAAE,YAA9B,CAAP;AACD;;AAED,EAAA,MAAM,CAAC,OAAD,EAAgC;AACpC,WAAO,KAAK,KAAL,CAAW,KAAX,CAAiB,oBAAjB,EAAuC,OAAvC,CAAP;AACD;;AAED,EAAA,MAAM,CAAC,EAAD,EAAW;AACf,WAAO,KAAK,KAAL,CAAW,OAAX,CAAmB,YAAY,EAAE,YAAjC,CAAP;AACD;;AAX2C;;QAAjC,gB,GAAA,gB","sourcesContent":["import { ISocietyPromoCode, CreateSocietyPromoCode } from '../../types';\nimport { Resource } from '../Resource';\n\nexport class SocietyPromoCode extends Resource {\n get(id: number): Promise<ISocietyPromoCode> {\n return this.axios.$get(`/society/${id}/promoCode`);\n }\n\n create(payload: CreateSocietyPromoCode): Promise<ISocietyPromoCode> {\n return this.axios.$post('/society/promoCode', payload);\n }\n\n delete(id: number): Promise<void> {\n return this.axios.$delete(`/society/${id}/promoCode`);\n }\n}"],"sourceRoot":"","file":"SocietyPromoCode.js"}
1
+ {"version":3,"sources":["../../../ts/api/resources/SocietyPromoCode.ts"],"names":[],"mappings":";;;;;;;AACA;;AAEM,MAAO,gBAAP,SAAgC,kBAAhC,CAAwC;AAC5C,EAAA,GAAG,CAAC,EAAD,EAAW;AACZ,WAAO,KAAK,KAAL,CAAW,IAAX,CAAgB,YAAY,EAAE,YAA9B,CAAP;AACD;;AAED,EAAA,MAAM,CAAC,OAAD,EAAgC;AACpC,WAAO,KAAK,KAAL,CAAW,KAAX,CAAiB,oBAAjB,EAAuC,OAAvC,CAAP;AACD;;AAED,EAAA,MAAM,CAAC,EAAD,EAAW;AACf,WAAO,KAAK,KAAL,CAAW,OAAX,CAAmB,YAAY,EAAE,YAAjC,CAAP;AACD;;AAX2C;;QAAjC,gB,GAAA,gB","sourcesContent":["import { ISocietyPromoCode, CreateSocietyPromoCode, IPromoCode } from '../../types';\nimport { Resource } from '../Resource';\n\nexport class SocietyPromoCode extends Resource {\n get(id: number): Promise<IPromoCode> {\n return this.axios.$get(`/society/${id}/promoCode`);\n }\n\n create(payload: CreateSocietyPromoCode): Promise<ISocietyPromoCode> {\n return this.axios.$post('/society/promoCode', payload);\n }\n\n delete(id: number): Promise<void> {\n return this.axios.$delete(`/society/${id}/promoCode`);\n }\n}"],"sourceRoot":"","file":"SocietyPromoCode.js"}
@@ -12,30 +12,30 @@ class Stocks extends _Resource.Resource {
12
12
  return this.axios.$post(`/stocks/${idSociety}/entries`, payload);
13
13
  }
14
14
 
15
- createFile(idSociety, file) {
16
- return this.axios.$post(`/stocks/${idSociety}/files`, file, {
15
+ createFile(file) {
16
+ return this.axios.$post('/stocks/files', file, {
17
17
  headers: {
18
18
  'Content-Type': 'multipart/form-data'
19
19
  }
20
20
  });
21
21
  }
22
22
 
23
- getStocks(idSociety, idExercice) {
24
- return this.axios.$get(`/stocks/${idSociety}/entries/${idExercice}`);
23
+ getStocks(idExercice) {
24
+ return this.axios.$get(`/stocks/entries/${idExercice}`);
25
25
  }
26
26
 
27
- getFiles(idSociety) {
28
- return this.axios.$get(`/stocks/${idSociety}/files`);
27
+ getFiles() {
28
+ return this.axios.$get('/stocks/files');
29
29
  }
30
30
 
31
- downloadFile(idSociety, token) {
32
- return this.axios.$get(`/stocks/${idSociety}/files/${token}`, {
31
+ downloadFile(token) {
32
+ return this.axios.$get(`/stocks/files/${token}`, {
33
33
  responseType: 'blob'
34
34
  });
35
35
  }
36
36
 
37
- deleteFile(idSociety, idFile) {
38
- return this.axios.$delete(`/stocks/${idSociety}/files/${idFile}`);
37
+ deleteFile(idFile) {
38
+ return this.axios.$delete(`/stocks/files/${idFile}`);
39
39
  }
40
40
 
41
41
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../ts/api/resources/Stocks.ts"],"names":[],"mappings":";;;;;;;AAAA;;AAGM,MAAO,MAAP,SAAsB,kBAAtB,CAA8B;AAClC,EAAA,YAAY,CAAC,SAAD,EAAoB,OAApB,EAAyC;AACnD,WAAO,KAAK,KAAL,CAAW,KAAX,CAAiB,WAAW,SAAS,UAArC,EAAiD,OAAjD,CAAP;AACD;;AAED,EAAA,UAAU,CAAC,SAAD,EAAoB,IAApB,EAA+B;AACvC,WAAO,KAAK,KAAL,CAAW,KAAX,CAAiB,WAAW,SAAS,QAArC,EAA+C,IAA/C,EAAqD;AAAE,MAAA,OAAO,EAAE;AAAE,wBAAgB;AAAlB;AAAX,KAArD,CAAP;AACD;;AAED,EAAA,SAAS,CAAC,SAAD,EAAoB,UAApB,EAAsC;AAC7C,WAAO,KAAK,KAAL,CAAW,IAAX,CAAgB,WAAW,SAAS,YAAY,UAAU,EAA1D,CAAP;AACD;;AAED,EAAA,QAAQ,CAAC,SAAD,EAAkB;AACxB,WAAO,KAAK,KAAL,CAAW,IAAX,CAAgB,WAAW,SAAS,QAApC,CAAP;AACD;;AAED,EAAA,YAAY,CAAC,SAAD,EAAoB,KAApB,EAAiC;AAC3C,WAAO,KAAK,KAAL,CAAW,IAAX,CAAgB,WAAW,SAAS,UAAU,KAAK,EAAnD,EAAuD;AAAE,MAAA,YAAY,EAAE;AAAhB,KAAvD,CAAP;AACD;;AAED,EAAA,UAAU,CAAC,SAAD,EAAoB,MAApB,EAAkC;AAC1C,WAAO,KAAK,KAAL,CAAW,OAAX,CAAmB,WAAW,SAAS,UAAU,MAAM,EAAvD,CAAP;AACD;;AAvBiC;;QAAvB,M,GAAA,M","sourcesContent":["import { Resource } from '../Resource';\nimport { StockEntries, TFile } from '../../types';\n\nexport class Stocks extends Resource {\n createStocks(idSociety: number, payload: StockEntries): Promise<any> {\n return this.axios.$post(`/stocks/${idSociety}/entries`, payload);\n }\n\n createFile(idSociety: number, file: TFile): Promise<any> {\n return this.axios.$post(`/stocks/${idSociety}/files`, file, { headers: { 'Content-Type': 'multipart/form-data' } });\n }\n\n getStocks(idSociety: number, idExercice: number): Promise<any> {\n return this.axios.$get(`/stocks/${idSociety}/entries/${idExercice}`);\n }\n\n getFiles(idSociety: number): Promise<any> {\n return this.axios.$get(`/stocks/${idSociety}/files`);\n }\n\n downloadFile(idSociety: number, token: string): Promise<any> {\n return this.axios.$get(`/stocks/${idSociety}/files/${token}`, { responseType: 'blob' });\n }\n\n deleteFile(idSociety: number, idFile: number): Promise<any> {\n return this.axios.$delete(`/stocks/${idSociety}/files/${idFile}`);\n }\n}"],"sourceRoot":"","file":"Stocks.js"}
1
+ {"version":3,"sources":["../../../ts/api/resources/Stocks.ts"],"names":[],"mappings":";;;;;;;AAAA;;AAGM,MAAO,MAAP,SAAsB,kBAAtB,CAA8B;AAClC,EAAA,YAAY,CAAC,SAAD,EAAoB,OAApB,EAAyC;AACnD,WAAO,KAAK,KAAL,CAAW,KAAX,CAAiB,WAAW,SAAS,UAArC,EAAiD,OAAjD,CAAP;AACD;;AAED,EAAA,UAAU,CAAC,IAAD,EAAY;AACpB,WAAO,KAAK,KAAL,CAAW,KAAX,CAAiB,eAAjB,EAAkC,IAAlC,EAAwC;AAAE,MAAA,OAAO,EAAE;AAAE,wBAAgB;AAAlB;AAAX,KAAxC,CAAP;AACD;;AAED,EAAA,SAAS,CAAC,UAAD,EAAmB;AAC1B,WAAO,KAAK,KAAL,CAAW,IAAX,CAAgB,mBAAmB,UAAU,EAA7C,CAAP;AACD;;AAED,EAAA,QAAQ,GAAA;AACN,WAAO,KAAK,KAAL,CAAW,IAAX,CAAgB,eAAhB,CAAP;AACD;;AAED,EAAA,YAAY,CAAC,KAAD,EAAc;AACxB,WAAO,KAAK,KAAL,CAAW,IAAX,CAAgB,iBAAiB,KAAK,EAAtC,EAA0C;AAAE,MAAA,YAAY,EAAE;AAAhB,KAA1C,CAAP;AACD;;AAED,EAAA,UAAU,CAAC,MAAD,EAAe;AACvB,WAAO,KAAK,KAAL,CAAW,OAAX,CAAmB,iBAAiB,MAAM,EAA1C,CAAP;AACD;;AAvBiC;;QAAvB,M,GAAA,M","sourcesContent":["import { Resource } from '../Resource';\nimport { StockEntries, TFile } from '../../types';\n\nexport class Stocks extends Resource {\n createStocks(idSociety: number, payload: StockEntries): Promise<any> {\n return this.axios.$post(`/stocks/${idSociety}/entries`, payload);\n }\n\n createFile(file: TFile): Promise<any> {\n return this.axios.$post('/stocks/files', file, { headers: { 'Content-Type': 'multipart/form-data' } });\n }\n\n getStocks(idExercice: number): Promise<any> {\n return this.axios.$get(`/stocks/entries/${idExercice}`);\n }\n\n getFiles(): Promise<any> {\n return this.axios.$get('/stocks/files');\n }\n\n downloadFile(token: string): Promise<any> {\n return this.axios.$get(`/stocks/files/${token}`, { responseType: 'blob' });\n }\n\n deleteFile(idFile: number): Promise<any> {\n return this.axios.$delete(`/stocks/files/${idFile}`);\n }\n}"],"sourceRoot":"","file":"Stocks.js"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@silexpert/core",
3
- "version": "0.4.31",
3
+ "version": "0.4.32",
4
4
  "description": "Silex Core perform HTTP Request and object binding. Silex core helps developers to retrieve and return formatted object",
5
5
  "homepage": "https://gitlab.compta-clementine.fr/dev/silex-api",
6
6
  "main": "js/index.js",
@@ -1,8 +1,8 @@
1
- import { ISocietyPromoCode, CreateSocietyPromoCode } from '../../types';
1
+ import { ISocietyPromoCode, CreateSocietyPromoCode, IPromoCode } from '../../types';
2
2
  import { Resource } from '../Resource';
3
3
 
4
4
  export class SocietyPromoCode extends Resource {
5
- get(id: number): Promise<ISocietyPromoCode> {
5
+ get(id: number): Promise<IPromoCode> {
6
6
  return this.axios.$get(`/society/${id}/promoCode`);
7
7
  }
8
8
 
@@ -6,23 +6,23 @@ export class Stocks extends Resource {
6
6
  return this.axios.$post(`/stocks/${idSociety}/entries`, payload);
7
7
  }
8
8
 
9
- createFile(idSociety: number, file: TFile): Promise<any> {
10
- return this.axios.$post(`/stocks/${idSociety}/files`, file, { headers: { 'Content-Type': 'multipart/form-data' } });
9
+ createFile(file: TFile): Promise<any> {
10
+ return this.axios.$post('/stocks/files', file, { headers: { 'Content-Type': 'multipart/form-data' } });
11
11
  }
12
12
 
13
- getStocks(idSociety: number, idExercice: number): Promise<any> {
14
- return this.axios.$get(`/stocks/${idSociety}/entries/${idExercice}`);
13
+ getStocks(idExercice: number): Promise<any> {
14
+ return this.axios.$get(`/stocks/entries/${idExercice}`);
15
15
  }
16
16
 
17
- getFiles(idSociety: number): Promise<any> {
18
- return this.axios.$get(`/stocks/${idSociety}/files`);
17
+ getFiles(): Promise<any> {
18
+ return this.axios.$get('/stocks/files');
19
19
  }
20
20
 
21
- downloadFile(idSociety: number, token: string): Promise<any> {
22
- return this.axios.$get(`/stocks/${idSociety}/files/${token}`, { responseType: 'blob' });
21
+ downloadFile(token: string): Promise<any> {
22
+ return this.axios.$get(`/stocks/files/${token}`, { responseType: 'blob' });
23
23
  }
24
24
 
25
- deleteFile(idSociety: number, idFile: number): Promise<any> {
26
- return this.axios.$delete(`/stocks/${idSociety}/files/${idFile}`);
25
+ deleteFile(idFile: number): Promise<any> {
26
+ return this.axios.$delete(`/stocks/files/${idFile}`);
27
27
  }
28
28
  }