need4deed-sdk 0.0.7 → 0.0.11

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 { Lang } from "../core";
2
+ export type OptionTitle = Partial<{
3
+ [key in Lang]: string;
4
+ }>;
5
+ export type OptionId = string | number;
6
+ export interface Option {
7
+ id: OptionId;
8
+ title: OptionTitle;
9
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,27 @@
1
+ export declare enum EventN4DType {
2
+ PARTY = "party",
3
+ WORKSHOP = "workshop"
4
+ }
5
+ export interface EventN4D {
6
+ active: boolean;
7
+ title: string;
8
+ subTitle?: string;
9
+ menuTitle: string;
10
+ hostName?: string;
11
+ date: Date;
12
+ dateEnd?: Date;
13
+ type: EventN4DType;
14
+ pic?: string;
15
+ time: string;
16
+ address: string;
17
+ locationLink?: string;
18
+ locationComment?: string;
19
+ description: string;
20
+ shortDescription: string;
21
+ linkRSVP: string;
22
+ followUpText?: string;
23
+ followUpLink?: string;
24
+ additionalTitle?: string;
25
+ additionalInfo?: string[];
26
+ outro?: string;
27
+ }
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.EventN4DType = void 0;
4
+ var EventN4DType;
5
+ (function (EventN4DType) {
6
+ EventN4DType["PARTY"] = "party";
7
+ EventN4DType["WORKSHOP"] = "workshop";
8
+ })(EventN4DType || (exports.EventN4DType = EventN4DType = {}));
@@ -0,0 +1,5 @@
1
+ export * from "./common";
2
+ export * from "./event";
3
+ export * from "./opportunity";
4
+ export * from "./testimonial";
5
+ export * from "./volunteer";
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./common"), exports);
18
+ __exportStar(require("./event"), exports);
19
+ __exportStar(require("./opportunity"), exports);
20
+ __exportStar(require("./testimonial"), exports);
21
+ __exportStar(require("./volunteer"), exports);
@@ -0,0 +1,36 @@
1
+ import { OptionId } from "./common";
2
+ export declare enum OpportunityType {
3
+ GENERAL = "volunteering",
4
+ ACCOMPANYING = "accompanying"
5
+ }
6
+ export declare enum TranslatedIntoType {
7
+ DEUTSCHE = "deutsche",
8
+ ENGLISH_OK = "englishOk",
9
+ NO_TRANSLATION = "noTranslation"
10
+ }
11
+ export interface Opportunity {
12
+ title: string;
13
+ rac_email: string;
14
+ rac_full_name: string;
15
+ rac_phone: string;
16
+ rac_address: string;
17
+ rac_plz: string;
18
+ opportunity_type: OpportunityType;
19
+ accomp_address: string;
20
+ accomp_postcode: string;
21
+ accomp_datetime?: string;
22
+ accomp_name?: string;
23
+ accomp_phone?: string;
24
+ accomp_information?: string;
25
+ accomp_translation?: TranslatedIntoType;
26
+ berlin_locations?: OptionId[];
27
+ languages: OptionId[];
28
+ activities: OptionId[];
29
+ skills: OptionId[];
30
+ timeslots?: [number, OptionId][];
31
+ volunteers_number: number;
32
+ vo_information?: string;
33
+ category: string;
34
+ category_id: OptionId;
35
+ last_edited_time_notion?: string;
36
+ }
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TranslatedIntoType = exports.OpportunityType = void 0;
4
+ var OpportunityType;
5
+ (function (OpportunityType) {
6
+ OpportunityType["GENERAL"] = "volunteering";
7
+ OpportunityType["ACCOMPANYING"] = "accompanying";
8
+ })(OpportunityType || (exports.OpportunityType = OpportunityType = {}));
9
+ var TranslatedIntoType;
10
+ (function (TranslatedIntoType) {
11
+ TranslatedIntoType["DEUTSCHE"] = "deutsche";
12
+ TranslatedIntoType["ENGLISH_OK"] = "englishOk";
13
+ TranslatedIntoType["NO_TRANSLATION"] = "noTranslation";
14
+ })(TranslatedIntoType || (exports.TranslatedIntoType = TranslatedIntoType = {}));
@@ -0,0 +1,6 @@
1
+ export interface Testimonial {
2
+ name: string;
3
+ pic: string;
4
+ translated_text: string;
5
+ activities: string[];
6
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,19 @@
1
+ import { OptionId } from "./common";
2
+ export interface Volunteer {
3
+ origin_opportunity: number | undefined;
4
+ full_name: string;
5
+ phone: string;
6
+ email: string;
7
+ postal_code: number;
8
+ good_conduct_certificate: "Yes" | "No";
9
+ if_measles_vaccination: boolean;
10
+ lead_from: string;
11
+ schedule: [number, OptionId][];
12
+ preferred_berlin_locations: OptionId[];
13
+ activities: OptionId[];
14
+ skills: OptionId[];
15
+ native_languages: OptionId[];
16
+ fluent_languages: OptionId[];
17
+ intermediate_languages: OptionId[];
18
+ comments: string;
19
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,23 @@
1
+ export declare enum Lang {
2
+ EN = "en",
3
+ DE = "de"
4
+ }
5
+ export declare enum LangProficiency {
6
+ BEGINER = "beginer",
7
+ INTERMEDIATE = "intermediate",
8
+ ADVANCED = "advanced",
9
+ FLUENT = "fluent",
10
+ NATIVE = "native"
11
+ }
12
+ export declare enum HttpMethod {
13
+ GET = "GET",
14
+ HEAD = "HEAD",
15
+ POST = "POST",
16
+ PUT = "PUT",
17
+ DELETE = "DELETE",
18
+ TRACE = "TRACE",
19
+ OPTIONS = "OPTIONS",
20
+ CONNECT = "CONNECT",
21
+ PATCH = "PATCH"
22
+ }
23
+ export type SomeType = "some" | "type";
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.HttpMethod = exports.LangProficiency = exports.Lang = void 0;
4
+ var Lang;
5
+ (function (Lang) {
6
+ Lang["EN"] = "en";
7
+ Lang["DE"] = "de";
8
+ })(Lang || (exports.Lang = Lang = {}));
9
+ var LangProficiency;
10
+ (function (LangProficiency) {
11
+ LangProficiency["BEGINER"] = "beginer";
12
+ LangProficiency["INTERMEDIATE"] = "intermediate";
13
+ LangProficiency["ADVANCED"] = "advanced";
14
+ LangProficiency["FLUENT"] = "fluent";
15
+ LangProficiency["NATIVE"] = "native";
16
+ })(LangProficiency || (exports.LangProficiency = LangProficiency = {}));
17
+ var HttpMethod;
18
+ (function (HttpMethod) {
19
+ HttpMethod["GET"] = "GET";
20
+ HttpMethod["HEAD"] = "HEAD";
21
+ HttpMethod["POST"] = "POST";
22
+ HttpMethod["PUT"] = "PUT";
23
+ HttpMethod["DELETE"] = "DELETE";
24
+ HttpMethod["TRACE"] = "TRACE";
25
+ HttpMethod["OPTIONS"] = "OPTIONS";
26
+ HttpMethod["CONNECT"] = "CONNECT";
27
+ HttpMethod["PATCH"] = "PATCH";
28
+ })(HttpMethod || (exports.HttpMethod = HttpMethod = {}));
@@ -0,0 +1,2 @@
1
+ export * from "./api";
2
+ export * from "./core";
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./api"), exports);
18
+ __exportStar(require("./core"), exports);
package/package.json CHANGED
@@ -1,14 +1,53 @@
1
1
  {
2
2
  "name": "need4deed-sdk",
3
- "version": "0.0.7",
3
+ "version": "0.0.11",
4
4
  "description": "Need4Deed.org SDK",
5
- "main": "src/index.ts",
5
+ "type": "commonjs",
6
+ "main": "dist/index.js",
7
+ "types": "dist/index.d.ts",
8
+ "files": [
9
+ "dist"
10
+ ],
11
+ "exports": {
12
+ ".": {
13
+ "require": "./dist/index.js",
14
+ "default": "./dist/index.js"
15
+ },
16
+ "./styles/*": "./dist/styles/*",
17
+ "./package.json": "./package.json"
18
+ },
6
19
  "scripts": {
7
- "test": "echo \"Error: no test specified\" && exit 1"
20
+ "build:copy-assets": "mkdir -p dist/styles && cp src/styles/*.css dist/styles/",
21
+ "build:tsc": "tsc",
22
+ "build": "yarn build:tsc && yarn build:copy-assets",
23
+ "watch": "tsc --watch --project tsconfig.cjs.json",
24
+ "prepublishOnly": "yarn build",
25
+ "publish": "yarn publish",
26
+ "publish:npm": "yarn publish --access public"
8
27
  },
28
+ "keywords": [
29
+ "sdk",
30
+ "react",
31
+ "typescript",
32
+ "api-hooks",
33
+ "ui-components",
34
+ "layouts",
35
+ "styling",
36
+ "utilities"
37
+ ],
9
38
  "author": "Need4Deed.org",
10
39
  "license": "MIT",
40
+ "repository": {
41
+ "type": "git",
42
+ "url": "https://github.com/need4deed-org/sdk.git"
43
+ },
11
44
  "devDependencies": {
45
+ "@types/react": "^18.0.0",
46
+ "@types/react-dom": "^18.0.0",
12
47
  "typescript": "^5.8.3"
48
+ },
49
+ "peerDependencies": {
50
+ "react": "^17.0.0 || ^18.0.0",
51
+ "react-dom": "^17.0.0 || ^18.0.0"
13
52
  }
14
53
  }
package/src/index.ts DELETED
@@ -1 +0,0 @@
1
- export * from "./types";
package/src/types/api.ts DELETED
@@ -1,102 +0,0 @@
1
- import { Lang } from "./common";
2
-
3
- export interface Testimonial {
4
- name: string;
5
- pic: string; // base64 encoded thumb most probably
6
- translated_text: string;
7
- activities: string[];
8
- }
9
-
10
- export enum EventN4DType {
11
- PARTY = "party",
12
- WORKSHOP = "workshop",
13
- }
14
-
15
- export interface EventN4D {
16
- active: boolean;
17
- title: string;
18
- subTitle?: string;
19
- menuTitle: string; // for the menu
20
- hostName?: string;
21
- date: Date;
22
- dateEnd?: Date;
23
- type: EventN4DType;
24
- pic?: string; // or standard one depending on type
25
- time: string;
26
- address: string; // address
27
- locationLink?: string; // to google maps
28
- locationComment?: string; // how to spot
29
- description: string;
30
- shortDescription: string; // for card view
31
- linkRSVP: string; // registration form
32
- followUpText?: string;
33
- followUpLink?: string; // the adjacent event
34
- additionalTitle?: string;
35
- additionalInfo?: string[]; // lineup, content, etc.
36
- outro?: string;
37
- }
38
-
39
- export enum OpportunityType {
40
- GENERAL = "volunteering",
41
- ACCOMPANYING = "accompanying",
42
- }
43
-
44
- export enum TranslatedIntoType {
45
- DEUTSCHE = "deutsche",
46
- ENGLISH_OK = "englishOk",
47
- NO_TRANSLATION = "noTranslation",
48
- }
49
-
50
- export type OptionTitle = Partial<{
51
- [key in Lang]: string;
52
- }>;
53
-
54
- export type OptionId = string | number;
55
-
56
- export interface Option {
57
- id: OptionId;
58
- title: OptionTitle;
59
- }
60
-
61
- export interface Opportunity {
62
- title: string;
63
- rac_email: string;
64
- rac_full_name: string;
65
- rac_phone: string;
66
- rac_address: string;
67
- rac_plz: string;
68
- opportunity_type: OpportunityType;
69
- accomp_address: string;
70
- accomp_postcode: string;
71
- accomp_datetime?: string;
72
- accomp_name?: string;
73
- accomp_phone?: string;
74
- accomp_information?: string;
75
- accomp_translation?: TranslatedIntoType;
76
- berlin_locations?: OptionId[];
77
- languages: OptionId[];
78
- activities: OptionId[];
79
- skills: OptionId[];
80
- timeslots?: [number, OptionId][];
81
- volunteers_number: number;
82
- vo_information?: string;
83
- }
84
-
85
- export interface Volunteer {
86
- origin_opportunity: number | undefined;
87
- full_name: string;
88
- phone: string;
89
- email: string;
90
- postal_code: number;
91
- good_conduct_certificate: "Yes" | "No";
92
- if_measles_vaccination: boolean;
93
- lead_from: string;
94
- schedule: [number, OptionId][];
95
- preferred_berlin_locations: OptionId[];
96
- activities: OptionId[];
97
- skills: OptionId[];
98
- native_languages: OptionId[];
99
- fluent_languages: OptionId[];
100
- intermediate_languages: OptionId[];
101
- comments: string;
102
- }
@@ -1,21 +0,0 @@
1
- export enum Lang {
2
- EN = "en",
3
- DE = "de",
4
- RU = "ru",
5
- AR = "ar",
6
- FA = "fa",
7
- TR = "tr",
8
- ES = "es",
9
- }
10
-
11
- export enum HttpMethod {
12
- GET = "GET",
13
- HEAD = "HEAD",
14
- POST = "POST",
15
- PUT = "PUT",
16
- DELETE = "DELETE",
17
- TRACE = "TRACE",
18
- OPTIONS = "OPTIONS",
19
- CONNECT = "CONNECT",
20
- PATCH = "PATCH",
21
- }
@@ -1,2 +0,0 @@
1
- export * from "./api";
2
- export * from "./common";