@spytecgps/nova-orm 0.0.195 → 0.0.196

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.
@@ -0,0 +1,5 @@
1
+ import { AppFeatureType } from '../../entities';
2
+ import { NovaDataSource } from '../../novaDataSource';
3
+ import { CreateAppFeatureTypeParams } from '../../types/appFeatures';
4
+ import { Logger } from '../../types/logger';
5
+ export declare const createAppFeatureType: (novaDataSource: NovaDataSource, params: CreateAppFeatureTypeParams, logger: Logger) => Promise<AppFeatureType>;
@@ -0,0 +1,5 @@
1
+ import { ClientAppFeature } from '../../entities';
2
+ import { NovaDataSource } from '../../novaDataSource';
3
+ import { CreateClientAppFeatureParams } from '../../types/appFeatures';
4
+ import { Logger } from '../../types/logger';
5
+ export declare const createClientAppFeature: (novaDataSource: NovaDataSource, params: CreateClientAppFeatureParams, logger: Logger) => Promise<ClientAppFeature>;
@@ -0,0 +1,5 @@
1
+ import { ClientAppFeature } from '../../entities';
2
+ import { NovaDataSource } from '../../novaDataSource';
3
+ import { GetClientAppFeaturesParams } from '../../types/appFeatures';
4
+ import { Logger } from '../../types/logger';
5
+ export declare const getClientAppFeatures: (novaDataSource: NovaDataSource, params: GetClientAppFeaturesParams, logger: Logger) => Promise<ClientAppFeature[]>;
@@ -0,0 +1,37 @@
1
+ import { AppFeatureType, ClientAppFeature } from '../../entities';
2
+ import { CreateAppFeatureTypeParams, CreateClientAppFeatureParams, GetClientAppFeaturesParams } from '../../types/appFeatures';
3
+ import { BaseRepository } from '../baseRepository';
4
+ export declare class AppFeaturesRepository extends BaseRepository {
5
+ /**
6
+ * Create a new app feature type
7
+ * @param params - The parameters to create the app feature type
8
+ * params.id - The id of the app feature type, optional. If not provided, it will be auto-generated
9
+ * params.name - The name of the app feature type, required
10
+ * params.description - The description of the app feature type, required
11
+ * params.statusId - The status id of the app feature type, optional, default to 1
12
+ * @returns The created app feature type
13
+ */
14
+ createAppFeatureType(params: CreateAppFeatureTypeParams): Promise<AppFeatureType>;
15
+ /**
16
+ * Create a new client app feature
17
+ * @param params - The parameters to create the client app feature
18
+ * params.clientId: The client id of the client app feature, required
19
+ * params.appFeatureTypeId: The app feature type id of the client app feature, required
20
+ * params.entityId: The entity id of the client app feature, required
21
+ * params.statusId: The status id of the client app feature, optional, default to 1
22
+ * @returns The created client app feature
23
+ */
24
+ createClientAppFeature(params: CreateClientAppFeatureParams): Promise<ClientAppFeature>;
25
+ /**
26
+ * Get client app features
27
+ * @param params - The parameters to get client app features
28
+ * One of the following filters is required:
29
+ * params.filters.clientId: The client id to filter, optional
30
+ * params.filters.appFeatureTypeId: The app feature type id to filter, optional
31
+ * params.filters.entityId: The entity id to filter, optional
32
+ * params.filters.statusId: The status id to filter, optional
33
+ * params.projectionOptions.withAppFeatureType: Whether to include app feature type relation in the result
34
+ * @returns The client app features
35
+ */
36
+ getClientAppFeatures(params: GetClientAppFeaturesParams): Promise<ClientAppFeature[]>;
37
+ }
@@ -2,6 +2,7 @@ import { AcumaticaRepository } from './acumatica';
2
2
  import { AempTokenRepository } from './aempToken';
3
3
  import { AlertRepository } from './alerts';
4
4
  import { AlertTypesRepository } from './alertTypes';
5
+ import { AppFeaturesRepository } from './appFeatures';
5
6
  import { AssetCategoriesRepository } from './assetCategories';
6
7
  import { BillingRepository } from './billing';
7
8
  import { BlacklistRepository } from './blacklist';
@@ -27,4 +28,4 @@ import { UserInvitationsRepository } from './userInvitations';
27
28
  import { UserRatingRequestsRepository } from './userRatingRequests';
