need4deed-sdk 0.0.42 → 0.0.44
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/dist/types/api/address.d.ts +5 -0
- package/dist/types/api/address.js +2 -0
- package/dist/types/api/agent.d.ts +11 -0
- package/dist/types/api/agent.js +8 -0
- package/dist/types/api/common.d.ts +2 -0
- package/dist/types/api/index.d.ts +1 -0
- package/dist/types/api/index.js +1 -0
- package/dist/types/api/opportunity.d.ts +35 -4
- package/dist/types/api/organization.d.ts +4 -0
- package/dist/types/api/organization.js +2 -0
- package/dist/types/api/person.d.ts +8 -0
- package/dist/types/api/person.js +9 -0
- package/dist/types/api/volunteer.d.ts +3 -7
- package/dist/types/api/volunteer.js +2 -7
- package/dist/types/utils.d.ts +1 -0
- package/dist/types/utils.js +2 -0
- package/package.json +1 -1
|
@@ -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
|
+
}
|
|
@@ -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">;
|
package/dist/types/api/index.js
CHANGED
|
@@ -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,10 @@
|
|
|
1
1
|
import { Id } from "..";
|
|
2
|
-
import {
|
|
2
|
+
import { AgentType } from "./agent";
|
|
3
|
+
import { ApiAvailability } from "./time";
|
|
4
|
+
import { ApiComment } from "./comment";
|
|
5
|
+
import { OptionById, OptionId } from "./common";
|
|
3
6
|
import { ApiLanguage } from "./language";
|
|
7
|
+
import { PrefferedCommunicationType } from "./person";
|
|
4
8
|
import { VolunteerStateTypeType } from "./volunteer";
|
|
5
9
|
export declare enum OpportunityType {
|
|
6
10
|
GENERAL = "volunteering",
|
|
@@ -53,15 +57,42 @@ export interface Opportunity {
|
|
|
53
57
|
category_id: OptionId;
|
|
54
58
|
last_edited_time_notion?: string;
|
|
55
59
|
}
|
|
60
|
+
export interface ApiOpportunityAgent {
|
|
61
|
+
type: AgentType;
|
|
62
|
+
name: string;
|
|
63
|
+
address: string;
|
|
64
|
+
district: OptionById;
|
|
65
|
+
}
|
|
66
|
+
export interface ApiOpportunityContact {
|
|
67
|
+
name: string;
|
|
68
|
+
phone: string;
|
|
69
|
+
email: string;
|
|
70
|
+
waysToContact: PrefferedCommunicationType[];
|
|
71
|
+
}
|
|
72
|
+
export interface ApiOpportunityAccompanyingDetails {
|
|
73
|
+
appointmentAddress?: string;
|
|
74
|
+
appointmentDate?: Date;
|
|
75
|
+
appointmentTime?: Date;
|
|
76
|
+
refugeeNumber?: string;
|
|
77
|
+
refugeeName?: string;
|
|
78
|
+
languageToTranslate?: TranslatedIntoType;
|
|
79
|
+
}
|
|
56
80
|
export interface ApiOpportunityGetList {
|
|
57
81
|
id: Id;
|
|
58
82
|
title: string;
|
|
83
|
+
categoryId: OptionById;
|
|
59
84
|
volunteerType: VolunteerStateTypeType;
|
|
60
85
|
statusOpportunity: OpportunityStatusType;
|
|
61
86
|
}
|
|
62
87
|
export interface ApiOpportunityGet extends ApiOpportunityGetList {
|
|
88
|
+
createdAt: Date;
|
|
63
89
|
languages: ApiLanguage[];
|
|
64
|
-
activities:
|
|
65
|
-
skills:
|
|
66
|
-
location:
|
|
90
|
+
activities: OptionById[];
|
|
91
|
+
skills: OptionById[];
|
|
92
|
+
location: OptionById[];
|
|
93
|
+
availability: ApiAvailability[];
|
|
94
|
+
comments: ApiComment[];
|
|
95
|
+
contact: ApiOpportunityContact;
|
|
96
|
+
agent: ApiOpportunityAgent;
|
|
97
|
+
accompanyingDetails: ApiOpportunityAccompanyingDetails;
|
|
67
98
|
}
|
|
@@ -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
|
}
|
package/dist/types/api/person.js
CHANGED
|
@@ -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
|
|
84
|
-
|
|
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",
|
|
@@ -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
|
-
|
|
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>>;
|