@aptly-as/types 1.4.1 → 1.6.0
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/core/api.d.ts +7 -0
- package/core/api.ts +8 -0
- package/core/app.d.ts +27 -0
- package/core/app.js +3 -0
- package/core/app.js.map +1 -0
- package/core/app.ts +32 -0
- package/core/fields.d.ts +17 -0
- package/core/fields.js +3 -0
- package/core/fields.js.map +1 -0
- package/core/fields.ts +19 -0
- package/core/index.d.ts +5 -0
- package/core/index.js +19 -7
- package/core/index.js.map +1 -1
- package/core/index.ts +5 -0
- package/core/permission.d.ts +109 -2
- package/core/permission.js +93 -0
- package/core/permission.js.map +1 -1
- package/core/permission.ts +117 -1
- package/core/scope.d.ts +12 -0
- package/core/scope.js +9 -0
- package/core/scope.js.map +1 -0
- package/core/scope.ts +12 -0
- package/enums/document.d.ts +1 -0
- package/enums/document.js +2 -0
- package/enums/document.js.map +1 -1
- package/enums/document.ts +1 -0
- package/enums/fields.d.ts +25 -0
- package/enums/fields.js +30 -0
- package/enums/fields.js.map +1 -0
- package/enums/fields.ts +26 -0
- package/enums/index.d.ts +1 -0
- package/enums/index.js +15 -6
- package/enums/index.js.map +1 -1
- package/enums/index.ts +1 -0
- package/enums/unit-template.js +1 -0
- package/enums/unit-template.js.map +1 -1
- package/enums/webhook.d.ts +3 -1
- package/enums/webhook.js +3 -0
- package/enums/webhook.js.map +1 -1
- package/enums/webhook.ts +3 -1
- package/index.js +13 -6
- package/index.js.map +1 -1
- package/models/app.d.ts +66 -0
- package/models/app.js +28 -0
- package/models/app.js.map +1 -0
- package/models/app.ts +75 -0
- package/models/client.d.ts +2 -1
- package/models/client.ts +2 -1
- package/models/department.d.ts +28 -0
- package/models/department.js +3 -0
- package/models/department.js.map +1 -0
- package/models/department.ts +31 -0
- package/models/document.d.ts +3 -3
- package/models/document.ts +3 -3
- package/models/extends.ts +1 -1
- package/models/index.d.ts +2 -0
- package/models/index.js +38 -29
- package/models/index.js.map +1 -1
- package/models/index.ts +2 -0
- package/models/media.d.ts +4 -0
- package/models/media.ts +5 -0
- package/models/organization.d.ts +32 -2
- package/models/organization.ts +45 -2
- package/models/page.d.ts +1 -1
- package/models/page.ts +1 -1
- package/models/product.d.ts +1 -0
- package/models/product.ts +1 -0
- package/models/project.d.ts +3 -3
- package/models/project.ts +3 -3
- package/models/unit-email.js +1 -0
- package/models/unit-email.js.map +1 -1
- package/models/unit-template.d.ts +1 -1
- package/models/unit-template.ts +1 -1
- package/models/unit.d.ts +3 -3
- package/models/unit.ts +3 -3
- package/models/webhook-event.d.ts +5 -2
- package/models/webhook-event.ts +5 -2
- package/models/webhook.d.ts +1 -0
- package/models/webhook.ts +1 -0
- package/package.json +8 -6
package/models/index.js
CHANGED
|
@@ -1,32 +1,41 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
function
|
|
3
|
-
|
|
4
|
-
}
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
+
}) : (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
o[k2] = m[k];
|
|
8
|
+
}));
|
|
9
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
10
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
|
+
};
|
|
5
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
13
|
+
__exportStar(require("./app"), exports);
|
|
14
|
+
__exportStar(require("./booking"), exports);
|
|
15
|
+
__exportStar(require("./client"), exports);
|
|
16
|
+
__exportStar(require("./department"), exports);
|
|
17
|
+
__exportStar(require("./document"), exports);
|
|
18
|
+
__exportStar(require("./extends"), exports);
|
|
19
|
+
__exportStar(require("./inquiry"), exports);
|
|
20
|
+
__exportStar(require("./media"), exports);
|
|
21
|
+
__exportStar(require("./notification-trigger"), exports);
|
|
22
|
+
__exportStar(require("./option-label"), exports);
|
|
23
|
+
__exportStar(require("./order"), exports);
|
|
24
|
+
__exportStar(require("./organization"), exports);
|
|
25
|
+
__exportStar(require("./page"), exports);
|
|
26
|
+
__exportStar(require("./producer"), exports);
|
|
27
|
+
__exportStar(require("./product"), exports);
|
|
28
|
+
__exportStar(require("./product-stats"), exports);
|
|
29
|
+
__exportStar(require("./project"), exports);
|
|
30
|
+
__exportStar(require("./queue-download"), exports);
|
|
31
|
+
__exportStar(require("./recommendation"), exports);
|
|
32
|
+
__exportStar(require("./supplier"), exports);
|
|
33
|
+
__exportStar(require("./tag"), exports);
|
|
34
|
+
__exportStar(require("./unit"), exports);
|
|
35
|
+
__exportStar(require("./unit-template"), exports);
|
|
36
|
+
__exportStar(require("./unit-email"), exports);
|
|
37
|
+
__exportStar(require("./upsell-template"), exports);
|
|
38
|
+
__exportStar(require("./user"), exports);
|
|
39
|
+
__exportStar(require("./webhook"), exports);
|
|
40
|
+
__exportStar(require("./webhook-event"), exports);
|
|
32
41
|
//# sourceMappingURL=index.js.map
|
package/models/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,wCAAsB;AACtB,4CAA0B;AAC1B,2CAAyB;AACzB,+CAA6B;AAC7B,6CAA2B;AAC3B,4CAA0B;AAC1B,4CAA0B;AAC1B,0CAAwB;AACxB,yDAAuC;AACvC,iDAA+B;AAC/B,0CAAwB;AACxB,iDAA+B;AAC/B,yCAAuB;AACvB,6CAA2B;AAC3B,4CAA0B;AAC1B,kDAAgC;AAChC,4CAA0B;AAC1B,mDAAiC;AACjC,mDAAiC;AACjC,6CAA2B;AAC3B,wCAAsB;AACtB,yCAAuB;AACvB,kDAAgC;AAChC,+CAA6B;AAC7B,oDAAkC;AAClC,yCAAuB;AACvB,4CAA0B;AAC1B,kDAAgC"}
|
package/models/index.ts
CHANGED
package/models/media.d.ts
CHANGED
|
@@ -49,6 +49,10 @@ export interface AptlyMediaSrcLocation {
|
|
|
49
49
|
export interface AptlyMediaSrcSchema<ID, DATE> extends Pick<AptlyMediaSchema<ID, DATE>, AptlyMediaSrcKeys> {
|
|
50
50
|
area?: AptlyMediaSrcArea;
|
|
51
51
|
location?: AptlyMediaSrcLocation;
|
|
52
|
+
/**
|
|
53
|
+
* @deprecated used my product images. Is slowly replaced with src/url
|
|
54
|
+
*/
|
|
55
|
+
image?: string;
|
|
52
56
|
}
|
|
53
57
|
export declare type AptlyMediaSrcKeys = '_id' | 'name' | 'src' | 'url' | 'alt' | 'title' | 'caption' | 'mime' | 'width' | 'height';
|
|
54
58
|
export declare type AptlyMediaSrc = AptlyMediaSrcSchema<string, string>;
|
package/models/media.ts
CHANGED
|
@@ -59,6 +59,11 @@ export interface AptlyMediaSrcLocation {
|
|
|
59
59
|
export interface AptlyMediaSrcSchema<ID, DATE> extends Pick<AptlyMediaSchema<ID, DATE>, AptlyMediaSrcKeys> {
|
|
60
60
|
area?: AptlyMediaSrcArea;
|
|
61
61
|
location?: AptlyMediaSrcLocation;
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* @deprecated used my product images. Is slowly replaced with src/url
|
|
65
|
+
*/
|
|
66
|
+
image?: string;
|
|
62
67
|
}
|
|
63
68
|
|
|
64
69
|
export type AptlyMediaSrcKeys = '_id' | 'name' | 'src' | 'url' | 'alt' | 'title' | 'caption' | 'mime' | 'width' | 'height';
|
package/models/organization.d.ts
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
import { AptlyPermissionModulesModels, AptlyPermissionOrganizationModels } from '../core';
|
|
2
|
-
import { AptlySignageSchema } from '../core/signage';
|
|
1
|
+
import { AptlyPermissionModulesModels, AptlyPermissionOrganizationModels, AptlyScope, AptlySignageSchema } from '../core';
|
|
3
2
|
import { AptlyUserSchema } from './user';
|
|
4
3
|
import { AptlyMediaSrc } from './media';
|
|
5
4
|
import { AptlyBaseSchema } from './extends';
|
|
5
|
+
import { AptlyDepartmentGeneric } from './department';
|
|
6
|
+
import { AptlyProducerSchema } from './producer';
|
|
7
|
+
import { AptlyAppSchema } from './app';
|
|
6
8
|
export declare type AptlyOrganization = AptlyOrganizationSchema<string, string>;
|
|
7
9
|
export interface AptlyOrganizationSchema<ID, DATE> extends AptlyBaseSchema<ID, DATE> {
|
|
8
10
|
slug: string;
|
|
@@ -26,6 +28,8 @@ export interface AptlyOrganizationSchema<ID, DATE> extends AptlyBaseSchema<ID, D
|
|
|
26
28
|
modules: AptlyPermissionModulesModels[];
|
|
27
29
|
contractSign?: AptlySignageSchema<ID, DATE>;
|
|
28
30
|
integrations: AptlyOrganizationIntegrationsSchema<ID>[];
|
|
31
|
+
invites: AptlyOrganizationInviteSchema<ID, DATE>[];
|
|
32
|
+
apps: AptlyOrganizationAppConfigSchema<ID, DATE>[];
|
|
29
33
|
/**
|
|
30
34
|
* @deprecated use createdAt
|
|
31
35
|
*/
|
|
@@ -43,4 +47,30 @@ export interface AptlyOrganizationMemberSchema<ID, DATE> {
|
|
|
43
47
|
_id: ID;
|
|
44
48
|
user: AptlyUserSchema<ID, DATE> | ID;
|
|
45
49
|
permissions: AptlyPermissionOrganizationModels[];
|
|
50
|
+
projects?: (ID | AptlyProducerSchema<ID, DATE>)[] | null;
|
|
51
|
+
departments?: (ID | AptlyDepartmentGeneric<ID, DATE>)[];
|
|
52
|
+
}
|
|
53
|
+
export declare type AptlyOrganizationInvite = AptlyOrganizationInviteSchema<string, string>;
|
|
54
|
+
export interface AptlyOrganizationInviteSchema<ID, DATE> {
|
|
55
|
+
_id: ID;
|
|
56
|
+
code: string;
|
|
57
|
+
created: DATE;
|
|
58
|
+
permissions?: AptlyPermissionOrganizationModels[];
|
|
59
|
+
projects?: ID[] | null;
|
|
60
|
+
departments?: ID[] | null;
|
|
61
|
+
claim: {
|
|
62
|
+
email?: string;
|
|
63
|
+
claimed: boolean;
|
|
64
|
+
claimedBy: ID;
|
|
65
|
+
claimTime?: DATE;
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
export declare type AptlyOrganizationAppConfig = AptlyOrganizationAppConfigSchema<string, string>;
|
|
69
|
+
export interface AptlyOrganizationAppConfigSchema<ID, DATE> extends Omit<AptlyBaseSchema<ID, DATE>, 'name' | 'archived'> {
|
|
70
|
+
app: ID | AptlyAppSchema<ID, DATE>;
|
|
71
|
+
scope: AptlyScope[];
|
|
72
|
+
settings: AptlyOrganizationAppConfigSetting;
|
|
73
|
+
}
|
|
74
|
+
export interface AptlyOrganizationAppConfigSetting {
|
|
75
|
+
[key: string]: string | number | boolean;
|
|
46
76
|
}
|
package/models/organization.ts
CHANGED
|
@@ -1,10 +1,18 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import {
|
|
2
|
+
AptlyPermissionModulesModels,
|
|
3
|
+
AptlyPermissionOrganizationModels,
|
|
4
|
+
AptlyScope,
|
|
5
|
+
AptlySignageSchema
|
|
6
|
+
} from '../core';
|
|
3
7
|
import { AptlyUserSchema } from './user';
|
|
4
8
|
import { AptlyMediaSrc } from './media';
|
|
5
9
|
import { AptlyBaseSchema } from './extends';
|
|
10
|
+
import { AptlyDepartmentGeneric } from './department';
|
|
11
|
+
import { AptlyProducerSchema } from './producer';
|
|
12
|
+
import { AptlyAppSchema } from './app';
|
|
6
13
|
|
|
7
14
|
export type AptlyOrganization = AptlyOrganizationSchema<string, string>;
|
|
15
|
+
|
|
8
16
|
export interface AptlyOrganizationSchema<ID, DATE> extends AptlyBaseSchema<ID, DATE> {
|
|
9
17
|
slug: string;
|
|
10
18
|
logo?: string | null;
|
|
@@ -27,6 +35,8 @@ export interface AptlyOrganizationSchema<ID, DATE> extends AptlyBaseSchema<ID, D
|
|
|
27
35
|
modules: AptlyPermissionModulesModels[];
|
|
28
36
|
contractSign?: AptlySignageSchema<ID, DATE>;
|
|
29
37
|
integrations: AptlyOrganizationIntegrationsSchema<ID>[];
|
|
38
|
+
invites: AptlyOrganizationInviteSchema<ID, DATE>[];
|
|
39
|
+
apps: AptlyOrganizationAppConfigSchema<ID, DATE>[];
|
|
30
40
|
|
|
31
41
|
/**
|
|
32
42
|
* @deprecated use createdAt
|
|
@@ -35,6 +45,7 @@ export interface AptlyOrganizationSchema<ID, DATE> extends AptlyBaseSchema<ID, D
|
|
|
35
45
|
}
|
|
36
46
|
|
|
37
47
|
export type AptlyOrganizationIntegrations = AptlyOrganizationIntegrationsSchema<string>;
|
|
48
|
+
|
|
38
49
|
export interface AptlyOrganizationIntegrationsSchema<ID> {
|
|
39
50
|
_id: ID;
|
|
40
51
|
integration: string;
|
|
@@ -43,8 +54,40 @@ export interface AptlyOrganizationIntegrationsSchema<ID> {
|
|
|
43
54
|
}
|
|
44
55
|
|
|
45
56
|
export type AptlyOrganizationMember = AptlyOrganizationMemberSchema<string, string>;
|
|
57
|
+
|
|
46
58
|
export interface AptlyOrganizationMemberSchema<ID, DATE> {
|
|
47
59
|
_id: ID;
|
|
48
60
|
user: AptlyUserSchema<ID, DATE> | ID;
|
|
49
61
|
permissions: AptlyPermissionOrganizationModels[];
|
|
62
|
+
projects?: (ID | AptlyProducerSchema<ID, DATE>)[] | null;
|
|
63
|
+
departments?: (ID | AptlyDepartmentGeneric<ID, DATE>)[];
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export type AptlyOrganizationInvite = AptlyOrganizationInviteSchema<string, string>;
|
|
67
|
+
|
|
68
|
+
export interface AptlyOrganizationInviteSchema<ID, DATE> {
|
|
69
|
+
_id: ID;
|
|
70
|
+
code: string;
|
|
71
|
+
created: DATE;
|
|
72
|
+
permissions?: AptlyPermissionOrganizationModels[];
|
|
73
|
+
projects?: ID[] | null;
|
|
74
|
+
departments?: ID[] | null;
|
|
75
|
+
claim: {
|
|
76
|
+
email?: string;
|
|
77
|
+
claimed: boolean;
|
|
78
|
+
claimedBy: ID;
|
|
79
|
+
claimTime?: DATE;
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
export type AptlyOrganizationAppConfig = AptlyOrganizationAppConfigSchema<string, string>;
|
|
84
|
+
|
|
85
|
+
export interface AptlyOrganizationAppConfigSchema<ID, DATE> extends Omit<AptlyBaseSchema<ID, DATE>, 'name' | 'archived'> {
|
|
86
|
+
app: ID | AptlyAppSchema<ID, DATE>;
|
|
87
|
+
scope: AptlyScope[];
|
|
88
|
+
settings: AptlyOrganizationAppConfigSetting;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
export interface AptlyOrganizationAppConfigSetting {
|
|
92
|
+
[key: string]: string | number | boolean;
|
|
50
93
|
}
|
package/models/page.d.ts
CHANGED
|
@@ -23,7 +23,7 @@ export interface AptlyPageSchema<ID, DATE> extends AptlyBaseSchema<ID, DATE> {
|
|
|
23
23
|
showInMenu: boolean;
|
|
24
24
|
}
|
|
25
25
|
export declare type AptlyPageSection = AptlyPageSectionSchema<string, string>;
|
|
26
|
-
export interface AptlyPageSectionSchema<ID,
|
|
26
|
+
export interface AptlyPageSectionSchema<ID, VALUE = any> {
|
|
27
27
|
_id: ID;
|
|
28
28
|
name: string;
|
|
29
29
|
type: AptlyPageSectionType;
|
package/models/page.ts
CHANGED
|
@@ -26,7 +26,7 @@ export interface AptlyPageSchema<ID, DATE> extends AptlyBaseSchema<ID, DATE> {
|
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
export type AptlyPageSection = AptlyPageSectionSchema<string, string>;
|
|
29
|
-
export interface AptlyPageSectionSchema<ID,
|
|
29
|
+
export interface AptlyPageSectionSchema<ID, VALUE = any> {
|
|
30
30
|
_id: ID;
|
|
31
31
|
name: string;
|
|
32
32
|
type: AptlyPageSectionType;
|
package/models/product.d.ts
CHANGED
package/models/product.ts
CHANGED
package/models/project.d.ts
CHANGED
|
@@ -13,7 +13,7 @@ export interface AptlyProjectSchema<ID, DATE> extends AptlyBaseSchema<ID, DATE>
|
|
|
13
13
|
*/
|
|
14
14
|
customers: ID[];
|
|
15
15
|
periods: AptlyProjectPeriodSchema<ID, DATE>[];
|
|
16
|
-
algorithms: AptlyProjectAlgorithmSchema<ID
|
|
16
|
+
algorithms: AptlyProjectAlgorithmSchema<ID>[];
|
|
17
17
|
documents: AptlyDocumentSchema<ID, DATE>[];
|
|
18
18
|
pages: ID[];
|
|
19
19
|
myPageText?: string;
|
|
@@ -36,8 +36,8 @@ export interface AptlyProjectPeriodSchema<ID, DATE> {
|
|
|
36
36
|
close: DATE;
|
|
37
37
|
override?: boolean;
|
|
38
38
|
}
|
|
39
|
-
export declare type AptlyProjectAlgorithm = AptlyProjectAlgorithmSchema<string
|
|
40
|
-
export interface AptlyProjectAlgorithmSchema<ID
|
|
39
|
+
export declare type AptlyProjectAlgorithm = AptlyProjectAlgorithmSchema<string>;
|
|
40
|
+
export interface AptlyProjectAlgorithmSchema<ID> {
|
|
41
41
|
_id: ID;
|
|
42
42
|
name: string;
|
|
43
43
|
pipeline: AptlyProjectAlgorithmPipelineSchema<ID>[];
|
package/models/project.ts
CHANGED
|
@@ -14,7 +14,7 @@ export interface AptlyProjectSchema<ID, DATE> extends AptlyBaseSchema<ID, DATE>
|
|
|
14
14
|
*/
|
|
15
15
|
customers: ID[];
|
|
16
16
|
periods: AptlyProjectPeriodSchema<ID, DATE>[];
|
|
17
|
-
algorithms: AptlyProjectAlgorithmSchema<ID
|
|
17
|
+
algorithms: AptlyProjectAlgorithmSchema<ID>[];
|
|
18
18
|
documents: AptlyDocumentSchema<ID, DATE>[];
|
|
19
19
|
pages: ID[];
|
|
20
20
|
myPageText?: string;
|
|
@@ -40,8 +40,8 @@ export interface AptlyProjectPeriodSchema<ID, DATE> {
|
|
|
40
40
|
override?: boolean;
|
|
41
41
|
}
|
|
42
42
|
|
|
43
|
-
export type AptlyProjectAlgorithm = AptlyProjectAlgorithmSchema<string
|
|
44
|
-
export interface AptlyProjectAlgorithmSchema<ID
|
|
43
|
+
export type AptlyProjectAlgorithm = AptlyProjectAlgorithmSchema<string>;
|
|
44
|
+
export interface AptlyProjectAlgorithmSchema<ID> {
|
|
45
45
|
_id: ID;
|
|
46
46
|
name: string;
|
|
47
47
|
pipeline: AptlyProjectAlgorithmPipelineSchema<ID>[];
|
package/models/unit-email.js
CHANGED
package/models/unit-email.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"unit-email.js","sourceRoot":"","sources":["unit-email.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"unit-email.js","sourceRoot":"","sources":["unit-email.ts"],"names":[],"mappings":";;;AA4BA,IAAY,kBAUX;AAVD,WAAY,kBAAkB;IAC5B,yCAAmB,CAAA;IACnB,uCAAiB,CAAA;IACjB,4CAAsB,CAAA;IACtB,gDAA0B,CAAA;IAC1B,kDAA4B,CAAA;IAC5B,wDAAkC,CAAA;IAClC,sDAAgC,CAAA;IAChC,oDAA8B,CAAA;IAC9B,kDAA4B,CAAA;AAC9B,CAAC,EAVW,kBAAkB,GAAlB,0BAAkB,KAAlB,0BAAkB,QAU7B"}
|
|
@@ -83,7 +83,7 @@ export interface AptlyUnitTemplateCategorySectionProductSchema<ID, DATE> {
|
|
|
83
83
|
consequenceParam?: string;
|
|
84
84
|
amount: number;
|
|
85
85
|
unitCost?: number;
|
|
86
|
-
algorithm: AptlyProjectAlgorithmSchema<ID
|
|
86
|
+
algorithm: AptlyProjectAlgorithmSchema<ID> | ID;
|
|
87
87
|
standard: boolean;
|
|
88
88
|
standardVariant?: ID;
|
|
89
89
|
partOfPackage?: ID;
|
package/models/unit-template.ts
CHANGED
|
@@ -95,7 +95,7 @@ export interface AptlyUnitTemplateCategorySectionProductSchema<ID, DATE> {
|
|
|
95
95
|
consequenceParam?: string;
|
|
96
96
|
amount: number;
|
|
97
97
|
unitCost?: number;
|
|
98
|
-
algorithm: AptlyProjectAlgorithmSchema<ID
|
|
98
|
+
algorithm: AptlyProjectAlgorithmSchema<ID> | ID;
|
|
99
99
|
standard: boolean;
|
|
100
100
|
standardVariant?: ID;
|
|
101
101
|
partOfPackage?: ID;
|
package/models/unit.d.ts
CHANGED
|
@@ -28,7 +28,7 @@ export interface AptlyUnitSchema<ID, DATE> extends AptlyUnitTemplateBaseSchema<I
|
|
|
28
28
|
project: AptlyProjectSchema<ID, DATE> | ID;
|
|
29
29
|
users: (AptlyUserSchema<ID, DATE> | ID)[];
|
|
30
30
|
unitTemplate: ID | AptlyUnitTemplateSchema<ID, DATE>;
|
|
31
|
-
confirmedPeriods: AptlyUnitConfirmedPeriodSchema<ID
|
|
31
|
+
confirmedPeriods: AptlyUnitConfirmedPeriodSchema<ID>[];
|
|
32
32
|
queueInvites: string[];
|
|
33
33
|
invites: AptlyUnitInviteSchema<ID, DATE>[];
|
|
34
34
|
/**
|
|
@@ -156,8 +156,8 @@ export interface IUnitSpec {
|
|
|
156
156
|
}[];
|
|
157
157
|
}[];
|
|
158
158
|
}
|
|
159
|
-
export declare type AptlyUnitConfirmedPeriod = AptlyUnitConfirmedPeriodSchema<string
|
|
160
|
-
export interface AptlyUnitConfirmedPeriodSchema<ID
|
|
159
|
+
export declare type AptlyUnitConfirmedPeriod = AptlyUnitConfirmedPeriodSchema<string>;
|
|
160
|
+
export interface AptlyUnitConfirmedPeriodSchema<ID> {
|
|
161
161
|
_id: ID;
|
|
162
162
|
period: ID;
|
|
163
163
|
order: ID;
|
package/models/unit.ts
CHANGED
|
@@ -30,7 +30,7 @@ export interface AptlyUnitSchema<ID, DATE> extends AptlyUnitTemplateBaseSchema<I
|
|
|
30
30
|
project: AptlyProjectSchema<ID, DATE> | ID;
|
|
31
31
|
users: (AptlyUserSchema<ID, DATE> | ID)[];
|
|
32
32
|
unitTemplate: ID | AptlyUnitTemplateSchema<ID, DATE>;
|
|
33
|
-
confirmedPeriods: AptlyUnitConfirmedPeriodSchema<ID
|
|
33
|
+
confirmedPeriods: AptlyUnitConfirmedPeriodSchema<ID>[];
|
|
34
34
|
queueInvites: string[];
|
|
35
35
|
invites: AptlyUnitInviteSchema<ID, DATE>[];
|
|
36
36
|
/**
|
|
@@ -174,8 +174,8 @@ export interface IUnitSpec {
|
|
|
174
174
|
}[];
|
|
175
175
|
}
|
|
176
176
|
|
|
177
|
-
export type AptlyUnitConfirmedPeriod = AptlyUnitConfirmedPeriodSchema<string
|
|
178
|
-
export interface AptlyUnitConfirmedPeriodSchema<ID
|
|
177
|
+
export type AptlyUnitConfirmedPeriod = AptlyUnitConfirmedPeriodSchema<string>;
|
|
178
|
+
export interface AptlyUnitConfirmedPeriodSchema<ID> {
|
|
179
179
|
_id: ID;
|
|
180
180
|
period: ID;
|
|
181
181
|
order: ID;
|
|
@@ -11,11 +11,13 @@ export interface AptlyWebhookEventSchema<ID, DATE, DATA = unknown> extends Omit<
|
|
|
11
11
|
datacontenttype: 'application/json';
|
|
12
12
|
data?: DATA;
|
|
13
13
|
state?: string;
|
|
14
|
+
secret?: string;
|
|
14
15
|
run: DATE;
|
|
15
16
|
webhook: ID;
|
|
16
17
|
organization: ID;
|
|
17
|
-
project
|
|
18
|
-
unit
|
|
18
|
+
project?: ID;
|
|
19
|
+
unit?: ID;
|
|
20
|
+
app?: ID;
|
|
19
21
|
status: AptlyWebhookEventStatus;
|
|
20
22
|
url: string;
|
|
21
23
|
headers: AptlyWebhookEventHeaders;
|
|
@@ -37,6 +39,7 @@ export interface AptlyWebhookEventResponseSchema<ID, DATE, DATA = any> {
|
|
|
37
39
|
export interface AptlyWebhookEventHeaders {
|
|
38
40
|
'x-aptly-url-sha256'?: string;
|
|
39
41
|
'x-aptly-content-sha256'?: string;
|
|
42
|
+
'x-aptly-organization': string;
|
|
40
43
|
'webhook-request-origin': string;
|
|
41
44
|
'content-type': 'application/json;charset=UTF-8';
|
|
42
45
|
}
|
package/models/webhook-event.ts
CHANGED
|
@@ -12,12 +12,14 @@ export interface AptlyWebhookEventSchema<ID, DATE, DATA = unknown> extends Omit<
|
|
|
12
12
|
datacontenttype: 'application/json';
|
|
13
13
|
data?: DATA;
|
|
14
14
|
state?: string;
|
|
15
|
+
secret?: string;
|
|
15
16
|
|
|
16
17
|
run: DATE;
|
|
17
18
|
webhook: ID;
|
|
18
19
|
organization: ID;
|
|
19
|
-
project
|
|
20
|
-
unit
|
|
20
|
+
project?: ID;
|
|
21
|
+
unit?: ID;
|
|
22
|
+
app?: ID;
|
|
21
23
|
status: AptlyWebhookEventStatus;
|
|
22
24
|
url: string;
|
|
23
25
|
headers: AptlyWebhookEventHeaders;
|
|
@@ -42,6 +44,7 @@ export interface AptlyWebhookEventResponseSchema<ID, DATE, DATA = any> {
|
|
|
42
44
|
export interface AptlyWebhookEventHeaders {
|
|
43
45
|
'x-aptly-url-sha256'?: string;
|
|
44
46
|
'x-aptly-content-sha256'?: string;
|
|
47
|
+
'x-aptly-organization': string;
|
|
45
48
|
'webhook-request-origin': string;
|
|
46
49
|
'content-type': 'application/json;charset=UTF-8';
|
|
47
50
|
}
|
package/models/webhook.d.ts
CHANGED
package/models/webhook.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aptly-as/types",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.6.0",
|
|
4
4
|
"description": "Aptly types and enums",
|
|
5
5
|
"main": "./index.js",
|
|
6
6
|
"types": "./index.d.ts",
|
|
@@ -12,15 +12,14 @@
|
|
|
12
12
|
"start": "yarn build:watch",
|
|
13
13
|
"build": "tsc",
|
|
14
14
|
"build:watch": "tsc --watch --incremental",
|
|
15
|
-
"lint": "tslint --project \"./tsconfig.json\"",
|
|
16
|
-
"test": "jest",
|
|
17
|
-
"test:watch": "jest --watchAll",
|
|
18
|
-
"storybook": "start-storybook -p 9001 -c .storybook",
|
|
19
15
|
"postversion": "git push && git push --tags",
|
|
20
16
|
"prepublish": "npm run build"
|
|
21
17
|
},
|
|
22
18
|
"dependencies": {},
|
|
23
19
|
"devDependencies": {
|
|
20
|
+
"husky": "^7.0.4",
|
|
21
|
+
"lint-staged": "^12.3.4",
|
|
22
|
+
"prettier": "^2.5.1",
|
|
24
23
|
"typescript": "^4.2.4"
|
|
25
24
|
},
|
|
26
25
|
"repository": {
|
|
@@ -44,5 +43,8 @@
|
|
|
44
43
|
"index.d.ts",
|
|
45
44
|
"index.js",
|
|
46
45
|
"index.js.map"
|
|
47
|
-
]
|
|
46
|
+
],
|
|
47
|
+
"lint-staged": {
|
|
48
|
+
"**/*": "prettier --write --ignore-unknown"
|
|
49
|
+
}
|
|
48
50
|
}
|