@openbox/shared-types 0.5.40 → 0.5.42
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/.eslintrc.js +37 -0
- package/.github/copilot-instructions.md +195 -25
- package/lib/index.d.ts +1 -0
- package/lib/index.js +1 -0
- package/lib/index.js.map +1 -1
- package/lib/providers/Branches/CreateSingle/Request.d.ts +2 -0
- package/lib/providers/Branches/CreateSingle/Request.js +3 -0
- package/lib/providers/Branches/CreateSingle/Request.js.map +1 -0
- package/lib/providers/Branches/CreateSingle/Response.d.ts +2 -0
- package/lib/providers/Branches/CreateSingle/Response.js +3 -0
- package/lib/providers/Branches/CreateSingle/Response.js.map +1 -0
- package/lib/providers/Branches/index.d.ts +3 -0
- package/lib/providers/Branches/index.js +20 -0
- package/lib/providers/Branches/index.js.map +1 -0
- package/lib/providers/Branches/providers.branches.types.d.ts +24 -0
- package/lib/providers/Branches/providers.branches.types.js +3 -0
- package/lib/providers/Branches/providers.branches.types.js.map +1 -0
- package/lib/providers/Providers/GetMany/Request.d.ts +2 -0
- package/lib/providers/Providers/GetMany/Request.js +3 -0
- package/lib/providers/Providers/GetMany/Request.js.map +1 -0
- package/lib/providers/Providers/GetMany/Response.d.ts +7 -0
- package/lib/providers/Providers/GetMany/Response.js +3 -0
- package/lib/providers/Providers/GetMany/Response.js.map +1 -0
- package/lib/providers/Providers/GetSingle/Response.d.ts +5 -0
- package/lib/providers/Providers/GetSingle/Response.js +3 -0
- package/lib/providers/Providers/GetSingle/Response.js.map +1 -0
- package/lib/providers/Providers/index.d.ts +4 -0
- package/lib/providers/Providers/index.js +21 -0
- package/lib/providers/Providers/index.js.map +1 -0
- package/lib/providers/Providers/providers.types.d.ts +35 -0
- package/lib/providers/Providers/providers.types.js +3 -0
- package/lib/providers/Providers/providers.types.js.map +1 -0
- package/lib/providers/index.d.ts +2 -0
- package/lib/providers/index.js +19 -0
- package/lib/providers/index.js.map +1 -0
- package/lib/system/Modules/ModuleActions/CreateSingle/Request.d.ts +2 -0
- package/lib/system/Modules/ModuleActions/CreateSingle/Request.js +3 -0
- package/lib/system/Modules/ModuleActions/CreateSingle/Request.js.map +1 -0
- package/lib/system/Modules/ModuleActions/CreateSingle/Response.d.ts +2 -0
- package/lib/system/Modules/ModuleActions/CreateSingle/Response.js +3 -0
- package/lib/system/Modules/ModuleActions/CreateSingle/Response.js.map +1 -0
- package/lib/system/Modules/ModuleActions/index.d.ts +3 -0
- package/lib/system/Modules/ModuleActions/index.js +20 -0
- package/lib/system/Modules/ModuleActions/index.js.map +1 -0
- package/lib/system/Modules/ModuleActions/system.module-actions.types.d.ts +13 -0
- package/lib/system/Modules/ModuleActions/system.module-actions.types.js +3 -0
- package/lib/system/Modules/ModuleActions/system.module-actions.types.js.map +1 -0
- package/lib/system/Modules/Modules/index.d.ts +1 -0
- package/lib/system/Modules/Modules/index.js +18 -0
- package/lib/system/Modules/Modules/index.js.map +1 -0
- package/lib/system/Modules/Modules/system.modules.types.d.ts +8 -0
- package/lib/system/Modules/Modules/system.modules.types.js +3 -0
- package/lib/system/Modules/Modules/system.modules.types.js.map +1 -0
- package/lib/system/Modules/index.d.ts +2 -0
- package/lib/system/Modules/index.js +19 -0
- package/lib/system/Modules/index.js.map +1 -0
- package/lib/system/index.d.ts +1 -0
- package/lib/system/index.js +1 -0
- package/lib/system/index.js.map +1 -1
- package/lib/system/system.enums.d.ts +1 -1
- package/lib/system/system.enums.js +2 -2
- package/lib/system/system.enums.js.map +1 -1
- package/package.json +1 -1
package/.eslintrc.js
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
module.exports = {
|
|
2
|
+
parser: '@typescript-eslint/parser',
|
|
3
|
+
parserOptions: {
|
|
4
|
+
project: './tsconfig.json',
|
|
5
|
+
},
|
|
6
|
+
plugins: ['@typescript-eslint/eslint-plugin', 'import'],
|
|
7
|
+
extends: [
|
|
8
|
+
'plugin:@typescript-eslint/recommended',
|
|
9
|
+
'eslint-config-prettier',
|
|
10
|
+
'plugin:prettier/recommended',
|
|
11
|
+
],
|
|
12
|
+
root: true,
|
|
13
|
+
rules: {
|
|
14
|
+
'@typescript-eslint/explicit-function-return-type': 'off',
|
|
15
|
+
'@typescript-eslint/no-explicit-any': 'warn',
|
|
16
|
+
'@typescript-eslint/no-use-before-define': 'error',
|
|
17
|
+
semi: 'off',
|
|
18
|
+
'import/order': [
|
|
19
|
+
'error',
|
|
20
|
+
{
|
|
21
|
+
groups: [['builtin', 'external'], 'internal', 'parent', 'sibling', 'index'],
|
|
22
|
+
alphabetize: { order: 'asc' },
|
|
23
|
+
},
|
|
24
|
+
],
|
|
25
|
+
'import/newline-after-import': ['error', { count: 1 }],
|
|
26
|
+
'linebreak-style': ['error', 'unix'],
|
|
27
|
+
'@typescript-eslint/no-unused-vars': [
|
|
28
|
+
'error',
|
|
29
|
+
{
|
|
30
|
+
argsIgnorePattern: '^_',
|
|
31
|
+
varsIgnorePattern: '^_',
|
|
32
|
+
destructuredArrayIgnorePattern: '^_',
|
|
33
|
+
},
|
|
34
|
+
],
|
|
35
|
+
'@typescript-eslint/no-empty-interface': 'warn',
|
|
36
|
+
},
|
|
37
|
+
}
|
|
@@ -1,16 +1,161 @@
|
|
|
1
1
|
# GitHub Copilot Instructions
|
|
2
2
|
|
|
3
|
+
## Project Architecture
|
|
4
|
+
|
|
5
|
+
This is a TypeScript shared types library for Openbox Cloud SaaS platform following Domain-Driven Design principles.
|
|
6
|
+
|
|
7
|
+
### Module Structure
|
|
8
|
+
|
|
9
|
+
Each module in `src/` represents a business domain:
|
|
10
|
+
- **`accounting/`** - Financial operations and accounting entries
|
|
11
|
+
- **`auth/`** - Authentication and user management
|
|
12
|
+
- **`customers/`** - Customer and branch management
|
|
13
|
+
- **`inventories/`** - Products, categories, and inventory tracking
|
|
14
|
+
- **`invoices/`** - Invoicing, documents, and payment conditions
|
|
15
|
+
- **`legal/`** - Legal documents and compliance
|
|
16
|
+
- **`management/`** - Administrative operations
|
|
17
|
+
- **`partners/`** - External partner integrations (versioned APIs)
|
|
18
|
+
- **`services/`** - Service catalog and configurations
|
|
19
|
+
- **`system/`** - System-wide utilities and configurations
|
|
20
|
+
|
|
21
|
+
### Table-Based Organization
|
|
22
|
+
|
|
23
|
+
Each module contains folders representing database tables:
|
|
24
|
+
- Use `PascalCase` for table folder names
|
|
25
|
+
- Each table folder represents an entity in the Openbox Cloud database
|
|
26
|
+
- Tables may have relationships (e.g., `Entries` → `EntriesDetails`)
|
|
27
|
+
|
|
28
|
+
### Operation Pattern
|
|
29
|
+
|
|
30
|
+
Each table follows consistent CRUD+ operations:
|
|
31
|
+
|
|
32
|
+
```
|
|
33
|
+
TableName/
|
|
34
|
+
├── CreateSingle/Request.ts # Single record creation
|
|
35
|
+
├── CreateSingle/Response.ts # Creation response
|
|
36
|
+
├── CreateMany/Request.ts # Batch creation
|
|
37
|
+
├── CreateMany/Response.ts # Batch response
|
|
38
|
+
├── GetSingle/Response.ts # Single record retrieval
|
|
39
|
+
├── GetMany/Request.ts # List/search parameters
|
|
40
|
+
├── GetMany/Response.ts # Paginated list response
|
|
41
|
+
├── UpdateSingle/Request.ts # Single record update
|
|
42
|
+
├── UpdateSingle/Response.ts # Update response
|
|
43
|
+
├── UpdateMany/Request.ts # Batch updates
|
|
44
|
+
├── DeleteSingle/Response.ts # Deletion response
|
|
45
|
+
├── {CustomOperations}/ # Business-specific operations
|
|
46
|
+
└── {module}.{table}.types.ts # Core type definitions
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
### Type Definition Patterns
|
|
50
|
+
|
|
51
|
+
**ALWAYS** define three core types for each table:
|
|
52
|
+
|
|
53
|
+
1. **Base Entity Type** - Complete table structure:
|
|
54
|
+
```typescript
|
|
55
|
+
export type TableName = {
|
|
56
|
+
id: string
|
|
57
|
+
// All table properties with exact database types
|
|
58
|
+
createdAt: Date
|
|
59
|
+
updatedAt: Date
|
|
60
|
+
// Related entities as full objects
|
|
61
|
+
relatedEntity: RelatedEntityType
|
|
62
|
+
}
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
2. **Request Type** - Optimized for creation:
|
|
66
|
+
```typescript
|
|
67
|
+
export type TableNameRequest = Omit<TableName, 'id' | 'createdAt' | 'updatedAt' | 'computedFields'> & {
|
|
68
|
+
// Transform complex objects to IDs for API requests
|
|
69
|
+
relatedEntity: string // ID instead of full object
|
|
70
|
+
}
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
3. **Response Type** - API response format:
|
|
74
|
+
```typescript
|
|
75
|
+
export type TableNameResponse = TableName
|
|
76
|
+
// Or with transformations if needed
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
### Operation Type Patterns
|
|
80
|
+
|
|
81
|
+
- **CreateSingle**: Use base Request type
|
|
82
|
+
- **CreateMany**: Array of Request type
|
|
83
|
+
- **UpdateSingle**: Partial<Request> with required ID
|
|
84
|
+
- **UpdateMany**: Array of Partial<Request> & {id: string}
|
|
85
|
+
- **GetMany**: Extend `GetManyRequest` with filters
|
|
86
|
+
- **Responses**: Use base Response type or `ManyResponse` for lists
|
|
87
|
+
|
|
88
|
+
### Naming Conventions
|
|
89
|
+
|
|
90
|
+
- **Types**: `PascalCase` (e.g., `AccountingEntries`)
|
|
91
|
+
- **Files**: `camelCase.types.ts` (e.g., `accounting.entries.types.ts`)
|
|
92
|
+
- **Folders**: `PascalCase` (e.g., `CreateSingle`, `UpdateMany`)
|
|
93
|
+
- **Properties**: `camelCase` (e.g., `customerId`, `createdAt`)
|
|
94
|
+
|
|
95
|
+
### Index File Pattern
|
|
96
|
+
|
|
97
|
+
Each table and module MUST have an `index.ts` file exporting all types:
|
|
98
|
+
|
|
99
|
+
```typescript
|
|
100
|
+
// Table level index
|
|
101
|
+
export * from './CreateSingle/Request'
|
|
102
|
+
export * from './CreateSingle/Response'
|
|
103
|
+
export * from './GetMany/Request'
|
|
104
|
+
export * from './GetMany/Response'
|
|
105
|
+
export * from './table.types'
|
|
106
|
+
|
|
107
|
+
// Module level index
|
|
108
|
+
export * from './TableName'
|
|
109
|
+
export * from './AnotherTable'
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
### Relationship Handling
|
|
113
|
+
|
|
114
|
+
- **In Base Types**: Include full related objects
|
|
115
|
+
- **In Request Types**: Use string IDs for related entities
|
|
116
|
+
- **In Response Types**: Include full related objects
|
|
117
|
+
- **Use Pick<>**: For partial relationships (e.g., `Pick<User, 'id' | 'name'>`)
|
|
118
|
+
|
|
119
|
+
### Business Logic Types
|
|
120
|
+
|
|
121
|
+
For complex operations, create specific types:
|
|
122
|
+
- Reports: `{Module}Reports{Name}Request/Response`
|
|
123
|
+
- Settings: `{Module}Settings{Type}Request/Response`
|
|
124
|
+
- Custom Operations: `{Module}{Table}{Operation}Request/Response`
|
|
125
|
+
|
|
126
|
+
### Partner API Versioning
|
|
127
|
+
|
|
128
|
+
For partner integrations, use version folders:
|
|
129
|
+
```
|
|
130
|
+
partners/
|
|
131
|
+
├── V1/
|
|
132
|
+
│ ├── auth/
|
|
133
|
+
│ └── invoices/
|
|
134
|
+
└── V2/
|
|
135
|
+
└── ...
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
## Code Quality Standards
|
|
139
|
+
|
|
140
|
+
- **Import Organization**: Group imports by: external libs, internal modules, relative imports
|
|
141
|
+
- **Type Safety**: Use strict TypeScript, avoid `any`
|
|
142
|
+
- **Documentation**: Add JSDoc for complex types
|
|
143
|
+
- **Consistency**: Follow existing patterns in similar modules
|
|
144
|
+
- **Validation**: Ensure all types align with database schema
|
|
145
|
+
|
|
3
146
|
## Commit Message Format
|
|
4
|
-
Always generate commit messages using Conventional Commits format with these specific types:
|
|
5
147
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
- **
|
|
9
|
-
- **
|
|
10
|
-
- **
|
|
11
|
-
- **
|
|
148
|
+
Always generate commit messages using Conventional Commits format with these specific types that align with our commitlint configuration:
|
|
149
|
+
|
|
150
|
+
- **feat**: New features or functionality
|
|
151
|
+
- **fix**: Bug fixes and issue resolutions
|
|
152
|
+
- **chore**: Maintenance tasks, dependency updates, build changes
|
|
153
|
+
- **refactor**: Code restructuring without changing functionality
|
|
154
|
+
- **test**: Adding, updating, or fixing tests
|
|
155
|
+
- **wip**: Work in progress commits
|
|
12
156
|
|
|
13
157
|
## Format Structure
|
|
158
|
+
|
|
14
159
|
```
|
|
15
160
|
<type>[optional scope]: <description>
|
|
16
161
|
|
|
@@ -20,6 +165,7 @@ Always generate commit messages using Conventional Commits format with these spe
|
|
|
20
165
|
```
|
|
21
166
|
|
|
22
167
|
## Body Requirements
|
|
168
|
+
|
|
23
169
|
The body is **required** and should provide a list of changes made in the commit. The list doesn't need to be exhaustive but should give reviewers a clear understanding of what was done:
|
|
24
170
|
|
|
25
171
|
- Use bullet points to list the main changes
|
|
@@ -27,26 +173,38 @@ The body is **required** and should provide a list of changes made in the commit
|
|
|
27
173
|
- Be concise but informative
|
|
28
174
|
- Use present tense verbs
|
|
29
175
|
|
|
176
|
+
## Commitlint Configuration Alignment
|
|
177
|
+
|
|
178
|
+
Our repository uses commitlint with the following rules that MUST be followed:
|
|
179
|
+
|
|
180
|
+
- **Type restriction**: Only use the 6 approved types above (enforced by `type-enum` rule)
|
|
181
|
+
- **Scope format**: Scopes can be either upper-case or lower-case (both allowed)
|
|
182
|
+
- **Subject format**: Subject can use sentence-case, start-case, lower-case, or upper-case
|
|
183
|
+
- **Body requirements**: Body has leading blank line and max line length of 500 characters
|
|
184
|
+
- **Header length**: Maximum header length is 200 characters
|
|
185
|
+
|
|
30
186
|
## Examples
|
|
31
187
|
|
|
32
188
|
```
|
|
33
|
-
feat:
|
|
189
|
+
feat: Add customer branch management types
|
|
34
190
|
|
|
35
|
-
-
|
|
36
|
-
- Add
|
|
37
|
-
-
|
|
191
|
+
- Create CustomersBranches base type with address fields
|
|
192
|
+
- Add CustomersBranchesRequest for creation operations
|
|
193
|
+
- Implement CreateSingle and UpdateSingle request types
|
|
194
|
+
- Add directory relationship handling
|
|
38
195
|
```
|
|
39
196
|
|
|
40
197
|
```
|
|
41
|
-
fix:
|
|
198
|
+
fix: Resolve invoice details type inconsistencies
|
|
42
199
|
|
|
43
|
-
-
|
|
44
|
-
-
|
|
45
|
-
-
|
|
200
|
+
- Update InvoicesDetails to match database schema
|
|
201
|
+
- Fix sellingType relationship in request types
|
|
202
|
+
- Correct price calculation fields naming
|
|
203
|
+
- Add missing NCDTotal boolean field
|
|
46
204
|
```
|
|
47
205
|
|
|
48
206
|
```
|
|
49
|
-
fix:
|
|
207
|
+
fix: Resolve createSingle test assertions (#123)
|
|
50
208
|
|
|
51
209
|
- Update test expectations for new validation rules
|
|
52
210
|
- Fix mock data to match schema requirements
|
|
@@ -54,7 +212,7 @@ fix: resolve createSingle test assertions (#123)
|
|
|
54
212
|
```
|
|
55
213
|
|
|
56
214
|
```
|
|
57
|
-
chore:
|
|
215
|
+
chore: Update TypeScript dependencies
|
|
58
216
|
|
|
59
217
|
- Upgrade TypeScript to v5.2.0
|
|
60
218
|
- Update @types/node to latest version
|
|
@@ -62,7 +220,7 @@ chore: update TypeScript dependencies
|
|
|
62
220
|
```
|
|
63
221
|
|
|
64
222
|
```
|
|
65
|
-
test:
|
|
223
|
+
test: Add unit tests for auth service
|
|
66
224
|
|
|
67
225
|
- Create tests for login functionality
|
|
68
226
|
- Add validation test cases
|
|
@@ -70,24 +228,36 @@ test: add unit tests for auth service
|
|
|
70
228
|
```
|
|
71
229
|
|
|
72
230
|
```
|
|
73
|
-
refactor:
|
|
231
|
+
refactor: Standardize accounting entries structure
|
|
74
232
|
|
|
75
|
-
- Consolidate
|
|
76
|
-
-
|
|
77
|
-
-
|
|
233
|
+
- Consolidate AccountingEntries and AccountingEntriesDetails
|
|
234
|
+
- Implement consistent Request/Response pattern
|
|
235
|
+
- Update all operation types to use new structure
|
|
236
|
+
- Maintain backward compatibility
|
|
78
237
|
```
|
|
79
238
|
|
|
80
239
|
## Requirements
|
|
240
|
+
|
|
81
241
|
- Use lowercase for type and description
|
|
242
|
+
- Use Sentence case for description
|
|
82
243
|
- Keep description under 50 characters when possible
|
|
83
244
|
- Reference GitHub issues using (#issue-number) format
|
|
84
|
-
- Use present tense ("
|
|
85
|
-
-
|
|
245
|
+
- Use present tense ("Add" not "Added")
|
|
246
|
+
- Always capitalize first letter of description
|
|
86
247
|
- Don't end description with period
|
|
87
248
|
|
|
249
|
+
## Critical Validation Rules
|
|
250
|
+
|
|
251
|
+
- **NEVER** use commit types other than: `feat`, `fix`, `chore`, `refactor`, `test`, `wip`
|
|
252
|
+
- **ALWAYS** include a body with bullet points describing changes
|
|
253
|
+
- **ALWAYS** ensure header stays under 200 characters
|
|
254
|
+
- **ALWAYS** include leading blank line before body
|
|
255
|
+
- **ALWAYS** keep body lines under 500 characters
|
|
256
|
+
|
|
88
257
|
## Code Quality
|
|
258
|
+
|
|
89
259
|
- Follow existing code patterns and conventions
|
|
90
260
|
- Add appropriate TypeScript types
|
|
91
261
|
- Include JSDoc comments for public methods
|
|
92
262
|
- Write comprehensive tests for new functionality
|
|
93
|
-
- Follow the existing project structure
|
|
263
|
+
- Follow the existing project structure
|
package/lib/index.d.ts
CHANGED
package/lib/index.js
CHANGED
|
@@ -22,6 +22,7 @@ __exportStar(require("./invoices"), exports);
|
|
|
22
22
|
__exportStar(require("./legal"), exports);
|
|
23
23
|
__exportStar(require("./management"), exports);
|
|
24
24
|
__exportStar(require("./partners"), exports);
|
|
25
|
+
__exportStar(require("./providers"), exports);
|
|
25
26
|
__exportStar(require("./services"), exports);
|
|
26
27
|
__exportStar(require("./system"), exports);
|
|
27
28
|
//# sourceMappingURL=index.js.map
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,+CAA4B;AAC5B,yCAAsB;AACtB,8CAA2B;AAC3B,gDAA6B;AAC7B,6CAA0B;AAC1B,0CAAuB;AACvB,+CAA4B;AAC5B,6CAA0B;AAC1B,6CAA0B;AAC1B,2CAAwB"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,+CAA4B;AAC5B,yCAAsB;AACtB,8CAA2B;AAC3B,gDAA6B;AAC7B,6CAA0B;AAC1B,0CAAuB;AACvB,+CAA4B;AAC5B,6CAA0B;AAC1B,8CAA2B;AAC3B,6CAA0B;AAC1B,2CAAwB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Request.js","sourceRoot":"","sources":["../../../../src/providers/Branches/CreateSingle/Request.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Response.js","sourceRoot":"","sources":["../../../../src/providers/Branches/CreateSingle/Response.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./CreateSingle/Request"), exports);
|
|
18
|
+
__exportStar(require("./CreateSingle/Response"), exports);
|
|
19
|
+
__exportStar(require("./providers.branches.types"), exports);
|
|
20
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/providers/Branches/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,yDAAsC;AACtC,0DAAuC;AACvC,6DAA0C"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { SystemDirectoryCreateSingleRequest } from '../../system';
|
|
2
|
+
import { SystemCitiesResponse } from '../../system/Cities/system.cities.types';
|
|
3
|
+
import { SystemCountriesResponse } from '../../system/Countries/system.countries.types';
|
|
4
|
+
import { SystemDirectoryResponse } from '../../system/Directory/system.directory.types';
|
|
5
|
+
import { SystemStatesResponse } from '../../system/States/system.states.types';
|
|
6
|
+
export type ProvidersBranches = {
|
|
7
|
+
id: string;
|
|
8
|
+
name: string;
|
|
9
|
+
address1?: string;
|
|
10
|
+
address2?: string;
|
|
11
|
+
zipcode?: string;
|
|
12
|
+
default?: boolean;
|
|
13
|
+
city: SystemCitiesResponse;
|
|
14
|
+
country: SystemCountriesResponse;
|
|
15
|
+
state: SystemStatesResponse;
|
|
16
|
+
directory: SystemDirectoryResponse[];
|
|
17
|
+
};
|
|
18
|
+
export type ProvidersBranchesRequest = Omit<ProvidersBranches, 'id' | 'city' | 'country' | 'state' | 'directory'> & {
|
|
19
|
+
city: number;
|
|
20
|
+
country: number;
|
|
21
|
+
state: number;
|
|
22
|
+
directory?: Omit<SystemDirectoryCreateSingleRequest, 'entityType' | 'entityId'>[];
|
|
23
|
+
};
|
|
24
|
+
export type ProvidersBranchesResponse = ProvidersBranches;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"providers.branches.types.js","sourceRoot":"","sources":["../../../src/providers/Branches/providers.branches.types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Request.js","sourceRoot":"","sources":["../../../../src/providers/Providers/GetMany/Request.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { GetManyResponse } from '../../../interfaces';
|
|
2
|
+
import { ProvidersGetSingleResponse } from '../GetSingle/Response';
|
|
3
|
+
export type ProvidersGetManyResponse = GetManyResponse & {
|
|
4
|
+
data: Array<Omit<ProvidersGetSingleResponse, 'branches'> & {
|
|
5
|
+
index: number;
|
|
6
|
+
}>;
|
|
7
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Response.js","sourceRoot":"","sources":["../../../../src/providers/Providers/GetMany/Response.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Response.js","sourceRoot":"","sources":["../../../../src/providers/Providers/GetSingle/Response.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./GetMany/Request"), exports);
|
|
18
|
+
__exportStar(require("./GetMany/Response"), exports);
|
|
19
|
+
__exportStar(require("./GetSingle/Response"), exports);
|
|
20
|
+
__exportStar(require("./providers.types"), exports);
|
|
21
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/providers/Providers/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,oDAAiC;AACjC,qDAAkC;AAClC,uDAAoC;AACpC,oDAAiC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { ManagementCompany } from '../../management/Company/management.company.type';
|
|
2
|
+
import { SystemDirectoryCreateSingleRequest, SystemSvFields, SystemSvFieldsRequest } from '../../system';
|
|
3
|
+
import { SystemDirectoryResponse } from '../../system/Directory/system.directory.types';
|
|
4
|
+
import { SystemPersonTypeNaturalsGetSingleResponse } from '../../system/PersonTypeNaturals/GetSingle/Response';
|
|
5
|
+
import { SystemPersonTypesGetSingleResponse } from '../../system/PersonTypes/GetSingle/Response';
|
|
6
|
+
import { SystemSellingTypeGetSingleResponse } from '../../system/SellingTypes/GetSingle/Response';
|
|
7
|
+
import { ProvidersBranchesCreateSingleRequest } from '../Branches';
|
|
8
|
+
export type Providers = {
|
|
9
|
+
id: string;
|
|
10
|
+
name: string;
|
|
11
|
+
name1?: string;
|
|
12
|
+
name2?: string;
|
|
13
|
+
name3?: string;
|
|
14
|
+
lastname1?: string;
|
|
15
|
+
lastname2?: string;
|
|
16
|
+
lastname3?: string;
|
|
17
|
+
shortName: string;
|
|
18
|
+
active?: boolean;
|
|
19
|
+
company: ManagementCompany;
|
|
20
|
+
svFields: SystemSvFields;
|
|
21
|
+
directory: SystemDirectoryResponse[];
|
|
22
|
+
personType: SystemPersonTypesGetSingleResponse;
|
|
23
|
+
type: SystemSellingTypeGetSingleResponse;
|
|
24
|
+
personTypeNatural: SystemPersonTypeNaturalsGetSingleResponse;
|
|
25
|
+
};
|
|
26
|
+
export type ProvidersRequest = Omit<Providers, 'id' | 'company' | 'svFields' | 'directory' | 'personType' | 'type' | 'personTypeNatural'> & {
|
|
27
|
+
company: string;
|
|
28
|
+
svFields: SystemSvFieldsRequest;
|
|
29
|
+
directory?: Omit<SystemDirectoryCreateSingleRequest, 'entityType' | 'entityId'>[];
|
|
30
|
+
personType: number;
|
|
31
|
+
type: number;
|
|
32
|
+
personTypeNatural?: number;
|
|
33
|
+
branch: ProvidersBranchesCreateSingleRequest;
|
|
34
|
+
};
|
|
35
|
+
export type ProvidersResponse = Providers;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"providers.types.js","sourceRoot":"","sources":["../../../src/providers/Providers/providers.types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./Providers"), exports);
|
|
18
|
+
__exportStar(require("./Branches"), exports);
|
|
19
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/providers/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8CAA2B;AAC3B,6CAA0B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Request.js","sourceRoot":"","sources":["../../../../../src/system/Modules/ModuleActions/CreateSingle/Request.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Response.js","sourceRoot":"","sources":["../../../../../src/system/Modules/ModuleActions/CreateSingle/Response.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./CreateSingle/Request"), exports);
|
|
18
|
+
__exportStar(require("./CreateSingle/Response"), exports);
|
|
19
|
+
__exportStar(require("./system.module-actions.types"), exports);
|
|
20
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/system/Modules/ModuleActions/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,yDAAsC;AACtC,0DAAuC;AACvC,gEAA6C"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { SystemModules } from '../Modules';
|
|
2
|
+
export type SystemModuleActions = {
|
|
3
|
+
id: string;
|
|
4
|
+
module: SystemModules;
|
|
5
|
+
actionKey: string;
|
|
6
|
+
actionName: string;
|
|
7
|
+
description: string;
|
|
8
|
+
isActive: boolean;
|
|
9
|
+
};
|
|
10
|
+
export type SystemModuleActionsRequest = Omit<SystemModuleActions, 'id' | 'module' | 'isActive'> & {
|
|
11
|
+
module: string;
|
|
12
|
+
};
|
|
13
|
+
export type SystemModuleActionsResponse = SystemModuleActions;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"system.module-actions.types.js","sourceRoot":"","sources":["../../../../src/system/Modules/ModuleActions/system.module-actions.types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './system.modules.types';
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./system.modules.types"), exports);
|
|
18
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/system/Modules/Modules/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,yDAAsC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"system.modules.types.js","sourceRoot":"","sources":["../../../../src/system/Modules/Modules/system.modules.types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./ModuleActions"), exports);
|
|
18
|
+
__exportStar(require("./Modules"), exports);
|
|
19
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/system/Modules/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,kDAA+B;AAC/B,4CAAyB"}
|
package/lib/system/index.d.ts
CHANGED
package/lib/system/index.js
CHANGED
|
@@ -18,6 +18,7 @@ __exportStar(require("./Cities/"), exports);
|
|
|
18
18
|
__exportStar(require("./Countries/"), exports);
|
|
19
19
|
__exportStar(require("./Directory/"), exports);
|
|
20
20
|
__exportStar(require("./Logs/"), exports);
|
|
21
|
+
__exportStar(require("./Modules/"), exports);
|
|
21
22
|
__exportStar(require("./PersonTypeNaturals"), exports);
|
|
22
23
|
__exportStar(require("./PersonTypes/"), exports);
|
|
23
24
|
__exportStar(require("./SellingTypes/"), exports);
|
package/lib/system/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/system/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4CAAyB;AACzB,+CAA4B;AAC5B,+CAA4B;AAC5B,0CAAuB;AACvB,uDAAoC;AACpC,iDAA8B;AAC9B,kDAA+B;AAC/B,4CAAyB;AACzB,wCAAqB;AACrB,iDAA8B;AAC9B,gDAA6B"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/system/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4CAAyB;AACzB,+CAA4B;AAC5B,+CAA4B;AAC5B,0CAAuB;AACvB,6CAA0B;AAC1B,uDAAoC;AACpC,iDAA8B;AAC9B,kDAA+B;AAC/B,4CAAyB;AACzB,wCAAqB;AACrB,iDAA8B;AAC9B,gDAA6B"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.SystemSettingTypes = exports.SystemSettingKeys = exports.SystemSellingTypesEnum = exports.SystemNaturalTypesEnum = exports.SystemPersonTypesEnum = exports.SystemTaxerTypesEnum = exports.
|
|
4
|
-
exports.
|
|
3
|
+
exports.SystemSettingTypes = exports.SystemSettingKeys = exports.SystemSellingTypesEnum = exports.SystemNaturalTypesEnum = exports.SystemPersonTypesEnum = exports.SystemTaxerTypesEnum = exports.SystemModulesData = void 0;
|
|
4
|
+
exports.SystemModulesData = {
|
|
5
5
|
Customers: {
|
|
6
6
|
id: '9ff0b6f4-9c58-475b-b2dd-5eea6d7b66aa',
|
|
7
7
|
name: 'Customers',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"system.enums.js","sourceRoot":"","sources":["../../src/system/system.enums.ts"],"names":[],"mappings":";;;AAAa,QAAA,
|
|
1
|
+
{"version":3,"file":"system.enums.js","sourceRoot":"","sources":["../../src/system/system.enums.ts"],"names":[],"mappings":";;;AAAa,QAAA,iBAAiB,GAAG;IAC/B,SAAS,EAAE;QACT,EAAE,EAAE,sCAAsC;QAC1C,IAAI,EAAE,WAAW;KAClB;IACD,SAAS,EAAE;QACT,EAAE,EAAE,sCAAsC;QAC1C,IAAI,EAAE,WAAW;KAClB;IACD,QAAQ,EAAE;QACR,EAAE,EAAE,sCAAsC;QAC1C,IAAI,EAAE,UAAU;KACjB;IACD,KAAK,EAAE;QACL,EAAE,EAAE,sCAAsC;QAC1C,IAAI,EAAE,OAAO;KACd;IACD,QAAQ,EAAE;QACR,EAAE,EAAE,sCAAsC;QAC1C,IAAI,EAAE,UAAU;KACjB;IACD,SAAS,EAAE;QACT,EAAE,EAAE,sCAAsC;QAC1C,IAAI,EAAE,WAAW;KAClB;IACD,QAAQ,EAAE;QACR,EAAE,EAAE,sCAAsC;QAC1C,IAAI,EAAE,UAAU;KACjB;IACD,UAAU,EAAE;QACV,EAAE,EAAE,sCAAsC;QAC1C,IAAI,EAAE,YAAY;KACnB;IACD,UAAU,EAAE;QACV,EAAE,EAAE,sCAAsC;QAC1C,IAAI,EAAE,YAAY;KACnB;IACD,KAAK,EAAE;QACL,EAAE,EAAE,sCAAsC;QAC1C,IAAI,EAAE,OAAO;KACd;IACD,WAAW,EAAE;QACX,EAAE,EAAE,sCAAsC;QAC1C,IAAI,EAAE,aAAa;KACpB;CACF,CAAA;AAED,IAAY,oBAIX;AAJD,WAAY,oBAAoB;IAC9B,iEAAS,CAAA;IACT,mEAAU,CAAA;IACV,iEAAS,CAAA;AACX,CAAC,EAJW,oBAAoB,GAApB,4BAAoB,KAApB,4BAAoB,QAI/B;AAED,IAAY,qBAIX;AAJD,WAAY,qBAAqB;IAC/B,yEAAY,CAAA;IACZ,uEAAW,CAAA;IACX,6EAAc,CAAA;AAChB,CAAC,EAJW,qBAAqB,GAArB,6BAAqB,KAArB,6BAAqB,QAIhC;AAED,IAAY,sBAGX;AAHD,WAAY,sBAAsB;IAChC,mFAAgB,CAAA;IAChB,+EAAc,CAAA;AAChB,CAAC,EAHW,sBAAsB,GAAtB,8BAAsB,KAAtB,8BAAsB,QAGjC;AAED,IAAY,sBAIX;AAJD,WAAY,sBAAsB;IAChC,2EAAY,CAAA;IACZ,uEAAU,CAAA;IACV,yEAAW,CAAA;AACb,CAAC,EAJW,sBAAsB,GAAtB,8BAAsB,KAAtB,8BAAsB,QAIjC;AAED,IAAY,iBAEX;AAFD,WAAY,iBAAiB;IAC3B,sDAAiC,CAAA;AACnC,CAAC,EAFW,iBAAiB,GAAjB,yBAAiB,KAAjB,yBAAiB,QAE5B;AAMD,IAAY,kBAIX;AAJD,WAAY,kBAAkB;IAC5B,uCAAiB,CAAA;IACjB,uCAAiB,CAAA;IACjB,yCAAmB,CAAA;AACrB,CAAC,EAJW,kBAAkB,GAAlB,0BAAkB,KAAlB,0BAAkB,QAI7B"}
|