need4deed-sdk 0.0.168 → 0.0.170
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 -0
- package/dist/types/api/agent.d.ts +14 -2
- 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/statistics.d.ts +45 -0
- package/dist/types/api/statistics.js +27 -0
- package/dist/types/api/user.d.ts +1 -0
- package/package.json +1 -1
|
@@ -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;
|
|
@@ -158,6 +159,12 @@ export interface ApiAgentRegisterResponse {
|
|
|
158
159
|
agentId: number;
|
|
159
160
|
membershipStatus: AgentMembershipStatus;
|
|
160
161
|
}
|
|
162
|
+
export interface ApiAgentRegisterStatus {
|
|
163
|
+
registered: boolean;
|
|
164
|
+
agentId?: number;
|
|
165
|
+
agentTitle?: string;
|
|
166
|
+
membershipStatus?: AgentMembershipStatus;
|
|
167
|
+
}
|
|
161
168
|
export interface ApiAgentCreateResponse {
|
|
162
169
|
agentId: number;
|
|
163
170
|
}
|
|
@@ -169,7 +176,12 @@ export interface ApiAgentAddressConflict {
|
|
|
169
176
|
conflict: "address";
|
|
170
177
|
agentId: number;
|
|
171
178
|
}
|
|
172
|
-
export
|
|
179
|
+
export interface ApiAgentAlreadyRegisteredConflict {
|
|
180
|
+
conflict: "registered";
|
|
181
|
+
agentId: number;
|
|
182
|
+
membershipStatus: AgentMembershipStatus;
|
|
183
|
+
}
|
|
184
|
+
export type ApiAgentRegisterConflict = ApiAgentTitleConflict | ApiAgentAddressConflict | ApiAgentAlreadyRegisteredConflict;
|
|
173
185
|
export interface ApiAgentMembership {
|
|
174
186
|
id: number;
|
|
175
187
|
agentId: number;
|
|
@@ -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);
|
|
@@ -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";
|
package/dist/types/api/user.d.ts
CHANGED