Skip to content

Course project #33

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 25 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1,205 changes: 482 additions & 723 deletions package-lock.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"@angular/core": "^16.1.0",
"@angular/platform-browser": "^16.1.0",
"@angular/platform-browser-dynamic": "^16.1.0",
"@angular/router": "^16.1.0",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This project shouldn't concern it's self with the router.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's used by the sample

"rxjs": "~7.8.0",
"tslib": "^2.3.0",
"uuid": "^9.0.0",
Expand Down
7 changes: 7 additions & 0 deletions projects/ngx-xapi/client/src/lib/state-options.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
export interface StateOptions {
contentType: string;
etag?: string;
match?: boolean;
}

export type DeleteStateOptions = Omit<StateOptions, 'contentType'>;
9 changes: 5 additions & 4 deletions projects/ngx-xapi/client/src/lib/xapi-client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import {
ActivityProfileParams,
ActivityProfilesParams,
} from './activity-profile-params';
import { DeleteStateOptions, StateOptions } from './state-options';

export interface XapiConfig {
endpoint: string;
Expand Down Expand Up @@ -110,7 +111,7 @@ export class XapiClient {
putState(
object: any,
stateParams: StateParams,
options: { contentType: string; etag?: string; match?: boolean }
options: StateOptions
): Observable<HttpResponse<object>> {
return this.config$.pipe(
mergeMap((config) => {
Expand All @@ -134,7 +135,7 @@ export class XapiClient {
postState(
object: any,
stateParams: StateParams,
options: { contentType: string; etag?: string; match?: boolean }
options: StateOptions
): Observable<HttpResponse<object>> {
return this.config$.pipe(
mergeMap((config) => {
Expand All @@ -159,7 +160,7 @@ export class XapiClient {
*/
deleteState(
stateParams: StateParams,
options: { etag?: string; match?: boolean }
options: DeleteStateOptions
): Observable<HttpResponse<object>> {
return this.config$.pipe(
mergeMap((config) => {
Expand All @@ -183,7 +184,7 @@ export class XapiClient {
*/
deleteStates(
statesParams: DeleteStatesParams,
options: { etag?: string; match?: boolean }
options: DeleteStateOptions
): Observable<HttpResponse<object>> {
return this.config$.pipe(
mergeMap((config) => {
Expand Down
1 change: 1 addition & 0 deletions projects/ngx-xapi/client/src/public-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,5 @@ export {
GetStatesParams,
DeleteStatesParams,
} from './lib/state-params';
export * from './lib/state-options';
export * from './lib/statements-params';
1 change: 1 addition & 0 deletions projects/ngx-xapi/course/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from './src/public-api';
6 changes: 6 additions & 0 deletions projects/ngx-xapi/course/ng-package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"dest": "../../../dist/ngx-xapi/course",
"lib": {
"entryFile": "src/public-api.ts"
}
}
Loading