jamespot-user-api 1.0.162 → 1.0.164

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 (77) 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/JBusinessNetworkingApi.html +1 -1
  12. package/documentation/classes/JCommunityApi.html +1 -1
  13. package/documentation/classes/JDiapazoneApi.html +1 -1
  14. package/documentation/classes/JFaqApi.html +1 -1
  15. package/documentation/classes/JFileApi.html +5 -5
  16. package/documentation/classes/JFilebankApi.html +1 -1
  17. package/documentation/classes/JGlobalApi.html +1 -1
  18. package/documentation/classes/JGroupApi.html +12 -12
  19. package/documentation/classes/JIAApi.html +1 -1
  20. package/documentation/classes/JLandApi.html +1 -1
  21. package/documentation/classes/JMessengerApi.html +1 -1
  22. package/documentation/classes/JObjectApi.html +1 -1
  23. package/documentation/classes/JSearchApi.html +6 -6
  24. package/documentation/classes/JShareApi.html +1 -1
  25. package/documentation/classes/JSocialActionApi.html +1 -1
  26. package/documentation/classes/JTaxonomyApi.html +2 -2
  27. package/documentation/classes/JUserApi.html +7 -7
  28. package/documentation/classes/JWedocApi.html +1 -1
  29. package/documentation/classes/JWidgetApi.html +1 -1
  30. package/documentation/classes/JamespotUserApi.html +1 -1
  31. package/documentation/classes/Network.html +1 -1
  32. package/documentation/classes/TVDisplayApi.html +1 -1
  33. package/documentation/classes/WindowBrowser.html +1 -1
  34. package/documentation/enums/GroupModerateStatus.html +1 -1
  35. package/documentation/enums/StudioApplicationStatus.html +1 -1
  36. package/documentation/index.html +1 -1
  37. package/documentation/interfaces/AccessRightObject.html +1 -1
  38. package/documentation/interfaces/AdminLicenseUser.html +1 -1
  39. package/documentation/interfaces/ApiDefaultWrapper.html +1 -1
  40. package/documentation/interfaces/ApiWrapper.html +1 -1
  41. package/documentation/interfaces/BaseAutocomplete.html +1 -1
  42. package/documentation/interfaces/BaseMessage.html +1 -1
  43. package/documentation/interfaces/Category.html +1 -1
  44. package/documentation/interfaces/FileBankProps.html +1 -1
  45. package/documentation/interfaces/FolderProps.html +1 -1
  46. package/documentation/interfaces/ListFilterSpec.html +1 -1
  47. package/documentation/interfaces/OF.html +1 -1
  48. package/documentation/interfaces/ObjectListProps.html +1 -1
  49. package/documentation/interfaces/PagingResults.html +1 -1
  50. package/documentation/interfaces/RootFolderProps.html +1 -1
  51. package/documentation/interfaces/SearchCategoryModel.html +1 -1
  52. package/documentation/interfaces/SearchCategoryValue.html +1 -1
  53. package/documentation/interfaces/SearchConfig.html +1 -1
  54. package/documentation/interfaces/SearchFacetModel.html +1 -1
  55. package/documentation/interfaces/SearchFacetValueModel.html +1 -1
  56. package/documentation/interfaces/SearchQuery.html +1 -1
  57. package/documentation/interfaces/SearchQueryFilterModel.html +1 -1
  58. package/documentation/interfaces/SearchQueryOption.html +1 -1
  59. package/documentation/interfaces/SearchQueryResult.html +1 -1
  60. package/documentation/interfaces/SearchQuerySortModel.html +1 -1
  61. package/documentation/interfaces/SearchResultCatProps.html +1 -1
  62. package/documentation/interfaces/SearchResultPropsApp.html +1 -1
  63. package/documentation/interfaces/SearchResultPropsObject.html +1 -1
  64. package/documentation/interfaces/SpotProps.html +1 -1
  65. package/documentation/interfaces/TaxonomyCreate.html +1 -1
  66. package/documentation/interfaces/WindowInterface.html +1 -1
  67. package/documentation/modules.html +11 -11
  68. package/lib/jamespot-user-api.js +1 -1
  69. package/lib/jamespot-user-api.js.map +1 -1
  70. package/lib/src/apis/widget/widget.d.ts +8 -1
  71. package/lib/src/apis/widget/widget.mock.d.ts +4 -2
  72. package/lib/src/types/widgets.d.ts +9 -8
  73. package/package.json +1 -1
  74. package/phpunitMock/articleGet-with-widgets.json +2 -10
  75. package/phpunitMock/widgetCheckListRespond-article.json +1 -0
  76. package/phpunitMock/widgetUpdateWidget-checkList.json +23 -0
  77. package/phpunitMock/widgetUpdateWidget-quickSurvey.json +25 -0
