need4deed-sdk 0.0.41 → 0.0.43

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,5 @@
1
+ export interface ApiAddressGet {
2
+ street: string;
3
+ city: string;
4
+ postcode: string;
5
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,11 @@
1
+ import { ApiOrganizationGet } from "./organization";
2
+ import { ApiPersonGet } from "./person";
3
+ export declare enum AgentType {
4
+ RAC = "rac",
5
+ NGO = "ngo"
6
+ }
7
+ export interface ApiAgentGet {
8
+ type: AgentType;
9
+ operator: ApiPersonGet | ApiOrganizationGet;
10
+ contact: ApiPersonGet;
11
+ }
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AgentType = void 0;
4
+ var AgentType;
5
+ (function (AgentType) {
6
+ AgentType["RAC"] = "rac";
7
+ AgentType["NGO"] = "ngo";
8
+ })(AgentType || (exports.AgentType = AgentType = {}));
@@ -1,4 +1,5 @@
1
1
  import { Lang } from "../core";
2
+ import { PartialBy } from "../utils";
2
3
  export type OptionTitle = Partial<{
3
4
  [key in Lang]: string;
4
5
  }>;
@@ -7,3 +8,4 @@ export interface Option {
7
8
  id: OptionId;
8
9
  title: OptionTitle;
9
10
  }
11
+ export type OptionById = PartialBy<Option, "title">;
@@ -1,3 +1,4 @@
1
+ export * from "./agent";
1
2
  export * from "./appreciation";
2
3
  export * from "./comment";
3
4
  export * from "./common";
@@ -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("./agent"), exports);
17
18
  __exportStar(require("./appreciation"), exports);
18
19
  __exportStar(require("./comment"), exports);
19
20
  __exportStar(require("./common"), exports);
@@ -1,6 +1,8 @@
1
1
  import { Id } from "..";
2
- import { OptionId } from "./common";
2
+ import { ApiAddressGet } from "./address";
3
+ import { OptionById, OptionId } from "./common";
3
4
  import { ApiLanguage } from "./language";
5
+ import { PrefferedCommunicationType } from "./person";
4
6
  import { VolunteerStateTypeType } from "./volunteer";
