jamespot-user-api 1.0.133 → 1.0.134

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.
Files changed (84) hide show
  1. package/documentation/assets/search.js +1 -1
  2. package/documentation/classes/AdminLicenseApi.html +11 -11
  3. package/documentation/classes/AdminStoreApi.html +1 -1
  4. package/documentation/classes/AdminUtilsApi.html +1 -1
  5. package/documentation/classes/JApplicationApi.html +8 -8
  6. package/documentation/classes/JArticleApi.html +1 -1
  7. package/documentation/classes/JAssetReservation.html +1 -1
  8. package/documentation/classes/JAudienceApi.html +1 -1
  9. package/documentation/classes/JBaseApi.html +1 -1
  10. package/documentation/classes/JBookmarkApi.html +1 -1
  11. package/documentation/classes/JCommunityApi.html +1 -1
  12. package/documentation/classes/JDiapazoneApi.html +1 -1
  13. package/documentation/classes/JFaqApi.html +1 -1
  14. package/documentation/classes/JFileApi.html +5 -5
  15. package/documentation/classes/JFilebankApi.html +1 -1
  16. package/documentation/classes/JGroupApi.html +10 -10
  17. package/documentation/classes/JLandApi.html +1 -1
  18. package/documentation/classes/JMessengerApi.html +1 -1
  19. package/documentation/classes/JObjectApi.html +1 -1
  20. package/documentation/classes/JSearchApi.html +6 -6
  21. package/documentation/classes/JShareApi.html +1 -1
  22. package/documentation/classes/JTaxonomyApi.html +2 -2
  23. package/documentation/classes/JUserApi.html +4 -4
  24. package/documentation/classes/JWedocApi.html +1 -1
  25. package/documentation/classes/JamespotUserApi.html +1 -1
  26. package/documentation/classes/Network.html +1 -1
  27. package/documentation/classes/TVDisplayApi.html +1 -1
  28. package/documentation/classes/WindowBrowser.html +1 -1
  29. package/documentation/enums/StudioApplicationStatus.html +1 -1
  30. package/documentation/index.html +1 -1
  31. package/documentation/interfaces/AccessRightObject.html +1 -1
  32. package/documentation/interfaces/AdminLicenseUser.html +1 -1
  33. package/documentation/interfaces/ApiDefaultWrapper.html +1 -1
  34. package/documentation/interfaces/ApiWrapper.html +1 -1
  35. package/documentation/interfaces/BaseAutocomplete.html +1 -1
  36. package/documentation/interfaces/BaseMessage.html +1 -1
  37. package/documentation/interfaces/Category.html +1 -1
  38. package/documentation/interfaces/FileBankProps.html +1 -1
  39. package/documentation/interfaces/FolderProps.html +1 -1
  40. package/documentation/interfaces/ListFilterSpec.html +1 -1
  41. package/documentation/interfaces/OF.html +1 -1
  42. package/documentation/interfaces/ObjectListProps.html +1 -1
  43. package/documentation/interfaces/PagingResults.html +1 -1
  44. package/documentation/interfaces/RootFolderProps.html +1 -1
  45. package/documentation/interfaces/SearchCategoryModel.html +1 -1
  46. package/documentation/interfaces/SearchCategoryValue.html +1 -1
  47. package/documentation/interfaces/SearchConfig.html +1 -1
  48. package/documentation/interfaces/SearchFacetModel.html +1 -1
  49. package/documentation/interfaces/SearchFacetValueModel.html +1 -1
  50. package/documentation/interfaces/SearchQuery.html +1 -1
  51. package/documentation/interfaces/SearchQueryFilterModel.html +1 -1
  52. package/documentation/interfaces/SearchQueryOption.html +1 -1
  53. package/documentation/interfaces/SearchQueryResult.html +1 -1
  54. package/documentation/interfaces/SearchQuerySortModel.html +1 -1
  55. package/documentation/interfaces/SearchResultCatProps.html +1 -1
  56. package/documentation/interfaces/SearchResultPropsApp.html +1 -1
  57. package/documentation/interfaces/SearchResultPropsObject.html +1 -1
  58. package/documentation/interfaces/SpotProps.html +1 -1
  59. package/documentation/interfaces/Taxonomy.html +1 -1
  60. package/documentation/interfaces/TaxonomyCreate.html +1 -1
  61. package/documentation/interfaces/WindowInterface.html +1 -1
  62. package/documentation/modules.html +11 -11
  63. package/jest.config.ts +6 -0
  64. package/lib/jamespot-user-api.js.map +1 -1
  65. package/lib/jest.config.d.ts +6 -0
  66. package/lib/jest.config.vm.d.ts +6 -0
  67. package/lib/src/apis/assetReservation/assetReservation.d.ts +2 -2
  68. package/lib/src/apis/assetReservation/assetReservation.mock.d.ts +3 -1
  69. package/lib/src/apis/group/group.d.ts +6 -3
  70. package/lib/src/apis/group/group.mock.d.ts +11 -2
  71. package/lib/src/apis/taxonomy/taxonomy.mock.d.ts +1 -0
  72. package/lib/src/types/group.d.ts +17 -4
  73. package/lib/src/util/ensure.test.d.ts +1 -0
  74. package/lib/src/util/string.test.d.ts +2 -0
  75. package/package.json +1 -1
  76. package/phpunitMock/assetReservationGetReservations-default.json +221 -0
  77. package/phpunitMock/objectListAssetReservationList-default.json +75 -75
  78. package/phpunitMock/spotCreate-default.json +24 -0
  79. package/phpunitMock/spotGetAvailableWidget-default.json +24 -0
  80. package/phpunitMock/spotGetCategories-default.json +10 -0
  81. package/phpunitMock/spotGetProperties-default.json +100 -182
  82. package/phpunitMock/spotGetSpotMembers-default.json +42 -0
  83. package/phpunitMock/spotResetNotifications-default.json +7 -0
  84. package/phpunitMock/spotUpdate-default.json +24 -0
