@hubs101/js-api-skd-client 1.0.10230 → 1.0.10245
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 +29 -29
- package/lib/api/event/index.d.ts +1 -1
- package/lib/api/event/index.js +2 -2
- package/lib/api/event/types.d.ts +14 -0
- package/lib/index.js +2 -2
- package/lib/types/base.d.ts +1 -1
- package/package.json +55 -55
package/README.md
CHANGED
|
@@ -1,29 +1,29 @@
|
|
|
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 'event-app-api';`
|
|
17
|
-
2. Access api via hook:
|
|
18
|
-
` const { fetchAttendees } = useAPIContext();`
|
|
19
|
-
|
|
20
|
-
\*\*First init or initWithToken needs to be called in order to have authentication setup.
|
|
21
|
-
|
|
22
|
-
## Creating new release
|
|
23
|
-
|
|
24
|
-
1. Commit al changes to git.
|
|
25
|
-
2. Prepare build: `npm run build`
|
|
26
|
-
3. Create new patch version run: `npm version patch`
|
|
27
|
-
4. Publish package to NPM: `npm publish`
|
|
28
|
-
|
|
29
|
-
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 'event-app-api';`
|
|
17
|
+
2. Access api via hook:
|
|
18
|
+
` const { fetchAttendees } = useAPIContext();`
|
|
19
|
+
|
|
20
|
+
\*\*First init or initWithToken needs to be called in order to have authentication setup.
|
|
21
|
+
|
|
22
|
+
## Creating new release
|
|
23
|
+
|
|
24
|
+
1. Commit al changes to git.
|
|
25
|
+
2. Prepare build: `npm run build`
|
|
26
|
+
3. Create new patch version run: `npm version patch`
|
|
27
|
+
4. Publish package to NPM: `npm publish`
|
|
28
|
+
|
|
29
|
+
All in one publish alternative run: `npm run new-version`
|
package/lib/api/event/index.d.ts
CHANGED
|
@@ -46,7 +46,7 @@ export declare const _unpinExhibition: (basePath: string, token: string, exhibit
|
|
|
46
46
|
export declare const _fetchEventGroups: (basePath: string, token: string, eventId: string) => Promise<GroupServerResponse[]>;
|
|
47
47
|
export declare const _assignTicket: (basePath: string, token: string, bookingId: string, ticketId: string, data: any) => Promise<any>;
|
|
48
48
|
export declare const _fetchTicketDetails: (basePath: string, eventId: string, profileId: string, access: string) => Promise<ResponsePaginationType<BookingDetails>>;
|
|
49
|
-
export declare const _acceptTicket: (basePath: string, ticketId: string, body: any) => Promise<any>;
|
|
49
|
+
export declare const _acceptTicket: (basePath: string, ticketId: string, access: string, body: any) => Promise<any>;
|
|
50
50
|
export declare const _fetchEventBookings: (basePath: string, token: string, eventId: string) => Promise<ResponsePaginationType<Booking>>;
|
|
51
51
|
export declare const _createFreeTrialAccount: (basePath: string, token: string, data: any) => Promise<any>;
|
|
52
52
|
export declare const _eventInvitationRegistration: (basePath: string, token: string, userId: string, data: any) => Promise<any>;
|
package/lib/api/event/index.js
CHANGED
|
@@ -298,9 +298,9 @@ const _fetchTicketDetails = (basePath, eventId, profileId, access) => __awaiter(
|
|
|
298
298
|
return data;
|
|
299
299
|
});
|
|
300
300
|
exports._fetchTicketDetails = _fetchTicketDetails;
|
|
301
|
-
const _acceptTicket = (basePath, ticketId, body) => __awaiter(void 0, void 0, void 0, function* () {
|
|
301
|
+
const _acceptTicket = (basePath, ticketId, access, body) => __awaiter(void 0, void 0, void 0, function* () {
|
|
302
302
|
const base = (0, base_1.getBasePath)(basePath);
|
|
303
|
-
const response = yield (0, api_1.postRequestWE)(`${base.
|
|
303
|
+
const response = yield (0, api_1.postRequestWE)(`${base.PUBLIC_INVITATIONS}/tickets/${ticketId}/accept?access=${access}`, body);
|
|
304
304
|
return response;
|
|
305
305
|
});
|
|
306
306
|
exports._acceptTicket = _acceptTicket;
|
package/lib/api/event/types.d.ts
CHANGED
|
@@ -422,6 +422,19 @@ export type StreamConfig = {
|
|
|
422
422
|
password: string;
|
|
423
423
|
reference: string;
|
|
424
424
|
};
|
|
425
|
+
export type OnboardingQuestionOption = {
|
|
426
|
+
order: number;
|
|
427
|
+
answer: string;
|
|
428
|
+
};
|
|
429
|
+
export type BookingQuestion = {
|
|
430
|
+
id: string;
|
|
431
|
+
question: string;
|
|
432
|
+
order: number;
|
|
433
|
+
required: boolean;
|
|
434
|
+
answers: OnboardingQuestionOption[];
|
|
435
|
+
type: string;
|
|
436
|
+
style: string;
|
|
437
|
+
};
|
|
425
438
|
export type EventServerResponse = {
|
|
426
439
|
id: string;
|
|
427
440
|
name: string;
|
|
@@ -474,6 +487,7 @@ export type EventServerResponse = {
|
|
|
474
487
|
menu: any;
|
|
475
488
|
promotion: unknown;
|
|
476
489
|
onboarding_questions: Question[];
|
|
490
|
+
booking_questions: BookingQuestion[];
|
|
477
491
|
streaming: unknown;
|
|
478
492
|
setting: {
|
|
479
493
|
domain: string;
|
package/lib/index.js
CHANGED
|
@@ -144,9 +144,9 @@ function EventAPIProvider(props) {
|
|
|
144
144
|
(0, api_1.validateConfig)(config);
|
|
145
145
|
return (0, event_1._assignTicket)(config.baseUrl, config.token, bookingId, ticketId, data);
|
|
146
146
|
}), [config, config.baseUrl, config.token]);
|
|
147
|
-
const acceptTicket = (0, react_1.useCallback)((ticketId, body) => __awaiter(this, void 0, void 0, function* () {
|
|
147
|
+
const acceptTicket = (0, react_1.useCallback)((ticketId, access, body) => __awaiter(this, void 0, void 0, function* () {
|
|
148
148
|
(0, api_1.validateConfig)(config);
|
|
149
|
-
return (0, event_1._acceptTicket)(config.baseUrl, ticketId, body);
|
|
149
|
+
return (0, event_1._acceptTicket)(config.baseUrl, ticketId, access, body);
|
|
150
150
|
}), [config, config.baseUrl, config.token]);
|
|
151
151
|
const fetchTicketDetails = (0, react_1.useCallback)((eventId, profileId, access) => __awaiter(this, void 0, void 0, function* () {
|
|
152
152
|
(0, api_1.validateConfig)(config);
|
package/lib/types/base.d.ts
CHANGED
|
@@ -84,7 +84,7 @@ export type BaseAPIType = {
|
|
|
84
84
|
unpinExhibition: (basePath: string, token: string, exhibitionId: string) => Promise<boolean>;
|
|
85
85
|
fetchEventGroups: (basePath: string, token: string, eventId: string) => Promise<GroupServerResponse[]>;
|
|
86
86
|
assignTicket: (basePath: string, token: string, bookingId: string, ticketId: string, data: any) => Promise<any>;
|
|
87
|
-
acceptTicket: (basePath: string, ticketId: string, body: any) => Promise<any>;
|
|
87
|
+
acceptTicket: (basePath: string, ticketId: string, access: string, body: any) => Promise<any>;
|
|
88
88
|
fetchTicketDetails: (basePath: string, eventId: string, profileId: string, access: string) => Promise<ResponsePaginationType<BookingDetails>>;
|
|
89
89
|
fetchEventBookings: (basePath: string, token: string, eventId: string) => Promise<ResponsePaginationType<Booking>>;
|
|
90
90
|
createFreeTrialAccount: (basePath: string, token: string, data: any) => 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
|
|
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.10245",
|
|
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
|
+
}
|