need4deed-sdk 0.0.59 → 0.0.61

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.
@@ -0,0 +1,9 @@
1
+ import { TranslatedIntoType } from "./opportunity";
2
+ export interface ApiOpportunityAccompanyingDetails {
3
+ appointmentAddress?: string;
4
+ appointmentDate?: Date;
5
+ appointmentTime?: Date;
6
+ refugeeNumber?: string;
7
+ refugeeName?: string;
8
+ languageToTranslate?: TranslatedIntoType;
9
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,3 +1,4 @@
1
+ export * from "./accompanying";
1
2
  export * from "./agent";
2
3
  export * from "./appreciation";
3
4
  export * from "./comment";
@@ -14,6 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./accompanying"), exports);
17
18
  __exportStar(require("./agent"), exports);
18
19
  __exportStar(require("./appreciation"), exports);
19
20
  __exportStar(require("./comment"), exports);
@@ -1,11 +1,12 @@
1
- import { Id } from "..";
1
+ import { Id, Lang } from "..";
2
+ import { ApiOpportunityAccompanyingDetails } from "./accompanying";
2
3
  import { AgentType } from "./agent";
3
- import { ApiAvailability } from "./time";
4
4
  import { ApiComment } from "./comment";
5
5
  import { OptionById, OptionId } from "./common";
6
6
  import { ApiLanguage } from "./language";
7
7
  import { PreferredCommunicationType } from "./person";
8
8
  import { ProfileVolunteeringType } from "./profile";
9
+ import { ApiAvailability } from "./time";
9
10
  import { VolunteerStateTypeType } from "./volunteer";
10
11
  export declare const REGULAR_ACCOMPANYING: ProfileVolunteeringType, OpportunityType: {
11
12
  ACCOMPANYING: ProfileVolunteeringType.ACCOMPANYING;
@@ -62,6 +63,33 @@ export interface OpportunityFormData {
62
63
  category_id: OptionId;
63
64
  last_edited_time_notion?: string;
64
65
  }
66
+ export interface OpportunityLegacyFormData {
67
+ title: string;
68
+ rac_email: string;
69
+ rac_full_name: string;
70
+ rac_phone: string;
71
+ rac_address: string;
72
+ rac_plz: string;
73
+ opportunity_type: "accompanying" | "volunteering";
74
+ accomp_address: string;
75
+ accomp_postcode: string;
76
+ accomp_datetime?: string;
77
+ accomp_name?: string;
78
+ accomp_phone?: string;
79
+ accomp_information?: string;
80
+ accomp_translation?: `${TranslatedIntoType}`;
81
+ berlin_locations?: string[];
82
+ languages: string[];
83
+ activities: string[];
84
+ skills: string[];
85
+ timeslots?: [number, string][];
86
+ volunteers_number: number;
87
+ vo_information?: string;
88
+ category: string;
89
+ category_id: OptionId;
90
+ last_edited_time_notion?: string;
91
+ language: `${Lang}`;
92
+ }
65
93
  export interface ApiOpportunityAgent {
66
94
  type: AgentType;
67
95
  name: string;
@@ -74,14 +102,6 @@ export interface ApiOpportunityContact {
74
102
  email: string;
75
103
  waysToContact: PreferredCommunicationType[];
76
104
  }
77
- export interface ApiOpportunityAccompanyingDetails {
78
- appointmentAddress?: string;
79
- appointmentDate?: Date;
80
- appointmentTime?: Date;
81
- refugeeNumber?: string;
82
- refugeeName?: string;
83
- languageToTranslate?: TranslatedIntoType;
84
- }
85
105
  export interface ApiOpportunityGetList {
86
106
  id: Id;
87
107
  title: string;
@@ -104,3 +124,13 @@ export interface ApiOpportunityGet extends ApiOpportunityGetList {
104
124
  agent: ApiOpportunityAgent;
105
125
  accompanyingDetails: ApiOpportunityAccompanyingDetails;
106
126
  }
127
+ export interface OpportunityVolunteer {
128
+ id: number;
129
+ status: OpportunityVolunteerStatusType;
130
+ opportunityId: number;
131
+ volunteerId: number;
132
+ updatedAt: Date;
133
+ }
134
+ export interface ApiOpportunityVolunteerGet extends OpportunityVolunteer {
135
+ title: string;
136
+ }
@@ -1,7 +1,7 @@
1
1
  import { DocumentStatusType, Id } from "../core";
2
2
  import { OptionById, OptionId } from "./common";
3
3
  import { ApiLanguage } from "./language";
4
- import { ApiOpportunityGetList, OpportunityVolunteerStatusType } from "./opportunity";
4
+ import { ApiOpportunityGetList, OpportunityVolunteer } from "./opportunity";
5
5
  import { OptionItem } from "./option";
6
6
  import { ApiPersonGet, PreferredCommunicationType } from "./person";
7
7
  import { ProfileVolunteeringType } from "./profile";
@@ -146,13 +146,16 @@ export interface ApiVolunteerGet {
146
146
  }
147
147
  export interface VolunteerPatchBodyData extends Partial<ApiVolunteerGet> {
148
148
  }
149
- export interface ApiOpportunityVolunteerGet {
150
- id: number;
151
- opportunityId: number;
152
- volunteerId: number;
153
- title: string;
154
- status: OpportunityVolunteerStatusType;
155
- updatedAt: Date;
149
+ export interface ApiVolunteerOpportunityGet extends OpportunityVolunteer {
150
+ name: string;
151
+ avatarUrl: string;
152
+ volunteeringType: ProfileVolunteeringType;
153
+ engagement: VolunteerStateEngagementType;
154
+ languages: ApiLanguage[];
155
+ availability: ApiAvailability[];
156
+ activities: OptionItem[];
157
+ skills: OptionItem[];
158
+ locations: OptionItem[];
156
159
  }
157
160
  export interface ApiVolunteerOpportunityGetList extends ApiOpportunityGetList {
158
161
  languages: ApiLanguage[];
@@ -54,12 +54,14 @@ export declare enum QueryParams {
54
54
  export declare enum EntityTableName {
55
55
  NONE = "none",
56
56
  ACTIVITY = "activity",
57
- SKILL = "skill",
57
+ AGENT = "agent",
58
58
  CATEGORY = "comment",
59
59
  COMMENT = "category",
60
+ DISTRICT = "district",
60
61
  LANGUAGE = "language",
61
62
  LEAD = "lead_from",
62
- DISTRICT = "district",
63
+ OPPORTUNITY = "opportunity",
64
+ SKILL = "skill",
63
65
  VOLUNTEER = "volunteer"
64
66
  }
65
67
  export declare enum QueryParamsKeys {
@@ -64,12 +64,14 @@ var EntityTableName;
64
64
  (function (EntityTableName) {
65
65
  EntityTableName["NONE"] = "none";
66
66
  EntityTableName["ACTIVITY"] = "activity";
67
- EntityTableName["SKILL"] = "skill";
67
+ EntityTableName["AGENT"] = "agent";
68
68
  EntityTableName["CATEGORY"] = "comment";
69
69
  EntityTableName["COMMENT"] = "category";
70
+ EntityTableName["DISTRICT"] = "district";
70
71
  EntityTableName["LANGUAGE"] = "language";
71
72
  EntityTableName["LEAD"] = "lead_from";
72
- EntityTableName["DISTRICT"] = "district";
73
+ EntityTableName["OPPORTUNITY"] = "opportunity";
74
+ EntityTableName["SKILL"] = "skill";
73
75
  EntityTableName["VOLUNTEER"] = "volunteer";
74
76
  })(EntityTableName || (exports.EntityTableName = EntityTableName = {}));
75
77
  var QueryParamsKeys;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "need4deed-sdk",
3
- "version": "0.0.59",
3
+ "version": "0.0.61",
4
4
  "description": "Need4Deed.org SDK",
5
5
  "type": "commonjs",
6
6
  "main": "dist/index.js",