@nomalism-com/api 0.17.26 → 0.18.2
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/index.d.ts +0 -18
- package/dist/index.js +3 -21
- package/package.json +6 -6
- package/dist/modules/integration/dynamicData.d.ts +0 -18
- package/dist/modules/integration/dynamicData.js +0 -113
- package/dist/modules/integration/task.d.ts +0 -19
- package/dist/modules/integration/task.js +0 -121
- package/dist/modules/integration/taskAttachment.d.ts +0 -14
- package/dist/modules/integration/taskAttachment.js +0 -76
- package/dist/modules/integration/taskGroup.d.ts +0 -18
- package/dist/modules/integration/taskGroup.js +0 -113
- package/dist/modules/integration/taskNote.d.ts +0 -17
- package/dist/modules/integration/taskNote.js +0 -100
- package/dist/modules/user/entityList.d.ts +0 -17
- package/dist/modules/user/entityList.js +0 -119
package/dist/index.d.ts
CHANGED
|
@@ -15,7 +15,6 @@ import DocumentLineClass from './modules/supply/documentLine';
|
|
|
15
15
|
import DocumentLineAssocClass from './modules/supply/documentLineAssoc';
|
|
16
16
|
import DocumentLineFolderClass from './modules/supply/documentLineFolder';
|
|
17
17
|
import DocumentTypeClass from './modules/supply/documentType';
|
|
18
|
-
import EntityListClass from './modules/user/entityList';
|
|
19
18
|
import FavoritesClass from './modules/user/favorites';
|
|
20
19
|
import FieldClass from './modules/integration/field';
|
|
21
20
|
import FieldGroupClass from './modules/integration/fieldGroup';
|
|
@@ -62,10 +61,6 @@ import SimilarProductClass from './modules/stock/similarProduct';
|
|
|
62
61
|
import SocialMediaClass from './modules/user/socialMedia';
|
|
63
62
|
import StoreOperatorClass from './modules/user/storeOperator';
|
|
64
63
|
import SwiftClass from './modules/user/swift';
|
|
65
|
-
import TaskAttachmentClass from './modules/integration/taskAttachment';
|
|
66
|
-
import TaskNoteClass from './modules/integration/taskNote';
|
|
67
|
-
import TasksClass from './modules/integration/task';
|
|
68
|
-
import TasksGroupClass from './modules/integration/taskGroup';
|
|
69
64
|
import TypeOfInventoryClass from './modules/stock/typeOfInventory';
|
|
70
65
|
import TypeOfLocationClass from './modules/stock/typeOfLocation';
|
|
71
66
|
import UnitOfMeasureClass from './modules/stock/unitOfMeasure';
|
|
@@ -75,7 +70,6 @@ import UsersClass from './modules/user/user';
|
|
|
75
70
|
import VatTaxClass from './modules/stock/vatTax';
|
|
76
71
|
import VatTaxZoneClass from './modules/stock/vatTaxZone';
|
|
77
72
|
import WorkflowClass from './modules/supply/workflow';
|
|
78
|
-
import DynamicDataClass from './modules/integration/dynamicData';
|
|
79
73
|
import DeliveryMethodsClass from './modules/user/deliveryMethods';
|
|
80
74
|
import MaturityDatesClass from './modules/user/maturityDates';
|
|
81
75
|
import PaymentMethodsClass from './modules/user/paymentMethods';
|
|
@@ -145,7 +139,6 @@ export * as DocumentLine from './modules/supply/documentLine';
|
|
|
145
139
|
export * as DocumentLineAssoc from './modules/supply/documentLineAssoc';
|
|
146
140
|
export * as DocumentLineFolder from './modules/supply/documentLineFolder';
|
|
147
141
|
export * as DocumentType from './modules/supply/documentType';
|
|
148
|
-
export * as EntityList from './modules/user/entityList';
|
|
149
142
|
export * as Favorites from './modules/user/favorites';
|
|
150
143
|
export * as Field from './modules/integration/field';
|
|
151
144
|
export * as FieldGroup from './modules/integration/fieldGroup';
|
|
@@ -192,10 +185,6 @@ export * as SimilarProduct from './modules/stock/similarProduct';
|
|
|
192
185
|
export * as SocialMedia from './modules/user/socialMedia';
|
|
193
186
|
export * as StoreOperator from './modules/user/storeOperator';
|
|
194
187
|
export * as Swift from './modules/user/swift';
|
|
195
|
-
export * as TaskAttachment from './modules/integration/taskAttachment';
|
|
196
|
-
export * as TaskNote from './modules/integration/taskNote';
|
|
197
|
-
export * as Tasks from './modules/integration/task';
|
|
198
|
-
export * as TasksGroup from './modules/integration/taskGroup';
|
|
199
188
|
export * as TypeOfInventory from './modules/stock/typeOfInventory';
|
|
200
189
|
export * as TypeOfLocation from './modules/stock/typeOfLocation';
|
|
201
190
|
export * as UnitOfMeasure from './modules/stock/unitOfMeasure';
|
|
@@ -205,7 +194,6 @@ export * as Users from './modules/user/user';
|
|
|
205
194
|
export * as VatTax from './modules/stock/vatTax';
|
|
206
195
|
export * as VatTaxZone from './modules/stock/vatTaxZone';
|
|
207
196
|
export * as Workflow from './modules/supply/workflow';
|
|
208
|
-
export * as DynamicData from './modules/integration/dynamicData';
|
|
209
197
|
export * as DeliveryMethods from './modules/user/deliveryMethods';
|
|
210
198
|
export * as MaturityDates from './modules/user/maturityDates';
|
|
211
199
|
export * as PaymentMethods from './modules/user/paymentMethods';
|
|
@@ -300,7 +288,6 @@ export declare class API {
|
|
|
300
288
|
DocumentLineAssoc: DocumentLineAssocClass;
|
|
301
289
|
DocumentLineFolder: DocumentLineFolderClass;
|
|
302
290
|
DocumentType: DocumentTypeClass;
|
|
303
|
-
EntityList: EntityListClass;
|
|
304
291
|
Favorites: FavoritesClass;
|
|
305
292
|
Field: FieldClass;
|
|
306
293
|
FieldGroup: FieldGroupClass;
|
|
@@ -347,10 +334,6 @@ export declare class API {
|
|
|
347
334
|
SocialMedia: SocialMediaClass;
|
|
348
335
|
StoreOperator: StoreOperatorClass;
|
|
349
336
|
Swift: SwiftClass;
|
|
350
|
-
TaskAttachment: TaskAttachmentClass;
|
|
351
|
-
TaskNote: TaskNoteClass;
|
|
352
|
-
Tasks: TasksClass;
|
|
353
|
-
TasksGroup: TasksGroupClass;
|
|
354
337
|
TypeOfInventory: TypeOfInventoryClass;
|
|
355
338
|
TypeOfLocation: TypeOfLocationClass;
|
|
356
339
|
UnitOfMeasure: UnitOfMeasureClass;
|
|
@@ -360,7 +343,6 @@ export declare class API {
|
|
|
360
343
|
VatTax: VatTaxClass;
|
|
361
344
|
VatTaxZone: VatTaxZoneClass;
|
|
362
345
|
Workflow: WorkflowClass;
|
|
363
|
-
DynamicData: DynamicDataClass;
|
|
364
346
|
DeliveryMethods: DeliveryMethodsClass;
|
|
365
347
|
MaturityDates: MaturityDatesClass;
|
|
366
348
|
PaymentMethods: PaymentMethodsClass;
|
package/dist/index.js
CHANGED
|
@@ -26,9 +26,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
26
26
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
27
|
};
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
-
exports.PromotionAssoc = exports.Promotion = exports.ProductName = exports.ProductUseAssoc = exports.ProductUse = exports.ProductSubCategory = exports.ProductPart = exports.ProductImage = exports.ProductColor = exports.ProductCategory = exports.ProductAttribute = exports.Product = exports.PrimaryColor = exports.Permissions = exports.Password = exports.PaymentConditions = exports.ObservationType = exports.Observation = exports.Multimedia = exports.MaintenancePresetAssoc = exports.MaintenancePreset = exports.MaintenanceType = exports.MaintenanceAssoc = exports.Maintenance = exports.Logout = exports.Location = exports.Language = exports.History = exports.GroupPermissions = exports.GoogleSheets = exports.File = exports.FieldGroup = exports.Field = exports.Favorites = exports.
|
|
30
|
-
exports.SchedulePrintJob = exports.Printer = exports.Npc = exports.OrderManagement = exports.CabideProduct = exports.Cabide = exports.PreSaleProduct = exports.PreSale = exports.Tenant = exports.ZipCode = exports.StockMovement = exports.ProductNamePreset = exports.VatValidation = exports.MoloniRequest = exports.ProviderCurrentAccount = exports.ClientCurrentAccount = exports.ExternalDocumentHeader = exports.Payment = exports.DocumentSet = exports.ExternalDocumentType = exports.Vehicles = exports.PaymentMethods = exports.MaturityDates = exports.DeliveryMethods = exports.
|
|
31
|
-
exports.API = exports.shared = exports.SavedProviderProposal = exports.DocumentLineNote = exports.EmailLog = exports.ReturnToProvider = exports.Inventario = exports.Quebra = exports.Prison = exports.EmailTemplateAttachment = exports.EmailTemplate = exports.SavedEmPicking = exports.UpfrontReturn = exports.Transformado = exports.MaterialEntrance = exports.Purchase = exports.Order = exports.ProjectInfo = exports.Persona = exports.ErrorHandler = exports.StartDocumentHeaderLastUpdate = exports.Clt = exports.TicketsLanguage = exports.Channel = exports.Tickets = exports.Settings =
|
|
29
|
+
exports.Providers = exports.PromotionAssoc = exports.Promotion = exports.ProductName = exports.ProductUseAssoc = exports.ProductUse = exports.ProductSubCategory = exports.ProductPart = exports.ProductImage = exports.ProductColor = exports.ProductCategory = exports.ProductAttribute = exports.Product = exports.PrimaryColor = exports.Permissions = exports.Password = exports.PaymentConditions = exports.ObservationType = exports.Observation = exports.Multimedia = exports.MaintenancePresetAssoc = exports.MaintenancePreset = exports.MaintenanceType = exports.MaintenanceAssoc = exports.Maintenance = exports.Logout = exports.Location = exports.Language = exports.History = exports.GroupPermissions = exports.GoogleSheets = exports.File = exports.FieldGroup = exports.Field = exports.Favorites = exports.DocumentType = exports.DocumentLineFolder = exports.DocumentLineAssoc = exports.DocumentLine = exports.DocumentHeader = exports.Country = exports.CompositionMaterial = exports.Composition = exports.Commissioner = exports.Color = exports.ClientType = exports.Client = exports.BankData = exports.AttributeValue = exports.Attribute = void 0;
|
|
30
|
+
exports.GoogleFilePermission = exports.Schedule = exports.PropostaSheets = exports.ReturnReason = exports.QueryParameter = exports.QueryList = exports.SchedulePrintJob = exports.Printer = exports.Npc = exports.OrderManagement = exports.CabideProduct = exports.Cabide = exports.PreSaleProduct = exports.PreSale = exports.Tenant = exports.ZipCode = exports.StockMovement = exports.ProductNamePreset = exports.VatValidation = exports.MoloniRequest = exports.ProviderCurrentAccount = exports.ClientCurrentAccount = exports.ExternalDocumentHeader = exports.Payment = exports.DocumentSet = exports.ExternalDocumentType = exports.Vehicles = exports.PaymentMethods = exports.MaturityDates = exports.DeliveryMethods = exports.Workflow = exports.VatTaxZone = exports.VatTax = exports.Users = exports.UserPositions = exports.UserPermissions = exports.UnitOfMeasure = exports.TypeOfLocation = exports.TypeOfInventory = exports.Swift = exports.StoreOperator = exports.SocialMedia = exports.SimilarProduct = exports.Shippings = exports.Sessions = exports.SegmentsArea = exports.RefreshToken = exports.ReasonForExemption = exports.PurchaseConditions = exports.ProviderType = void 0;
|
|
31
|
+
exports.API = exports.shared = exports.SavedProviderProposal = exports.DocumentLineNote = exports.EmailLog = exports.ReturnToProvider = exports.Inventario = exports.Quebra = exports.Prison = exports.EmailTemplateAttachment = exports.EmailTemplate = exports.SavedEmPicking = exports.UpfrontReturn = exports.Transformado = exports.MaterialEntrance = exports.Purchase = exports.Order = exports.ProjectInfo = exports.Persona = exports.ErrorHandler = exports.StartDocumentHeaderLastUpdate = exports.Clt = exports.TicketsLanguage = exports.Channel = exports.Tickets = exports.Settings = void 0;
|
|
32
32
|
var types_1 = require("@nomalism-com/types");
|
|
33
33
|
Object.defineProperty(exports, "shared", { enumerable: true, get: function () { return types_1.shared; } });
|
|
34
34
|
var axios_1 = __importDefault(require("axios"));
|
|
@@ -47,7 +47,6 @@ var documentLine_1 = __importDefault(require("./modules/supply/documentLine"));
|
|
|
47
47
|
var documentLineAssoc_1 = __importDefault(require("./modules/supply/documentLineAssoc"));
|
|
48
48
|
var documentLineFolder_1 = __importDefault(require("./modules/supply/documentLineFolder"));
|
|
49
49
|
var documentType_1 = __importDefault(require("./modules/supply/documentType"));
|
|
50
|
-
var entityList_1 = __importDefault(require("./modules/user/entityList"));
|
|
51
50
|
var favorites_1 = __importDefault(require("./modules/user/favorites"));
|
|
52
51
|
var field_1 = __importDefault(require("./modules/integration/field"));
|
|
53
52
|
var fieldGroup_1 = __importDefault(require("./modules/integration/fieldGroup"));
|
|
@@ -94,10 +93,6 @@ var similarProduct_1 = __importDefault(require("./modules/stock/similarProduct")
|
|
|
94
93
|
var socialMedia_1 = __importDefault(require("./modules/user/socialMedia"));
|
|
95
94
|
var storeOperator_1 = __importDefault(require("./modules/user/storeOperator"));
|
|
96
95
|
var swift_1 = __importDefault(require("./modules/user/swift"));
|
|
97
|
-
var taskAttachment_1 = __importDefault(require("./modules/integration/taskAttachment"));
|
|
98
|
-
var taskNote_1 = __importDefault(require("./modules/integration/taskNote"));
|
|
99
|
-
var task_1 = __importDefault(require("./modules/integration/task"));
|
|
100
|
-
var taskGroup_1 = __importDefault(require("./modules/integration/taskGroup"));
|
|
101
96
|
var typeOfInventory_1 = __importDefault(require("./modules/stock/typeOfInventory"));
|
|
102
97
|
var typeOfLocation_1 = __importDefault(require("./modules/stock/typeOfLocation"));
|
|
103
98
|
var unitOfMeasure_1 = __importDefault(require("./modules/stock/unitOfMeasure"));
|
|
@@ -107,7 +102,6 @@ var user_1 = __importDefault(require("./modules/user/user"));
|
|
|
107
102
|
var vatTax_1 = __importDefault(require("./modules/stock/vatTax"));
|
|
108
103
|
var vatTaxZone_1 = __importDefault(require("./modules/stock/vatTaxZone"));
|
|
109
104
|
var workflow_1 = __importDefault(require("./modules/supply/workflow"));
|
|
110
|
-
var dynamicData_1 = __importDefault(require("./modules/integration/dynamicData"));
|
|
111
105
|
var deliveryMethods_1 = __importDefault(require("./modules/user/deliveryMethods"));
|
|
112
106
|
var maturityDates_1 = __importDefault(require("./modules/user/maturityDates"));
|
|
113
107
|
var paymentMethods_1 = __importDefault(require("./modules/user/paymentMethods"));
|
|
@@ -177,7 +171,6 @@ exports.DocumentLine = __importStar(require("./modules/supply/documentLine"));
|
|
|
177
171
|
exports.DocumentLineAssoc = __importStar(require("./modules/supply/documentLineAssoc"));
|
|
178
172
|
exports.DocumentLineFolder = __importStar(require("./modules/supply/documentLineFolder"));
|
|
179
173
|
exports.DocumentType = __importStar(require("./modules/supply/documentType"));
|
|
180
|
-
exports.EntityList = __importStar(require("./modules/user/entityList"));
|
|
181
174
|
exports.Favorites = __importStar(require("./modules/user/favorites"));
|
|
182
175
|
exports.Field = __importStar(require("./modules/integration/field"));
|
|
183
176
|
exports.FieldGroup = __importStar(require("./modules/integration/fieldGroup"));
|
|
@@ -224,10 +217,6 @@ exports.SimilarProduct = __importStar(require("./modules/stock/similarProduct"))
|
|
|
224
217
|
exports.SocialMedia = __importStar(require("./modules/user/socialMedia"));
|
|
225
218
|
exports.StoreOperator = __importStar(require("./modules/user/storeOperator"));
|
|
226
219
|
exports.Swift = __importStar(require("./modules/user/swift"));
|
|
227
|
-
exports.TaskAttachment = __importStar(require("./modules/integration/taskAttachment"));
|
|
228
|
-
exports.TaskNote = __importStar(require("./modules/integration/taskNote"));
|
|
229
|
-
exports.Tasks = __importStar(require("./modules/integration/task"));
|
|
230
|
-
exports.TasksGroup = __importStar(require("./modules/integration/taskGroup"));
|
|
231
220
|
exports.TypeOfInventory = __importStar(require("./modules/stock/typeOfInventory"));
|
|
232
221
|
exports.TypeOfLocation = __importStar(require("./modules/stock/typeOfLocation"));
|
|
233
222
|
exports.UnitOfMeasure = __importStar(require("./modules/stock/unitOfMeasure"));
|
|
@@ -237,7 +226,6 @@ exports.Users = __importStar(require("./modules/user/user"));
|
|
|
237
226
|
exports.VatTax = __importStar(require("./modules/stock/vatTax"));
|
|
238
227
|
exports.VatTaxZone = __importStar(require("./modules/stock/vatTaxZone"));
|
|
239
228
|
exports.Workflow = __importStar(require("./modules/supply/workflow"));
|
|
240
|
-
exports.DynamicData = __importStar(require("./modules/integration/dynamicData"));
|
|
241
229
|
exports.DeliveryMethods = __importStar(require("./modules/user/deliveryMethods"));
|
|
242
230
|
exports.MaturityDates = __importStar(require("./modules/user/maturityDates"));
|
|
243
231
|
exports.PaymentMethods = __importStar(require("./modules/user/paymentMethods"));
|
|
@@ -357,7 +345,6 @@ var API = (function () {
|
|
|
357
345
|
this.DocumentLineAssoc = new documentLineAssoc_1.default(getModuleParams('stock', 'document_line_assoc'));
|
|
358
346
|
this.DocumentLineFolder = new documentLineFolder_1.default(getModuleParams('stock', 'document_line_folder'));
|
|
359
347
|
this.DocumentType = new documentType_1.default(getModuleParams('stock', 'document_type'));
|
|
360
|
-
this.EntityList = new entityList_1.default(getModuleParams('users', 'entity'));
|
|
361
348
|
this.Favorites = new favorites_1.default(getModuleParams('users', 'favorite'));
|
|
362
349
|
this.Field = new field_1.default(getModuleParams('integration', 'field'));
|
|
363
350
|
this.FieldGroup = new fieldGroup_1.default(getModuleParams('integration', 'field_group'));
|
|
@@ -404,10 +391,6 @@ var API = (function () {
|
|
|
404
391
|
this.SocialMedia = new socialMedia_1.default(getModuleParams('users', 'social_media'));
|
|
405
392
|
this.StoreOperator = new storeOperator_1.default(getModuleParams('users', 'store_operator'));
|
|
406
393
|
this.Swift = new swift_1.default(getModuleParams('users', 'swift'));
|
|
407
|
-
this.TaskAttachment = new taskAttachment_1.default(getModuleParams('integration', 'task_attachment'));
|
|
408
|
-
this.TaskNote = new taskNote_1.default(getModuleParams('integration', 'task_note'));
|
|
409
|
-
this.Tasks = new task_1.default(getModuleParams('integration', 'task'));
|
|
410
|
-
this.TasksGroup = new taskGroup_1.default(getModuleParams('integration', 'task_group'));
|
|
411
394
|
this.TypeOfInventory = new typeOfInventory_1.default(getModuleParams('stock', 'type_of_inventory'));
|
|
412
395
|
this.TypeOfLocation = new typeOfLocation_1.default(getModuleParams('stock', 'type_of_location'));
|
|
413
396
|
this.UnitOfMeasure = new unitOfMeasure_1.default(getModuleParams('stock', 'unit_of_measure'));
|
|
@@ -417,7 +400,6 @@ var API = (function () {
|
|
|
417
400
|
this.VatTax = new vatTax_1.default(getModuleParams('stock', 'vat_tax'));
|
|
418
401
|
this.VatTaxZone = new vatTaxZone_1.default(getModuleParams('stock', 'vat_tax_zone'));
|
|
419
402
|
this.Workflow = new workflow_1.default(getModuleParams('stock', 'workflow'));
|
|
420
|
-
this.DynamicData = new dynamicData_1.default(getModuleParams('integration', 'dynamic_data'));
|
|
421
403
|
this.DeliveryMethods = new deliveryMethods_1.default(getModuleParams('users', 'delivery_methods'));
|
|
422
404
|
this.MaturityDates = new maturityDates_1.default(getModuleParams('users', 'maturity_dates'));
|
|
423
405
|
this.PaymentMethods = new paymentMethods_1.default(getModuleParams('users', 'payment_methods'));
|
package/package.json
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"typescript",
|
|
10
10
|
"helper"
|
|
11
11
|
],
|
|
12
|
-
"version": "0.
|
|
12
|
+
"version": "0.18.2",
|
|
13
13
|
"main": "dist/index.js",
|
|
14
14
|
"types": "./dist/index.d.ts",
|
|
15
15
|
"files": [
|
|
@@ -32,9 +32,9 @@
|
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
34
|
"@types/convert-units": "^2.3.9",
|
|
35
|
-
"@types/node": "^20.11.
|
|
36
|
-
"@typescript-eslint/eslint-plugin": "^6.
|
|
37
|
-
"@typescript-eslint/parser": "^6.
|
|
35
|
+
"@types/node": "^20.11.16",
|
|
36
|
+
"@typescript-eslint/eslint-plugin": "^6.21.0",
|
|
37
|
+
"@typescript-eslint/parser": "^6.21.0",
|
|
38
38
|
"concurrently": "^8.2.2",
|
|
39
39
|
"eslint": "^8.56.0",
|
|
40
40
|
"eslint-config-airbnb-base": "^15.0.0",
|
|
@@ -42,12 +42,12 @@
|
|
|
42
42
|
"eslint-import-resolver-typescript": "^3.6.1",
|
|
43
43
|
"eslint-plugin-import": "^2.29.1",
|
|
44
44
|
"eslint-plugin-prettier": "^5.1.3",
|
|
45
|
-
"prettier": "^3.2.
|
|
45
|
+
"prettier": "^3.2.5",
|
|
46
46
|
"tsx": "^4.7.0",
|
|
47
47
|
"typescript": "^5.3.3"
|
|
48
48
|
},
|
|
49
49
|
"dependencies": {
|
|
50
|
-
"@nomalism-com/types": "^0.
|
|
50
|
+
"@nomalism-com/types": "^0.18.5",
|
|
51
51
|
"axios": "^0.27.2"
|
|
52
52
|
}
|
|
53
53
|
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { DynamicData as Entity, shared } from '@nomalism-com/types';
|
|
2
|
-
import { IModuleConstructor } from '../..';
|
|
3
|
-
export import IEntity = Entity.Entity;
|
|
4
|
-
export import IFindRequest = Entity.IFindRequest;
|
|
5
|
-
export import IFindByTypeRequest = Entity.IFindByTypeRequest;
|
|
6
|
-
export import ICreateRequest = Entity.ICreateRequest;
|
|
7
|
-
export import IUpdateRequest = Entity.IUpdateRequest;
|
|
8
|
-
export default class Repository implements Entity.IRepository {
|
|
9
|
-
route: string;
|
|
10
|
-
publicRoute: string;
|
|
11
|
-
private api;
|
|
12
|
-
constructor({ api, route, publicRoute }: IModuleConstructor);
|
|
13
|
-
findByType(params?: IFindByTypeRequest): Promise<IEntity[]>;
|
|
14
|
-
find(params?: IFindRequest): Promise<IEntity[]>;
|
|
15
|
-
create(body: ICreateRequest): Promise<IEntity>;
|
|
16
|
-
update(selector: shared.IFindByIdRequest, body: IUpdateRequest): Promise<IEntity | null>;
|
|
17
|
-
deleteOne(selector: shared.IFindByIdRequest): Promise<IEntity | null>;
|
|
18
|
-
}
|
|
@@ -1,113 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
12
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
13
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
14
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
|
-
function step(op) {
|
|
16
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
-
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
18
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
|
-
switch (op[0]) {
|
|
21
|
-
case 0: case 1: t = op; break;
|
|
22
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
23
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
24
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
25
|
-
default:
|
|
26
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
27
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
28
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
29
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
30
|
-
if (t[2]) _.ops.pop();
|
|
31
|
-
_.trys.pop(); continue;
|
|
32
|
-
}
|
|
33
|
-
op = body.call(thisArg, _);
|
|
34
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
35
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
var Repository = (function () {
|
|
40
|
-
function Repository(_a) {
|
|
41
|
-
var api = _a.api, route = _a.route, publicRoute = _a.publicRoute;
|
|
42
|
-
this.api = api;
|
|
43
|
-
this.route = route;
|
|
44
|
-
this.publicRoute = publicRoute;
|
|
45
|
-
}
|
|
46
|
-
Repository.prototype.findByType = function (params) {
|
|
47
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
48
|
-
var response;
|
|
49
|
-
return __generator(this, function (_a) {
|
|
50
|
-
switch (_a.label) {
|
|
51
|
-
case 0: return [4, this.api.get("".concat(this.route), { params: params })];
|
|
52
|
-
case 1:
|
|
53
|
-
response = _a.sent();
|
|
54
|
-
return [2, response.data];
|
|
55
|
-
}
|
|
56
|
-
});
|
|
57
|
-
});
|
|
58
|
-
};
|
|
59
|
-
Repository.prototype.find = function (params) {
|
|
60
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
61
|
-
var response;
|
|
62
|
-
return __generator(this, function (_a) {
|
|
63
|
-
switch (_a.label) {
|
|
64
|
-
case 0: return [4, this.api.get("".concat(this.route), { params: params })];
|
|
65
|
-
case 1:
|
|
66
|
-
response = _a.sent();
|
|
67
|
-
return [2, response.data];
|
|
68
|
-
}
|
|
69
|
-
});
|
|
70
|
-
});
|
|
71
|
-
};
|
|
72
|
-
Repository.prototype.create = function (body) {
|
|
73
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
74
|
-
var response;
|
|
75
|
-
return __generator(this, function (_a) {
|
|
76
|
-
switch (_a.label) {
|
|
77
|
-
case 0: return [4, this.api.post("".concat(this.route), body)];
|
|
78
|
-
case 1:
|
|
79
|
-
response = _a.sent();
|
|
80
|
-
return [2, response.data];
|
|
81
|
-
}
|
|
82
|
-
});
|
|
83
|
-
});
|
|
84
|
-
};
|
|
85
|
-
Repository.prototype.update = function (selector, body) {
|
|
86
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
87
|
-
var response;
|
|
88
|
-
return __generator(this, function (_a) {
|
|
89
|
-
switch (_a.label) {
|
|
90
|
-
case 0: return [4, this.api.put("".concat(this.route).concat(selector.id), body)];
|
|
91
|
-
case 1:
|
|
92
|
-
response = _a.sent();
|
|
93
|
-
return [2, response.data];
|
|
94
|
-
}
|
|
95
|
-
});
|
|
96
|
-
});
|
|
97
|
-
};
|
|
98
|
-
Repository.prototype.deleteOne = function (selector) {
|
|
99
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
100
|
-
var response;
|
|
101
|
-
return __generator(this, function (_a) {
|
|
102
|
-
switch (_a.label) {
|
|
103
|
-
case 0: return [4, this.api.delete("".concat(this.route).concat(selector.id))];
|
|
104
|
-
case 1:
|
|
105
|
-
response = _a.sent();
|
|
106
|
-
return [2, response.data];
|
|
107
|
-
}
|
|
108
|
-
});
|
|
109
|
-
});
|
|
110
|
-
};
|
|
111
|
-
return Repository;
|
|
112
|
-
}());
|
|
113
|
-
exports.default = Repository;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { shared, Tasks as Entity } from '@nomalism-com/types';
|
|
2
|
-
import { IModuleConstructor } from '../..';
|
|
3
|
-
export import IFindByQueryRequest = Entity.IFindByQueryRequest;
|
|
4
|
-
export import IFindByQueryResponse = Entity.IFindByQueryResponse;
|
|
5
|
-
export import IBasicSearchRequest = Entity.IBasicSearchRequest;
|
|
6
|
-
export import IBasicSearchResponse = Entity.IBasicSearchResponse;
|
|
7
|
-
export import IUpdateRequest = Entity.IUpdateRequest;
|
|
8
|
-
export import IEntity = Entity.Entity;
|
|
9
|
-
export import ICreateRequest = Entity.ICreateRequest;
|
|
10
|
-
export default class Repository implements Entity.IApi {
|
|
11
|
-
route: string;
|
|
12
|
-
publicRoute: string;
|
|
13
|
-
private api;
|
|
14
|
-
constructor({ api, route, publicRoute }: IModuleConstructor);
|
|
15
|
-
findByQuery(params: IFindByQueryRequest): Promise<IFindByQueryResponse[]>;
|
|
16
|
-
basicSearch(params: IBasicSearchRequest): Promise<shared.IPaginationResponse<IBasicSearchResponse>>;
|
|
17
|
-
update(selector: shared.IFindByIdRequest, body: IUpdateRequest): Promise<IFindByQueryResponse | null>;
|
|
18
|
-
create(body: ICreateRequest, reply_to?: string): Promise<IFindByQueryResponse>;
|
|
19
|
-
}
|
|
@@ -1,121 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __assign = (this && this.__assign) || function () {
|
|
3
|
-
__assign = Object.assign || function(t) {
|
|
4
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
-
s = arguments[i];
|
|
6
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
-
t[p] = s[p];
|
|
8
|
-
}
|
|
9
|
-
return t;
|
|
10
|
-
};
|
|
11
|
-
return __assign.apply(this, arguments);
|
|
12
|
-
};
|
|
13
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
14
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
15
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
16
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
17
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
18
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
19
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
20
|
-
});
|
|
21
|
-
};
|
|
22
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
23
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
24
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
25
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
26
|
-
function step(op) {
|
|
27
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
28
|
-
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
29
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
30
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
31
|
-
switch (op[0]) {
|
|
32
|
-
case 0: case 1: t = op; break;
|
|
33
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
34
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
35
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
36
|
-
default:
|
|
37
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
38
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
39
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
40
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
41
|
-
if (t[2]) _.ops.pop();
|
|
42
|
-
_.trys.pop(); continue;
|
|
43
|
-
}
|
|
44
|
-
op = body.call(thisArg, _);
|
|
45
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
46
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
47
|
-
}
|
|
48
|
-
};
|
|
49
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
50
|
-
var Repository = (function () {
|
|
51
|
-
function Repository(_a) {
|
|
52
|
-
var api = _a.api, route = _a.route, publicRoute = _a.publicRoute;
|
|
53
|
-
this.api = api;
|
|
54
|
-
this.route = route;
|
|
55
|
-
this.publicRoute = publicRoute;
|
|
56
|
-
}
|
|
57
|
-
Repository.prototype.findByQuery = function (params) {
|
|
58
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
59
|
-
var response;
|
|
60
|
-
return __generator(this, function (_a) {
|
|
61
|
-
switch (_a.label) {
|
|
62
|
-
case 0: return [4, this.api.get("".concat(this.route), { params: params })];
|
|
63
|
-
case 1:
|
|
64
|
-
response = _a.sent();
|
|
65
|
-
return [2, response.data.map(function (task) {
|
|
66
|
-
return __assign(__assign({}, task), { children: task.children.map(function (child) {
|
|
67
|
-
return __assign(__assign({}, child), { parent_id: task.id });
|
|
68
|
-
}) });
|
|
69
|
-
})];
|
|
70
|
-
}
|
|
71
|
-
});
|
|
72
|
-
});
|
|
73
|
-
};
|
|
74
|
-
Repository.prototype.basicSearch = function (params) {
|
|
75
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
76
|
-
var response;
|
|
77
|
-
return __generator(this, function (_a) {
|
|
78
|
-
switch (_a.label) {
|
|
79
|
-
case 0: return [4, this.api.get("".concat(this.route, "basic_search"), {
|
|
80
|
-
params: params,
|
|
81
|
-
})];
|
|
82
|
-
case 1:
|
|
83
|
-
response = _a.sent();
|
|
84
|
-
return [2, response.data];
|
|
85
|
-
}
|
|
86
|
-
});
|
|
87
|
-
});
|
|
88
|
-
};
|
|
89
|
-
Repository.prototype.update = function (selector, body) {
|
|
90
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
91
|
-
var response;
|
|
92
|
-
return __generator(this, function (_a) {
|
|
93
|
-
switch (_a.label) {
|
|
94
|
-
case 0: return [4, this.api.put("".concat(this.route).concat(selector.id), body)];
|
|
95
|
-
case 1:
|
|
96
|
-
response = _a.sent();
|
|
97
|
-
return [2, response.data];
|
|
98
|
-
}
|
|
99
|
-
});
|
|
100
|
-
});
|
|
101
|
-
};
|
|
102
|
-
Repository.prototype.create = function (body, reply_to) {
|
|
103
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
104
|
-
var response;
|
|
105
|
-
return __generator(this, function (_a) {
|
|
106
|
-
switch (_a.label) {
|
|
107
|
-
case 0: return [4, this.api.post("".concat(this.route), body, {
|
|
108
|
-
params: {
|
|
109
|
-
reply_to: reply_to,
|
|
110
|
-
},
|
|
111
|
-
})];
|
|
112
|
-
case 1:
|
|
113
|
-
response = _a.sent();
|
|
114
|
-
return [2, response.data];
|
|
115
|
-
}
|
|
116
|
-
});
|
|
117
|
-
});
|
|
118
|
-
};
|
|
119
|
-
return Repository;
|
|
120
|
-
}());
|
|
121
|
-
exports.default = Repository;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { TaskAttachment as Entity } from '@nomalism-com/types';
|
|
2
|
-
import { IModuleConstructor } from '../..';
|
|
3
|
-
export import IFindRequest = Entity.IFindRequest;
|
|
4
|
-
export import IFindResponse = Entity.IFindResponse;
|
|
5
|
-
export import ICreateRequest = Entity.ICreateRequest;
|
|
6
|
-
export import IEntity = Entity.Entity;
|
|
7
|
-
export default class Repository implements Entity.IApi {
|
|
8
|
-
route: string;
|
|
9
|
-
publicRoute: string;
|
|
10
|
-
private api;
|
|
11
|
-
constructor({ api, route, publicRoute }: IModuleConstructor);
|
|
12
|
-
findByTaskId(params: IFindRequest): Promise<IFindResponse[]>;
|
|
13
|
-
create(body: ICreateRequest): Promise<IEntity>;
|
|
14
|
-
}
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
12
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
13
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
14
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
|
-
function step(op) {
|
|
16
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
-
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
18
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
|
-
switch (op[0]) {
|
|
21
|
-
case 0: case 1: t = op; break;
|
|
22
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
23
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
24
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
25
|
-
default:
|
|
26
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
27
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
28
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
29
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
30
|
-
if (t[2]) _.ops.pop();
|
|
31
|
-
_.trys.pop(); continue;
|
|
32
|
-
}
|
|
33
|
-
op = body.call(thisArg, _);
|
|
34
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
35
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
var Repository = (function () {
|
|
40
|
-
function Repository(_a) {
|
|
41
|
-
var api = _a.api, route = _a.route, publicRoute = _a.publicRoute;
|
|
42
|
-
this.api = api;
|
|
43
|
-
this.route = route;
|
|
44
|
-
this.publicRoute = publicRoute;
|
|
45
|
-
}
|
|
46
|
-
Repository.prototype.findByTaskId = function (params) {
|
|
47
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
48
|
-
var response;
|
|
49
|
-
return __generator(this, function (_a) {
|
|
50
|
-
switch (_a.label) {
|
|
51
|
-
case 0: return [4, this.api.get("".concat(this.route), {
|
|
52
|
-
params: params,
|
|
53
|
-
})];
|
|
54
|
-
case 1:
|
|
55
|
-
response = _a.sent();
|
|
56
|
-
return [2, response.data];
|
|
57
|
-
}
|
|
58
|
-
});
|
|
59
|
-
});
|
|
60
|
-
};
|
|
61
|
-
Repository.prototype.create = function (body) {
|
|
62
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
63
|
-
var response;
|
|
64
|
-
return __generator(this, function (_a) {
|
|
65
|
-
switch (_a.label) {
|
|
66
|
-
case 0: return [4, this.api.post("".concat(this.route), body)];
|
|
67
|
-
case 1:
|
|
68
|
-
response = _a.sent();
|
|
69
|
-
return [2, response.data];
|
|
70
|
-
}
|
|
71
|
-
});
|
|
72
|
-
});
|
|
73
|
-
};
|
|
74
|
-
return Repository;
|
|
75
|
-
}());
|
|
76
|
-
exports.default = Repository;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { TasksGroup as Entity, shared } from '@nomalism-com/types';
|
|
2
|
-
import { IModuleConstructor } from '../..';
|
|
3
|
-
export import IFindDetailedResponse = Entity.IFindDetailedResponse;
|
|
4
|
-
export import IFindAndCountResponse = Entity.IFindAndCountResponse;
|
|
5
|
-
export import ICreateRequest = Entity.ICreateRequest;
|
|
6
|
-
export import IUpdateRequest = Entity.IUpdateRequest;
|
|
7
|
-
export import IEntity = Entity.Entity;
|
|
8
|
-
export default class Repository implements Entity.IApi {
|
|
9
|
-
route: string;
|
|
10
|
-
publicRoute: string;
|
|
11
|
-
private api;
|
|
12
|
-
constructor({ api, route, publicRoute }: IModuleConstructor);
|
|
13
|
-
findDetailed(): Promise<IFindDetailedResponse[]>;
|
|
14
|
-
findAndCount(): Promise<IFindAndCountResponse[]>;
|
|
15
|
-
create(body: ICreateRequest): Promise<IFindDetailedResponse>;
|
|
16
|
-
update(selector: shared.IFindByIdRequest, body: IUpdateRequest): Promise<IEntity | null>;
|
|
17
|
-
deleteOne(selector: shared.IFindByIdRequest): Promise<IEntity | null>;
|
|
18
|
-
}
|
|
@@ -1,113 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
12
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
13
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
14
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
|
-
function step(op) {
|
|
16
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
-
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
18
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
|
-
switch (op[0]) {
|
|
21
|
-
case 0: case 1: t = op; break;
|
|
22
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
23
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
24
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
25
|
-
default:
|
|
26
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
27
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
28
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
29
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
30
|
-
if (t[2]) _.ops.pop();
|
|
31
|
-
_.trys.pop(); continue;
|
|
32
|
-
}
|
|
33
|
-
op = body.call(thisArg, _);
|
|
34
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
35
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
var Repository = (function () {
|
|
40
|
-
function Repository(_a) {
|
|
41
|
-
var api = _a.api, route = _a.route, publicRoute = _a.publicRoute;
|
|
42
|
-
this.api = api;
|
|
43
|
-
this.route = route;
|
|
44
|
-
this.publicRoute = publicRoute;
|
|
45
|
-
}
|
|
46
|
-
Repository.prototype.findDetailed = function () {
|
|
47
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
48
|
-
var response;
|
|
49
|
-
return __generator(this, function (_a) {
|
|
50
|
-
switch (_a.label) {
|
|
51
|
-
case 0: return [4, this.api.get("".concat(this.route))];
|
|
52
|
-
case 1:
|
|
53
|
-
response = _a.sent();
|
|
54
|
-
return [2, response.data];
|
|
55
|
-
}
|
|
56
|
-
});
|
|
57
|
-
});
|
|
58
|
-
};
|
|
59
|
-
Repository.prototype.findAndCount = function () {
|
|
60
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
61
|
-
var response;
|
|
62
|
-
return __generator(this, function (_a) {
|
|
63
|
-
switch (_a.label) {
|
|
64
|
-
case 0: return [4, this.api.get("".concat(this.route, "find_and_count"))];
|
|
65
|
-
case 1:
|
|
66
|
-
response = _a.sent();
|
|
67
|
-
return [2, response.data];
|
|
68
|
-
}
|
|
69
|
-
});
|
|
70
|
-
});
|
|
71
|
-
};
|
|
72
|
-
Repository.prototype.create = function (body) {
|
|
73
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
74
|
-
var response;
|
|
75
|
-
return __generator(this, function (_a) {
|
|
76
|
-
switch (_a.label) {
|
|
77
|
-
case 0: return [4, this.api.post("".concat(this.route), body)];
|
|
78
|
-
case 1:
|
|
79
|
-
response = _a.sent();
|
|
80
|
-
return [2, response.data];
|
|
81
|
-
}
|
|
82
|
-
});
|
|
83
|
-
});
|
|
84
|
-
};
|
|
85
|
-
Repository.prototype.update = function (selector, body) {
|
|
86
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
87
|
-
var response;
|
|
88
|
-
return __generator(this, function (_a) {
|
|
89
|
-
switch (_a.label) {
|
|
90
|
-
case 0: return [4, this.api.put("".concat(this.route).concat(selector.id), body)];
|
|
91
|
-
case 1:
|
|
92
|
-
response = _a.sent();
|
|
93
|
-
return [2, response.data];
|
|
94
|
-
}
|
|
95
|
-
});
|
|
96
|
-
});
|
|
97
|
-
};
|
|
98
|
-
Repository.prototype.deleteOne = function (selector) {
|
|
99
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
100
|
-
var response;
|
|
101
|
-
return __generator(this, function (_a) {
|
|
102
|
-
switch (_a.label) {
|
|
103
|
-
case 0: return [4, this.api.delete("".concat(this.route).concat(selector.id))];
|
|
104
|
-
case 1:
|
|
105
|
-
response = _a.sent();
|
|
106
|
-
return [2, response.data];
|
|
107
|
-
}
|
|
108
|
-
});
|
|
109
|
-
});
|
|
110
|
-
};
|
|
111
|
-
return Repository;
|
|
112
|
-
}());
|
|
113
|
-
exports.default = Repository;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { TaskNote as Entity, shared } from '@nomalism-com/types';
|
|
2
|
-
import { IModuleConstructor } from '../..';
|
|
3
|
-
export import IFindRequest = Entity.IFindRequest;
|
|
4
|
-
export import IFindResponse = Entity.IFindResponse;
|
|
5
|
-
export import ICreateRequest = Entity.ICreateRequest;
|
|
6
|
-
export import IEntity = Entity.Entity;
|
|
7
|
-
export import IUpdateRequest = Entity.IUpdateRequest;
|
|
8
|
-
export default class Repository implements Entity.IApi {
|
|
9
|
-
route: string;
|
|
10
|
-
publicRoute: string;
|
|
11
|
-
private api;
|
|
12
|
-
constructor({ api, route, publicRoute }: IModuleConstructor);
|
|
13
|
-
findByTaskId(params: IFindRequest): Promise<IFindResponse[]>;
|
|
14
|
-
create(body: ICreateRequest): Promise<IEntity>;
|
|
15
|
-
update(selector: shared.IFindByIdRequest, body: IUpdateRequest): Promise<IEntity | null>;
|
|
16
|
-
deleteOne(selector: shared.IFindByIdRequest): Promise<IEntity | null>;
|
|
17
|
-
}
|
|
@@ -1,100 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
12
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
13
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
14
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
|
-
function step(op) {
|
|
16
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
-
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
18
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
|
-
switch (op[0]) {
|
|
21
|
-
case 0: case 1: t = op; break;
|
|
22
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
23
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
24
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
25
|
-
default:
|
|
26
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
27
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
28
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
29
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
30
|
-
if (t[2]) _.ops.pop();
|
|
31
|
-
_.trys.pop(); continue;
|
|
32
|
-
}
|
|
33
|
-
op = body.call(thisArg, _);
|
|
34
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
35
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
var Repository = (function () {
|
|
40
|
-
function Repository(_a) {
|
|
41
|
-
var api = _a.api, route = _a.route, publicRoute = _a.publicRoute;
|
|
42
|
-
this.api = api;
|
|
43
|
-
this.route = route;
|
|
44
|
-
this.publicRoute = publicRoute;
|
|
45
|
-
}
|
|
46
|
-
Repository.prototype.findByTaskId = function (params) {
|
|
47
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
48
|
-
var response;
|
|
49
|
-
return __generator(this, function (_a) {
|
|
50
|
-
switch (_a.label) {
|
|
51
|
-
case 0: return [4, this.api.get("".concat(this.route), { params: params })];
|
|
52
|
-
case 1:
|
|
53
|
-
response = _a.sent();
|
|
54
|
-
return [2, response.data];
|
|
55
|
-
}
|
|
56
|
-
});
|
|
57
|
-
});
|
|
58
|
-
};
|
|
59
|
-
Repository.prototype.create = function (body) {
|
|
60
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
61
|
-
var response;
|
|
62
|
-
return __generator(this, function (_a) {
|
|
63
|
-
switch (_a.label) {
|
|
64
|
-
case 0: return [4, this.api.post("".concat(this.route), body)];
|
|
65
|
-
case 1:
|
|
66
|
-
response = _a.sent();
|
|
67
|
-
return [2, response.data];
|
|
68
|
-
}
|
|
69
|
-
});
|
|
70
|
-
});
|
|
71
|
-
};
|
|
72
|
-
Repository.prototype.update = function (selector, body) {
|
|
73
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
74
|
-
var response;
|
|
75
|
-
return __generator(this, function (_a) {
|
|
76
|
-
switch (_a.label) {
|
|
77
|
-
case 0: return [4, this.api.put("".concat(this.route).concat(selector.id), body)];
|
|
78
|
-
case 1:
|
|
79
|
-
response = _a.sent();
|
|
80
|
-
return [2, response.data];
|
|
81
|
-
}
|
|
82
|
-
});
|
|
83
|
-
});
|
|
84
|
-
};
|
|
85
|
-
Repository.prototype.deleteOne = function (selector) {
|
|
86
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
87
|
-
var response;
|
|
88
|
-
return __generator(this, function (_a) {
|
|
89
|
-
switch (_a.label) {
|
|
90
|
-
case 0: return [4, this.api.delete("".concat(this.route).concat(selector.id))];
|
|
91
|
-
case 1:
|
|
92
|
-
response = _a.sent();
|
|
93
|
-
return [2, response.data];
|
|
94
|
-
}
|
|
95
|
-
});
|
|
96
|
-
});
|
|
97
|
-
};
|
|
98
|
-
return Repository;
|
|
99
|
-
}());
|
|
100
|
-
exports.default = Repository;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { EntityList as Entity, shared } from '@nomalism-com/types';
|
|
2
|
-
import { IModuleConstructor } from '../..';
|
|
3
|
-
export import EValidEntityName = Entity.EValidEntityName;
|
|
4
|
-
export import ICreateRequest = Entity.ICreateRequest;
|
|
5
|
-
export import IEntity = Entity.Entity;
|
|
6
|
-
export import IUpdateRequest = Entity.IUpdateRequest;
|
|
7
|
-
export default class Repository implements Entity.IApi {
|
|
8
|
-
route: string;
|
|
9
|
-
publicRoute: string;
|
|
10
|
-
private api;
|
|
11
|
-
constructor({ api, route, publicRoute }: IModuleConstructor);
|
|
12
|
-
findByUserId(): Promise<IEntity[]>;
|
|
13
|
-
findById({ id }: shared.IFindByIdRequest): Promise<IEntity | null>;
|
|
14
|
-
create(body: ICreateRequest): Promise<IEntity>;
|
|
15
|
-
update({ id }: shared.IFindByIdRequest, body: IUpdateRequest): Promise<IEntity | null>;
|
|
16
|
-
deleteOne({ id }: shared.IFindByIdRequest): Promise<IEntity | null>;
|
|
17
|
-
}
|
|
@@ -1,119 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
12
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
13
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
14
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
|
-
function step(op) {
|
|
16
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
-
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
18
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
|
-
switch (op[0]) {
|
|
21
|
-
case 0: case 1: t = op; break;
|
|
22
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
23
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
24
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
25
|
-
default:
|
|
26
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
27
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
28
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
29
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
30
|
-
if (t[2]) _.ops.pop();
|
|
31
|
-
_.trys.pop(); continue;
|
|
32
|
-
}
|
|
33
|
-
op = body.call(thisArg, _);
|
|
34
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
35
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.EValidEntityName = void 0;
|
|
40
|
-
var types_1 = require("@nomalism-com/types");
|
|
41
|
-
exports.EValidEntityName = types_1.EntityList.EValidEntityName;
|
|
42
|
-
var Repository = (function () {
|
|
43
|
-
function Repository(_a) {
|
|
44
|
-
var api = _a.api, route = _a.route, publicRoute = _a.publicRoute;
|
|
45
|
-
this.api = api;
|
|
46
|
-
this.route = route;
|
|
47
|
-
this.publicRoute = publicRoute;
|
|
48
|
-
}
|
|
49
|
-
Repository.prototype.findByUserId = function () {
|
|
50
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
51
|
-
var response;
|
|
52
|
-
return __generator(this, function (_a) {
|
|
53
|
-
switch (_a.label) {
|
|
54
|
-
case 0: return [4, this.api.get("".concat(this.route))];
|
|
55
|
-
case 1:
|
|
56
|
-
response = _a.sent();
|
|
57
|
-
return [2, response.data];
|
|
58
|
-
}
|
|
59
|
-
});
|
|
60
|
-
});
|
|
61
|
-
};
|
|
62
|
-
Repository.prototype.findById = function (_a) {
|
|
63
|
-
var id = _a.id;
|
|
64
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
65
|
-
var response;
|
|
66
|
-
return __generator(this, function (_b) {
|
|
67
|
-
switch (_b.label) {
|
|
68
|
-
case 0: return [4, this.api.get("".concat(this.route).concat(id))];
|
|
69
|
-
case 1:
|
|
70
|
-
response = _b.sent();
|
|
71
|
-
return [2, response.data];
|
|
72
|
-
}
|
|
73
|
-
});
|
|
74
|
-
});
|
|
75
|
-
};
|
|
76
|
-
Repository.prototype.create = function (body) {
|
|
77
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
78
|
-
var response;
|
|
79
|
-
return __generator(this, function (_a) {
|
|
80
|
-
switch (_a.label) {
|
|
81
|
-
case 0: return [4, this.api.post("".concat(this.route), body)];
|
|
82
|
-
case 1:
|
|
83
|
-
response = _a.sent();
|
|
84
|
-
return [2, response.data];
|
|
85
|
-
}
|
|
86
|
-
});
|
|
87
|
-
});
|
|
88
|
-
};
|
|
89
|
-
Repository.prototype.update = function (_a, body) {
|
|
90
|
-
var id = _a.id;
|
|
91
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
92
|
-
var response;
|
|
93
|
-
return __generator(this, function (_b) {
|
|
94
|
-
switch (_b.label) {
|
|
95
|
-
case 0: return [4, this.api.put("".concat(this.route).concat(id), body)];
|
|
96
|
-
case 1:
|
|
97
|
-
response = _b.sent();
|
|
98
|
-
return [2, response.data];
|
|
99
|
-
}
|
|
100
|
-
});
|
|
101
|
-
});
|
|
102
|
-
};
|
|
103
|
-
Repository.prototype.deleteOne = function (_a) {
|
|
104
|
-
var id = _a.id;
|
|
105
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
106
|
-
var response;
|
|
107
|
-
return __generator(this, function (_b) {
|
|
108
|
-
switch (_b.label) {
|
|
109
|
-
case 0: return [4, this.api.delete("".concat(this.route).concat(id))];
|
|
110
|
-
case 1:
|
|
111
|
-
response = _b.sent();
|
|
112
|
-
return [2, response.data];
|
|
113
|
-
}
|
|
114
|
-
});
|
|
115
|
-
});
|
|
116
|
-
};
|
|
117
|
-
return Repository;
|
|
118
|
-
}());
|
|
119
|
-
exports.default = Repository;
|