28
29
  import { UserRegistrationAttemptsRepository } from './userRegistrationAttempts';
29
30
  import { UsersRepository } from './users';
30
- export { AcumaticaRepository, AempTokenRepository, AlertRepository, AlertTypesRepository, AssetCategoriesRepository, BillingRepository, BlacklistRepository, BoundariesRepository, ClientsRepository, CountriesRepository, DeactivationsRepository, DeviceBehaviorsRepository, DevicePairingsRepository, DevicesRepository, FirmwaresRepository, NotificationRecipientsRepository, PositionRepository, SecurityRepository, TasksRepository, TripRepository, UserActivationsRepository, UserAppFeedbackRepository, UserAppIncidentsRepository, UserConfigurationsRepository, UserDataDeletionRequestsRepository, UserInvitationsRepository, UserRatingRequestsRepository, UserRegistrationAttemptsRepository, UsersRepository, };
31
+ export { AcumaticaRepository, AempTokenRepository, AlertRepository, AlertTypesRepository, AppFeaturesRepository, AssetCategoriesRepository, BillingRepository, BlacklistRepository, BoundariesRepository, ClientsRepository, CountriesRepository, DeactivationsRepository, DeviceBehaviorsRepository, DevicePairingsRepository, DevicesRepository, FirmwaresRepository, NotificationRecipientsRepository, PositionRepository, SecurityRepository, TasksRepository, TripRepository, UserActivationsRepository, UserAppFeedbackRepository, UserAppIncidentsRepository, UserConfigurationsRepository, UserDataDeletionRequestsRepository, UserInvitationsRepository, UserRatingRequestsRepository, UserRegistrationAttemptsRepository, UsersRepository, };
@@ -0,0 +1,23 @@
1
+ export interface CreateAppFeatureTypeParams {
2
+ id?: number;
3
+ name: string;
4
+ description: string;
5
+ statusId?: number;
6
+ }
7
+ export interface CreateClientAppFeatureParams {
8
+ clientId: number;
9
+ appFeatureTypeId: number;
10
+ entityId: number;
11
+ statusId?: number;
12
+ }
13
+ export interface GetClientAppFeaturesParams {
14
+ filters: {
15
+ clientId?: number;
16
+ appFeatureTypeId?: number;
17
+ entityId?: number;
18
+ statusId?: number;
19
+ };
20
+ projectionOptions?: {
21
+ withAppFeatureType?: boolean;
22
+ };
23
+ }
@@ -1,6 +1,7 @@
1
1
  import * as Acumatica from './acumatica';
2
2
  import * as Alerts from './alert';
3
3
  import * as AlertTypes from './alertTypes';
4
+ import * as AppFeatures from './appFeatures';
4
5
  import * as Billing from './billing';
5
6
  import * as Blacklist from './blacklist';
6
7
  import * as Boundaries from './boundaries';
@@ -26,4 +27,4 @@ import * as UserDataDeletionRequests from './userDataDeletionRequests';
26
27
  import * as UserInvitations from './userInvitations';
27
28
  import * as UserRatingRequests from './userRatingRequests';
28
29
  import * as UserRegistrationAttempts from './userRegistrationAttempts';
29
- export { Acumatica, Alerts, AlertTypes, Billing, Blacklist, Boundaries, Clients, Countries, Deactivations, DeviceBehaviors, DevicePairings, Devices, Firmwares, Logger, NotificationRecipients, Positions, Security, Trips, Users, UserActivations, UserAppFeedback, UserAppIncidents, UserConfigurations, UserDataDeletionRequests, UserInvitations, UserRatingRequests, UserRegistrationAttempts, Enums, };
30
+ export { Acumatica, Alerts, AlertTypes, AppFeatures, Billing, Blacklist, Boundaries, Clients, Countries, Deactivations, DeviceBehaviors, DevicePairings, Devices, Firmwares, Logger, NotificationRecipients, Positions, Security, Trips, Users, UserActivations, UserAppFeedback, UserAppIncidents, UserConfigurations, UserDataDeletionRequests, UserInvitations, UserRatingRequests, UserRegistrationAttempts, Enums, };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spytecgps/nova-orm",
3
- "version": "0.0.195",
3
+ "version": "0.0.196",
4
4
  "description": "ORM with PlanetScale",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",