need4deed-sdk 0.0.6 → 0.0.7

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "need4deed-sdk",
3
- "version": "0.0.6",
3
+ "version": "0.0.7",
4
4
  "description": "Need4Deed.org SDK",
5
5
  "main": "src/index.ts",
6
6
  "scripts": {
package/src/types/api.ts CHANGED
@@ -1,3 +1,5 @@
1
+ import { Lang } from "./common";
2
+
1
3
  export interface Testimonial {
2
4
  name: string;
3
5
  pic: string; // base64 encoded thumb most probably
@@ -33,3 +35,68 @@ export interface EventN4D {
33
35
  additionalInfo?: string[]; // lineup, content, etc.
34
36
  outro?: string;
35
37
  }
38
+
39
+ export enum OpportunityType {
40
+ GENERAL = "volunteering",
41
+ ACCOMPANYING = "accompanying",
42
+ }
43
+
44
+ export enum TranslatedIntoType {
45
+ DEUTSCHE = "deutsche",
46
+ ENGLISH_OK = "englishOk",
47
+ NO_TRANSLATION = "noTranslation",
48
+ }
49
+
50
+ export type OptionTitle = Partial<{
51
+ [key in Lang]: string;
52
+ }>;
53
+
54
+ export type OptionId = string | number;
55
+
56
+ export interface Option {
57
+ id: OptionId;
58
+ title: OptionTitle;
59
+ }
60
+
61
+ export interface Opportunity {
62
+ title: string;
63
+ rac_email: string;
64
+ rac_full_name: string;
65
+ rac_phone: string;
66
+ rac_address: string;
67
+ rac_plz: string;
68
+ opportunity_type: OpportunityType;
69
+ accomp_address: string;
70
+ accomp_postcode: string;
71
+ accomp_datetime?: string;
72
+ accomp_name?: string;
73
+ accomp_phone?: string;
74
+ accomp_information?: string;
75
+ accomp_translation?: TranslatedIntoType;
76
+ berlin_locations?: OptionId[];
77
+ languages: OptionId[];
78
+ activities: OptionId[];
79
+ skills: OptionId[];
80
+ timeslots?: [number, OptionId][];
81
+ volunteers_number: number;
82
+ vo_information?: string;
83
+ }
84
+
85
+ export interface Volunteer {
86
+ origin_opportunity: number | undefined;
87
+ full_name: string;
88
+ phone: string;
89
+ email: string;
90
+ postal_code: number;
91
+ good_conduct_certificate: "Yes" | "No";
92
+ if_measles_vaccination: boolean;
93
+ lead_from: string;
94
+ schedule: [number, OptionId][];
95
+ preferred_berlin_locations: OptionId[];
96
+ activities: OptionId[];
97
+ skills: OptionId[];
98
+ native_languages: OptionId[];
99
+ fluent_languages: OptionId[];
100
+ intermediate_languages: OptionId[];
101
+ comments: string;
102
+ }
@@ -0,0 +1,21 @@
1
+ export enum Lang {
2
+ EN = "en",
3
+ DE = "de",
4
+ RU = "ru",
5
+ AR = "ar",
6
+ FA = "fa",
7
+ TR = "tr",
8
+ ES = "es",
9
+ }
10
+
11
+ export enum HttpMethod {
12
+ GET = "GET",
13
+ HEAD = "HEAD",
14
+ POST = "POST",
15
+ PUT = "PUT",
16
+ DELETE = "DELETE",
17
+ TRACE = "TRACE",
18
+ OPTIONS = "OPTIONS",
19
+ CONNECT = "CONNECT",
20
+ PATCH = "PATCH",
21
+ }
@@ -1 +1,2 @@
1
1
  export * from "./api";
2
+ export * from "./common";