@tolinax/ayoune-interfaces 2025.16.6 → 2025.16.7

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,9 @@
1
+ export interface IAPIAction {
2
+ action: string;
3
+ title: string;
4
+ href: string;
5
+ method: "get" | "put" | "post" | "delete";
6
+ rel: string;
7
+ types?: string[];
8
+ right?: string;
9
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,8 @@
1
+ export interface IAPILink {
2
+ rel: string;
3
+ title: string;
4
+ href: string;
5
+ method: "get" | "put" | "post" | "delete";
6
+ types: string[];
7
+ right?: string;
8
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,8 @@
1
+ export interface IAPIRelation {
2
+ rel: string;
3
+ title: string;
4
+ href: string;
5
+ method: "get" | "put" | "post" | "delete";
6
+ types: string[];
7
+ right?: string;
8
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,75 @@
1
+ import { IAPIAction } from "./IAPIAction";
2
+ import { IAPILink } from "./IAPILink";
3
+ import { IAPIRelation } from "./IAPIRelation";
4
+ import { IResponseRateLimit } from "./IResponseLocals";
5
+ import { IGeoIPLocationTracking } from "../interfaces";
6
+ /**
7
+ * Represents the meta data of an API result.
8
+ * @interface
9
+ */
10
+ export interface IAPIResultMeta {
11
+ status?: "success" | "pending" | "failure" | "no-user-right" | "no-customer-right" | "no-api-right" | "long-running-task" | "account-locked" | "not-authorized";
12
+ version?: {
13
+ host: string;
14
+ core: string;
15
+ };
16
+ internal?: {
17
+ infrastructure?: {
18
+ pod: string;
19
+ ip: string;
20
+ namespace: string;
21
+ component: string;
22
+ release: string;
23
+ partOf: string;
24
+ build: string;
25
+ commit: string;
26
+ };
27
+ hosts?: string[];
28
+ location: IGeoIPLocationTracking;
29
+ tracking: any;
30
+ inbound: any;
31
+ };
32
+ actions?: IAPIAction[];
33
+ reports?: {
34
+ _id: string;
35
+ label: string;
36
+ }[];
37
+ links: IAPILink[];
38
+ relations: IAPIRelation[];
39
+ message?: string;
40
+ deviceType?: string;
41
+ responseTime?: number;
42
+ filter?: any;
43
+ paths?: any;
44
+ cursor?: any;
45
+ fields?: any;
46
+ lrt?: boolean;
47
+ requiredRights?: string[];
48
+ module?: string;
49
+ model?: string;
50
+ rateLimit?: IResponseRateLimit;
51
+ pageInfo?: {
52
+ totalPages: number;
53
+ page: number;
54
+ totalEntries: number;
55
+ };
56
+ debugId?: string;
57
+ audit?: any;
58
+ error?: boolean;
59
+ removedFields?: [];
60
+ errors?: {
61
+ _id: string;
62
+ message: string;
63
+ code: number;
64
+ }[];
65
+ code?: number;
66
+ }
67
+ export interface IAPIResult {
68
+ payload?: any | any[];
69
+ meta?: IAPIResultMeta;
70
+ dataTable?: boolean;
71
+ draw?: string;
72
+ recordsTotal?: number;
73
+ recordsFiltered?: number;
74
+ data?: any[];
75
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,67 @@
1
+ import { IAPILink } from "./IAPILink";
2
+ import { IaYOUneUser, IConsumer } from "../interfaces";
3
+ import { IaYOUneExpressOptions } from "./IaYOUneExpressOptions";
4
+ export interface IResponseInboundTraffic {
5
+ trafficType: string;
6
+ network: string;
7
+ mailClient: string;
8
+ searchEngine: string;
9
+ site: string;
10
+ }
11
+ export interface IResponseLocationInfo {
12
+ range: number[];
13
+ country: string;
14
+ region: string;
15
+ eu: string;
16
+ timezone: string;
17
+ city: string;
18
+ ll: number[];
19
+ metro: number;
20
+ area: number;
21
+ }
22
+ export interface IResponseDevice {
23
+ type: string;
24
+ name: string;
25
+ }
26
+ export interface IResponseCursor {
27
+ skip: number;
28
+ limit: number;
29
+ [key: string]: any;
30
+ }
31
+ export interface IResponseRateLimit {
32
+ limit: string;
33
+ remaining: string;
34
+ reset: string;
35
+ resetDate: string;
36
+ }
37
+ export interface IResponseLocals {
38
+ id?: string;
39
+ ids?: string[];
40
+ errors?: any[];
41
+ user?: IaYOUneUser | IConsumer;
42
+ _consumer?: IConsumer;
43
+ options?: IaYOUneExpressOptions;
44
+ middlewareFlow?: string[];
45
+ startHrTime?: [number, number];
46
+ isValid?: boolean;
47
+ type?: string;
48
+ status?: number;
49
+ ip?: string;
50
+ location?: IResponseLocationInfo;
51
+ ayouneParams?: Record<string, string>;
52
+ inbound?: IResponseInboundTraffic;
53
+ device?: IResponseDevice;
54
+ responseData?: any;
55
+ debugId?: string;
56
+ module?: string;
57
+ space?: string;
58
+ fn?: string;
59
+ cursor?: IResponseCursor;
60
+ query?: any;
61
+ fields?: any;
62
+ plain?: boolean;
63
+ yaml?: boolean;
64
+ rateLimit?: IResponseRateLimit;
65
+ links?: IAPILink[];
66
+ [key: string]: any;
67
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,31 @@
1
+ export interface IaYOUneExpressOptionsDocs {
2
+ disabled?: boolean;
3
+ swagger?: boolean;
4
+ redoc?: boolean;
5
+ route?: string;
6
+ }
7
+ export interface IaYOUneExpressOptionsOpenAPI {
8
+ coerce: boolean;
9
+ htmlui: boolean;
10
+ basePath: string;
11
+ }
12
+ export interface IaYOUneExpressRobotsOptions {
13
+ UserAgent: string;
14
+ Disallow?: string;
15
+ Allow?: string;
16
+ CrawlDelay?: string;
17
+ Sitemap?: string | string[];
18
+ }
19
+ export interface IaYOUneExpressOptions {
20
+ description?: string;
21
+ performanceTracking?: boolean;
22
+ enableDeviceHelpers?: boolean;
23
+ rateLimit?: boolean;
24
+ metrics?: boolean;
25
+ extractQuery?: boolean;
26
+ openapiOptions?: IaYOUneExpressOptionsOpenAPI;
27
+ docs?: IaYOUneExpressOptionsDocs;
28
+ modelNames?: string[];
29
+ robots?: IaYOUneExpressRobotsOptions | IaYOUneExpressRobotsOptions[];
30
+ cacheControl?: boolean;
31
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
package/api/index.d.ts ADDED
@@ -0,0 +1,6 @@
1
+ export * from "./IAPIAction";
2
+ export * from "./IAPILink";
3
+ export * from "./IAPIRelation";
4
+ export * from "./IAPIResult";
5
+ export * from "./IaYOUneExpressOptions";
6
+ export * from "./IResponseLocals";
package/api/index.js ADDED
@@ -0,0 +1,22 @@
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("./IAPIAction"), exports);
18
+ __exportStar(require("./IAPILink"), exports);
19
+ __exportStar(require("./IAPIRelation"), exports);
20
+ __exportStar(require("./IAPIResult"), exports);
21
+ __exportStar(require("./IaYOUneExpressOptions"), exports);
22
+ __exportStar(require("./IResponseLocals"), exports);
package/index.d.ts CHANGED
@@ -3,3 +3,4 @@ declare global {
3
3
  }
4
4
  export * from "./interfaces";
5
5
  export * from "./data";
6
+ export * from "./api";
package/index.js CHANGED
@@ -16,3 +16,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./interfaces"), exports);
18
18
  __exportStar(require("./data"), exports);
19
+ __exportStar(require("./api"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tolinax/ayoune-interfaces",
3
- "version": "2025.16.6",
3
+ "version": "2025.16.7",
4
4
  "description": "Houses TypeScript interfaces for aYOUne",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",