need4deed-sdk 0.0.102 → 0.0.104
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.
|
@@ -8,4 +8,9 @@ var Endpoint;
|
|
|
8
8
|
Endpoint["TESTIMONIAL"] = "/testimonial";
|
|
9
9
|
Endpoint["VOLUNTEER"] = "/volunteer";
|
|
10
10
|
Endpoint["OPTION"] = "/option";
|
|
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
|
+
Endpoint["REGISTER"] = "/register";
|
|
11
16
|
})(Endpoint || (exports.Endpoint = Endpoint = {}));
|
|
@@ -112,4 +112,40 @@ interface AgentPatch {
|
|
|
112
112
|
districtId: number;
|
|
113
113
|
}
|
|
114
114
|
export type ApiAgentPatch = VoidableProps<AgentPatch>;
|
|
115
|
+
export interface ApiAgentRegisterNew {
|
|
116
|
+
title: string;
|
|
117
|
+
type?: AgentType;
|
|
118
|
+
info?: string;
|
|
119
|
+
website?: string;
|
|
120
|
+
services?: AgentServiceType[];
|
|
121
|
+
addressStreet?: string;
|
|
122
|
+
addressPostcode?: string;
|
|
123
|
+
districtId?: number;
|
|
124
|
+
languages?: number[];
|
|
125
|
+
}
|
|
126
|
+
export type ApiAgentRegister = {
|
|
127
|
+
agentId: number;
|
|
128
|
+
} | {
|
|
129
|
+
agent: ApiAgentRegisterNew;
|
|
130
|
+
};
|
|
131
|
+
export declare enum AgentMembershipStatus {
|
|
132
|
+
ACTIVE = "active",
|
|
133
|
+
PENDING = "pending"
|
|
134
|
+
}
|
|
135
|
+
export interface ApiAgentRegisterResponse {
|
|
136
|
+
agentId: number;
|
|
137
|
+
membershipStatus: AgentMembershipStatus;
|
|
138
|
+
}
|
|
139
|
+
export interface ApiAgentTitleConflict {
|
|
140
|
+
conflict: "title";
|
|
141
|
+
agentId: number;
|
|
142
|
+
}
|
|
143
|
+
export interface ApiAgentMembership {
|
|
144
|
+
id: number;
|
|
145
|
+
agentId: number;
|
|
146
|
+
agentTitle: string;
|
|
147
|
+
person: ApiPersonGet;
|
|
148
|
+
role: AgentRoleType;
|
|
149
|
+
status: AgentMembershipStatus;
|
|
150
|
+
}
|
|
115
151
|
export {};
|
package/dist/types/api/agent.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.AgentTrustType = exports.AgentServiceType = exports.AgentVolunteerSearchType = exports.AgentEngagementStatusType = exports.AgentRoleType = exports.AgentOperatorType = exports.AgentType = void 0;
|
|
3
|
+
exports.AgentMembershipStatus = exports.AgentTrustType = exports.AgentServiceType = exports.AgentVolunteerSearchType = exports.AgentEngagementStatusType = exports.AgentRoleType = exports.AgentOperatorType = exports.AgentType = void 0;
|
|
4
4
|
var AgentType;
|
|
5
5
|
(function (AgentType) {
|
|
6
6
|
AgentType["AE"] = "AE";
|
|
@@ -62,3 +62,8 @@ var AgentTrustType;
|
|
|
62
62
|
AgentTrustType["LOW"] = "agent-low";
|
|
63
63
|
AgentTrustType["UNKNOWN"] = "agent-unknown";
|
|
64
64
|
})(AgentTrustType || (exports.AgentTrustType = AgentTrustType = {}));
|
|
65
|
+
var AgentMembershipStatus;
|
|
66
|
+
(function (AgentMembershipStatus) {
|
|
67
|
+
AgentMembershipStatus["ACTIVE"] = "active";
|
|
68
|
+
AgentMembershipStatus["PENDING"] = "pending";
|
|
69
|
+
})(AgentMembershipStatus || (exports.AgentMembershipStatus = AgentMembershipStatus = {}));
|
|
@@ -178,3 +178,28 @@ export interface OpportunityVolunteer {
|
|
|
178
178
|
export interface ApiOpportunityVolunteerGet extends OpportunityVolunteer {
|
|
179
179
|
title: string;
|
|
180
180
|
}
|
|
181
|
+
/**
|
|
182
|
+
* A volunteer linked to an opportunity, as surfaced on an agent's opportunity
|
|
183
|
+
* list. Person fields (`name`, `avatarUrl`) are PII-masked per caller role by
|
|
184
|
+
* the API, so they may be absent or redacted.
|
|
185
|
+
*/
|
|
186
|
+
export interface ApiAgentOpportunityVolunteer {
|
|
187
|
+
id: number;
|
|
188
|
+
volunteerId: number;
|
|
189
|
+
status: OpportunityVolunteerStatusType;
|
|
190
|
+
name?: string;
|
|
191
|
+
avatarUrl?: string;
|
|
192
|
+
}
|
|
193
|
+
/**
|
|
194
|
+
* One of an agent's opportunities with the volunteers linked to it. Response
|
|
195
|
+
* item of `GET /agent/:id/opportunity-linked`.
|
|
196
|
+
*/
|
|
197
|
+
export interface ApiAgentOpportunity {
|
|
198
|
+
id: Id;
|
|
199
|
+
title: string;
|
|
200
|
+
statusOpportunity: OpportunityStatusType;
|
|
201
|
+
statusMatch: OpportunityMatchStatusType;
|
|
202
|
+
numberOfVolunteers: number;
|
|
203
|
+
createdAt: Date;
|
|
204
|
+
volunteers: ApiAgentOpportunityVolunteer[];
|
|
205
|
+
}
|