@things-factory/saas 0.0.0-stage → 10.1.234
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/README.md +19 -2
- package/dist-client/bootstrap.d.ts +1 -0
- package/dist-client/bootstrap.js +5 -0
- package/dist-client/bootstrap.js.map +1 -0
- package/dist-client/components/saas-bill-editor.d.ts +59 -0
- package/dist-client/components/saas-bill-editor.js +211 -0
- package/dist-client/components/saas-bill-editor.js.map +1 -0
- package/dist-client/entity360/saas-account-360.d.ts +12 -0
- package/dist-client/entity360/saas-account-360.js +231 -0
- package/dist-client/entity360/saas-account-360.js.map +1 -0
- package/dist-client/index.d.ts +3 -0
- package/dist-client/index.js +4 -0
- package/dist-client/index.js.map +1 -0
- package/dist-client/pages/saas-account-list.d.ts +57 -0
- package/dist-client/pages/saas-account-list.js +175 -0
- package/dist-client/pages/saas-account-list.js.map +1 -0
- package/dist-client/pages/saas-account-page.d.ts +54 -0
- package/dist-client/pages/saas-account-page.js +352 -0
- package/dist-client/pages/saas-account-page.js.map +1 -0
- package/dist-client/pages/saas-cost-trend.d.ts +23 -0
- package/dist-client/pages/saas-cost-trend.js +219 -0
- package/dist-client/pages/saas-cost-trend.js.map +1 -0
- package/dist-client/route.d.ts +1 -0
- package/dist-client/route.js +16 -0
- package/dist-client/route.js.map +1 -0
- package/dist-client/tsconfig.tsbuildinfo +1 -0
- package/dist-client/words.d.ts +47 -0
- package/dist-client/words.js +39 -0
- package/dist-client/words.js.map +1 -0
- package/dist-server/index.d.ts +1 -0
- package/dist-server/index.js +9 -0
- package/dist-server/index.js.map +1 -0
- package/dist-server/role-tasks.d.ts +2 -0
- package/dist-server/role-tasks.js +16 -0
- package/dist-server/role-tasks.js.map +1 -0
- package/dist-server/service/checks.d.ts +32 -0
- package/dist-server/service/checks.js +83 -0
- package/dist-server/service/checks.js.map +1 -0
- package/dist-server/service/index.d.ts +20 -0
- package/dist-server/service/index.js +38 -0
- package/dist-server/service/index.js.map +1 -0
- package/dist-server/service/saas-access.d.ts +20 -0
- package/dist-server/service/saas-access.js +36 -0
- package/dist-server/service/saas-access.js.map +1 -0
- package/dist-server/service/saas-account.d.ts +43 -0
- package/dist-server/service/saas-account.js +166 -0
- package/dist-server/service/saas-account.js.map +1 -0
- package/dist-server/service/saas-bill.d.ts +41 -0
- package/dist-server/service/saas-bill.js +160 -0
- package/dist-server/service/saas-bill.js.map +1 -0
- package/dist-server/service/saas-mutation.d.ts +12 -0
- package/dist-server/service/saas-mutation.js +103 -0
- package/dist-server/service/saas-mutation.js.map +1 -0
- package/dist-server/service/saas-query.d.ts +69 -0
- package/dist-server/service/saas-query.js +215 -0
- package/dist-server/service/saas-query.js.map +1 -0
- package/dist-server/service/saas-rules.d.ts +138 -0
- package/dist-server/service/saas-rules.js +217 -0
- package/dist-server/service/saas-rules.js.map +1 -0
- package/dist-server/service/saas-seat.d.ts +25 -0
- package/dist-server/service/saas-seat.js +105 -0
- package/dist-server/service/saas-seat.js.map +1 -0
- package/dist-server/service/saas-service.d.ts +119 -0
- package/dist-server/service/saas-service.js +492 -0
- package/dist-server/service/saas-service.js.map +1 -0
- package/dist-server/service/saas-subscription.d.ts +44 -0
- package/dist-server/service/saas-subscription.js +174 -0
- package/dist-server/service/saas-subscription.js.map +1 -0
- package/dist-server/service/saas-trend-type.d.ts +9 -0
- package/dist-server/service/saas-trend-type.js +37 -0
- package/dist-server/service/saas-trend-type.js.map +1 -0
- package/dist-server/service/saas-type.d.ts +113 -0
- package/dist-server/service/saas-type.js +430 -0
- package/dist-server/service/saas-type.js.map +1 -0
- package/dist-server/tsconfig.tsbuildinfo +1 -0
- package/package.json +49 -4
- package/things-factory.config.js +13 -0
- package/translations/en.json +185 -0
- package/translations/es.json +185 -0
- package/translations/ja.json +185 -0
- package/translations/ko.json +185 -0
- package/translations/ms.json +185 -0
- package/translations/zh.json +185 -0
|
@@ -0,0 +1,430 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SaasChange = exports.SaasCostTrend = exports.SaasAlert = exports.SaasDepartmentSeries = exports.SaasTrendSeries = exports.SaasAccountList = exports.SaasBillInput = exports.SaasBillLineInput = exports.SaasSeatPatch = exports.SaasSubscriptionPatch = exports.SaasAccountPatch = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const type_graphql_1 = require("type-graphql");
|
|
6
|
+
const saas_account_1 = require("./saas-account");
|
|
7
|
+
const saas_rules_1 = require("./saas-rules");
|
|
8
|
+
let SaasAccountPatch = class SaasAccountPatch {
|
|
9
|
+
};
|
|
10
|
+
exports.SaasAccountPatch = SaasAccountPatch;
|
|
11
|
+
tslib_1.__decorate([
|
|
12
|
+
(0, type_graphql_1.Field)(type => type_graphql_1.ID, { nullable: true, description: 'The account; empty for a new one' }),
|
|
13
|
+
tslib_1.__metadata("design:type", String)
|
|
14
|
+
], SaasAccountPatch.prototype, "id", void 0);
|
|
15
|
+
tslib_1.__decorate([
|
|
16
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'Grid flag: + new, M changed, - deleted' }),
|
|
17
|
+
tslib_1.__metadata("design:type", String)
|
|
18
|
+
], SaasAccountPatch.prototype, "cuFlag", void 0);
|
|
19
|
+
tslib_1.__decorate([
|
|
20
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'The service' }),
|
|
21
|
+
tslib_1.__metadata("design:type", String)
|
|
22
|
+
], SaasAccountPatch.prototype, "name", void 0);
|
|
23
|
+
tslib_1.__decorate([
|
|
24
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'The vendor - a counterparty id' }),
|
|
25
|
+
tslib_1.__metadata("design:type", String)
|
|
26
|
+
], SaasAccountPatch.prototype, "counterpartyId", void 0);
|
|
27
|
+
tslib_1.__decorate([
|
|
28
|
+
(0, type_graphql_1.Field)({ nullable: true, description: "The vendor's name for the account" }),
|
|
29
|
+
tslib_1.__metadata("design:type", String)
|
|
30
|
+
], SaasAccountPatch.prototype, "identifier", void 0);
|
|
31
|
+
tslib_1.__decorate([
|
|
32
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'The account it is under - an account id' }),
|
|
33
|
+
tslib_1.__metadata("design:type", String)
|
|
34
|
+
], SaasAccountPatch.prototype, "parentId", void 0);
|
|
35
|
+
tslib_1.__decorate([
|
|
36
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'What it is used for' }),
|
|
37
|
+
tslib_1.__metadata("design:type", String)
|
|
38
|
+
], SaasAccountPatch.prototype, "purpose", void 0);
|
|
39
|
+
tslib_1.__decorate([
|
|
40
|
+
(0, type_graphql_1.Field)(type => [String], { nullable: true, description: 'Who administers it - employee ids' }),
|
|
41
|
+
tslib_1.__metadata("design:type", Array)
|
|
42
|
+
], SaasAccountPatch.prototype, "adminIds", void 0);
|
|
43
|
+
tslib_1.__decorate([
|
|
44
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'Where the vendor sends the bills' }),
|
|
45
|
+
tslib_1.__metadata("design:type", String)
|
|
46
|
+
], SaasAccountPatch.prototype, "billingEmail", void 0);
|
|
47
|
+
tslib_1.__decorate([
|
|
48
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'What it is paid from - a bank account or card id' }),
|
|
49
|
+
tslib_1.__metadata("design:type", String)
|
|
50
|
+
], SaasAccountPatch.prototype, "paymentAccountId", void 0);
|
|
51
|
+
tslib_1.__decorate([
|
|
52
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'The currency it is billed in' }),
|
|
53
|
+
tslib_1.__metadata("design:type", String)
|
|
54
|
+
], SaasAccountPatch.prototype, "currency", void 0);
|
|
55
|
+
tslib_1.__decorate([
|
|
56
|
+
(0, type_graphql_1.Field)(type => type_graphql_1.Int, { nullable: true, description: 'The day of the month the bill is paid' }),
|
|
57
|
+
tslib_1.__metadata("design:type", Number)
|
|
58
|
+
], SaasAccountPatch.prototype, "billingDay", void 0);
|
|
59
|
+
tslib_1.__decorate([
|
|
60
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'Where its secrets are kept' }),
|
|
61
|
+
tslib_1.__metadata("design:type", String)
|
|
62
|
+
], SaasAccountPatch.prototype, "secretLocation", void 0);
|
|
63
|
+
tslib_1.__decorate([
|
|
64
|
+
(0, type_graphql_1.Field)(type => type_graphql_1.Float, { nullable: true, description: 'A rise over the month before told above this part' }),
|
|
65
|
+
tslib_1.__metadata("design:type", Number)
|
|
66
|
+
], SaasAccountPatch.prototype, "increaseAlertRate", void 0);
|
|
67
|
+
tslib_1.__decorate([
|
|
68
|
+
(0, type_graphql_1.Field)(type => saas_rules_1.SaasAccountStatus, { nullable: true, description: 'In use or closed' }),
|
|
69
|
+
tslib_1.__metadata("design:type", String)
|
|
70
|
+
], SaasAccountPatch.prototype, "status", void 0);
|
|
71
|
+
tslib_1.__decorate([
|
|
72
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'The day it was closed - YYYY-MM-DD' }),
|
|
73
|
+
tslib_1.__metadata("design:type", String)
|
|
74
|
+
], SaasAccountPatch.prototype, "closedOn", void 0);
|
|
75
|
+
tslib_1.__decorate([
|
|
76
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'Notes' }),
|
|
77
|
+
tslib_1.__metadata("design:type", String)
|
|
78
|
+
], SaasAccountPatch.prototype, "description", void 0);
|
|
79
|
+
exports.SaasAccountPatch = SaasAccountPatch = tslib_1.__decorate([
|
|
80
|
+
(0, type_graphql_1.InputType)({ description: 'A row of the accounts grid (cuFlag + for new, M for changed, - for deleted)' })
|
|
81
|
+
], SaasAccountPatch);
|
|
82
|
+
let SaasSubscriptionPatch = class SaasSubscriptionPatch {
|
|
83
|
+
};
|
|
84
|
+
exports.SaasSubscriptionPatch = SaasSubscriptionPatch;
|
|
85
|
+
tslib_1.__decorate([
|
|
86
|
+
(0, type_graphql_1.Field)(type => type_graphql_1.ID, { nullable: true, description: 'The subscription; empty for a new one' }),
|
|
87
|
+
tslib_1.__metadata("design:type", String)
|
|
88
|
+
], SaasSubscriptionPatch.prototype, "id", void 0);
|
|
89
|
+
tslib_1.__decorate([
|
|
90
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'Grid flag: + new, M changed, - deleted' }),
|
|
91
|
+
tslib_1.__metadata("design:type", String)
|
|
92
|
+
], SaasSubscriptionPatch.prototype, "cuFlag", void 0);
|
|
93
|
+
tslib_1.__decorate([
|
|
94
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'The product and plan' }),
|
|
95
|
+
tslib_1.__metadata("design:type", String)
|
|
96
|
+
], SaasSubscriptionPatch.prototype, "name", void 0);
|
|
97
|
+
tslib_1.__decorate([
|
|
98
|
+
(0, type_graphql_1.Field)(type => saas_rules_1.SaasBilling, { nullable: true, description: 'How it is paid for' }),
|
|
99
|
+
tslib_1.__metadata("design:type", String)
|
|
100
|
+
], SaasSubscriptionPatch.prototype, "billing", void 0);
|
|
101
|
+
tslib_1.__decorate([
|
|
102
|
+
(0, type_graphql_1.Field)(type => type_graphql_1.Float, { nullable: true, description: 'Seats or units' }),
|
|
103
|
+
tslib_1.__metadata("design:type", Number)
|
|
104
|
+
], SaasSubscriptionPatch.prototype, "quantity", void 0);
|
|
105
|
+
tslib_1.__decorate([
|
|
106
|
+
(0, type_graphql_1.Field)(type => type_graphql_1.Float, { nullable: true, description: 'The price of one seat for one billing' }),
|
|
107
|
+
tslib_1.__metadata("design:type", Number)
|
|
108
|
+
], SaasSubscriptionPatch.prototype, "unitPrice", void 0);
|
|
109
|
+
tslib_1.__decorate([
|
|
110
|
+
(0, type_graphql_1.Field)(type => type_graphql_1.Float, { nullable: true, description: 'What one billing costs' }),
|
|
111
|
+
tslib_1.__metadata("design:type", Number)
|
|
112
|
+
], SaasSubscriptionPatch.prototype, "amount", void 0);
|
|
113
|
+
tslib_1.__decorate([
|
|
114
|
+
(0, type_graphql_1.Field)(type => type_graphql_1.Float, { nullable: true, description: 'What a month of usage may cost' }),
|
|
115
|
+
tslib_1.__metadata("design:type", Number)
|
|
116
|
+
], SaasSubscriptionPatch.prototype, "budget", void 0);
|
|
117
|
+
tslib_1.__decorate([
|
|
118
|
+
(0, type_graphql_1.Field)(type => type_graphql_1.Int, { nullable: true, description: 'Billed every so many months' }),
|
|
119
|
+
tslib_1.__metadata("design:type", Number)
|
|
120
|
+
], SaasSubscriptionPatch.prototype, "everyMonths", void 0);
|
|
121
|
+
tslib_1.__decorate([
|
|
122
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'The day it started - YYYY-MM-DD' }),
|
|
123
|
+
tslib_1.__metadata("design:type", String)
|
|
124
|
+
], SaasSubscriptionPatch.prototype, "startOn", void 0);
|
|
125
|
+
tslib_1.__decorate([
|
|
126
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'The day it renews - YYYY-MM-DD' }),
|
|
127
|
+
tslib_1.__metadata("design:type", String)
|
|
128
|
+
], SaasSubscriptionPatch.prototype, "renewalOn", void 0);
|
|
129
|
+
tslib_1.__decorate([
|
|
130
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'Whether the vendor renews it unless cancelled' }),
|
|
131
|
+
tslib_1.__metadata("design:type", Boolean)
|
|
132
|
+
], SaasSubscriptionPatch.prototype, "autoRenew", void 0);
|
|
133
|
+
tslib_1.__decorate([
|
|
134
|
+
(0, type_graphql_1.Field)(type => type_graphql_1.Int, { nullable: true, description: 'Days before renewal it must be cancelled' }),
|
|
135
|
+
tslib_1.__metadata("design:type", Number)
|
|
136
|
+
], SaasSubscriptionPatch.prototype, "noticeDays", void 0);
|
|
137
|
+
tslib_1.__decorate([
|
|
138
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'The department it is for - a department id' }),
|
|
139
|
+
tslib_1.__metadata("design:type", String)
|
|
140
|
+
], SaasSubscriptionPatch.prototype, "departmentId", void 0);
|
|
141
|
+
tslib_1.__decorate([
|
|
142
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'For a license owned: its asset - an asset id' }),
|
|
143
|
+
tslib_1.__metadata("design:type", String)
|
|
144
|
+
], SaasSubscriptionPatch.prototype, "assetId", void 0);
|
|
145
|
+
tslib_1.__decorate([
|
|
146
|
+
(0, type_graphql_1.Field)(type => saas_rules_1.SaasSubscriptionStatus, { nullable: true, description: 'In use, not to be renewed, or ended' }),
|
|
147
|
+
tslib_1.__metadata("design:type", String)
|
|
148
|
+
], SaasSubscriptionPatch.prototype, "status", void 0);
|
|
149
|
+
tslib_1.__decorate([
|
|
150
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'The day it ended - YYYY-MM-DD' }),
|
|
151
|
+
tslib_1.__metadata("design:type", String)
|
|
152
|
+
], SaasSubscriptionPatch.prototype, "endedOn", void 0);
|
|
153
|
+
tslib_1.__decorate([
|
|
154
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'Notes' }),
|
|
155
|
+
tslib_1.__metadata("design:type", String)
|
|
156
|
+
], SaasSubscriptionPatch.prototype, "description", void 0);
|
|
157
|
+
exports.SaasSubscriptionPatch = SaasSubscriptionPatch = tslib_1.__decorate([
|
|
158
|
+
(0, type_graphql_1.InputType)({ description: 'A row of the subscriptions grid of an account' })
|
|
159
|
+
], SaasSubscriptionPatch);
|
|
160
|
+
let SaasSeatPatch = class SaasSeatPatch {
|
|
161
|
+
};
|
|
162
|
+
exports.SaasSeatPatch = SaasSeatPatch;
|
|
163
|
+
tslib_1.__decorate([
|
|
164
|
+
(0, type_graphql_1.Field)(type => type_graphql_1.ID, { nullable: true, description: 'The seat; empty for a new one' }),
|
|
165
|
+
tslib_1.__metadata("design:type", String)
|
|
166
|
+
], SaasSeatPatch.prototype, "id", void 0);
|
|
167
|
+
tslib_1.__decorate([
|
|
168
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'Grid flag: + new, M changed, - deleted' }),
|
|
169
|
+
tslib_1.__metadata("design:type", String)
|
|
170
|
+
], SaasSeatPatch.prototype, "cuFlag", void 0);
|
|
171
|
+
tslib_1.__decorate([
|
|
172
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'The employee who holds it - an employee id' }),
|
|
173
|
+
tslib_1.__metadata("design:type", String)
|
|
174
|
+
], SaasSeatPatch.prototype, "employeeId", void 0);
|
|
175
|
+
tslib_1.__decorate([
|
|
176
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'Who holds it when it is no employee' }),
|
|
177
|
+
tslib_1.__metadata("design:type", String)
|
|
178
|
+
], SaasSeatPatch.prototype, "holder", void 0);
|
|
179
|
+
tslib_1.__decorate([
|
|
180
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'The day it was given - YYYY-MM-DD' }),
|
|
181
|
+
tslib_1.__metadata("design:type", String)
|
|
182
|
+
], SaasSeatPatch.prototype, "fromOn", void 0);
|
|
183
|
+
tslib_1.__decorate([
|
|
184
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'The day it was taken back - YYYY-MM-DD' }),
|
|
185
|
+
tslib_1.__metadata("design:type", String)
|
|
186
|
+
], SaasSeatPatch.prototype, "untilOn", void 0);
|
|
187
|
+
tslib_1.__decorate([
|
|
188
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'Notes' }),
|
|
189
|
+
tslib_1.__metadata("design:type", String)
|
|
190
|
+
], SaasSeatPatch.prototype, "description", void 0);
|
|
191
|
+
exports.SaasSeatPatch = SaasSeatPatch = tslib_1.__decorate([
|
|
192
|
+
(0, type_graphql_1.InputType)({ description: 'A row of the seats grid of a subscription' })
|
|
193
|
+
], SaasSeatPatch);
|
|
194
|
+
let SaasBillLineInput = class SaasBillLineInput {
|
|
195
|
+
};
|
|
196
|
+
exports.SaasBillLineInput = SaasBillLineInput;
|
|
197
|
+
tslib_1.__decorate([
|
|
198
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'The subscription it is for; empty for tax and credits' }),
|
|
199
|
+
tslib_1.__metadata("design:type", String)
|
|
200
|
+
], SaasBillLineInput.prototype, "subscriptionId", void 0);
|
|
201
|
+
tslib_1.__decorate([
|
|
202
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'What the bill calls it' }),
|
|
203
|
+
tslib_1.__metadata("design:type", String)
|
|
204
|
+
], SaasBillLineInput.prototype, "label", void 0);
|
|
205
|
+
tslib_1.__decorate([
|
|
206
|
+
(0, type_graphql_1.Field)(type => type_graphql_1.Float, { description: 'What it cost; a credit below zero' }),
|
|
207
|
+
tslib_1.__metadata("design:type", Number)
|
|
208
|
+
], SaasBillLineInput.prototype, "amount", void 0);
|
|
209
|
+
exports.SaasBillLineInput = SaasBillLineInput = tslib_1.__decorate([
|
|
210
|
+
(0, type_graphql_1.InputType)({ description: 'A line of a bill' })
|
|
211
|
+
], SaasBillLineInput);
|
|
212
|
+
let SaasBillInput = class SaasBillInput {
|
|
213
|
+
};
|
|
214
|
+
exports.SaasBillInput = SaasBillInput;
|
|
215
|
+
tslib_1.__decorate([
|
|
216
|
+
(0, type_graphql_1.Field)(type => type_graphql_1.ID, { nullable: true, description: 'The bill; empty for a new one' }),
|
|
217
|
+
tslib_1.__metadata("design:type", String)
|
|
218
|
+
], SaasBillInput.prototype, "id", void 0);
|
|
219
|
+
tslib_1.__decorate([
|
|
220
|
+
(0, type_graphql_1.Field)({ description: 'The month it bills - YYYY-MM' }),
|
|
221
|
+
tslib_1.__metadata("design:type", String)
|
|
222
|
+
], SaasBillInput.prototype, "month", void 0);
|
|
223
|
+
tslib_1.__decorate([
|
|
224
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'The day the vendor billed it - YYYY-MM-DD' }),
|
|
225
|
+
tslib_1.__metadata("design:type", String)
|
|
226
|
+
], SaasBillInput.prototype, "billedOn", void 0);
|
|
227
|
+
tslib_1.__decorate([
|
|
228
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'Notes' }),
|
|
229
|
+
tslib_1.__metadata("design:type", String)
|
|
230
|
+
], SaasBillInput.prototype, "description", void 0);
|
|
231
|
+
tslib_1.__decorate([
|
|
232
|
+
(0, type_graphql_1.Field)(type => [SaasBillLineInput], { description: 'Its lines' }),
|
|
233
|
+
tslib_1.__metadata("design:type", Array)
|
|
234
|
+
], SaasBillInput.prototype, "lines", void 0);
|
|
235
|
+
exports.SaasBillInput = SaasBillInput = tslib_1.__decorate([
|
|
236
|
+
(0, type_graphql_1.InputType)({ description: 'A bill of an account for a month, its lines whole' })
|
|
237
|
+
], SaasBillInput);
|
|
238
|
+
let SaasAccountList = class SaasAccountList {
|
|
239
|
+
};
|
|
240
|
+
exports.SaasAccountList = SaasAccountList;
|
|
241
|
+
tslib_1.__decorate([
|
|
242
|
+
(0, type_graphql_1.Field)(type => [saas_account_1.SaasAccount], { description: 'Accounts on the page' }),
|
|
243
|
+
tslib_1.__metadata("design:type", Array)
|
|
244
|
+
], SaasAccountList.prototype, "items", void 0);
|
|
245
|
+
tslib_1.__decorate([
|
|
246
|
+
(0, type_graphql_1.Field)(type => type_graphql_1.Int, { description: 'Number of accounts matching the list parameters' }),
|
|
247
|
+
tslib_1.__metadata("design:type", Number)
|
|
248
|
+
], SaasAccountList.prototype, "total", void 0);
|
|
249
|
+
exports.SaasAccountList = SaasAccountList = tslib_1.__decorate([
|
|
250
|
+
(0, type_graphql_1.ObjectType)({ description: 'A page of accounts' })
|
|
251
|
+
], SaasAccountList);
|
|
252
|
+
let SaasTrendSeries = class SaasTrendSeries {
|
|
253
|
+
};
|
|
254
|
+
exports.SaasTrendSeries = SaasTrendSeries;
|
|
255
|
+
tslib_1.__decorate([
|
|
256
|
+
(0, type_graphql_1.Field)({ description: 'What the series is of' }),
|
|
257
|
+
tslib_1.__metadata("design:type", String)
|
|
258
|
+
], SaasTrendSeries.prototype, "key", void 0);
|
|
259
|
+
tslib_1.__decorate([
|
|
260
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'The account' }),
|
|
261
|
+
tslib_1.__metadata("design:type", String)
|
|
262
|
+
], SaasTrendSeries.prototype, "accountId", void 0);
|
|
263
|
+
tslib_1.__decorate([
|
|
264
|
+
(0, type_graphql_1.Field)({ nullable: true, description: "The account's name" }),
|
|
265
|
+
tslib_1.__metadata("design:type", String)
|
|
266
|
+
], SaasTrendSeries.prototype, "accountName", void 0);
|
|
267
|
+
tslib_1.__decorate([
|
|
268
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'The subscription; empty for the lines on none' }),
|
|
269
|
+
tslib_1.__metadata("design:type", String)
|
|
270
|
+
], SaasTrendSeries.prototype, "subscriptionId", void 0);
|
|
271
|
+
tslib_1.__decorate([
|
|
272
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'The account or subscription name' }),
|
|
273
|
+
tslib_1.__metadata("design:type", String)
|
|
274
|
+
], SaasTrendSeries.prototype, "name", void 0);
|
|
275
|
+
tslib_1.__decorate([
|
|
276
|
+
(0, type_graphql_1.Field)({ description: 'The currency the amounts are in' }),
|
|
277
|
+
tslib_1.__metadata("design:type", String)
|
|
278
|
+
], SaasTrendSeries.prototype, "currency", void 0);
|
|
279
|
+
tslib_1.__decorate([
|
|
280
|
+
(0, type_graphql_1.Field)(type => [type_graphql_1.Float], { description: 'One amount a month, in the order of the months' }),
|
|
281
|
+
tslib_1.__metadata("design:type", Array)
|
|
282
|
+
], SaasTrendSeries.prototype, "amounts", void 0);
|
|
283
|
+
tslib_1.__decorate([
|
|
284
|
+
(0, type_graphql_1.Field)(type => type_graphql_1.Float, { description: 'The months together' }),
|
|
285
|
+
tslib_1.__metadata("design:type", Number)
|
|
286
|
+
], SaasTrendSeries.prototype, "total", void 0);
|
|
287
|
+
tslib_1.__decorate([
|
|
288
|
+
(0, type_graphql_1.Field)(type => type_graphql_1.Float, { nullable: true, description: 'The last month over the one before, as a part' }),
|
|
289
|
+
tslib_1.__metadata("design:type", Number)
|
|
290
|
+
], SaasTrendSeries.prototype, "monthOverMonth", void 0);
|
|
291
|
+
tslib_1.__decorate([
|
|
292
|
+
(0, type_graphql_1.Field)(type => type_graphql_1.Float, { nullable: true, description: 'The last month over the same month a year before, as a part' }),
|
|
293
|
+
tslib_1.__metadata("design:type", Number)
|
|
294
|
+
], SaasTrendSeries.prototype, "yearOverYear", void 0);
|
|
295
|
+
exports.SaasTrendSeries = SaasTrendSeries = tslib_1.__decorate([
|
|
296
|
+
(0, type_graphql_1.ObjectType)({ description: 'A series of the cost trend - all, an account or a subscription, in one currency' })
|
|
297
|
+
], SaasTrendSeries);
|
|
298
|
+
let SaasDepartmentSeries = class SaasDepartmentSeries {
|
|
299
|
+
};
|
|
300
|
+
exports.SaasDepartmentSeries = SaasDepartmentSeries;
|
|
301
|
+
tslib_1.__decorate([
|
|
302
|
+
(0, type_graphql_1.Field)({ description: 'What the series is of' }),
|
|
303
|
+
tslib_1.__metadata("design:type", String)
|
|
304
|
+
], SaasDepartmentSeries.prototype, "key", void 0);
|
|
305
|
+
tslib_1.__decorate([
|
|
306
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'The department; empty for cost no department is named for' }),
|
|
307
|
+
tslib_1.__metadata("design:type", String)
|
|
308
|
+
], SaasDepartmentSeries.prototype, "departmentId", void 0);
|
|
309
|
+
tslib_1.__decorate([
|
|
310
|
+
(0, type_graphql_1.Field)({ nullable: true, description: "The department's name" }),
|
|
311
|
+
tslib_1.__metadata("design:type", String)
|
|
312
|
+
], SaasDepartmentSeries.prototype, "name", void 0);
|
|
313
|
+
tslib_1.__decorate([
|
|
314
|
+
(0, type_graphql_1.Field)({ description: 'The currency the amounts are in' }),
|
|
315
|
+
tslib_1.__metadata("design:type", String)
|
|
316
|
+
], SaasDepartmentSeries.prototype, "currency", void 0);
|
|
317
|
+
tslib_1.__decorate([
|
|
318
|
+
(0, type_graphql_1.Field)(type => [type_graphql_1.Float], { description: 'One amount a month' }),
|
|
319
|
+
tslib_1.__metadata("design:type", Array)
|
|
320
|
+
], SaasDepartmentSeries.prototype, "amounts", void 0);
|
|
321
|
+
tslib_1.__decorate([
|
|
322
|
+
(0, type_graphql_1.Field)(type => type_graphql_1.Float, { description: 'The months together' }),
|
|
323
|
+
tslib_1.__metadata("design:type", Number)
|
|
324
|
+
], SaasDepartmentSeries.prototype, "total", void 0);
|
|
325
|
+
exports.SaasDepartmentSeries = SaasDepartmentSeries = tslib_1.__decorate([
|
|
326
|
+
(0, type_graphql_1.ObjectType)({ description: 'A department’s part of the cost, in one currency' })
|
|
327
|
+
], SaasDepartmentSeries);
|
|
328
|
+
let SaasAlert = class SaasAlert {
|
|
329
|
+
};
|
|
330
|
+
exports.SaasAlert = SaasAlert;
|
|
331
|
+
tslib_1.__decorate([
|
|
332
|
+
(0, type_graphql_1.Field)({ description: 'usage-over-budget, bill-increased or seat-bill-differs' }),
|
|
333
|
+
tslib_1.__metadata("design:type", String)
|
|
334
|
+
], SaasAlert.prototype, "kind", void 0);
|
|
335
|
+
tslib_1.__decorate([
|
|
336
|
+
(0, type_graphql_1.Field)({ description: 'The account' }),
|
|
337
|
+
tslib_1.__metadata("design:type", String)
|
|
338
|
+
], SaasAlert.prototype, "accountId", void 0);
|
|
339
|
+
tslib_1.__decorate([
|
|
340
|
+
(0, type_graphql_1.Field)({ nullable: true, description: "The account's name" }),
|
|
341
|
+
tslib_1.__metadata("design:type", String)
|
|
342
|
+
], SaasAlert.prototype, "accountName", void 0);
|
|
343
|
+
tslib_1.__decorate([
|
|
344
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'The subscription' }),
|
|
345
|
+
tslib_1.__metadata("design:type", String)
|
|
346
|
+
], SaasAlert.prototype, "subscriptionId", void 0);
|
|
347
|
+
tslib_1.__decorate([
|
|
348
|
+
(0, type_graphql_1.Field)({ nullable: true, description: "The subscription's name" }),
|
|
349
|
+
tslib_1.__metadata("design:type", String)
|
|
350
|
+
], SaasAlert.prototype, "subscriptionName", void 0);
|
|
351
|
+
tslib_1.__decorate([
|
|
352
|
+
(0, type_graphql_1.Field)({ description: 'The month of the bill' }),
|
|
353
|
+
tslib_1.__metadata("design:type", String)
|
|
354
|
+
], SaasAlert.prototype, "month", void 0);
|
|
355
|
+
tslib_1.__decorate([
|
|
356
|
+
(0, type_graphql_1.Field)(type => type_graphql_1.Float, { description: 'What was billed' }),
|
|
357
|
+
tslib_1.__metadata("design:type", Number)
|
|
358
|
+
], SaasAlert.prototype, "amount", void 0);
|
|
359
|
+
tslib_1.__decorate([
|
|
360
|
+
(0, type_graphql_1.Field)(type => type_graphql_1.Float, { description: 'What it was told against - the budget, the rise allowed, seats times price' }),
|
|
361
|
+
tslib_1.__metadata("design:type", Number)
|
|
362
|
+
], SaasAlert.prototype, "limit", void 0);
|
|
363
|
+
exports.SaasAlert = SaasAlert = tslib_1.__decorate([
|
|
364
|
+
(0, type_graphql_1.ObjectType)({ description: 'Something in the latest bills worth telling' })
|
|
365
|
+
], SaasAlert);
|
|
366
|
+
let SaasCostTrend = class SaasCostTrend {
|
|
367
|
+
};
|
|
368
|
+
exports.SaasCostTrend = SaasCostTrend;
|
|
369
|
+
tslib_1.__decorate([
|
|
370
|
+
(0, type_graphql_1.Field)(type => [String], { description: 'The months, YYYY-MM' }),
|
|
371
|
+
tslib_1.__metadata("design:type", Array)
|
|
372
|
+
], SaasCostTrend.prototype, "months", void 0);
|
|
373
|
+
tslib_1.__decorate([
|
|
374
|
+
(0, type_graphql_1.Field)(type => [SaasTrendSeries], { description: 'Everything, one series a currency' }),
|
|
375
|
+
tslib_1.__metadata("design:type", Array)
|
|
376
|
+
], SaasCostTrend.prototype, "all", void 0);
|
|
377
|
+
tslib_1.__decorate([
|
|
378
|
+
(0, type_graphql_1.Field)(type => [SaasTrendSeries], { description: 'One series an account' }),
|
|
379
|
+
tslib_1.__metadata("design:type", Array)
|
|
380
|
+
], SaasCostTrend.prototype, "accounts", void 0);
|
|
381
|
+
tslib_1.__decorate([
|
|
382
|
+
(0, type_graphql_1.Field)(type => [SaasTrendSeries], { description: 'One series a subscription' }),
|
|
383
|
+
tslib_1.__metadata("design:type", Array)
|
|
384
|
+
], SaasCostTrend.prototype, "subscriptions", void 0);
|
|
385
|
+
tslib_1.__decorate([
|
|
386
|
+
(0, type_graphql_1.Field)(type => [SaasDepartmentSeries], { description: 'One series a department' }),
|
|
387
|
+
tslib_1.__metadata("design:type", Array)
|
|
388
|
+
], SaasCostTrend.prototype, "departments", void 0);
|
|
389
|
+
tslib_1.__decorate([
|
|
390
|
+
(0, type_graphql_1.Field)(type => [SaasAlert], { description: 'What the latest month’s bills are worth telling' }),
|
|
391
|
+
tslib_1.__metadata("design:type", Array)
|
|
392
|
+
], SaasCostTrend.prototype, "alerts", void 0);
|
|
393
|
+
exports.SaasCostTrend = SaasCostTrend = tslib_1.__decorate([
|
|
394
|
+
(0, type_graphql_1.ObjectType)({ description: 'The cost trend of the subscriptions from their bills' })
|
|
395
|
+
], SaasCostTrend);
|
|
396
|
+
let SaasChange = class SaasChange {
|
|
397
|
+
};
|
|
398
|
+
exports.SaasChange = SaasChange;
|
|
399
|
+
tslib_1.__decorate([
|
|
400
|
+
(0, type_graphql_1.Field)({ description: 'What it moved on - the account or the subscription, by name' }),
|
|
401
|
+
tslib_1.__metadata("design:type", String)
|
|
402
|
+
], SaasChange.prototype, "subject", void 0);
|
|
403
|
+
tslib_1.__decorate([
|
|
404
|
+
(0, type_graphql_1.Field)({ description: 'saas-account or saas-subscription' }),
|
|
405
|
+
tslib_1.__metadata("design:type", String)
|
|
406
|
+
], SaasChange.prototype, "factKind", void 0);
|
|
407
|
+
tslib_1.__decorate([
|
|
408
|
+
(0, type_graphql_1.Field)({ description: 'Which field moved' }),
|
|
409
|
+
tslib_1.__metadata("design:type", String)
|
|
410
|
+
], SaasChange.prototype, "field", void 0);
|
|
411
|
+
tslib_1.__decorate([
|
|
412
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'The value before, as text' }),
|
|
413
|
+
tslib_1.__metadata("design:type", String)
|
|
414
|
+
], SaasChange.prototype, "fromValue", void 0);
|
|
415
|
+
tslib_1.__decorate([
|
|
416
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'The value after, as text' }),
|
|
417
|
+
tslib_1.__metadata("design:type", String)
|
|
418
|
+
], SaasChange.prototype, "toValue", void 0);
|
|
419
|
+
tslib_1.__decorate([
|
|
420
|
+
(0, type_graphql_1.Field)({ description: 'When it moved' }),
|
|
421
|
+
tslib_1.__metadata("design:type", Date)
|
|
422
|
+
], SaasChange.prototype, "at", void 0);
|
|
423
|
+
tslib_1.__decorate([
|
|
424
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'Who moved it' }),
|
|
425
|
+
tslib_1.__metadata("design:type", String)
|
|
426
|
+
], SaasChange.prototype, "changedBy", void 0);
|
|
427
|
+
exports.SaasChange = SaasChange = tslib_1.__decorate([
|
|
428
|
+
(0, type_graphql_1.ObjectType)({ description: 'What moved on an account or one of its subscriptions' })
|
|
429
|
+
], SaasChange);
|
|
430
|
+
//# sourceMappingURL=saas-type.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"saas-type.js","sourceRoot":"","sources":["../../server/service/saas-type.ts"],"names":[],"mappings":";;;;AAAA,+CAA2E;AAE3E,iDAA4C;AAC5C,6CAAqF;AAG9E,IAAM,gBAAgB,GAAtB,MAAM,gBAAgB;CAkB5B,CAAA;AAlBY,4CAAgB;AAC6D;IAAvF,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,iBAAE,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,WAAW,EAAE,kCAAkC,EAAE,CAAC;;4CAAY;AACjB;IAAjF,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,WAAW,EAAE,wCAAwC,EAAE,CAAC;;gDAAgB;AAC1C;IAAtD,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,WAAW,EAAE,aAAa,EAAE,CAAC;;8CAAc;AACM;IAAzE,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,WAAW,EAAE,gCAAgC,EAAE,CAAC;;wDAAwB;AACpB;IAA5E,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,WAAW,EAAE,mCAAmC,EAAE,CAAC;;oDAAoB;AACb;IAAlF,IAAA,oBAAK,EAAC,EAAE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c,EAAE,CAAC;;6CAAmB;qBAP/D,UAAU;IADtB,IAAA,yBAAU,EAAC,EAAE,WAAW,EAAE,sDAAsD,EAAE,CAAC;GACvE,UAAU,CAQtB","sourcesContent":["import { Field, Float, ID, InputType, Int, ObjectType } from 'type-graphql'\n\nimport { SaasAccount } from './saas-account'\nimport { SaasAccountStatus, SaasBilling, SaasSubscriptionStatus } from './saas-rules'\n\n@InputType({ description: 'A row of the accounts grid (cuFlag + for new, M for changed, - for deleted)' })\nexport class SaasAccountPatch {\n @Field(type => ID, { nullable: true, description: 'The account; empty for a new one' }) id?: string\n @Field({ nullable: true, description: 'Grid flag: + new, M changed, - deleted' }) cuFlag?: string\n @Field({ nullable: true, description: 'The service' }) name?: string\n @Field({ nullable: true, description: 'The vendor - a counterparty id' }) counterpartyId?: string\n @Field({ nullable: true, description: \"The vendor's name for the account\" }) identifier?: string\n @Field({ nullable: true, description: 'The account it is under - an account id' }) parentId?: string\n @Field({ nullable: true, description: 'What it is used for' }) purpose?: string\n @Field(type => [String], { nullable: true, description: 'Who administers it - employee ids' }) adminIds?: string[]\n @Field({ nullable: true, description: 'Where the vendor sends the bills' }) billingEmail?: string\n @Field({ nullable: true, description: 'What it is paid from - a bank account or card id' }) paymentAccountId?: string\n @Field({ nullable: true, description: 'The currency it is billed in' }) currency?: string\n @Field(type => Int, { nullable: true, description: 'The day of the month the bill is paid' }) billingDay?: number\n @Field({ nullable: true, description: 'Where its secrets are kept' }) secretLocation?: string\n @Field(type => Float, { nullable: true, description: 'A rise over the month before told above this part' }) increaseAlertRate?: number\n @Field(type => SaasAccountStatus, { nullable: true, description: 'In use or closed' }) status?: SaasAccountStatus\n @Field({ nullable: true, description: 'The day it was closed - YYYY-MM-DD' }) closedOn?: string\n @Field({ nullable: true, description: 'Notes' }) description?: string\n}\n\n@InputType({ description: 'A row of the subscriptions grid of an account' })\nexport class SaasSubscriptionPatch {\n @Field(type => ID, { nullable: true, description: 'The subscription; empty for a new one' }) id?: string\n @Field({ nullable: true, description: 'Grid flag: + new, M changed, - deleted' }) cuFlag?: string\n @Field({ nullable: true, description: 'The product and plan' }) name?: string\n @Field(type => SaasBilling, { nullable: true, description: 'How it is paid for' }) billing?: SaasBilling\n @Field(type => Float, { nullable: true, description: 'Seats or units' }) quantity?: number\n @Field(type => Float, { nullable: true, description: 'The price of one seat for one billing' }) unitPrice?: number\n @Field(type => Float, { nullable: true, description: 'What one billing costs' }) amount?: number\n @Field(type => Float, { nullable: true, description: 'What a month of usage may cost' }) budget?: number\n @Field(type => Int, { nullable: true, description: 'Billed every so many months' }) everyMonths?: number\n @Field({ nullable: true, description: 'The day it started - YYYY-MM-DD' }) startOn?: string\n @Field({ nullable: true, description: 'The day it renews - YYYY-MM-DD' }) renewalOn?: string\n @Field({ nullable: true, description: 'Whether the vendor renews it unless cancelled' }) autoRenew?: boolean\n @Field(type => Int, { nullable: true, description: 'Days before renewal it must be cancelled' }) noticeDays?: number\n @Field({ nullable: true, description: 'The department it is for - a department id' }) departmentId?: string\n @Field({ nullable: true, description: 'For a license owned: its asset - an asset id' }) assetId?: string\n @Field(type => SaasSubscriptionStatus, { nullable: true, description: 'In use, not to be renewed, or ended' }) status?: SaasSubscriptionStatus\n @Field({ nullable: true, description: 'The day it ended - YYYY-MM-DD' }) endedOn?: string\n @Field({ nullable: true, description: 'Notes' }) description?: string\n}\n\n@InputType({ description: 'A row of the seats grid of a subscription' })\nexport class SaasSeatPatch {\n @Field(type => ID, { nullable: true, description: 'The seat; empty for a new one' }) id?: string\n @Field({ nullable: true, description: 'Grid flag: + new, M changed, - deleted' }) cuFlag?: string\n @Field({ nullable: true, description: 'The employee who holds it - an employee id' }) employeeId?: string\n @Field({ nullable: true, description: 'Who holds it when it is no employee' }) holder?: string\n @Field({ nullable: true, description: 'The day it was given - YYYY-MM-DD' }) fromOn?: string\n @Field({ nullable: true, description: 'The day it was taken back - YYYY-MM-DD' }) untilOn?: string\n @Field({ nullable: true, description: 'Notes' }) description?: string\n}\n\n@InputType({ description: 'A line of a bill' })\nexport class SaasBillLineInput {\n @Field({ nullable: true, description: 'The subscription it is for; empty for tax and credits' }) subscriptionId?: string\n @Field({ nullable: true, description: 'What the bill calls it' }) label?: string\n @Field(type => Float, { description: 'What it cost; a credit below zero' }) amount: number\n}\n\n@InputType({ description: 'A bill of an account for a month, its lines whole' })\nexport class SaasBillInput {\n @Field(type => ID, { nullable: true, description: 'The bill; empty for a new one' }) id?: string\n @Field({ description: 'The month it bills - YYYY-MM' }) month: string\n @Field({ nullable: true, description: 'The day the vendor billed it - YYYY-MM-DD' }) billedOn?: string\n @Field({ nullable: true, description: 'Notes' }) description?: string\n @Field(type => [SaasBillLineInput], { description: 'Its lines' }) lines: SaasBillLineInput[]\n}\n\n@ObjectType({ description: 'A page of accounts' })\nexport class SaasAccountList {\n @Field(type => [SaasAccount], { description: 'Accounts on the page' }) items: SaasAccount[]\n @Field(type => Int, { description: 'Number of accounts matching the list parameters' }) total: number\n}\n\n@ObjectType({ description: 'A series of the cost trend - all, an account or a subscription, in one currency' })\nexport class SaasTrendSeries {\n @Field({ description: 'What the series is of' }) key: string\n @Field({ nullable: true, description: 'The account' }) accountId?: string\n @Field({ nullable: true, description: \"The account's name\" }) accountName?: string\n @Field({ nullable: true, description: 'The subscription; empty for the lines on none' }) subscriptionId?: string\n @Field({ nullable: true, description: 'The account or subscription name' }) name?: string\n @Field({ description: 'The currency the amounts are in' }) currency: string\n @Field(type => [Float], { description: 'One amount a month, in the order of the months' }) amounts: number[]\n @Field(type => Float, { description: 'The months together' }) total: number\n @Field(type => Float, { nullable: true, description: 'The last month over the one before, as a part' }) monthOverMonth?: number\n @Field(type => Float, { nullable: true, description: 'The last month over the same month a year before, as a part' }) yearOverYear?: number\n}\n\n@ObjectType({ description: 'A department’s part of the cost, in one currency' })\nexport class SaasDepartmentSeries {\n @Field({ description: 'What the series is of' }) key: string\n @Field({ nullable: true, description: 'The department; empty for cost no department is named for' }) departmentId?: string\n @Field({ nullable: true, description: \"The department's name\" }) name?: string\n @Field({ description: 'The currency the amounts are in' }) currency: string\n @Field(type => [Float], { description: 'One amount a month' }) amounts: number[]\n @Field(type => Float, { description: 'The months together' }) total: number\n}\n\n@ObjectType({ description: 'Something in the latest bills worth telling' })\nexport class SaasAlert {\n @Field({ description: 'usage-over-budget, bill-increased or seat-bill-differs' }) kind: string\n @Field({ description: 'The account' }) accountId: string\n @Field({ nullable: true, description: \"The account's name\" }) accountName?: string\n @Field({ nullable: true, description: 'The subscription' }) subscriptionId?: string\n @Field({ nullable: true, description: \"The subscription's name\" }) subscriptionName?: string\n @Field({ description: 'The month of the bill' }) month: string\n @Field(type => Float, { description: 'What was billed' }) amount: number\n @Field(type => Float, { description: 'What it was told against - the budget, the rise allowed, seats times price' }) limit: number\n}\n\n@ObjectType({ description: 'The cost trend of the subscriptions from their bills' })\nexport class SaasCostTrend {\n @Field(type => [String], { description: 'The months, YYYY-MM' }) months: string[]\n @Field(type => [SaasTrendSeries], { description: 'Everything, one series a currency' }) all: SaasTrendSeries[]\n @Field(type => [SaasTrendSeries], { description: 'One series an account' }) accounts: SaasTrendSeries[]\n @Field(type => [SaasTrendSeries], { description: 'One series a subscription' }) subscriptions: SaasTrendSeries[]\n @Field(type => [SaasDepartmentSeries], { description: 'One series a department' }) departments: SaasDepartmentSeries[]\n @Field(type => [SaasAlert], { description: 'What the latest month’s bills are worth telling' }) alerts: SaasAlert[]\n}\n\n@ObjectType({ description: 'What moved on an account or one of its subscriptions' })\nexport class SaasChange {\n @Field({ description: 'What it moved on - the account or the subscription, by name' }) subject: string\n @Field({ description: 'saas-account or saas-subscription' }) factKind: string\n @Field({ description: 'Which field moved' }) field: string\n @Field({ nullable: true, description: 'The value before, as text' }) fromValue?: string\n @Field({ nullable: true, description: 'The value after, as text' }) toValue?: string\n @Field({ description: 'When it moved' }) at: Date\n @Field({ nullable: true, description: 'Who moved it' }) changedBy?: string\n}\n"]}
|