need4deed-sdk 0.0.12 → 0.0.14

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.
@@ -3,6 +3,7 @@ export declare enum EventN4DType {
3
3
  WORKSHOP = "workshop"
4
4
  }
5
5
  export interface EventN4D {
6
+ id: number | string;
6
7
  active: boolean;
7
8
  title: string;
8
9
  subTitle?: string;
@@ -1,5 +1,9 @@
1
1
  export * from "./common";
2
2
  export * from "./event";
3
+ export * from "./language";
4
+ export * from "./location";
5
+ export * from "./new_api";
3
6
  export * from "./opportunity";
4
7
  export * from "./testimonial";
8
+ export * from "./time";
5
9
  export * from "./volunteer";
@@ -16,6 +16,10 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./common"), exports);
18
18
  __exportStar(require("./event"), exports);
19
+ __exportStar(require("./language"), exports);
20
+ __exportStar(require("./location"), exports);
21
+ __exportStar(require("./new_api"), exports);
19
22
  __exportStar(require("./opportunity"), exports);
20
23
  __exportStar(require("./testimonial"), exports);
24
+ __exportStar(require("./time"), exports);
21
25
  __exportStar(require("./volunteer"), exports);
@@ -0,0 +1,5 @@
1
+ import { LangProficiency } from "../core";
2
+ export interface ApiLanguage {
3
+ title: string;
4
+ proficiency: LangProficiency;
5
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,29 @@
1
+ export interface Address {
2
+ id: string;
3
+ street: string;
4
+ city: string;
5
+ postcode: Postcode;
6
+ }
7
+ export interface Postcode {
8
+ id: string;
9
+ code: string;
10
+ latitude: number;
11
+ longitude: number;
12
+ }
13
+ export declare enum LocationType {
14
+ ADDRESS = "address",
15
+ DISTRICT = "district",
16
+ POSTCODE = "postcode"
17
+ }
18
+ export interface Location {
19
+ id: string;
20
+ type: LocationType;
21
+ address?: Address;
22
+ district?: District;
23
+ postcode?: Postcode;
24
+ }
25
+ export interface District {
26
+ id: string;
27
+ title: string;
28
+ postcodes: Postcode[];
29
+ }
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.LocationType = void 0;
4
+ var LocationType;
5
+ (function (LocationType) {
6
+ LocationType["ADDRESS"] = "address";
7
+ LocationType["DISTRICT"] = "district";
8
+ LocationType["POSTCODE"] = "postcode";
9
+ })(LocationType || (exports.LocationType = LocationType = {}));
@@ -0,0 +1,94 @@
1
+ import { LangProficiency } from "../core";
2
+ import { LocationType } from "./location";
3
+ export interface VolunteerAPI {
4
+ id: string;
5
+ person: PersonAPI;
6
+ deal: DealAPI;
7
+ }
8
+ export interface AddressAPI {
9
+ id: string;
10
+ street: string;
11
+ city: string;
12
+ postcode: PostcodeAPI;
13
+ }
14
+ export interface PostcodeAPI {
15
+ id: string;
16
+ code: string;
17
+ latitude: number;
18
+ longitude: number;
19
+ }
20
+ export declare enum DealType {
21
+ VOLUNTEER = "volunteer",
22
+ OPPORTUNITY = "opportunity"
23
+ }
24
+ export interface DealAPI {
25
+ id: string;
26
+ type: DealType;
27
+ profile: ProfileAPI;
28
+ location: LocationAPI[];
29
+ time: TimeAPI[];
30
+ }
31
+ export interface ProfileAPI {
32
+ id: string;
33
+ info: string;
34
+ confidential: string;
35
+ category: CategoryAPI;
36
+ activities: ActivityAPI[];
37
+ skills: SkillAPI[];
38
+ languages: LanguageAPI[];
39
+ }
40
+ export interface CategoryAPI {
41
+ id: string;
42
+ title: string;
43
+ }
44
+ export interface ActivityAPI {
45
+ id: string;
46
+ title: string;
47
+ category: CategoryAPI;
48
+ }
49
+ export interface SkillAPI {
50
+ id: string;
51
+ title: string;
52
+ }
53
+ export declare enum LangPurposeType {
54
+ GENERAL = "general",
55
+ INTERPRETATION = "interpretation"
56
+ }
57
+ export interface LanguageAPI {
58
+ id: string;
59
+ title: string;
60
+ proficiency?: LangProficiency;
61
+ purpose: LangPurposeType;
62
+ }
63
+ export interface SkillAPI {
64
+ id: string;
65
+ title: string;
66
+ }
67
+ export interface LocationAPI {
68
+ id: string;
69
+ type: LocationType;
70
+ address?: AddressAPI;
71
+ district?: DistrictAPI;
72
+ postcode?: PostcodeAPI;
73
+ }
74
+ export interface DistrictAPI {
75
+ id: string;
76
+ title: string;
77
+ postcodes: PostcodeAPI[];
78
+ }
79
+ export interface PersonAPI {
80
+ id: string;
81
+ firstName: string;
82
+ middleName?: string;
83
+ lastName: string;
84
+ email: string;
85
+ phone?: string;
86
+ address?: AddressAPI;
87
+ }
88
+ export interface TimeAPI {
89
+ id: string;
90
+ description: string;
91
+ start: Date;
92
+ end?: Date;
93
+ rrule?: string;
94
+ }
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.LangPurposeType = exports.DealType = void 0;
4
+ var DealType;
5
+ (function (DealType) {
6
+ DealType["VOLUNTEER"] = "volunteer";
7
+ DealType["OPPORTUNITY"] = "opportunity";
8
+ })(DealType || (exports.DealType = DealType = {}));
9
+ var LangPurposeType;
10
+ (function (LangPurposeType) {
11
+ LangPurposeType["GENERAL"] = "general";
12
+ LangPurposeType["INTERPRETATION"] = "interpretation";
13
+ })(LangPurposeType || (exports.LangPurposeType = LangPurposeType = {}));
@@ -0,0 +1,60 @@
1
+ export interface Time {
2
+ id: string;
3
+ description: string;
4
+ start: Date;
5
+ end?: Date;
6
+ rrule?: string;
7
+ }
8
+ export declare enum ByDay {
9
+ MO = "Monday",
10
+ TU = "Tuesday",
11
+ WE = "Wednesday",
12
+ TH = "Thursday",
13
+ FR = "Friday",
14
+ SA = "Saturday",
15
+ SU = "Sunday"
16
+ }
17
+ export type Occasionally = "occasionally";
18
+ export type OccasionalDays = "weekends" | "weekdays";
19
+ export declare enum Hour {
20
+ H00 = "0:00",
21
+ H01 = "1:00",
22
+ H02 = "2:00",
23
+ H03 = "3:00",
24
+ H04 = "4:00",
25
+ H05 = "5:00",
26
+ H06 = "6:00",
27
+ H07 = "7:00",
28
+ H08 = "8:00",
29
+ H09 = "9:00",
30
+ H10 = "10:00",
31
+ H11 = "11:00",
32
+ H12 = "12:00",
33
+ H13 = "13:00",
34
+ H14 = "14:00",
35
+ H15 = "15:00",
36
+ H16 = "16:00",
37
+ H17 = "17:00",
38
+ H18 = "18:00",
39
+ H19 = "19:00",
40
+ H20 = "20:00",
41
+ H21 = "21:00",
42
+ H22 = "22:00",
43
+ H23 = "23:00",
44
+ H24 = "24:00"
45
+ }
46
+ export type Daytime = [Hour, Hour] | OccasionalDays;
47
+ export interface Availability {
48
+ day: ByDay | Occasionally;
49
+ daytime: Daytime;
50
+ }
51
+ export declare enum OccasionalType {
52
+ UNDEFINED = "undefined",
53
+ WEEKENDS = "weekends",
54
+ WEEKDAYS = "weekdays",
55
+ OCCASIONALLY = "occasionally"
56
+ }
57
+ export interface TimedText {
58
+ date: Date;
59
+ text: string;
60
+ }
@@ -0,0 +1,48 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.OccasionalType = exports.Hour = exports.ByDay = void 0;
4
+ var ByDay;
5
+ (function (ByDay) {
6
+ ByDay["MO"] = "Monday";
7
+ ByDay["TU"] = "Tuesday";
8
+ ByDay["WE"] = "Wednesday";
9
+ ByDay["TH"] = "Thursday";
10
+ ByDay["FR"] = "Friday";
11
+ ByDay["SA"] = "Saturday";
12
+ ByDay["SU"] = "Sunday";
13
+ })(ByDay || (exports.ByDay = ByDay = {}));
14
+ var Hour;
15
+ (function (Hour) {
16
+ Hour["H00"] = "0:00";
17
+ Hour["H01"] = "1:00";
18
+ Hour["H02"] = "2:00";
19
+ Hour["H03"] = "3:00";
20
+ Hour["H04"] = "4:00";
21
+ Hour["H05"] = "5:00";
22
+ Hour["H06"] = "6:00";
23
+ Hour["H07"] = "7:00";
24
+ Hour["H08"] = "8:00";
25
+ Hour["H09"] = "9:00";
26
+ Hour["H10"] = "10:00";
27
+ Hour["H11"] = "11:00";
28
+ Hour["H12"] = "12:00";
29
+ Hour["H13"] = "13:00";
30
+ Hour["H14"] = "14:00";
31
+ Hour["H15"] = "15:00";
32
+ Hour["H16"] = "16:00";
33
+ Hour["H17"] = "17:00";
34
+ Hour["H18"] = "18:00";
35
+ Hour["H19"] = "19:00";
36
+ Hour["H20"] = "20:00";
37
+ Hour["H21"] = "21:00";
38
+ Hour["H22"] = "22:00";
39
+ Hour["H23"] = "23:00";
40
+ Hour["H24"] = "24:00";
41
+ })(Hour || (exports.Hour = Hour = {}));
42
+ var OccasionalType;
43
+ (function (OccasionalType) {
44
+ OccasionalType["UNDEFINED"] = "undefined";
45
+ OccasionalType["WEEKENDS"] = "weekends";
46
+ OccasionalType["WEEKDAYS"] = "weekdays";
47
+ OccasionalType["OCCASIONALLY"] = "occasionally";
48
+ })(OccasionalType || (exports.OccasionalType = OccasionalType = {}));
@@ -1,4 +1,8 @@
1
- import { OptionId } from "./common";
1
+ import { DocumentStatusType, Id } from "../core";
2
+ import { Option, OptionId } from "./common";
3
+ import { ApiLanguage } from "./language";
4
+ import { Address } from "./location";
5
+ import { Availability, TimedText } from "./time";
2
6
  export interface Volunteer {
3
7
  origin_opportunity: number | undefined;
4
8
  full_name: string;
@@ -12,8 +16,47 @@ export interface Volunteer {
12
16
  preferred_berlin_locations: OptionId[];
13
17
  activities: OptionId[];
14
18
  skills: OptionId[];
15
- native_languages: OptionId[];
16
- fluent_languages: OptionId[];
17
- intermediate_languages: OptionId[];
19
+ nativeLanguages: OptionId[];
20
+ fluentLanguages: OptionId[];
21
+ intermediateLanguages: OptionId[];
18
22
  comments: string;
19
23
  }
24
+ export interface VolunteerFormData {
25
+ opportunityId?: Id | undefined;
26
+ fullName: string;
27
+ phone: string;
28
+ email: string;
29
+ postcode: number;
30
+ goodConductCertificate: DocumentStatusType;
31
+ measlesVaccination: DocumentStatusType;
32
+ schedule: [number, OptionId][];
33
+ districts: OptionId[];
34
+ languages: ApiLanguage[];
35
+ activities: OptionId[];
36
+ skills: OptionId[];
37
+ leadFrom: OptionId[];
38
+ comments: string;
39
+ }
40
+ export interface ApiVolunteerGetList {
41
+ name: string;
42
+ languages: ApiLanguage[];
43
+ availability: Availability[];
44
+ activities: string[];
45
+ skills: string[];
46
+ locations: string[];
47
+ }
48
+ export interface ApiVolunteerGet extends ApiVolunteerGetList {
49
+ firstName: string;
50
+ lastName: string;
51
+ phone: string;
52
+ email: string;
53
+ address: Address;
54
+ goodConductCertificate: DocumentStatusType;
55
+ measlesVaccination: DocumentStatusType;
56
+ infoAbout: string;
57
+ infoExperience: string;
58
+ timelineLogs: TimedText[];
59
+ comments: TimedText[];
60
+ opportunitiesApplied: Option[];
61
+ opportunitiesMatched: Option[];
62
+ }
@@ -3,7 +3,7 @@ export declare enum Lang {
3
3
  DE = "de"
4
4
  }
5
5
  export declare enum LangProficiency {
6
- BEGINER = "beginer",
6
+ BEGINNER = "beginner",
7
7
  INTERMEDIATE = "intermediate",
8
8
  ADVANCED = "advanced",
9
9
  FLUENT = "fluent",
@@ -20,4 +20,13 @@ export declare enum HttpMethod {
20
20
  CONNECT = "CONNECT",
21
21
  PATCH = "PATCH"
22
22
  }
23
+ export declare enum DocumentStatusType {
24
+ UNDEFINED = "undefined",
25
+ YES = "yes",
26
+ NO = "no",
27
+ ASKED_TO_APPLY = "asked_to_apply",
28
+ APPLIED_SELF = "applied_self",
29
+ APPLIED_N4D = "applied_n4d"
30
+ }
31
+ export type Id = string | number;
23
32
  export type SomeType = "some" | "type";
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.HttpMethod = exports.LangProficiency = exports.Lang = void 0;
3
+ exports.DocumentStatusType = exports.HttpMethod = exports.LangProficiency = exports.Lang = void 0;
4
4
  var Lang;
5
5
  (function (Lang) {
6
6
  Lang["EN"] = "en";
@@ -8,7 +8,7 @@ var Lang;
8
8
  })(Lang || (exports.Lang = Lang = {}));
9
9
  var LangProficiency;
10
10
  (function (LangProficiency) {
11
- LangProficiency["BEGINER"] = "beginer";
11
+ LangProficiency["BEGINNER"] = "beginner";
12
12
  LangProficiency["INTERMEDIATE"] = "intermediate";
13
13
  LangProficiency["ADVANCED"] = "advanced";
14
14
  LangProficiency["FLUENT"] = "fluent";
@@ -26,3 +26,12 @@ var HttpMethod;
26
26
  HttpMethod["CONNECT"] = "CONNECT";
27
27
  HttpMethod["PATCH"] = "PATCH";
28
28
  })(HttpMethod || (exports.HttpMethod = HttpMethod = {}));
29
+ var DocumentStatusType;
30
+ (function (DocumentStatusType) {
31
+ DocumentStatusType["UNDEFINED"] = "undefined";
32
+ DocumentStatusType["YES"] = "yes";
33
+ DocumentStatusType["NO"] = "no";
34
+ DocumentStatusType["ASKED_TO_APPLY"] = "asked_to_apply";
35
+ DocumentStatusType["APPLIED_SELF"] = "applied_self";
36
+ DocumentStatusType["APPLIED_N4D"] = "applied_n4d";
37
+ })(DocumentStatusType || (exports.DocumentStatusType = DocumentStatusType = {}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "need4deed-sdk",
3
- "version": "0.0.12",
3
+ "version": "0.0.14",
4
4
  "description": "Need4Deed.org SDK",
5
5
  "type": "commonjs",
6
6
  "main": "dist/index.js",