need4deed-sdk 0.0.197 → 0.0.199
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/commute.d.ts +12 -0
- package/dist/types/api/commute.js +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 +2 -0
- package/dist/types/api/recommended-matches.d.ts +9 -0
- package/dist/types/api/volunteer-audit-log.d.ts +2 -1
- package/dist/types/api/volunteer-audit-log.js +1 -0
- package/dist/types/api/volunteer.d.ts +2 -0
- package/dist/utils/commute.d.ts +3 -0
- package/dist/utils/commute.js +11 -0
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.js +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Id } from "..";
|
|
2
|
+
export interface ApiCommuteRange {
|
|
3
|
+
min: number;
|
|
4
|
+
max: number;
|
|
5
|
+
}
|
|
6
|
+
export interface ApiVolunteerCommuteQuery {
|
|
7
|
+
opportunity: Id | Id[];
|
|
8
|
+
}
|
|
9
|
+
export interface ApiVolunteerCommute {
|
|
10
|
+
opportunityId: Id;
|
|
11
|
+
commute: ApiCommuteRange | null;
|
|
12
|
+
}
|
|
@@ -5,6 +5,7 @@ export * from "./appreciation";
|
|
|
5
5
|
export * from "./comment";
|
|
6
6
|
export * from "./common";
|
|
7
7
|
export * from "./communication";
|
|
8
|
+
export * from "./commute";
|
|
8
9
|
export * from "./district-aggregate";
|
|
9
10
|
export * from "./district-geometry";
|
|
10
11
|
export * from "./district-marker";
|
package/dist/types/api/index.js
CHANGED
|
@@ -21,6 +21,7 @@ __exportStar(require("./appreciation"), exports);
|
|
|
21
21
|
__exportStar(require("./comment"), exports);
|
|
22
22
|
__exportStar(require("./common"), exports);
|
|
23
23
|
__exportStar(require("./communication"), exports);
|
|
24
|
+
__exportStar(require("./commute"), exports);
|
|
24
25
|
__exportStar(require("./district-aggregate"), exports);
|
|
25
26
|
__exportStar(require("./district-geometry"), exports);
|
|
26
27
|
__exportStar(require("./district-marker"), exports);
|
|
@@ -2,6 +2,7 @@ import { Id, Lang, VoidableProps, VoidableUndefined } from "..";
|
|
|
2
2
|
import { ApiOpportunityAccompanyingDetails } from "./accompanying";
|
|
3
3
|
import { AgentType } from "./agent";
|
|
4
4
|
import { ApiComment } from "./comment";
|
|
5
|
+
import { ApiCommuteRange } from "./commute";
|
|
5
6
|
import { OptionById, OptionId } from "./common";
|
|
6
7
|
import { ApiLanguage } from "./language";
|
|
7
8
|
import { OptionItem } from "./option";
|
|
@@ -235,6 +236,7 @@ export interface OpportunityVolunteer {
|
|
|
235
236
|
}
|
|
236
237
|
export interface ApiOpportunityVolunteerGet extends OpportunityVolunteer {
|
|
237
238
|
title: string;
|
|
239
|
+
commute?: ApiCommuteRange | null;
|
|
238
240
|
}
|
|
239
241
|
export declare const EMAIL_NOTE_MAX_LENGTH = 1000;
|
|
240
242
|
export interface ApiOpportunityVolunteerPost {
|
|
@@ -1,5 +1,14 @@
|
|
|
1
|
+
import { ApiCommuteRange } from "./commute";
|
|
2
|
+
import { ApiOpportunityGetList } from "./opportunity";
|
|
3
|
+
import { ApiVolunteerGetList } from "./volunteer";
|
|
1
4
|
export declare const RECOMMENDED_MATCHES_DEFAULT_LIMIT = 3;
|
|
2
5
|
export declare const RECOMMENDED_MATCHES_MAX_LIMIT = 10;
|
|
3
6
|
export interface ApiRecommendedMatchesQuery {
|
|
4
7
|
limit?: number;
|
|
5
8
|
}
|
|
9
|
+
export type ApiRecommendedVolunteer = ApiVolunteerGetList & {
|
|
10
|
+
commute: ApiCommuteRange | null;
|
|
11
|
+
};
|
|
12
|
+
export type ApiRecommendedOpportunity = ApiOpportunityGetList & {
|
|
13
|
+
commute: ApiCommuteRange | null;
|
|
14
|
+
};
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
export declare enum VolunteerAuditLogType {
|
|
2
2
|
CONTACT_DETAILS_CHANGED = "contact_details_changed",
|
|
3
3
|
AVAILABILITY_CHANGED = "availability_changed",
|
|
4
|
-
OPPORTUNITY_STATUS_CHANGED = "opportunity_status_changed"
|
|
4
|
+
OPPORTUNITY_STATUS_CHANGED = "opportunity_status_changed",
|
|
5
|
+
OWNER_CHANGED = "owner_changed"
|
|
5
6
|
}
|
|
6
7
|
export interface ApiVolunteerAuditLogGet {
|
|
7
8
|
id: number;
|
|
@@ -6,4 +6,5 @@ var VolunteerAuditLogType;
|
|
|
6
6
|
VolunteerAuditLogType["CONTACT_DETAILS_CHANGED"] = "contact_details_changed";
|
|
7
7
|
VolunteerAuditLogType["AVAILABILITY_CHANGED"] = "availability_changed";
|
|
8
8
|
VolunteerAuditLogType["OPPORTUNITY_STATUS_CHANGED"] = "opportunity_status_changed";
|
|
9
|
+
VolunteerAuditLogType["OWNER_CHANGED"] = "owner_changed";
|
|
9
10
|
})(VolunteerAuditLogType || (exports.VolunteerAuditLogType = VolunteerAuditLogType = {}));
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { DocumentStatusType, Id } from "../core";
|
|
2
2
|
import { VoidableProps } from "../utils";
|
|
3
3
|
import { OptionById, OptionId } from "./common";
|
|
4
|
+
import { ApiCommuteRange } from "./commute";
|
|
4
5
|
import { ApiLanguage } from "./language";
|
|
5
6
|
import { ApiOpportunityGetList, OpportunityType, OpportunityVolunteer } from "./opportunity";
|
|
6
7
|
import { OptionItem } from "./option";
|
|
@@ -180,6 +181,7 @@ export interface ApiVolunteerOpportunityGet extends OpportunityVolunteer {
|
|
|
180
181
|
activities: OptionItem[];
|
|
181
182
|
skills: OptionItem[];
|
|
182
183
|
locations: OptionItem[];
|
|
184
|
+
commute?: ApiCommuteRange | null;
|
|
183
185
|
}
|
|
184
186
|
export interface ApiVolunteerOpportunityGetList extends ApiOpportunityGetList {
|
|
185
187
|
languages: ApiLanguage[];
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.COMMUTE_RANGE_STEP_MINUTES = void 0;
|
|
4
|
+
exports.toCommuteRange = toCommuteRange;
|
|
5
|
+
exports.COMMUTE_RANGE_STEP_MINUTES = 5;
|
|
6
|
+
function toCommuteRange(minutes) {
|
|
7
|
+
if (minutes === null || minutes === undefined || !Number.isFinite(minutes) || minutes < 0)
|
|
8
|
+
return null;
|
|
9
|
+
const min = exports.COMMUTE_RANGE_STEP_MINUTES * Math.floor(minutes / exports.COMMUTE_RANGE_STEP_MINUTES);
|
|
10
|
+
return { min, max: min + exports.COMMUTE_RANGE_STEP_MINUTES };
|
|
11
|
+
}
|
package/dist/utils/index.d.ts
CHANGED
package/dist/utils/index.js
CHANGED
|
@@ -17,3 +17,4 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
17
17
|
__exportStar(require("./working-days"), exports);
|
|
18
18
|
__exportStar(require("./communication"), exports);
|
|
19
19
|
__exportStar(require("./volunteer-types"), exports);
|
|
20
|
+
__exportStar(require("./commute"), exports);
|