need4deed-sdk 0.0.126 → 0.0.128
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.
|
@@ -108,7 +108,41 @@ export interface OpportunityLegacyFormDataProps {
|
|
|
108
108
|
language: `${Lang}`;
|
|
109
109
|
}
|
|
110
110
|
export type OpportunityLegacyFormData = VoidableUndefined<OpportunityLegacyFormDataProps>;
|
|
111
|
-
|
|
111
|
+
/**
|
|
112
|
+
* Body for `POST /opportunity` — the dashboard's typed create-opportunity
|
|
113
|
+
* form. Unlike `OpportunityLegacyFormData` (free-text/ISO-code strings from
|
|
114
|
+
* the public form, resolved by title lookup), activities/skills/languages/
|
|
115
|
+
* districts here are numeric option ids from `GET /option/*`, resolved by id.
|
|
116
|
+
* Deliberately not derived from `OpportunityLegacyFormDataProps`: the two
|
|
117
|
+
* shapes look similar but mean different things, and overloading one type for
|
|
118
|
+
* both invites exactly the id-vs-title mismatch this type exists to prevent.
|
|
119
|
+
*/
|
|
120
|
+
export interface OpportunityCreateFormDataProps {
|
|
121
|
+
title: string;
|
|
122
|
+
agent_id?: number;
|
|
123
|
+
submitted_by_id?: number;
|
|
124
|
+
opportunity_type: OpportunityLegacyType;
|
|
125
|
+
accomp_address?: string;
|
|
126
|
+
accomp_postcode?: string;
|
|
127
|
+
accomp_datetime?: string;
|
|
128
|
+
accomp_name?: string;
|
|
129
|
+
accomp_phone?: string;
|
|
130
|
+
accomp_information?: string;
|
|
131
|
+
accomp_translation?: `${TranslatedIntoType}`;
|
|
132
|
+
districtIds?: number[];
|
|
133
|
+
languageIds: number[];
|
|
134
|
+
activityIds: number[];
|
|
135
|
+
skillIds: number[];
|
|
136
|
+
timeslots?: [number, string][];
|
|
137
|
+
onetime_date_time?: string;
|
|
138
|
+
volunteers_number: number;
|
|
139
|
+
vo_information?: string;
|
|
140
|
+
category: string;
|
|
141
|
+
category_id: OptionId;
|
|
142
|
+
last_edited_time_notion?: string;
|
|
143
|
+
language: `${Lang}`;
|
|
144
|
+
}
|
|
145
|
+
export type OpportunityFormDataWithAgentSubmitter = VoidableUndefined<OpportunityCreateFormDataProps>;
|
|
112
146
|
export interface ApiOpportunityAgent {
|
|
113
147
|
id: number;
|
|
114
148
|
type: AgentType;
|
|
@@ -161,6 +195,10 @@ export type ApiOpportunityPatch = VoidableProps<{
|
|
|
161
195
|
skills: OptionItem[];
|
|
162
196
|
schedule: ApiAvailability[];
|
|
163
197
|
opportunity_type: OpportunityType;
|
|
198
|
+
event: {
|
|
199
|
+
date: string;
|
|
200
|
+
time: string;
|
|
201
|
+
};
|
|
164
202
|
contact: {
|
|
165
203
|
id: number;
|
|
166
204
|
name: string;
|