@@ -8,6 +8,12 @@ declare const Config: {
8
8
  testTimeout: number;
9
9
  testEnvironment: string;
10
10
  collectCoverage: boolean;
11
+ coverageThreshold: {
12
+ global: {
13
+ statements: number;
14
+ functions: number;
15
+ };
16
+ };
11
17
  moduleNameMapper: {
12
18
  '^@phpunitMock/(.*)$': string;
13
19
  };
@@ -11,5 +11,11 @@ declare const ConfigVM: {
11
11
  testTimeout: number;
12
12
  testEnvironment: string;
13
13
  collectCoverage: boolean;
14
+ coverageThreshold: {
15
+ global: {
16
+ statements: number;
17
+ functions: number;
18
+ };
19
+ };
14
20
  };
15
21
  export default ConfigVM;
@@ -1,5 +1,5 @@
1
1
  import { JBaseApi } from '../base';
2
- import { ApiWrapper, BaseMessages, Filters, Orders, PagingResults } from '../../types/utils';
2
+ import { ApiPagingResults, ApiWrapper, BaseMessages, Filters, Orders } from '../../types/utils';
3
3
  import { AssetReservationConfiguration, BookableAssetList, ReservationList } from '../../types/assetReservation';
4
4
  export declare class JAssetReservation extends JBaseApi {
5
5
  configuration(): Promise<ApiWrapper<AssetReservationConfiguration>>;
@@ -32,5 +32,5 @@ export declare class JAssetReservation extends JBaseApi {
32
32
  orders?: Orders;
33
33
  filters?: Filters | undefined;
34
34
  viewMode?: 'history' | undefined;
35
- }): Promise<ApiWrapper<PagingResults<ReservationList>, BaseMessages>>;
35
+ }): Promise<ApiPagingResults<ReservationList>>;
36
36
  }
