@hubs101/js-api-skd-client 1.0.10301 → 1.0.10302
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/README.md +28 -28
- package/lib/api/attendee/index.d.ts +1 -0
- package/lib/api/attendee/index.js +7 -1
- package/lib/index.js +6 -0
- package/lib/types/base.d.ts +2 -0
- package/package.json +55 -55
package/README.md
CHANGED
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
## API Doc
|
|
2
|
-
|
|
3
|
-
[API Documentation](https://github.com/We-Conect/event-app-api/blob/main/src/README.md)
|
|
4
|
-
|
|
5
|
-
## Using BaseAPI, stateless
|
|
6
|
-
|
|
7
|
-
Used before initWithToken
|
|
8
|
-
`BaseAPI.login(basePath, username, password)`
|
|
9
|
-
|
|
10
|
-
Accessing API via stateless interface:
|
|
11
|
-
`BaseAPI.fetchAttendees(basePath, token, eventID)`
|
|
12
|
-
|
|
13
|
-
## Using EventAPIProvider
|
|
14
|
-
|
|
15
|
-
1. Wrap app with Provider:
|
|
16
|
-
`import { EventAPIProvider } from '@hubs101/js-api-skd-client';`
|
|
17
|
-
2. Access api via hook:
|
|
18
|
-
` const { fetchAttendees } = useAPIContext();`
|
|
19
|
-
\*\*First init or initWithToken needs to be called in order to have authentication setup.
|
|
20
|
-
|
|
21
|
-
## Creating new release
|
|
22
|
-
|
|
23
|
-
1. Commit al changes to git.
|
|
24
|
-
2. Prepare build: `npm run build`
|
|
25
|
-
3. Create new patch version run: `npm version patch`
|
|
26
|
-
4. Publish package to NPM: `npm publish`
|
|
27
|
-
|
|
28
|
-
All in one publish alternative run: `npm run new-version`
|
|
1
|
+
## API Doc
|
|
2
|
+
|
|
3
|
+
[API Documentation](https://github.com/We-Conect/event-app-api/blob/main/src/README.md)
|
|
4
|
+
|
|
5
|
+
## Using BaseAPI, stateless
|
|
6
|
+
|
|
7
|
+
Used before initWithToken
|
|
8
|
+
`BaseAPI.login(basePath, username, password)`
|
|
9
|
+
|
|
10
|
+
Accessing API via stateless interface:
|
|
11
|
+
`BaseAPI.fetchAttendees(basePath, token, eventID)`
|
|
12
|
+
|
|
13
|
+
## Using EventAPIProvider
|
|
14
|
+
|
|
15
|
+
1. Wrap app with Provider:
|
|
16
|
+
`import { EventAPIProvider } from '@hubs101/js-api-skd-client';`
|
|
17
|
+
2. Access api via hook:
|
|
18
|
+
` const { fetchAttendees } = useAPIContext();`
|
|
19
|
+
\*\*First init or initWithToken needs to be called in order to have authentication setup.
|
|
20
|
+
|
|
21
|
+
## Creating new release
|
|
22
|
+
|
|
23
|
+
1. Commit al changes to git.
|
|
24
|
+
2. Prepare build: `npm run build`
|
|
25
|
+
3. Create new patch version run: `npm version patch`
|
|
26
|
+
4. Publish package to NPM: `npm publish`
|
|
27
|
+
|
|
28
|
+
All in one publish alternative run: `npm run new-version`
|
|
@@ -34,6 +34,7 @@ export declare const _fetchUserNotifications: (basePath: string, token: string)
|
|
|
34
34
|
export declare const _markUserNotificationAsRead: (basePath: string, token: string, notificationId: string) => Promise<Response>;
|
|
35
35
|
export declare const _deleteUserNotification: (basePath: string, token: string, notificationId: string) => Promise<Response>;
|
|
36
36
|
export declare const _deleteAllUserNotifications: (basePath: string, token: string) => Promise<Response>;
|
|
37
|
+
export declare const _confirmAttendee: (basePath: string, token: string, attendeeId: string, data: any) => Promise<any>;
|
|
37
38
|
export declare const _resendConfirmationEmail: (basePath: string, token: string, attendeeId: string) => Promise<any>;
|
|
38
39
|
export declare const _checkAvailabilityAttendee: (basePath: string, token: string, attendeeId: string) => Promise<any>;
|
|
39
40
|
export declare const _removeOnsiteAttendee: (basePath: string, token: string, attendeeId: string) => Promise<any>;
|
|
@@ -9,7 +9,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports._showAttendee = exports._hideAttendee = exports._resendWelcomeEmail = exports._addOnsiteAttendee = exports._removeOnsiteAttendee = exports._checkAvailabilityAttendee = exports._resendConfirmationEmail = exports._deleteAllUserNotifications = exports._deleteUserNotification = exports._markUserNotificationAsRead = exports._fetchUserNotifications = exports._deleteNote = exports._updateNote = exports._createNote = exports._fetchMyNotes = exports._reportAttendeeAction = exports._importProfileFromLinkedIn = exports._createAttendee = exports._sendAttendeeOnboardingAnswers = exports._checkout = exports._checkIn = exports._confirmMyEventInvitation = exports._unpinAttendee = exports._pinAttendee = exports._removeConnection = exports._addConnection = exports._fetchMyConnections = exports._updateGlobalAttendee = exports._updateGlobalAttendeeImage = exports._updateAttendee = exports._updateAttendeeImage = exports._fetchMyUser = exports._fetchAttendees = exports._fetchAttendeeProfile = void 0;
|
|
12
|
+
exports._showAttendee = exports._hideAttendee = exports._resendWelcomeEmail = exports._addOnsiteAttendee = exports._removeOnsiteAttendee = exports._checkAvailabilityAttendee = exports._resendConfirmationEmail = exports._confirmAttendee = exports._deleteAllUserNotifications = exports._deleteUserNotification = exports._markUserNotificationAsRead = exports._fetchUserNotifications = exports._deleteNote = exports._updateNote = exports._createNote = exports._fetchMyNotes = exports._reportAttendeeAction = exports._importProfileFromLinkedIn = exports._createAttendee = exports._sendAttendeeOnboardingAnswers = exports._checkout = exports._checkIn = exports._confirmMyEventInvitation = exports._unpinAttendee = exports._pinAttendee = exports._removeConnection = exports._addConnection = exports._fetchMyConnections = exports._updateGlobalAttendee = exports._updateGlobalAttendeeImage = exports._updateAttendee = exports._updateAttendeeImage = exports._fetchMyUser = exports._fetchAttendees = exports._fetchAttendeeProfile = void 0;
|
|
13
13
|
const api_1 = require("../../utils/api");
|
|
14
14
|
const base_1 = require("../../utils/base");
|
|
15
15
|
const _fetchAttendeeProfile = (basePath, token, attendeeId) => __awaiter(void 0, void 0, void 0, function* () {
|
|
@@ -191,6 +191,12 @@ const _deleteAllUserNotifications = (basePath, token) => __awaiter(void 0, void
|
|
|
191
191
|
return response;
|
|
192
192
|
});
|
|
193
193
|
exports._deleteAllUserNotifications = _deleteAllUserNotifications;
|
|
194
|
+
const _confirmAttendee = (basePath, token, attendeeId, data) => __awaiter(void 0, void 0, void 0, function* () {
|
|
195
|
+
const base = (0, base_1.getBasePath)(basePath);
|
|
196
|
+
const response = yield (0, api_1.postRequestWE)(`${base.ATTENDEES}/${attendeeId}/confirm`, data, token);
|
|
197
|
+
return response;
|
|
198
|
+
});
|
|
199
|
+
exports._confirmAttendee = _confirmAttendee;
|
|
194
200
|
const _resendConfirmationEmail = (basePath, token, attendeeId) => __awaiter(void 0, void 0, void 0, function* () {
|
|
195
201
|
const base = (0, base_1.getBasePath)(basePath);
|
|
196
202
|
const response = yield (0, api_1.getRequest)(`${base.ATTENDEES}/${attendeeId}/resend-confirmation-email`, token);
|
package/lib/index.js
CHANGED
|
@@ -140,6 +140,10 @@ function EventAPIProvider(props) {
|
|
|
140
140
|
(0, api_1.validateConfig)(config);
|
|
141
141
|
return (0, event_1._fetchEventGroups)(config.baseUrl, config.token, eventId);
|
|
142
142
|
}), [config, config.baseUrl, config.token]);
|
|
143
|
+
const confirmAttendee = react_1.default.useCallback((attendeeId, data) => __awaiter(this, void 0, void 0, function* () {
|
|
144
|
+
(0, api_1.validateConfig)(config);
|
|
145
|
+
return (0, attendee_1._confirmAttendee)(config.baseUrl, config.token, attendeeId, data);
|
|
146
|
+
}), [config, config.baseUrl, config.token]);
|
|
143
147
|
const checkBooking = (0, react_1.useCallback)((body, lang) => __awaiter(this, void 0, void 0, function* () {
|
|
144
148
|
(0, api_1.validateConfig)(config);
|
|
145
149
|
return (0, event_1._checkBooking)(config.baseUrl, body, lang);
|
|
@@ -823,6 +827,7 @@ function EventAPIProvider(props) {
|
|
|
823
827
|
pinExhibition,
|
|
824
828
|
unpinExhibition,
|
|
825
829
|
fetchEventGroups,
|
|
830
|
+
confirmAttendee,
|
|
826
831
|
checkBooking,
|
|
827
832
|
createBooking,
|
|
828
833
|
fetchEventOrderedTickets,
|
|
@@ -1008,6 +1013,7 @@ exports.BaseAPI = {
|
|
|
1008
1013
|
pinExhibition: event_1._pinExhibition,
|
|
1009
1014
|
unpinExhibition: event_1._unpinExhibition,
|
|
1010
1015
|
fetchEventGroups: event_1._fetchEventGroups,
|
|
1016
|
+
confirmAttendee: attendee_1._confirmAttendee,
|
|
1011
1017
|
checkBooking: event_1._checkBooking,
|
|
1012
1018
|
createBooking: event_1._createBooking,
|
|
1013
1019
|
fetchEventOrderedTickets: event_1._fetchEventOrderedTickets,
|
package/lib/types/base.d.ts
CHANGED
|
@@ -85,6 +85,7 @@ export type BaseAPIType = {
|
|
|
85
85
|
unpinExhibition: (basePath: string, token: string, exhibitionId: string) => Promise<boolean>;
|
|
86
86
|
getPublicRegistrationForm: (basePath: string, eventId: string) => Promise<any>;
|
|
87
87
|
fetchEventGroups: (basePath: string, token: string, eventId: string) => Promise<GroupServerResponse[]>;
|
|
88
|
+
confirmAttendee: (basePath: string, token: string, attendeeId: string, data: any) => Promise<any>;
|
|
88
89
|
checkBooking: (basePath: string, body: any, lang: string) => Promise<any>;
|
|
89
90
|
createBooking: (basePath: string, body: any, lang: string) => Promise<any>;
|
|
90
91
|
fetchEventOrderedTickets: (basePath: string, token: string, eventId: string) => Promise<any>;
|
|
@@ -285,6 +286,7 @@ export type EventAPIType = {
|
|
|
285
286
|
pinExhibition: (exhibitionId: string) => Promise<boolean>;
|
|
286
287
|
unpinExhibition: (exhibitionId: string) => Promise<boolean>;
|
|
287
288
|
fetchEventGroups: (eventId: string) => Promise<GroupServerResponse[]>;
|
|
289
|
+
confirmAttendee: (attendeeId: string, data: any) => Promise<any>;
|
|
288
290
|
checkBooking: (body: any, lang: string) => Promise<any>;
|
|
289
291
|
createBooking: (body: any, lang: string) => Promise<any>;
|
|
290
292
|
fetchEventOrderedTickets: (eventId: string) => Promise<any>;
|
package/package.json
CHANGED
|
@@ -1,55 +1,55 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@hubs101/js-api-skd-client",
|
|
3
|
-
"version": "1.0.
|
|
4
|
-
"author": "Liveware",
|
|
5
|
-
"scripts": {
|
|
6
|
-
"test": "jest --config jestconfig.json",
|
|
7
|
-
"build": "tsc",
|
|
8
|
-
"format": "prettier --write \"src/**/*.ts\" \"src/**/*.ts\"",
|
|
9
|
-
"lint": "tslint -p tsconfig.json",
|
|
10
|
-
"prepare": "npm run build",
|
|
11
|
-
"prepublishOnly": "npm test && npm run lint",
|
|
12
|
-
"preversion": "npm run lint",
|
|
13
|
-
"version": "npm run format && git add -A src",
|
|
14
|
-
"postversion": "git push && git push --tags",
|
|
15
|
-
"new-version": "git pull && npm run build && git commit -m \"update api\" -a --no-verify && npm version patch && npm publish"
|
|
16
|
-
},
|
|
17
|
-
"meta": {},
|
|
18
|
-
"description": "Package for easy access to Event App API",
|
|
19
|
-
"repository": {
|
|
20
|
-
"type": "git",
|
|
21
|
-
"url": "git+https://github.com/We-Conect/hubs101-js-api-skd-client.git"
|
|
22
|
-
},
|
|
23
|
-
"keywords": [
|
|
24
|
-
"We-Conect",
|
|
25
|
-
"Liveware",
|
|
26
|
-
"EventApp"
|
|
27
|
-
],
|
|
28
|
-
"license": "ISC",
|
|
29
|
-
"dependencies": {
|
|
30
|
-
"@types/react": "*",
|
|
31
|
-
"react": "^18.2.0"
|
|
32
|
-
},
|
|
33
|
-
"peerDependencies": {
|
|
34
|
-
"react": "^18.2.0"
|
|
35
|
-
},
|
|
36
|
-
"main": "lib/index",
|
|
37
|
-
"react-native": "lib/index",
|
|
38
|
-
"types": "lib/index.d.ts",
|
|
39
|
-
"source": "src/index",
|
|
40
|
-
"directories": {
|
|
41
|
-
"test": "test"
|
|
42
|
-
},
|
|
43
|
-
"devDependencies": {
|
|
44
|
-
"@types/jest": "^29.5.0",
|
|
45
|
-
"jest": "^29.5.0",
|
|
46
|
-
"prettier": "^2.8.7",
|
|
47
|
-
"ts-jest": "^29.1.0",
|
|
48
|
-
"tslint": "^6.1.3",
|
|
49
|
-
"tslint-config-prettier": "^1.18.0",
|
|
50
|
-
"typescript": "^5.0.4"
|
|
51
|
-
},
|
|
52
|
-
"files": [
|
|
53
|
-
"lib/**/*"
|
|
54
|
-
]
|
|
55
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@hubs101/js-api-skd-client",
|
|
3
|
+
"version": "1.0.10302",
|
|
4
|
+
"author": "Liveware",
|
|
5
|
+
"scripts": {
|
|
6
|
+
"test": "jest --config jestconfig.json",
|
|
7
|
+
"build": "tsc",
|
|
8
|
+
"format": "prettier --write \"src/**/*.ts\" \"src/**/*.ts\"",
|
|
9
|
+
"lint": "tslint -p tsconfig.json",
|
|
10
|
+
"prepare": "npm run build",
|
|
11
|
+
"prepublishOnly": "npm test && npm run lint",
|
|
12
|
+
"preversion": "npm run lint",
|
|
13
|
+
"version": "npm run format && git add -A src",
|
|
14
|
+
"postversion": "git push && git push --tags",
|
|
15
|
+
"new-version": "git pull && npm run build && git commit -m \"update api\" -a --no-verify && npm version patch && npm publish"
|
|
16
|
+
},
|
|
17
|
+
"meta": {},
|
|
18
|
+
"description": "Package for easy access to Event App API",
|
|
19
|
+
"repository": {
|
|
20
|
+
"type": "git",
|
|
21
|
+
"url": "git+https://github.com/We-Conect/hubs101-js-api-skd-client.git"
|
|
22
|
+
},
|
|
23
|
+
"keywords": [
|
|
24
|
+
"We-Conect",
|
|
25
|
+
"Liveware",
|
|
26
|
+
"EventApp"
|
|
27
|
+
],
|
|
28
|
+
"license": "ISC",
|
|
29
|
+
"dependencies": {
|
|
30
|
+
"@types/react": "*",
|
|
31
|
+
"react": "^18.2.0"
|
|
32
|
+
},
|
|
33
|
+
"peerDependencies": {
|
|
34
|
+
"react": "^18.2.0"
|
|
35
|
+
},
|
|
36
|
+
"main": "lib/index",
|
|
37
|
+
"react-native": "lib/index",
|
|
38
|
+
"types": "lib/index.d.ts",
|
|
39
|
+
"source": "src/index",
|
|
40
|
+
"directories": {
|
|
41
|
+
"test": "test"
|
|
42
|
+
},
|
|
43
|
+
"devDependencies": {
|
|
44
|
+
"@types/jest": "^29.5.0",
|
|
45
|
+
"jest": "^29.5.0",
|
|
46
|
+
"prettier": "^2.8.7",
|
|
47
|
+
"ts-jest": "^29.1.0",
|
|
48
|
+
"tslint": "^6.1.3",
|
|
49
|
+
"tslint-config-prettier": "^1.18.0",
|
|
50
|
+
"typescript": "^5.0.4"
|
|
51
|
+
},
|
|
52
|
+
"files": [
|
|
53
|
+
"lib/**/*"
|
|
54
|
+
]
|
|
55
|
+
}
|