@@ -1,4 +1,4 @@
1
- import { ApiWrapper, jUserLittle } from '../../types';
1
+ import { ApiWrapper, CombinedWidgetContent, CombinedWidgetType, WidgetWrapperProps, jUserLittle } from '../../types';
2
2
  import { JBaseApi } from '../base';
3
3
  export declare class JWidgetApi extends JBaseApi {
4
4
  responseUserList(uri: string, uniqid: string, page: number): Promise<ApiWrapper<jUserLittle[]>>;
@@ -14,4 +14,11 @@ export declare class JWidgetApi extends JBaseApi {
14
14
  uniqid: string;
15
15
  index: number;
16
16
  }): Promise<ApiWrapper<[]>>;
17
+ updateWidget<T = CombinedWidgetType>({ id, uniqid, content, title, type, }: {
18
+ id: number;
19
+ uniqid: string;
20
+ content: Partial<CombinedWidgetContent>;
21
+ title: string;
22
+ type: string;
23
+ }): Promise<ApiWrapper<Pick<WidgetWrapperProps<T>, 'widget'>[]>>;
17
24
  }
@@ -1,3 +1,5 @@
1
- import { ApiWrapper, jUserLittle } from '../../types';
1
+ import { ApiWrapper, WidgetCheckListType, WidgetWrapperProps, jUserLittle } from '../../types';
2
2
  export declare const widgetResponseUserList: ApiWrapper<jUserLittle[]>;
3
- export declare const widgetResponseRemoveWidget: ApiWrapper<[]>;
3
+ export declare const widgetResponseRemoveWidget: ApiWrapper<boolean>;
4
+ export declare const widgetResponseCheckListRespond: ApiWrapper<boolean>;
5
+ export declare const widgetResponseUpdateWidget: ApiWrapper<Pick<WidgetWrapperProps<WidgetCheckListType>, 'widget'>[]>;
@@ -1,5 +1,6 @@
1
1
  import { AudienceAutocomplete } from './autocomplete';
2
2
  import { jFileLittle } from './file';
3
+ import { jObjectLittle } from './object';
3
4
  import { jUserLittle } from './user';
4
5
  import { jArticleList, jArticleLittle, jHref } from './utils';