@@ -1,6 +1,8 @@
1
- import { ApiWrapper, AssetReservationConfiguration, BookableAssetList, ReservationList } from '../../types';
1
+ import { ApiPagingResults, ApiWrapper, AssetReservationConfiguration, BaseMessages, BookableAssetList, ReservationList } from '../../types';
2
2
  export declare const assetReservationCreateReservation: ApiWrapper<ReservationList>;
3
3
  export declare const assetReservationCancelReservation: ApiWrapper<ReservationList>;
4
4
  export declare const assetReservationConfigurationDefault: ApiWrapper<AssetReservationConfiguration>;
5
5
  export declare const assetReservationConfigurationUpdated: ApiWrapper<AssetReservationConfiguration>;
6
6
  export declare const assetReservationBookByDate: ApiWrapper<BookableAssetList[]>;
7
+ export declare const assetReservationGetReservations: ApiWrapper<ReservationList[], BaseMessages>;
8
+ export declare const objectListAssetReservationList: ApiPagingResults<ReservationList>;
@@ -1,6 +1,6 @@
1
- import { Category, CreateGroup, GroupList, GroupProperties, GroupView, GroupWidget, ResetNotificationConfiguration, UpdateGroup } from '../../types/group';
1
+ import { Category, CreateGroup, GroupList, GroupProperties, GroupUserLevel, GroupView, GroupWidget, ResetNotificationConfiguration, UpdateGroup } from '../../types/group';
2
2
  import { JBaseApi } from '../base';