5
7
  export declare enum OpportunityType {
6
8
  GENERAL = "volunteering",
@@ -53,6 +55,18 @@ export interface Opportunity {
53
55
  category_id: OptionId;
54
56
  last_edited_time_notion?: string;
55
57
  }
58
+ export interface ApiOpportunityAgent {
59
+ contactPerson: {
60
+ name: string;
61
+ phone: string;
62
+ rmail: string;
63
+ preferredComm: PrefferedCommunicationType;
64
+ };
65
+ operator: {
66
+ title: string;
67
+ address: ApiAddressGet;
68
+ };
69
+ }
56
70
  export interface ApiOpportunityGetList {
57
71
  id: Id;
58
72
  title: string;
@@ -61,7 +75,8 @@ export interface ApiOpportunityGetList {
61
75
  }
62
76
  export interface ApiOpportunityGet extends ApiOpportunityGetList {
63
77
  languages: ApiLanguage[];
64
- activities: string[];
65
- skills: string[];
66
- location: string[];
78
+ activities: OptionById[];
79
+ skills: OptionById[];
80
+ location: OptionById[];
81
+ agent: ApiOpportunityAgent;
67
82
  }
@@ -0,0 +1,4 @@
1
+ export interface ApiOrganizationGet {
2
+ id: number;
3
+ title: string;
4
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,4 +1,11 @@
1
1
  import { Address } from "./location";
2
+ export declare enum PrefferedCommunicationType {
3
+ CALLED = "called",
4
+ EMAIL_SENT = "email-sent",
5
+ BRIEFED = "briefed",
6
+ TRIED_CALL = "tried-call",
7
+ NOT_RESPONDING = "not-responding"
8
+ }
2
9
  export interface ApiPersonGet {
3
10
  id: number;
4
11
  avatarUrl: string;
@@ -8,4 +15,5 @@ export interface ApiPersonGet {
8
15
  phone: string;
9
16
  email: string;
10
17
  address: Address;
18
+ preferredComm?: PrefferedCommunicationType;
11
19
  }
@@ -1,2 +1,11 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.PrefferedCommunicationType = void 0;
4
+ var PrefferedCommunicationType;
5
+ (function (PrefferedCommunicationType) {
6
+ PrefferedCommunicationType["CALLED"] = "called";
7
+ PrefferedCommunicationType["EMAIL_SENT"] = "email-sent";
8
+ PrefferedCommunicationType["BRIEFED"] = "briefed";
9
+ PrefferedCommunicationType["TRIED_CALL"] = "tried-call";
10
+ PrefferedCommunicationType["NOT_RESPONDING"] = "not-responding";
11
+ })(PrefferedCommunicationType || (exports.PrefferedCommunicationType = PrefferedCommunicationType = {}));
@@ -3,7 +3,7 @@ import { OptionId } from "./common";
3
3
  import { ApiLanguage } from "./language";
4
4
  import { ApiOpportunityGetList, OpportunityVolunteerStatusType } from "./opportunity";
5
5
  import { OptionItem } from "./option";
6
- import { ApiPersonGet } from "./person";
6
+ import { ApiPersonGet, PrefferedCommunicationType } from "./person";
7
7
  import { ApiAvailability, TimedText } from "./time";
8
8
  export interface Volunteer {
9
9
  origin_opportunity: number | undefined;
@@ -80,12 +80,8 @@ export declare enum VolunteerStateType {
80
80
  TEMP_INACTIVE = "Temp inactive",
81
81
  INACTIVE = "Inactive"
82
82
  }
83
- export declare enum VolunteerStateMatchType {
84
- NO_MATCHES = "no-matches",
85
- PENDING_MATCH = "pending-match",
86
- MATCHED = "matched",
87
- NEEDS_REMATCH = "needs-rematch"
88
- }
83
+ export declare const VolunteerStateMatchType: typeof PrefferedCommunicationType;
84
+ export type VolunteerStateMatchType = PrefferedCommunicationType;
89
85
  export declare enum VolunteerCommunicationType {
90
86
  EMAIL = "email",
91
87
  MOBILE_PHONE = "mobilePhone",
@@ -134,7 +130,7 @@ export interface ApiVolunteerGet {
134
130
  }
135
131
  export interface VolunteerPatchBodyData extends Partial<ApiVolunteerGet> {
136
132
  }
137
- export interface VolunteerOpportunityGet {
133
+ export interface ApiVolunteerOpportunityGet {
138
134
  id: number;
139
135
  opportunityId: number;
140
136
  volunteerId: number;
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.VolunteerCommunicationType = exports.VolunteerStateMatchType = exports.VolunteerStateType = exports.VolunteerStateCGCType = exports.VolunteerStateTypeType = exports.VolunteerStateAppreciationType = exports.VolunteerStateCommunicationType = exports.VolunteerStateEngagementType = void 0;
4
+ const person_1 = require("./person");
4
5
  var VolunteerStateEngagementType;
5
6
  (function (VolunteerStateEngagementType) {
6
7
  VolunteerStateEngagementType["NEW"] = "new";
@@ -48,13 +49,7 @@ var VolunteerStateType;
48
49
  VolunteerStateType["TEMP_INACTIVE"] = "Temp inactive";
49
50
  VolunteerStateType["INACTIVE"] = "Inactive";
50
51
  })(VolunteerStateType || (exports.VolunteerStateType = VolunteerStateType = {}));
51
- var VolunteerStateMatchType;
52
- (function (VolunteerStateMatchType) {
53
- VolunteerStateMatchType["NO_MATCHES"] = "no-matches";
54
- VolunteerStateMatchType["PENDING_MATCH"] = "pending-match";
55
- VolunteerStateMatchType["MATCHED"] = "matched";
56
- VolunteerStateMatchType["NEEDS_REMATCH"] = "needs-rematch";
57
- })(VolunteerStateMatchType || (exports.VolunteerStateMatchType = VolunteerStateMatchType = {}));
52
+ exports.VolunteerStateMatchType = person_1.PrefferedCommunicationType;
58
53
  var VolunteerCommunicationType;
59
54
  (function (VolunteerCommunicationType) {
60
55
  VolunteerCommunicationType["EMAIL"] = "email";
@@ -0,0 +1 @@
1
+ export type PartialBy<T, K extends keyof T> = Omit<T, K> & Partial<Pick<T, K>>;
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "need4deed-sdk",
3
- "version": "0.0.41",
3
+ "version": "0.0.43",
4
4
  "description": "Need4Deed.org SDK",
5
5
  "type": "commonjs",
6
6
  "main": "dist/index.js",