5
6
  export type jArticleWidgetLittle = jArticleLittle & {
@@ -54,6 +55,10 @@ export type WidgetKeys = keyof WidgetTypeKeys;
54
55
  export type WidgetExtendedType = {
55
56
  layers?: string[];
56
57
  };
58
+ export type LegacyAngularJSType = {
59
+ css?: Record<string, string>;
60
+ widgets: WidgetWrapperProps[];
61
+ };
57
62
  export type WidgetApiType = {
58
63
  name: 'widget-api';
59
64
  uniqid: string;
@@ -95,10 +100,9 @@ export type WidgetArticleSliderType = {
95
100
  content: WidgetArticleSliderContent;
96
101
  };
97
102
  export type WidgetCheckListType = {
98
- title: string;
99
103
  name: 'widget-check-list';
100
104
  uniqid: string;
101
- content: WidgetCheckListContent;
105
+ content: WidgetCheckListContent & LegacyAngularJSType;
102
106
  };
103
107
  export type WidgetCheckListTypeForFront = {
104
108
  title: string;
@@ -126,10 +130,6 @@ export type WidgetArticleTitleContent = {
126
130
  };
127
131
  export type WidgetArticleTextContent = {
128
132
  text?: string;
129
- color?: string;
130
- fontSize?: string;
131
- lineHeight?: string;
132
- linkColor?: string;
133
133
  };
134
134
  export type WidgetApiContent = {
135
135
  url?: string;
@@ -204,8 +204,8 @@ export type WidgetCheckListContentArr = {
204
204
  id?: number;
205
205
  user?: {
206
206
  id: number;
207
- type: 'user';
208
- mainType: 'user';
207
+ type: string;
208
+ mainType: string;
209
209
  };
210
210
  };
211
211
  export type WidgetCheckListContentArrForFront = {
@@ -264,6 +264,7 @@ export type WidgetsState = {
264
264
  }>;
265
265
  currentEditableIndex: number;
266
266
  currentEditableWidgetId: string | undefined;
267
+ widgetObject: Record<string, Partial<jObjectLittle>>;
267
268
  };
268
269
  export type ArticleDisplayMode = 'default' | 'vertical';
269
270
  export type ArticleWidgetType = jArticleList & {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jamespot-user-api",
3
- "version": "1.0.162",
3
+ "version": "1.0.164",
4
4
  "main": "lib/jamespot-user-api.js",
5
5
  "types": "lib/src/index.d.ts",
6
6
  "directories": {
@@ -43,11 +43,7 @@
43
43
  "name": "widget-article-text",
44
44
  "uniqid": "6617b75730ea4",
45
45
  "content": {
46
- "text": "Hello world",
47
- "color": "white",
48
- "fontSize": "12",
49
- "lineHeight": "12",
50
- "linkColor": "red"
46
+ "text": "Hello world"
51
47
  }
52
48
  }
53
49
  },
@@ -95,11 +91,7 @@
95
91
  "name": "widget-article-text",
96
92
  "uniqid": "6617b75730ea4",
97
93
  "content": {
98
- "text": "Hello world",
99
- "color": "white",
100
- "fontSize": "12",
101
- "lineHeight": "12",
102
- "linkColor": "red"
94
+ "text": "Hello world"
103
95
  }
104
96
  }
105
97
  }
@@ -0,0 +1 @@
1
+ {"o":"widget","f":"CheckListRespond","error":0,"messages":[],"result":true}
@@ -0,0 +1,23 @@
1
+ {
2
+ "o": "widget",
3
+ "f": "UpdateWidget",
4
+ "error": 0,
5
+ "messages": [],
6
+ "result": [
7
+ {
8
+ "widget": {
9
+ "name": "widget-check-list",
10
+ "content": {
11
+ "arr": [
12
+ { "title": "A", "value": false },
13
+ { "title": "B", "value": false },
14
+ { "title": "C", "value": false }
15
+ ],
16
+ "css": { "min-height": "100px" },
17
+ "widgets": []
18
+ },
19
+ "uniqid": "667185149ba27"
20
+ }
21
+ }
22
+ ]
23
+ }
@@ -0,0 +1,25 @@
1
+ {
2
+ "o": "widget",
3
+ "f": "UpdateWidget",
4
+ "error": 0,
5
+ "messages": [],
6
+ "result": [
7
+ {
8
+ "widget": {
9
+ "name": "widget-quick-survey",
10
+ "content": {
11
+ "arr": [{ "title": "survey A" }, { "title": "update B" }],
12
+ "open": false,
13
+ "multi": false,
14
+ "css": { "min-height": "100px" },
15
+ "closing": false,
16
+ "isClosed": false,
17
+ "widgets": [],
18
+ "showResult": true,
19
+ "isNotDisabled": true
20
+ },
21
+ "uniqid": "66717ec8d59f4"
22
+ }
23
+ }
24
+ ]
25
+ }