3
- import { ApiReturn, Format, PagingResults, jObjectLittle, jSpotAutocomplete } from '../../types';
3
+ import { ApiReturn, Format, PagingResults, jObjectLittle, jSpotAutocomplete, jUserLittle } from '../../types';
4
4
  export declare class JGroupApi extends JBaseApi {
5
5
  /**
6
6
  * autocomplete return a list of groups
@@ -51,7 +51,10 @@ export declare class JGroupApi extends JBaseApi {
51
51
  * @param page page number
52
52
  * @return array of User
53
53
  */
54
- getObjectListJamespotSpotMembers(idSpot: number | string, query?: string, limit?: number, page?: number): Promise<import("../../types").ApiWrapper<PagingResults<jObjectLittle>, import("../../types").BaseMessages>>;
54
+ getObjectListJamespotSpotMembers(idSpot: number | string, query?: string, limit?: number, page?: number): Promise<import("../../types").ApiWrapper<PagingResults<{
55
+ level: GroupUserLevel;
56
+ user: jUserLittle;
57
+ }>, import("../../types").BaseMessages>>;
55
58
  /**
56
59
  * Reset the notifications configuration for all users of the group
57
60
  * @param config configuration
@@ -1,5 +1,14 @@
1
- import { ApiWrapper, jSpotAutocomplete } from '../../types';
2
- import { GroupProperties, GroupView } from '../../types/group';
1
+ import { ApiPagingResults, ApiWrapper, jSpotAutocomplete } from '../../types';
2
+ import { Category, GroupMemberLevel, GroupProperties, GroupView, GroupWidget } from '../../types/group';
3
3
  export declare const spot: ApiWrapper<GroupView>;
4
4
  export declare const properties: ApiWrapper<GroupProperties>;
5
5
  export declare const groupAutocompleteA: ApiWrapper<jSpotAutocomplete[]>;
6
+ export declare const groupCreate: ApiWrapper<GroupView>;
7
+ export declare const groupUpdate: ApiWrapper<GroupView>;
8
+ export declare const groupGetAvailableWidget: ApiWrapper<Record<string, GroupWidget>>;
9
+ export declare const groupGetCategories: ApiWrapper<Category[]>;
10
+ export declare const groupGetSpotMembers: ApiPagingResults<GroupMemberLevel>;
11
+ export declare const groupResetNotification: ApiWrapper<{
12
+ members: number;
13
+ msg: string;
14
+ }>;
@@ -1,6 +1,7 @@
1
1
  import { AutoCompleteConcept, Concept, Taxonomy, TaxonomyCreate } from './types';
2
2
  import { ApiWrapper, BaseMessages, PagingResults } from '../../types';
3
3
  export declare const taxonomyList: ApiWrapper<Taxonomy[]>;
4
+ export declare const taxonomyListError: ApiWrapper<undefined, BaseMessages>;
4
5
  export declare const taxonomyCreateParam: TaxonomyCreate;
5
6
  export declare const taxonomyCreateResponse: ApiWrapper<Taxonomy, BaseMessages>;
6
7
  export declare const taxonomyAutocomplete: ApiWrapper<AutoCompleteConcept[]>;
@@ -15,6 +15,11 @@ export type SpotBannerImage = {
15
15
  name: string;
16
16
  size: string;
17
17
  };
18
+ export type GroupUserLevel = 0 | 1 | 2 | 3;
19
+ export type GroupMemberLevel = {
20
+ level: GroupUserLevel;
21
+ user: jUserLittle;
22
+ };
18
23
  export type UpdateGroup = CreateGroup & Partial<Omit<GroupProperties, 'rss_feed'>> & {
19
24
  uri: string;
20
25
  image?: string | null;
@@ -29,7 +34,7 @@ export type GroupProperties = {
29
34
  commentLevel: '-1' | '1' | '2' | '3';
30
35
  user_level_signup: '' | '1' | '2' | '3';
31
36
  nounsubscribe: '0' | '1';
32
- useTeaser: '' | '0' | '1';
37
+ useTeaser: '' | '0' | '1' | null;
33
38
  displayType: string;
34
39
  spot_right_user: string;
35
40
  rss_feed: Array<RssType> | null;
@@ -67,7 +72,7 @@ export type GroupPropertiesOptions = {
67
72
  useTeaser: Array<ValueLabel>;
68
73
  spotDefaultPublishType: Array<string>;
69
74
  mail_frequency: Array<ValueLabel>;
70
- widgets: Array<GroupWidget>;
75
+ widgets: Array<GroupWidgetLittle>;
71
76
  custom_widgets: Record<string, GroupCustomWidget> | [];
72
77
  isArchive: number;
73
78
  fileSyncVersioningType: Array<ValueLabel>;
@@ -84,10 +89,18 @@ export type ValueLabel = {
84
89
  value: string | number;
85
90
  label: string;
86
91
  };
87
- export type GroupWidget = {
92
+ export type GroupWidgetLittle = {
88
93
  id: string;
89
94
  title: string;
90
95
  };
96
+ export type GroupWidget = {
97
+ idWidget: string;
98
+ title: string;
99
+ url: string;
100
+ type: string;
101
+ icon: string;
102
+ description: string;
103
+ };
91
104
  export type GroupCustomWidget = {
92
105
  idSpot: string;
93
106
  idOrder: string;
@@ -117,7 +130,7 @@ export type GroupView = GroupList & {
117
130
  image?: string | null;
118
131
  spotBanner?: [] | Record<string, SpotBannerImage>;
119
132
  idCommunity?: string;
120
- useTeaser?: '' | '0' | '1';
133
+ useTeaser?: '' | '0' | '1' | null;
121
134
  };
122
135
  export type ResetNotificationConfiguration = {
123
136
  idSpot: string | number;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,2 @@
1
+ export declare function suffixIfDoesNotExist(str: string | undefined, suffix: string): string | undefined;
2
+ export declare function removeIfStartsWith(str: string | undefined, prefix: string): string | undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jamespot-user-api",
3
- "version": "1.0.133",
3
+ "version": "1.0.134",
4
4
  "main": "lib/jamespot-user-api.js",
5
5
  "types": "lib/src/index.d.ts",
6
6
  "directories": {
@@ -0,0 +1,221 @@
1
+ {
2
+ "o": "assetReservation",
3
+ "f": "getReservations",
4
+ "error": 0,
5
+ "messages": [],
6
+ "result": [
7
+ {
8
+ "id": 16,
9
+ "mainType": "article",
10
+ "type": "reservation",
11
+ "uri": "reservation/16",
12
+ "dateCreation": "2024-01-09 11:36:44",
13
+ "dateModified": "2024-01-09 11:36:44",
14
+ "title": "R\u00e9servation",
15
+ "_url": "/ng/app/assetReservation/asset/13",
16
+ "_right": {
17
+ "create": true,
18
+ "read": true,
19
+ "publish": true,
20
+ "administrate": true,
21
+ "update": true,
22
+ "delete": true,
23
+ "comment": false,
24
+ "member": true
25
+ },
26
+ "description": "<div class='content-html'></div>",
27
+ "_user": {
28
+ "id": 1,
29
+ "mainType": "user",
30
+ "type": "user",
31
+ "uri": "user/1",
32
+ "dateCreation": "2019-03-26 16:29:33",
33
+ "dateModified": "2019-07-19 09:39:23",
34
+ "title": "AdminJenkins",
35
+ "_url": "/user/1",
36
+ "level": 9
37
+ },
38
+ "_audience": [],
39
+ "dateStart": "2024-01-15 08:00",
40
+ "dateEnd": "2024-01-15 09:00",
41
+ "reservationCancelled": false,
42
+ "_asset": {
43
+ "id": 13,
44
+ "mainType": "article",
45
+ "type": "bookableAsset",
46
+ "uri": "bookableAsset/13",
47
+ "dateCreation": "2024-01-09 11:36:43",
48
+ "dateModified": "2024-01-09 11:36:43",
49
+ "title": "test asset 1",
50
+ "_url": "/ng/app/assetReservation/asset/13",
51
+ "_right": {
52
+ "create": true,
53
+ "read": true,
54
+ "publish": true,
55
+ "administrate": true,
56
+ "update": true,
57
+ "delete": true,
58
+ "comment": false,
59
+ "member": true
60
+ },
61
+ "description": "<div class='content-html'></div>",
62
+ "_user": {
63
+ "id": 1,
64
+ "mainType": "user",
65
+ "type": "user",
66
+ "uri": "user/1",
67
+ "dateCreation": "2019-03-26 16:29:33",
68
+ "dateModified": "2019-07-19 09:39:23",
69
+ "title": "AdminJenkins",
70
+ "_url": "/user/1",
71
+ "level": 9
72
+ },
73
+ "_audience": [],
74
+ "_isColorDark": null,
75
+ "assetPlannerBackgroundColor": null
76
+ }
77
+ },
78
+ {
79
+ "id": 17,
80
+ "mainType": "article",
81
+ "type": "reservation",
82
+ "uri": "reservation/17",
83
+ "dateCreation": "2024-01-09 11:36:45",
84
+ "dateModified": "2024-01-09 11:36:45",
85
+ "title": "R\u00e9servation",
86
+ "_url": "/ng/app/assetReservation/asset/13",
87
+ "_right": {
88
+ "create": true,
89
+ "read": true,
90
+ "publish": true,
91
+ "administrate": true,
92
+ "update": true,
93
+ "delete": true,
94
+ "comment": false,
95
+ "member": true
96
+ },
97
+ "description": "<div class='content-html'></div>",
98
+ "_user": {
99
+ "id": 1,
100
+ "mainType": "user",
101
+ "type": "user",
102
+ "uri": "user/1",
103
+ "dateCreation": "2019-03-26 16:29:33",
104
+ "dateModified": "2019-07-19 09:39:23",
105
+ "title": "AdminJenkins",
106
+ "_url": "/user/1",
107
+ "level": 9
108
+ },
109
+ "_audience": [],
110
+ "dateStart": "2024-01-15 09:00",
111
+ "dateEnd": "2024-01-15 10:00",
112
+ "reservationCancelled": false,
113
+ "_asset": {
114
+ "id": 13,
115
+ "mainType": "article",
116
+ "type": "bookableAsset",
117
+ "uri": "bookableAsset/13",
118
+ "dateCreation": "2024-01-09 11:36:43",
119
+ "dateModified": "2024-01-09 11:36:43",
120
+ "title": "test asset 1",
121
+ "_url": "/ng/app/assetReservation/asset/13",
122
+ "_right": {
123
+ "create": true,
124
+ "read": true,
125
+ "publish": true,
126
+ "administrate": true,
127
+ "update": true,
128
+ "delete": true,
129
+ "comment": false,
130
+ "member": true
131
+ },
132
+ "description": "<div class='content-html'></div>",
133
+ "_user": {
134
+ "id": 1,
135
+ "mainType": "user",
136
+ "type": "user",
137
+ "uri": "user/1",
138
+ "dateCreation": "2019-03-26 16:29:33",
139
+ "dateModified": "2019-07-19 09:39:23",
140
+ "title": "AdminJenkins",
141
+ "_url": "/user/1",
142
+ "level": 9
143
+ },
144
+ "_audience": [],
145
+ "_isColorDark": null,
146
+ "assetPlannerBackgroundColor": null
147
+ }
148
+ },
149
+ {
150
+ "id": 18,
151
+ "mainType": "article",
152
+ "type": "reservation",
153
+ "uri": "reservation/18",
154
+ "dateCreation": "2024-01-09 11:36:45",
155
+ "dateModified": "2024-01-09 11:36:45",
156
+ "title": "R\u00e9servation",
157
+ "_url": "/ng/app/assetReservation/asset/13",
158
+ "_right": {
159
+ "create": true,
160
+ "read": true,
161
+ "publish": true,
162
+ "administrate": true,
163
+ "update": true,
164
+ "delete": true,
165
+ "comment": false,
166
+ "member": true
167
+ },
168
+ "description": "<div class='content-html'></div>",
169
+ "_user": {
170
+ "id": 1,
171
+ "mainType": "user",
172
+ "type": "user",
173
+ "uri": "user/1",
174
+ "dateCreation": "2019-03-26 16:29:33",
175
+ "dateModified": "2019-07-19 09:39:23",
176
+ "title": "AdminJenkins",
177
+ "_url": "/user/1",
178
+ "level": 9
179
+ },
180
+ "_audience": [],
181
+ "dateStart": "2024-01-16 11:00",
182
+ "dateEnd": "2024-01-16 12:00",
183
+ "reservationCancelled": false,
184
+ "_asset": {
185
+ "id": 13,
186
+ "mainType": "article",
187
+ "type": "bookableAsset",
188
+ "uri": "bookableAsset/13",
189
+ "dateCreation": "2024-01-09 11:36:43",
190
+ "dateModified": "2024-01-09 11:36:43",
191
+ "title": "test asset 1",
192
+ "_url": "/ng/app/assetReservation/asset/13",
193
+ "_right": {
194
+ "create": true,
195
+ "read": true,
196
+ "publish": true,
197
+ "administrate": true,
198
+ "update": true,
199
+ "delete": true,
200
+ "comment": false,
201
+ "member": true
202
+ },
203
+ "description": "<div class='content-html'></div>",
204
+ "_user": {
205
+ "id": 1,
206
+ "mainType": "user",
207
+ "type": "user",
208
+ "uri": "user/1",
209
+ "dateCreation": "2019-03-26 16:29:33",
210
+ "dateModified": "2019-07-19 09:39:23",
211
+ "title": "AdminJenkins",
212
+ "_url": "/user/1",
213
+ "level": 9
214
+ },
215
+ "_audience": [],
216
+ "_isColorDark": null,
217
+ "assetPlannerBackgroundColor": null
218
+ }
219
+ }
220
+ ]
221
+ }