need4deed-sdk 0.0.167 → 0.0.169
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/constants/endpoints.d.ts +2 -1
- package/dist/constants/endpoints.js +1 -3
- package/dist/types/api/agent.d.ts +2 -1
- package/dist/types/api/agent.js +0 -4
- package/dist/types/api/event.d.ts +1 -1
- package/dist/types/api/index.d.ts +1 -0
- package/dist/types/api/index.js +1 -0
- package/dist/types/api/opportunity.d.ts +0 -26
- package/dist/types/api/statistics.d.ts +45 -0
- package/dist/types/api/statistics.js +27 -0
- package/dist/types/api/translation.js +0 -10
- package/dist/types/api/trusted-domain.js +0 -4
- package/dist/types/api/volunteer-audit-log.js +0 -4
- package/package.json +1 -1
|
@@ -9,8 +9,6 @@ var Endpoint;
|
|
|
9
9
|
Endpoint["VOLUNTEER"] = "/volunteer";
|
|
10
10
|
Endpoint["OPTION"] = "/option";
|
|
11
11
|
Endpoint["AGENT"] = "/agent";
|
|
12
|
-
// Sub-path prefix, mounted under AGENT (mirrors the backend's
|
|
13
|
-
// `register(agentRegisterRoutes, { prefix: REGISTER })`). Compose as
|
|
14
|
-
// `Endpoint.AGENT + Endpoint.REGISTER` -> "/agent/register".
|
|
15
12
|
Endpoint["REGISTER"] = "/register";
|
|
13
|
+
Endpoint["STATISTICS"] = "/statistics";
|
|
16
14
|
})(Endpoint || (exports.Endpoint = Endpoint = {}));
|
|
@@ -103,6 +103,7 @@ interface AgentGetList {
|
|
|
103
103
|
unclaimed: boolean;
|
|
104
104
|
lat: number | null;
|
|
105
105
|
lon: number | null;
|
|
106
|
+
statusEngagement: AgentEngagementStatusType;
|
|
106
107
|
}
|
|
107
108
|
export type ApiAgentGetList = VoidableProps<AgentGetList, "district">;
|
|
108
109
|
interface AgentGet extends AgentGetList {
|
|
@@ -112,7 +113,6 @@ interface AgentGet extends AgentGetList {
|
|
|
112
113
|
representative: ApiRepresentativeGet;
|
|
113
114
|
contacts: ApiAgentMembership[];
|
|
114
115
|
services: Service[];
|
|
115
|
-
statusEngagement: AgentEngagementStatusType;
|
|
116
116
|
agentDetails: AgentDetails;
|
|
117
117
|
comments: ApiComment[];
|
|
118
118
|
languages: ApiLanguage[];
|
|
@@ -144,6 +144,7 @@ export interface ApiAgentRegisterNew {
|
|
|
144
144
|
addressStreet?: string;
|
|
145
145
|
addressPostcode?: string;
|
|
146
146
|
languages?: number[];
|
|
147
|
+
confirmSharedAddress?: boolean;
|
|
147
148
|
}
|
|
148
149
|
export type ApiAgentRegister = {
|
|
149
150
|
agentId: number;
|
package/dist/types/api/agent.js
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.AgentMembershipStatus = exports.AgentTrustType = exports.AgentServiceType = exports.AgentVolunteerSearchType = exports.AgentEngagementStatusType = exports.AgentRoleType = exports.AgentOperatorType = exports.AgentTypeKey = void 0;
|
|
4
|
-
// Canonical seed values for the `agent_type` reference table (see AgentType
|
|
5
|
-
// below) — not used directly in any API contract.
|
|
6
4
|
var AgentTypeKey;
|
|
7
5
|
(function (AgentTypeKey) {
|
|
8
6
|
AgentTypeKey["AE"] = "AE";
|
|
@@ -47,8 +45,6 @@ var AgentVolunteerSearchType;
|
|
|
47
45
|
AgentVolunteerSearchType["NOT_NEEDED"] = "agent-not-needed";
|
|
48
46
|
AgentVolunteerSearchType["VOLUNTEERS_FOUND"] = "agent-volunteers-found";
|
|
49
47
|
})(AgentVolunteerSearchType || (exports.AgentVolunteerSearchType = AgentVolunteerSearchType = {}));
|
|
50
|
-
// Canonical seed values for the `service` reference table (see Service
|
|
51
|
-
// below) — not used directly in any API contract.
|
|
52
48
|
var AgentServiceType;
|
|
53
49
|
(function (AgentServiceType) {
|
|
54
50
|
AgentServiceType["CHILDCARE"] = "childcare";
|
|
@@ -42,11 +42,11 @@ export interface ApiEventN4DGetList {
|
|
|
42
42
|
description: string;
|
|
43
43
|
shortDescription: string;
|
|
44
44
|
linkRSVP: string;
|
|
45
|
+
hostName?: string;
|
|
45
46
|
additionalTitle?: string;
|
|
46
47
|
additionalInfo?: string[];
|
|
47
48
|
}
|
|
48
49
|
export interface ApiEventN4DGet extends ApiEventN4DGetList {
|
|
49
|
-
hostName?: string;
|
|
50
50
|
time?: string;
|
|
51
51
|
locationLink?: string;
|
|
52
52
|
followUpText?: string;
|
package/dist/types/api/index.js
CHANGED
|
@@ -34,6 +34,7 @@ __exportStar(require("./post-reply"), exports);
|
|
|
34
34
|
__exportStar(require("./organization"), exports);
|
|
35
35
|
__exportStar(require("./person"), exports);
|
|
36
36
|
__exportStar(require("./profile"), exports);
|
|
37
|
+
__exportStar(require("./statistics"), exports);
|
|
37
38
|
__exportStar(require("./testimonial"), exports);
|
|
38
39
|
__exportStar(require("./time"), exports);
|
|
39
40
|
__exportStar(require("./translation"), exports);
|
|
@@ -112,15 +112,6 @@ export interface OpportunityLegacyFormDataProps {
|
|
|
112
112
|
language: `${Lang}`;
|
|
113
113
|
}
|
|
114
114
|
export type OpportunityLegacyFormData = VoidableUndefined<OpportunityLegacyFormDataProps>;
|
|
115
|
-
/**
|
|
116
|
-
* Body for `POST /opportunity` — the dashboard's typed create-opportunity
|
|
117
|
-
* form. Unlike `OpportunityLegacyFormData` (free-text/ISO-code strings from
|
|
118
|
-
* the public form, resolved by title lookup), activities/skills/languages/
|
|
119
|
-
* districts here are numeric option ids from `GET /option/*`, resolved by id.
|
|
120
|
-
* Deliberately not derived from `OpportunityLegacyFormDataProps`: the two
|
|
121
|
-
* shapes look similar but mean different things, and overloading one type for
|
|
122
|
-
* both invites exactly the id-vs-title mismatch this type exists to prevent.
|
|
123
|
-
*/
|
|
124
115
|
export interface OpportunityCreateFormDataProps {
|
|
125
116
|
title: string;
|
|
126
117
|
agent_id?: number;
|
|
@@ -215,18 +206,10 @@ export type ApiOpportunityPatch = VoidableProps<{
|
|
|
215
206
|
time: string;
|
|
216
207
|
};
|
|
217
208
|
contact: {
|
|
218
|
-
/**
|
|
219
|
-
* Relinks the opportunity to a different Person already registered as a
|
|
220
|
-
* contact of the opportunity's agent. `name`/`phone`/`email`/
|
|
221
|
-
* `waysToContact` are derived from that Person and returned on
|
|
222
|
-
* `ApiOpportunityContact` — editing them directly goes through the
|
|
223
|
-
* agent-contact endpoints (`ApiAgentContactPatch`), not this field.
|
|
224
|
-
*/
|
|
225
209
|
id: number;
|
|
226
210
|
};
|
|
227
211
|
agent: {
|
|
228
212
|
id?: number;
|
|
229
|
-
/** @deprecated free-text in-place edit; use `id` to re-link. BE only applies `name`. */
|
|
230
213
|
name?: string;
|
|
231
214
|
};
|
|
232
215
|
accompanyingDetails: ApiOpportunityAccompanyingDetails;
|
|
@@ -241,11 +224,6 @@ export interface OpportunityVolunteer {
|
|
|
241
224
|
export interface ApiOpportunityVolunteerGet extends OpportunityVolunteer {
|
|
242
225
|
title: string;
|
|
243
226
|
}
|
|
244
|
-
/**
|
|
245
|
-
* A volunteer linked to an opportunity, as surfaced on an agent's opportunity
|
|
246
|
-
* list. Person fields (`name`, `avatarUrl`) are PII-masked per caller role by
|
|
247
|
-
* the API, so they may be absent or redacted.
|
|
248
|
-
*/
|
|
249
227
|
export interface ApiAgentOpportunityVolunteer {
|
|
250
228
|
id: number;
|
|
251
229
|
volunteerId: number;
|
|
@@ -253,10 +231,6 @@ export interface ApiAgentOpportunityVolunteer {
|
|
|
253
231
|
name?: string;
|
|
254
232
|
avatarUrl?: string;
|
|
255
233
|
}
|
|
256
|
-
/**
|
|
257
|
-
* One of an agent's opportunities with the volunteers linked to it. Response
|
|
258
|
-
* item of `GET /agent/:id/opportunity-linked`.
|
|
259
|
-
*/
|
|
260
234
|
export interface ApiAgentOpportunity extends Pick<ApiOpportunityGetList, "volunteerType" | "languages" | "activities" | "availability" | "location" | "district"> {
|
|
261
235
|
id: Id;
|
|
262
236
|
title: string;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { OptionTitle } from "./common";
|
|
2
|
+
export declare enum StatisticsMetric {
|
|
3
|
+
NEW_VOLUNTEERS = "new-volunteers",
|
|
4
|
+
REQUESTS = "requests",
|
|
5
|
+
LEAD_FROM = "lead-from"
|
|
6
|
+
}
|
|
7
|
+
export declare enum StatisticsGranularity {
|
|
8
|
+
MONTH = "month",
|
|
9
|
+
QUARTER = "quarter",
|
|
10
|
+
YEAR = "year"
|
|
11
|
+
}
|
|
12
|
+
export declare enum StatisticsGroupBy {
|
|
13
|
+
NONE = "none",
|
|
14
|
+
DISTRICT = "district",
|
|
15
|
+
OPPORTUNITY_TYPE = "opportunity-type",
|
|
16
|
+
VOLUNTEER_TYPE = "volunteer-type",
|
|
17
|
+
LEAD_FROM = "lead-from"
|
|
18
|
+
}
|
|
19
|
+
export declare const STATISTICS_TOTAL_KEY = "total";
|
|
20
|
+
export declare const STATISTICS_UNKNOWN_KEY = "unknown";
|
|
21
|
+
export interface ApiStatisticsQuery {
|
|
22
|
+
granularity: StatisticsGranularity;
|
|
23
|
+
from?: string;
|
|
24
|
+
to?: string;
|
|
25
|
+
groupBy?: StatisticsGroupBy;
|
|
26
|
+
}
|
|
27
|
+
export interface ApiStatisticsGroup {
|
|
28
|
+
key: string;
|
|
29
|
+
title: OptionTitle;
|
|
30
|
+
}
|
|
31
|
+
export interface ApiStatisticsPeriod {
|
|
32
|
+
period: string;
|
|
33
|
+
start: Date;
|
|
34
|
+
counts: Record<string, number>;
|
|
35
|
+
total: number;
|
|
36
|
+
}
|
|
37
|
+
export interface ApiStatisticsGet {
|
|
38
|
+
metric: StatisticsMetric;
|
|
39
|
+
granularity: StatisticsGranularity;
|
|
40
|
+
groupBy: StatisticsGroupBy;
|
|
41
|
+
allowedGroupBy: StatisticsGroupBy[];
|
|
42
|
+
groups: ApiStatisticsGroup[];
|
|
43
|
+
periods: ApiStatisticsPeriod[];
|
|
44
|
+
totalsBeforeTracking?: Record<string, number>;
|
|
45
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.STATISTICS_UNKNOWN_KEY = exports.STATISTICS_TOTAL_KEY = exports.StatisticsGroupBy = exports.StatisticsGranularity = exports.StatisticsMetric = void 0;
|
|
4
|
+
// Periods are Europe/Berlin calendar periods, widened to whole periods.
|
|
5
|
+
var StatisticsMetric;
|
|
6
|
+
(function (StatisticsMetric) {
|
|
7
|
+
StatisticsMetric["NEW_VOLUNTEERS"] = "new-volunteers";
|
|
8
|
+
StatisticsMetric["REQUESTS"] = "requests";
|
|
9
|
+
// Counts ticked answers: one volunteer can tick several.
|
|
10
|
+
StatisticsMetric["LEAD_FROM"] = "lead-from";
|
|
11
|
+
})(StatisticsMetric || (exports.StatisticsMetric = StatisticsMetric = {}));
|
|
12
|
+
var StatisticsGranularity;
|
|
13
|
+
(function (StatisticsGranularity) {
|
|
14
|
+
StatisticsGranularity["MONTH"] = "month";
|
|
15
|
+
StatisticsGranularity["QUARTER"] = "quarter";
|
|
16
|
+
StatisticsGranularity["YEAR"] = "year";
|
|
17
|
+
})(StatisticsGranularity || (exports.StatisticsGranularity = StatisticsGranularity = {}));
|
|
18
|
+
var StatisticsGroupBy;
|
|
19
|
+
(function (StatisticsGroupBy) {
|
|
20
|
+
StatisticsGroupBy["NONE"] = "none";
|
|
21
|
+
StatisticsGroupBy["DISTRICT"] = "district";
|
|
22
|
+
StatisticsGroupBy["OPPORTUNITY_TYPE"] = "opportunity-type";
|
|
23
|
+
StatisticsGroupBy["VOLUNTEER_TYPE"] = "volunteer-type";
|
|
24
|
+
StatisticsGroupBy["LEAD_FROM"] = "lead-from";
|
|
25
|
+
})(StatisticsGroupBy || (exports.StatisticsGroupBy = StatisticsGroupBy = {}));
|
|
26
|
+
exports.STATISTICS_TOTAL_KEY = "total";
|
|
27
|
+
exports.STATISTICS_UNKNOWN_KEY = "unknown";
|
|
@@ -1,25 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.TranslationStatus = exports.TranslationOrigin = void 0;
|
|
4
|
-
// Machine translation of user-entered content (be#1064). Each
|
|
5
|
-
// field_translation row records where its text came from and, for machine
|
|
6
|
-
// rows, where it is in the translation queue.
|
|
7
4
|
var TranslationOrigin;
|
|
8
5
|
(function (TranslationOrigin) {
|
|
9
|
-
// Seeded, pre-translated reference data (skills, activities, languages, ...).
|
|
10
6
|
TranslationOrigin["REFERENCE"] = "reference";
|
|
11
|
-
// Produced by the machine-translation worker.
|
|
12
7
|
TranslationOrigin["MACHINE"] = "machine";
|
|
13
|
-
// Written or confirmed by a person. Never overwritten by MT while the
|
|
14
|
-
// source text is unchanged.
|
|
15
8
|
TranslationOrigin["HUMAN"] = "human";
|
|
16
9
|
})(TranslationOrigin || (exports.TranslationOrigin = TranslationOrigin = {}));
|
|
17
10
|
var TranslationStatus;
|
|
18
11
|
(function (TranslationStatus) {
|
|
19
|
-
// Queued for the machine-translation worker; no usable text yet.
|
|
20
12
|
TranslationStatus["PENDING"] = "pending";
|
|
21
13
|
TranslationStatus["DONE"] = "done";
|
|
22
|
-
// Gave up (retries exhausted or output failed validation); readers fall
|
|
23
|
-
// back to the original text.
|
|
24
14
|
TranslationStatus["FAILED"] = "failed";
|
|
25
15
|
})(TranslationStatus || (exports.TranslationStatus = TranslationStatus = {}));
|
|
@@ -1,6 +1,2 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
// Email-domain allowlist for agent self-registration. A registrant whose email
|
|
3
|
-
// domain is on this list is treated as belonging to a known RAC organisation —
|
|
4
|
-
// so a brand-new representative (whose org has no existing member yet) can still
|
|
5
|
-
// register, and a join auto-approves to ACTIVE. Managed by COORDINATOR/ADMIN.
|
|
6
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -1,10 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.VolunteerAuditLogType = void 0;
|
|
4
|
-
// Read-only audit trail of things that change on a volunteer's record
|
|
5
|
-
// (be#919). Distinct from ApiActivityLogGet/ApiActivityLogEntry
|
|
6
|
-
// (./activity-log.ts), an unrelated hours-worked ledger per
|
|
7
|
-
// opportunity-volunteer pairing that happens to share a similar name.
|
|
8
4
|
var VolunteerAuditLogType;
|
|
9
5
|
(function (VolunteerAuditLogType) {
|
|
10
6
|
VolunteerAuditLogType["CONTACT_DETAILS_CHANGED"] = "contact_details_changed";
|