spotcharge-types 1.0.326 → 1.0.327
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/models/api/companies/company.api.model.d.ts +68 -0
- package/dist/models/api/companies/company.api.model.d.ts.map +1 -0
- package/dist/models/api/companies/company.api.model.js +3 -0
- package/dist/models/api/companies/company.api.model.js.map +1 -0
- package/dist/models/api/companies/index.d.ts +2 -0
- package/dist/models/api/companies/index.d.ts.map +1 -0
- package/dist/models/api/companies/index.js +18 -0
- package/dist/models/api/companies/index.js.map +1 -0
- package/dist/models/api/company.api.model.d.ts +1 -0
- package/dist/models/api/company.api.model.d.ts.map +1 -1
- package/dist/models/api/index.d.ts +1 -0
- package/dist/models/api/index.d.ts.map +1 -1
- package/dist/models/api/index.js.map +1 -1
- package/package.json +2 -1
- package/src/models/api/companies/company.api.model.ts +75 -0
- package/src/models/api/companies/index.ts +1 -0
- package/src/models/api/company.api.model.ts +1 -0
- package/src/models/api/index.ts +8 -0
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { CompanyStatus, CompanyType } from '../../../enum';
|
|
2
|
+
import { AuditActor } from '../../audit-actor.model';
|
|
3
|
+
import { PhoneNumberModel } from '../../phone-number-model';
|
|
4
|
+
import { AddressApiModel } from '../address.api.model';
|
|
5
|
+
import { AuditTimestampsApiModel, IsoDateTime } from '../users/shared.api.model';
|
|
6
|
+
import { ApiSortDirection } from '../users/admin-user.api.model';
|
|
7
|
+
/** GET /api/companies */
|
|
8
|
+
export type CompanyListOrderBy = 'name' | 'status' | 'contactName' | 'createdAt';
|
|
9
|
+
export interface CompanyListItemApiModel {
|
|
10
|
+
/** companies.companies.id (uuid). */
|
|
11
|
+
id: string;
|
|
12
|
+
name: string;
|
|
13
|
+
displayName?: string;
|
|
14
|
+
type?: CompanyType;
|
|
15
|
+
contactName: string;
|
|
16
|
+
contactEmail?: string;
|
|
17
|
+
status: CompanyStatus;
|
|
18
|
+
createdAt: IsoDateTime;
|
|
19
|
+
}
|
|
20
|
+
/** GET /api/companies — paginated list response */
|
|
21
|
+
export interface CompanyListApiModel {
|
|
22
|
+
rows: CompanyListItemApiModel[];
|
|
23
|
+
totalCount: number;
|
|
24
|
+
pageIndex: number;
|
|
25
|
+
pageSize: number;
|
|
26
|
+
orderBy: CompanyListOrderBy;
|
|
27
|
+
sortDirection: ApiSortDirection;
|
|
28
|
+
}
|
|
29
|
+
/** GET /api/companies/:id */
|
|
30
|
+
export interface CompanyDetailApiModel extends Omit<CompanyListItemApiModel, 'contactEmail'>, AuditTimestampsApiModel {
|
|
31
|
+
legacyFirestoreId?: string | null;
|
|
32
|
+
contactPhone?: PhoneNumberModel | null;
|
|
33
|
+
contactEmail?: string | null;
|
|
34
|
+
address?: AddressApiModel | null;
|
|
35
|
+
gstNumber?: string | null;
|
|
36
|
+
panNumber?: string | null;
|
|
37
|
+
isDeleted: boolean;
|
|
38
|
+
createdBy: AuditActor | null;
|
|
39
|
+
updatedBy: AuditActor | null;
|
|
40
|
+
deletedBy: AuditActor | null;
|
|
41
|
+
}
|
|
42
|
+
/** POST /api/companies — audit fields set server-side from auth token. */
|
|
43
|
+
export interface CreateCompanyRequest {
|
|
44
|
+
name: string;
|
|
45
|
+
displayName?: string;
|
|
46
|
+
type?: CompanyType;
|
|
47
|
+
contactName: string;
|
|
48
|
+
contactPhone?: PhoneNumberModel | null;
|
|
49
|
+
contactEmail?: string;
|
|
50
|
+
address?: AddressApiModel | null;
|
|
51
|
+
gstNumber?: string;
|
|
52
|
+
panNumber?: string;
|
|
53
|
+
status?: CompanyStatus;
|
|
54
|
+
}
|
|
55
|
+
/** PATCH /api/companies/:id */
|
|
56
|
+
export interface UpdateCompanyRequest {
|
|
57
|
+
name?: string;
|
|
58
|
+
displayName?: string | null;
|
|
59
|
+
type?: CompanyType | null;
|
|
60
|
+
contactName?: string;
|
|
61
|
+
contactPhone?: PhoneNumberModel | null;
|
|
62
|
+
contactEmail?: string | null;
|
|
63
|
+
address?: AddressApiModel | null;
|
|
64
|
+
gstNumber?: string | null;
|
|
65
|
+
panNumber?: string | null;
|
|
66
|
+
status?: CompanyStatus;
|
|
67
|
+
}
|
|
68
|
+
//# sourceMappingURL=company.api.model.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"company.api.model.d.ts","sourceRoot":"","sources":["../../../../src/models/api/companies/company.api.model.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC3D,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACrD,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,uBAAuB,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AACjF,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAEjE,yBAAyB;AACzB,MAAM,MAAM,kBAAkB,GAAG,MAAM,GAAG,QAAQ,GAAG,aAAa,GAAG,WAAW,CAAC;AAEjF,MAAM,WAAW,uBAAuB;IACtC,qCAAqC;IACrC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,CAAC,EAAE,WAAW,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,MAAM,EAAE,aAAa,CAAC;IACtB,SAAS,EAAE,WAAW,CAAC;CACxB;AAED,mDAAmD;AACnD,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,uBAAuB,EAAE,CAAC;IAChC,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,kBAAkB,CAAC;IAC5B,aAAa,EAAE,gBAAg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gBAAgB,GAAG,IAAI,CAAC;IACvC,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,OAAO,CAAC,EAAE,eAAe,GAAG,IAAI,CAAC;IACjC,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,MAAM,CAAC,EAAE,aAAa,CAAC;CACxB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"company.api.model.js","sourceRoot":"","sources":["../../../../src/models/api/companies/company.api.model.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/models/api/companies/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC"}
|
|
@@ -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("./company.api.model"), exports);
|
|
18
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/models/api/companies/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,sDAAoC"}
|
|
@@ -3,6 +3,7 @@ import { PhoneNumberModel } from "../phone-number-model";
|
|
|
3
3
|
import { CreatedByModel } from "../created-by.model";
|
|
4
4
|
import { Timestamp } from "../timestamp";
|
|
5
5
|
import { AddressApiModel } from "./address.api.model";
|
|
6
|
+
/** @deprecated Firestore document shape. Use CompanyDetailApiModel from `./companies` for Postgres REST API. */
|
|
6
7
|
export interface CompanyApiModel {
|
|
7
8
|
id: string;
|
|
8
9
|
name: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"company.api.model.d.ts","sourceRoot":"","sources":["../../../src/models/api/company.api.model.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,WAAW,EAAE,aAAa,EAAC,MAAM,YAAY,CAAC;AACtD,OAAO,EAAC,gBAAgB,EAAC,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAC,cAAc,EAAC,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AACvC,OAAO,EAAC,eAAe,EAAC,MAAM,qBAAqB,CAAC;AAEpD,MAAM,WAAW,eAAe;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,CAAC,EAAE,WAAW,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,CAAC,EAAE,gBAAgB,CAAC;IAChC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,OAAO,CAAC,EAAE,eAAe,CAAC;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,aAAa,CAAC;IACtB,SAAS,EAAE,cAAc,CAAC;IAC1B,SAAS,EAAE,cAAc,CAAC;IAC1B,SAAS,CAAC,EAAE,cAAc,CAAC;IAC3B,SAAS,EAAE,SAAS,CAAC;IACrB,SAAS,EAAE,SAAS,CAAC;IACrB,SAAS,CAAC,EAAE,SAAS,GAAG,IAAI,CAAC;IAC7B,SAAS,EAAE,OAAO,CAAC;CACtB"}
|
|
1
|
+
{"version":3,"file":"company.api.model.d.ts","sourceRoot":"","sources":["../../../src/models/api/company.api.model.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,WAAW,EAAE,aAAa,EAAC,MAAM,YAAY,CAAC;AACtD,OAAO,EAAC,gBAAgB,EAAC,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAC,cAAc,EAAC,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAC,SAAS,EAAC,MAAM,cAAc,CAAC;AACvC,OAAO,EAAC,eAAe,EAAC,MAAM,qBAAqB,CAAC;AAEpD,gHAAgH;AAChH,MAAM,WAAW,eAAe;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,CAAC,EAAE,WAAW,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,CAAC,EAAE,gBAAgB,CAAC;IAChC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,OAAO,CAAC,EAAE,eAAe,CAAC;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,aAAa,CAAC;IACtB,SAAS,EAAE,cAAc,CAAC;IAC1B,SAAS,EAAE,cAAc,CAAC;IAC1B,SAAS,CAAC,EAAE,cAAc,CAAC;IAC3B,SAAS,EAAE,SAAS,CAAC;IACrB,SAAS,EAAE,SAAS,CAAC;IACrB,SAAS,CAAC,EAAE,SAAS,GAAG,IAAI,CAAC;IAC7B,SAAS,EAAE,OAAO,CAAC;CACtB"}
|
|
@@ -50,6 +50,7 @@ export { FleetUserAccessApiModel } from './fleet-user-access.api.model';
|
|
|
50
50
|
export { TariffApiModel } from './tariff.api.model';
|
|
51
51
|
export { TariffAssignmentApiModel } from './tariff-assignment.api.model';
|
|
52
52
|
export { CompanyApiModel } from './company.api.model';
|
|
53
|
+
export { CompanyDetailApiModel, CompanyListApiModel, CompanyListItemApiModel, CompanyListOrderBy, CreateCompanyRequest, UpdateCompanyRequest, } from './companies/company.api.model';
|
|
53
54
|
export { CompanyUserApiModel } from './company-user.api.model';
|
|
54
55
|
export { BusinessModelConfig, RevenueConfig } from './franchise-business-model';
|
|
55
56
|
export { CompanyUserEntityAccessApiModel } from './company-user-entity-access.api.model';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/models/api/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,gBAAgB,EAAC,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAC,eAAe,EAAE,UAAU,EAAC,MAAM,qBAAqB,CAAC;AAChE,OAAO,EAAC,aAAa,EAAC,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAC,iBAAiB,EAAE,iBAAiB,EAAC,MAAM,wBAAwB,CAAC;AAC5E,OAAO,EAAC,iBAAiB,EAAC,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAC,eAAe,EAAC,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAC,oBAAoB,EAAC,MAAM,2BAA2B,CAAC;AAC/D,OAAO,EAAC,uBAAuB,EAAC,MAAM,8BAA8B,CAAC;AACrE,OAAO,EAAC,cAAc,EAAC,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAC,qBAAqB,EAAC,MAAM,4BAA4B,CAAC;AACjE,OAAO,EAAC,YAAY,EAAC,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAC,aAAa,EAAC,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAC,oBAAoB,EAAC,MAAM,2BAA2B,CAAC;AAC/D,OAAO,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BAAyB,EAAC,MAAM,gCAAgC,CAAC;AACzE,OAAO,EAAC,sBAAsB,EAAE,6BAA6B,EAAE,+BAA+B,EAAE,sBAAsB,EAAC,MAAM,6BAA6B,CAAC;AAC3J,OAAO,EAAC,kBAAkB,EAAC,MAAM,wBAAwB,CAAC;AAC1D,OAAO,EAAC,2BAA2B,EAAC,MAAM,mCAAmC,CAAC;AAC9E,cAAc,SAAS,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/models/api/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAoCA,mCAA+C;AAAvC,2GAAA,mBAAmB,OAAA;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/models/api/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAoCA,mCAA+C;AAAvC,2GAAA,mBAAmB,OAAA;AAoC3B,yEAA2J;AAA3H,0IAAA,6BAA6B,OAAA;AAAE,4IAAA,+BAA+B,OAAA;AAAE,mIAAA,sBAAsB,OAAA;AAGtH,0CAAwB"}
|
package/package.json
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "spotcharge-types",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.327",
|
|
4
4
|
"description": "Spotcharge types",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
|
+
"types": "dist/index.d.ts",
|
|
6
7
|
"scripts": {
|
|
7
8
|
"start": "tsc",
|
|
8
9
|
"test": "echo \"Error: no test specified\" && exit 1",
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { CompanyStatus, CompanyType } from '../../../enum';
|
|
2
|
+
import { AuditActor } from '../../audit-actor.model';
|
|
3
|
+
import { PhoneNumberModel } from '../../phone-number-model';
|
|
4
|
+
import { AddressApiModel } from '../address.api.model';
|
|
5
|
+
import { AuditTimestampsApiModel, IsoDateTime } from '../users/shared.api.model';
|
|
6
|
+
import { ApiSortDirection } from '../users/admin-user.api.model';
|
|
7
|
+
|
|
8
|
+
/** GET /api/companies */
|
|
9
|
+
export type CompanyListOrderBy = 'name' | 'status' | 'contactName' | 'createdAt';
|
|
10
|
+
|
|
11
|
+
export interface CompanyListItemApiModel {
|
|
12
|
+
/** companies.companies.id (uuid). */
|
|
13
|
+
id: string;
|
|
14
|
+
name: string;
|
|
15
|
+
displayName?: string;
|
|
16
|
+
type?: CompanyType;
|
|
17
|
+
contactName: string;
|
|
18
|
+
contactEmail?: string;
|
|
19
|
+
status: CompanyStatus;
|
|
20
|
+
createdAt: IsoDateTime;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/** GET /api/companies — paginated list response */
|
|
24
|
+
export interface CompanyListApiModel {
|
|
25
|
+
rows: CompanyListItemApiModel[];
|
|
26
|
+
totalCount: number;
|
|
27
|
+
pageIndex: number;
|
|
28
|
+
pageSize: number;
|
|
29
|
+
orderBy: CompanyListOrderBy;
|
|
30
|
+
sortDirection: ApiSortDirection;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/** GET /api/companies/:id */
|
|
34
|
+
export interface CompanyDetailApiModel
|
|
35
|
+
extends Omit<CompanyListItemApiModel, 'contactEmail'>,
|
|
36
|
+
AuditTimestampsApiModel {
|
|
37
|
+
legacyFirestoreId?: string | null;
|
|
38
|
+
contactPhone?: PhoneNumberModel | null;
|
|
39
|
+
contactEmail?: string | null;
|
|
40
|
+
address?: AddressApiModel | null;
|
|
41
|
+
gstNumber?: string | null;
|
|
42
|
+
panNumber?: string | null;
|
|
43
|
+
isDeleted: boolean;
|
|
44
|
+
createdBy: AuditActor | null;
|
|
45
|
+
updatedBy: AuditActor | null;
|
|
46
|
+
deletedBy: AuditActor | null;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/** POST /api/companies — audit fields set server-side from auth token. */
|
|
50
|
+
export interface CreateCompanyRequest {
|
|
51
|
+
name: string;
|
|
52
|
+
displayName?: string;
|
|
53
|
+
type?: CompanyType;
|
|
54
|
+
contactName: string;
|
|
55
|
+
contactPhone?: PhoneNumberModel | null;
|
|
56
|
+
contactEmail?: string;
|
|
57
|
+
address?: AddressApiModel | null;
|
|
58
|
+
gstNumber?: string;
|
|
59
|
+
panNumber?: string;
|
|
60
|
+
status?: CompanyStatus;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
/** PATCH /api/companies/:id */
|
|
64
|
+
export interface UpdateCompanyRequest {
|
|
65
|
+
name?: string;
|
|
66
|
+
displayName?: string | null;
|
|
67
|
+
type?: CompanyType | null;
|
|
68
|
+
contactName?: string;
|
|
69
|
+
contactPhone?: PhoneNumberModel | null;
|
|
70
|
+
contactEmail?: string | null;
|
|
71
|
+
address?: AddressApiModel | null;
|
|
72
|
+
gstNumber?: string | null;
|
|
73
|
+
panNumber?: string | null;
|
|
74
|
+
status?: CompanyStatus;
|
|
75
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './company.api.model';
|
|
@@ -4,6 +4,7 @@ import {CreatedByModel} from "../created-by.model";
|
|
|
4
4
|
import {Timestamp} from "../timestamp";
|
|
5
5
|
import {AddressApiModel} from "./address.api.model";
|
|
6
6
|
|
|
7
|
+
/** @deprecated Firestore document shape. Use CompanyDetailApiModel from `./companies` for Postgres REST API. */
|
|
7
8
|
export interface CompanyApiModel {
|
|
8
9
|
id: string;
|
|
9
10
|
name: string;
|
package/src/models/api/index.ts
CHANGED
|
@@ -58,6 +58,14 @@ export {FleetUserAccessApiModel} from './fleet-user-access.api.model';
|
|
|
58
58
|
export {TariffApiModel} from './tariff.api.model';
|
|
59
59
|
export {TariffAssignmentApiModel} from './tariff-assignment.api.model';
|
|
60
60
|
export {CompanyApiModel} from './company.api.model';
|
|
61
|
+
export {
|
|
62
|
+
CompanyDetailApiModel,
|
|
63
|
+
CompanyListApiModel,
|
|
64
|
+
CompanyListItemApiModel,
|
|
65
|
+
CompanyListOrderBy,
|
|
66
|
+
CreateCompanyRequest,
|
|
67
|
+
UpdateCompanyRequest,
|
|
68
|
+
} from './companies/company.api.model';
|
|
61
69
|
export {CompanyUserApiModel} from './company-user.api.model';
|
|
62
70
|
export {BusinessModelConfig, RevenueConfig} from './franchise-business-model';
|
|
63
71
|
export {CompanyUserEntityAccessApiModel} from './company-user-entity-access.api.model';
|