jamespot-user-api 1.0.114 → 1.0.116

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 (120) hide show
  1. package/documentation/assets/main.js +2 -2
  2. package/documentation/assets/search.js +1 -1
  3. package/documentation/assets/style.css +3 -2
  4. package/documentation/classes/AdminLicenseApi.html +11 -11
  5. package/documentation/classes/AdminStoreApi.html +1 -1
  6. package/documentation/classes/AdminUtilsApi.html +1 -1
  7. package/documentation/classes/JApplicationApi.html +8 -8
  8. package/documentation/classes/JArticleApi.html +1 -1
  9. package/documentation/classes/JAssetReservation.html +1 -1
  10. package/documentation/classes/JAudienceApi.html +1 -1
  11. package/documentation/classes/JBaseApi.html +1 -1
  12. package/documentation/classes/JBookmarkApi.html +1 -1
  13. package/documentation/classes/JCommunityApi.html +1 -1
  14. package/documentation/classes/JDiapazoneApi.html +1 -1
  15. package/documentation/classes/JFaqApi.html +1 -0
  16. package/documentation/classes/JFileApi.html +5 -5
  17. package/documentation/classes/JFilebankApi.html +1 -1
  18. package/documentation/classes/JGroupApi.html +11 -11
  19. package/documentation/classes/JLandApi.html +1 -1
  20. package/documentation/classes/JMessengerApi.html +1 -1
  21. package/documentation/classes/JSearchApi.html +6 -6
  22. package/documentation/classes/JShareApi.html +1 -1
  23. package/documentation/classes/JTaxonomyApi.html +2 -2
  24. package/documentation/classes/JUserApi.html +5 -5
  25. package/documentation/classes/JWedocApi.html +1 -1
  26. package/documentation/classes/JamespotUserApi.html +2 -2
  27. package/documentation/classes/Network.html +2 -2
  28. package/documentation/classes/TVDisplayApi.html +1 -1
  29. package/documentation/classes/WindowBrowser.html +1 -1
  30. package/documentation/enums/StudioApplicationStatus.html +1 -1
  31. package/documentation/index.html +2 -2
  32. package/documentation/interfaces/AccessRightObject.html +1 -1
  33. package/documentation/interfaces/AdminLicenseUser.html +1 -1
  34. package/documentation/interfaces/ApiDefaultWrapper.html +1 -1
  35. package/documentation/interfaces/ApiWrapper.html +1 -1
  36. package/documentation/interfaces/BaseAutocomplete.html +1 -1
  37. package/documentation/interfaces/BaseMessage.html +1 -1
  38. package/documentation/interfaces/Category.html +1 -1
  39. package/documentation/interfaces/FileBankProps.html +1 -1
  40. package/documentation/interfaces/FolderProps.html +1 -1
  41. package/documentation/interfaces/ListFilterSpec.html +1 -1
  42. package/documentation/interfaces/OF.html +1 -1
  43. package/documentation/interfaces/ObjectListProps.html +1 -1
  44. package/documentation/interfaces/PagingResults.html +1 -1
  45. package/documentation/interfaces/RootFolderProps.html +1 -1
  46. package/documentation/interfaces/SearchCategoryModel.html +1 -1
  47. package/documentation/interfaces/SearchCategoryValue.html +1 -1
  48. package/documentation/interfaces/SearchConfig.html +1 -1
  49. package/documentation/interfaces/SearchFacetModel.html +1 -1
  50. package/documentation/interfaces/SearchFacetValueModel.html +1 -1
  51. package/documentation/interfaces/SearchQuery.html +1 -1
  52. package/documentation/interfaces/SearchQueryFilterModel.html +2 -2
  53. package/documentation/interfaces/SearchQueryOption.html +2 -2
  54. package/documentation/interfaces/SearchQueryResult.html +1 -1
  55. package/documentation/interfaces/SearchQuerySortModel.html +2 -2
  56. package/documentation/interfaces/SearchResultCatProps.html +1 -1
  57. package/documentation/interfaces/SearchResultPropsApp.html +1 -1
  58. package/documentation/interfaces/SearchResultPropsObject.html +1 -1
  59. package/documentation/interfaces/SpotProps.html +1 -1
  60. package/documentation/interfaces/Taxonomy.html +1 -1
  61. package/documentation/interfaces/TaxonomyCreate.html +1 -1
  62. package/documentation/interfaces/WindowInterface.html +1 -1
  63. package/documentation/modules.html +9 -9
  64. package/lib/jamespot-user-api.js +1 -1
  65. package/lib/jamespot-user-api.js.map +1 -1
  66. package/lib/src/apis/application/types.d.ts +6 -6
  67. package/lib/src/apis/article/article.d.ts +14 -7
  68. package/lib/src/apis/article/article.mock.d.ts +2 -0
  69. package/lib/src/apis/faq/faq.d.ts +12 -0
  70. package/lib/src/apis/faq/faq.mock.d.ts +7 -0
  71. package/lib/src/apis/faq/faq.test.d.ts +1 -0
  72. package/lib/src/apis/file.d.ts +1 -8
  73. package/lib/src/apis/filebank.d.ts +3 -3
  74. package/lib/src/apis/index.d.ts +1 -0
  75. package/lib/src/apis/jamespotUserApi.d.ts +2 -0
  76. package/lib/src/apis/jland/jland.d.ts +6 -6
  77. package/lib/src/apis/taxonomy/taxonomy.d.ts +3 -6
  78. package/lib/src/apis/taxonomy/taxonomy.mock.d.ts +3 -3
  79. package/lib/src/apis/taxonomy/types.d.ts +4 -4
  80. package/lib/src/apis/user/user.d.ts +3 -3
  81. package/lib/src/types/adminLicence.d.ts +6 -6
  82. package/lib/src/types/adminStore.d.ts +2 -2
  83. package/lib/src/types/adminUtils.d.ts +3 -3
  84. package/lib/src/types/asei.d.ts +5 -5
  85. package/lib/src/types/assetReservation.d.ts +4 -4
  86. package/lib/src/types/autocomplete.d.ts +6 -6
  87. package/lib/src/types/bookmark.d.ts +5 -5
  88. package/lib/src/types/comment.d.ts +2 -2
  89. package/lib/src/types/diapazone.d.ts +1 -1
  90. package/lib/src/types/drive.d.ts +5 -5
  91. package/lib/src/types/faq.d.ts +30 -0
  92. package/lib/src/types/file.d.ts +12 -11
  93. package/lib/src/types/group.d.ts +13 -13
  94. package/lib/src/types/index.d.ts +1 -0
  95. package/lib/src/types/mediaLibrary.d.ts +3 -3
  96. package/lib/src/types/model.d.ts +32 -32
  97. package/lib/src/types/realtime.d.ts +14 -14
  98. package/lib/src/types/search.d.ts +4 -4
  99. package/lib/src/types/share.d.ts +5 -5
  100. package/lib/src/types/tvDisplay.d.ts +18 -18
  101. package/lib/src/types/uri.d.ts +1 -1
  102. package/lib/src/types/user.d.ts +5 -5
  103. package/lib/src/types/utils.d.ts +29 -29
  104. package/lib/src/types/wedoc.d.ts +2 -2
  105. package/lib/src/types/widgets.d.ts +39 -39
  106. package/lib/src/util/Test.d.ts +2 -1
  107. package/lib/src/util/ensure.d.ts +2 -2
  108. package/lib/src/util/images.d.ts +6 -6
  109. package/lib/src/util/network.d.ts +3 -3
  110. package/lib/src/util/taxonomy.d.ts +3 -0
  111. package/lib/src/window/Window.d.ts +2 -2
  112. package/package.json +72 -73
  113. package/phpunitMock/articleCreate-faq-category.json +51 -0
  114. package/phpunitMock/articleDelete-faq-category.json +12 -0
  115. package/phpunitMock/articleGet-faq-category.json +45 -0
  116. package/phpunitMock/articleGetAttachment-success.json +18 -0
  117. package/phpunitMock/articleUpdate-faq-category.json +49 -0
  118. package/phpunitMock/faqGetFaqTaxonomy-success.json +10 -0
  119. package/phpunitMock/faqGetHookProperties-success.json +9 -0
  120. package/pnpm-lock.yaml +0 -12425
@@ -7,11 +7,11 @@ import { jUserLittle } from './user';
7
7
  * B: A & {b: int}
8
8
  * Readable<B> => {a: string, b:int}
9
9
  */
10
- export declare type Readable<T> = T extends infer U ? {
10
+ export type Readable<T> = T extends infer U ? {
11
11
  [K in keyof U]: U[K];
12
12
  } : never;
13
- export declare type AllKeys<T> = T extends unknown ? keyof T : never;
14
- declare type _ExclusifyUnion<T, K extends PropertyKey> = T extends unknown ? Readable<T & Partial<Record<Exclude<K, keyof T>, never>>> : never;
13
+ export type AllKeys<T> = T extends unknown ? keyof T : never;
14
+ type _ExclusifyUnion<T, K extends PropertyKey> = T extends unknown ? Readable<T & Partial<Record<Exclude<K, keyof T>, never>>> : never;
15
15
  /**
16
16
  * Builds an exclusive union type from a union type
17
17
  * C = ExclusifyUnion<A|B>
@@ -20,13 +20,13 @@ declare type _ExclusifyUnion<T, K extends PropertyKey> = T extends unknown ? Rea
20
20
  * tutu: C = {a: "tata", b: 123} KO => Types of property 'a' are incompatible. Type 'string' is not assignable to type 'undefined'.
21
21
  * This is the kind of error shown when you add too many properties with this definition.
22
22
  */
23
- export declare type ExclusifyUnion<T> = _ExclusifyUnion<T, AllKeys<T>>;
23
+ export type ExclusifyUnion<T> = _ExclusifyUnion<T, AllKeys<T>>;
24
24
  export interface BaseMessage {
25
25
  msg: string;
26
26
  code: number;
27
27
  }
28
- export declare type BaseMessages = BaseMessage[];
29
- export declare type BaseMessagesOne = [BaseMessage];
28
+ export type BaseMessages = BaseMessage[];
29
+ export type BaseMessagesOne = [BaseMessage];
30
30
  export interface ApiDefaultWrapper<U = BaseMessages> {
31
31
  o: string;
32
32
  f: string;
@@ -45,8 +45,8 @@ export interface PagingResults<T> {
45
45
  limit: number;
46
46
  page: number;
47
47
  }
48
- export declare type ApiPagingResults<T, U = BaseMessages> = ApiWrapper<PagingResults<T>, U>;
49
- export declare type Rights = {
48
+ export type ApiPagingResults<T, U = BaseMessages> = ApiWrapper<PagingResults<T>, U>;
49
+ export type Rights = {
50
50
  create: boolean;
51
51
  read: boolean;
52
52
  publish: boolean;
@@ -56,7 +56,7 @@ export declare type Rights = {
56
56
  comment: boolean;
57
57
  member: boolean;
58
58
  };
59
- export declare type jObjectBase = {
59
+ export type jObjectBase = {
60
60
  id: number;
61
61
  mainType: string;
62
62
  type: string;
@@ -64,11 +64,11 @@ export declare type jObjectBase = {
64
64
  dateCreation?: string;
65
65
  dateModified?: string;
66
66
  };
67
- export declare type jObjectLittle = jObjectBase & {
67
+ export type jObjectLittle = jObjectBase & {
68
68
  title: string;
69
69
  _url: string;
70
70
  };
71
- export declare type jObjectList = jObjectLittle & {
71
+ export type jObjectList = jObjectLittle & {
72
72
  description?: string | null;
73
73
  _user: jUserLittle;
74
74
  _right: Rights;
@@ -76,39 +76,39 @@ export declare type jObjectList = jObjectLittle & {
76
76
  /**
77
77
  * @deprecated Use jObjectLittle instead
78
78
  */
79
- export declare type Little = jObjectLittle;
79
+ export type Little = jObjectLittle;
80
80
  /**
81
81
  * @deprecated Use jObjectList instead
82
82
  */
83
- export declare type List = jObjectList;
84
- export declare type jLinkLittle = jObjectBase & {
83
+ export type List = jObjectList;
84
+ export type jLinkLittle = jObjectBase & {
85
85
  srcId: number;
86
86
  srcType: string;
87
87
  targetId: number;
88
88
  targetType: string | null;
89
89
  };
90
- export declare type jLinkList<T extends jObjectBase = jObjectLittle | jUserLittle> = jLinkLittle & {
90
+ export type jLinkList<T extends jObjectBase = jObjectLittle | jUserLittle> = jLinkLittle & {
91
91
  value: string | null;
92
92
  _src?: T;
93
93
  _target?: T | undefined;
94
94
  };
95
- export declare type jArticleLittle = jObjectLittle & {
95
+ export type jArticleLittle = jObjectLittle & {
96
96
  dateCreation: string;
97
97
  dateModified: string;
98
98
  };
99
- export declare type jArticleList = jArticleLittle & {
99
+ export type jArticleList = jArticleLittle & {
100
100
  description?: string | null;
101
101
  _user: jUserLittle;
102
102
  _right: Rights;
103
103
  };
104
- export declare type jArticleView = jArticleList & {};
105
- export declare type Order = {
104
+ export type jArticleView = jArticleList & {};
105
+ export type Order = {
106
106
  name: string;
107
107
  sort: 'ASC' | 'DESC';
108
108
  };
109
- export declare type Audience = jUserLittle | GroupLittle;
110
- export declare type Orders = Array<Order>;
111
- export declare type FilterValue = boolean | string | number | string[] | {
109
+ export type Audience = jUserLittle | GroupLittle;
110
+ export type Orders = Array<Order>;
111
+ export type FilterValue = boolean | string | number | string[] | {
112
112
  srcId: number | string;
113
113
  srcType: string;
114
114
  } | {
@@ -118,7 +118,7 @@ export declare type FilterValue = boolean | string | number | string[] | {
118
118
  start: string;
119
119
  end: string;
120
120
  };
121
- export declare type Filter = {
121
+ export type Filter = {
122
122
  name: string;
123
123
  value: FilterValue;
124
124
  operator?: '<' | '>' | '<=' | '>=' | '!=' | '<>' | 'like' | 'between' | 'is' | 'is not' | 'in' | 'link' | 'match' | 'equal';
@@ -127,14 +127,14 @@ export declare type Filter = {
127
127
  isNull?: boolean;
128
128
  isNotNull?: boolean;
129
129
  };
130
- export declare type Filters = Array<Filter>;
131
- export declare type MaybeWithToken<T> = T & {
130
+ export type Filters = Array<Filter>;
131
+ export type MaybeWithToken<T> = T & {
132
132
  token?: string | undefined;
133
133
  };
134
- export declare type MaybeWithParent<T extends jObjectBase = jObjectBase> = {
134
+ export type MaybeWithParent<T extends jObjectBase = jObjectBase> = {
135
135
  _parent?: T;
136
136
  };
137
- export declare type Format = 'raw-little' | 'raw-list' | 'raw-view' | undefined;
138
- export declare type ApiReturn<T extends Format, Little, List = Little, View = List, Default = {}> = T extends 'raw-little' ? Little : T extends 'raw-list' ? List : T extends 'raw-view' ? View : Default;
139
- export declare type ValueOf<T> = T[keyof T];
137
+ export type Format = 'raw-little' | 'raw-list' | 'raw-view' | undefined;
138
+ export type ApiReturn<T extends Format, Little, List = Little, View = List, Default = {}> = T extends 'raw-little' ? Little : T extends 'raw-list' ? List : T extends 'raw-view' ? View : Default;
139
+ export type ValueOf<T> = T[keyof T];
140
140
  export {};
@@ -1,6 +1,6 @@
1
1
  import { jUserLittle } from './user';
2
2
  import { Filters, jObjectBase, jObjectLittle, Orders, Rights } from './utils';
3
- export declare type WedocFileInfo = {
3
+ export type WedocFileInfo = {
4
4
  color: string;
5
5
  description: string;
6
6
  extension: string;
@@ -22,7 +22,7 @@ export declare type WedocFileType = jObjectBase & {
22
22
  _right: Rights;
23
23
  _user: jUserLittle;
24
24
  };
25
- export declare type WedocFileAudienceType = jObjectLittle;
25
+ export type WedocFileAudienceType = jObjectLittle;
26
26
  export declare type WedocTemplate = {
27
27
  color: string;
28
28
  description: string;
@@ -1,6 +1,6 @@
1
1
  import { AudienceAutocomplete } from './autocomplete';
2
2
  import { jArticleLittle } from './utils';
3
- export declare type WidgetLayer = {
3
+ export type WidgetLayer = {
4
4
  uniqid: string;
5
5
  title: string;
6
6
  locked: boolean;
@@ -8,11 +8,11 @@ export declare type WidgetLayer = {
8
8
  widgets: WidgetWrapperProps[];
9
9
  position?: WidgetVector;
10
10
  };
11
- export declare type WidgetWrapperProps<T = CombinedWidgetType> = {
11
+ export type WidgetWrapperProps<T = CombinedWidgetType> = {
12
12
  title: string;
13
13
  widget: WidgetExtendedType & T;
14
14
  };
15
- export declare type WidgetDefaultProps = {
15
+ export type WidgetDefaultProps = {
16
16
  width?: number | undefined;
17
17
  inplace: boolean;
18
18
  isComponentVisible?: boolean;
@@ -21,8 +21,8 @@ export declare type WidgetDefaultProps = {
21
21
  onChange: (content: CombinedWidgetContent, override?: boolean) => void;
22
22
  onStateChange?: (state: WidgetStateProps) => void;
23
23
  };
24
- export declare type CombinedWidgetType = WidgetTypeKeys[keyof WidgetTypeKeys];
25
- export declare type WidgetTypeKeys = {
24
+ export type CombinedWidgetType = WidgetTypeKeys[keyof WidgetTypeKeys];
25
+ export type WidgetTypeKeys = {
26
26
  'widget-article-button': WidgetArticleButtonType;
27
27
  'widget-article-gallery': WidgetArticleGalleryType;
28
28
  'widget-article-title': WidgetArticleTitleType;
@@ -30,7 +30,7 @@ export declare type WidgetTypeKeys = {
30
30
  'widget-article-image': WidgetArticleImageType;
31
31
  'widget-article-attachment': WidgetArticleAttachmentType;
32
32
  };
33
- export declare type WidgetContentKeys = {
33
+ export type WidgetContentKeys = {
34
34
  'widget-article-button': WidgetArticleButtonContent;
35
35
  'widget-article-gallery': WidgetArticleGalleryContent;
36
36
  'widget-article-title': WidgetArticleTitleContent;
@@ -38,47 +38,47 @@ export declare type WidgetContentKeys = {
38
38
  'widget-article-image': WidgetArticleImageContent;
39
39
  'widget-article-attachment': WidgetArticleAttachmentContent;
40
40
  };
41
- export declare type WidgetKeys = keyof WidgetTypeKeys;
42
- export declare type WidgetExtendedType = {
41
+ export type WidgetKeys = keyof WidgetTypeKeys;
42
+ export type WidgetExtendedType = {
43
43
  layers?: string[];
44
44
  };
45
- export declare type WidgetArticleButtonType = {
45
+ export type WidgetArticleButtonType = {
46
46
  name: 'widget-article-button';
47
47
  uniqid: string;
48
48
  content: WidgetArticleButtonContent;
49
49
  };
50
- export declare type WidgetArticleGalleryType = {
50
+ export type WidgetArticleGalleryType = {
51
51
  name: 'widget-article-gallery';
52
52
  uniqid: string;
53
53
  content: WidgetArticleGalleryContent;
54
54
  };
55
- export declare type WidgetArticleTitleType = {
55
+ export type WidgetArticleTitleType = {
56
56
  name: 'widget-article-title';
57
57
  uniqid: string;
58
58
  content: WidgetArticleTitleContent;
59
59
  };
60
- export declare type WidgetArticleTextType = {
60
+ export type WidgetArticleTextType = {
61
61
  name: 'widget-article-text';
62
62
  uniqid: string;
63
63
  content: WidgetArticleTextContent;
64
64
  };
65
- export declare type WidgetArticleImageType = {
65
+ export type WidgetArticleImageType = {
66
66
  name: 'widget-article-image';
67
67
  uniqid: string;
68
68
  content: WidgetArticleImageContent;
69
69
  };
70
- export declare type WidgetArticleAttachmentType = {
70
+ export type WidgetArticleAttachmentType = {
71
71
  name: 'widget-article-attachment';
72
72
  uniqid: string;
73
73
  content: WidgetArticleAttachmentContent;
74
74
  };
75
- export declare type CSSTextAlignType = 'left' | 'right' | 'center' | 'justify';
76
- export declare type CSSBackgroundPosition = 'top' | 'bottom' | 'center' | 'left' | 'right';
77
- export declare type CSSBackgroundSize = 'auto' | 'contain' | 'cover';
78
- export declare type VariantSizeType = 'sm' | 'md' | 'lg';
79
- export declare type VariantType = 'contained' | 'outlined';
80
- export declare type OpeningType = 'link' | 'anchor' | 'popup';
81
- export declare type WidgetArticleGalleryContent = {
75
+ export type CSSTextAlignType = 'left' | 'right' | 'center' | 'justify';
76
+ export type CSSBackgroundPosition = 'top' | 'bottom' | 'center' | 'left' | 'right';
77
+ export type CSSBackgroundSize = 'auto' | 'contain' | 'cover';
78
+ export type VariantSizeType = 'sm' | 'md' | 'lg';
79
+ export type VariantType = 'contained' | 'outlined';
80
+ export type OpeningType = 'link' | 'anchor' | 'popup';
81
+ export type WidgetArticleGalleryContent = {
82
82
  gap?: string;
83
83
  columnCount?: string;
84
84
  files?: WidgetFileType[];
@@ -86,7 +86,7 @@ export declare type WidgetArticleGalleryContent = {
86
86
  heightMode?: 'auto' | 'custom';
87
87
  heightModeValue?: string;
88
88
  };
89
- export declare type WidgetArticleTitleContent = {
89
+ export type WidgetArticleTitleContent = {
90
90
  widgets?: WidgetWrapperProps[];
91
91
  text?: string;
92
92
  textAlign?: CSSTextAlignType;
@@ -94,25 +94,25 @@ export declare type WidgetArticleTitleContent = {
94
94
  color?: string;
95
95
  backgroundColor?: string;
96
96
  };
97
- export declare type WidgetArticleTextContent = {
97
+ export type WidgetArticleTextContent = {
98
98
  text?: string;
99
99
  color?: string;
100
100
  fontSize?: string;
101
101
  lineHeight?: string;
102
102
  linkColor?: string;
103
103
  };
104
- export declare type OpeningTypeLink = {
104
+ export type OpeningTypeLink = {
105
105
  url: string;
106
106
  target: string;
107
107
  };
108
- export declare type OpeningTypeAnchor = {
108
+ export type OpeningTypeAnchor = {
109
109
  uniqid: string;
110
110
  };
111
- export declare type OpeningTypePopup = {
111
+ export type OpeningTypePopup = {
112
112
  title: string;
113
113
  widgets: WidgetWrapperProps[];
114
114
  };
115
- export declare type WidgetArticleButtonContent = {
115
+ export type WidgetArticleButtonContent = {
116
116
  text?: string;
117
117
  color?: string;
118
118
  backgroundColor?: string;
@@ -125,7 +125,7 @@ export declare type WidgetArticleButtonContent = {
125
125
  openingTypeAnchor?: OpeningTypeAnchor;
126
126
  openingTypePopup?: OpeningTypePopup;
127
127
  };
128
- export declare type WidgetArticleImageContent = {
128
+ export type WidgetArticleImageContent = {
129
129
  file?: WidgetFileType;
130
130
  useFilter?: boolean;
131
131
  displayAs?: 'image' | 'background';
@@ -134,21 +134,21 @@ export declare type WidgetArticleImageContent = {
134
134
  borderRadius?: string;
135
135
  widgets?: WidgetWrapperProps[];
136
136
  };
137
- export declare type WidgetArticleAttachmentContent = {
137
+ export type WidgetArticleAttachmentContent = {
138
138
  files?: WidgetFileType[];
139
139
  fileDisplay?: 'list' | 'gallery';
140
140
  };
141
- export declare type CombinedWidgetContent = {
141
+ export type CombinedWidgetContent = {
142
142
  widgets?: WidgetWrapperProps[];
143
143
  } & (WidgetArticleTextContent | WidgetArticleImageContent | WidgetArticleTitleContent | WidgetArticleButtonContent | WidgetArticleGalleryContent | WidgetArticleAttachmentContent);
144
- export declare type WidgetStateProps = {
144
+ export type WidgetStateProps = {
145
145
  busy?: boolean | undefined;
146
146
  loading?: boolean | undefined;
147
147
  initialized?: boolean | undefined;
148
148
  mounted?: boolean | undefined;
149
149
  hover?: boolean | undefined;
150
150
  };
151
- export declare type WidgetDefinitionProps = {
151
+ export type WidgetDefinitionProps = {
152
152
  label: string;
153
153
  description: string;
154
154
  name: WidgetKeys;
@@ -160,11 +160,11 @@ export declare type WidgetDefinitionProps = {
160
160
  useWidgets: boolean;
161
161
  };
162
162
  };
163
- export declare type WidgetVector = {
163
+ export type WidgetVector = {
164
164
  x: number;
165
165
  y: number;
166
166
  };
167
- export declare type WidgetFileType = {
167
+ export type WidgetFileType = {
168
168
  id: number;
169
169
  filename: string;
170
170
  name?: string;
@@ -174,15 +174,15 @@ export declare type WidgetFileType = {
174
174
  height: number;
175
175
  };
176
176
  };
177
- export declare type WidgetDisplayMode = 'edit' | 'view';
178
- export declare type WidgetModalProps = {
177
+ export type WidgetDisplayMode = 'edit' | 'view';
178
+ export type WidgetModalProps = {
179
179
  title?: string;
180
180
  view?: any;
181
181
  };
182
- export declare type WidgetsRootState = {
182
+ export type WidgetsRootState = {
183
183
  widgets: WidgetsState;
184
184
  };
185
- export declare type WidgetsState = {
185
+ export type WidgetsState = {
186
186
  token?: string | undefined;
187
187
  ids: Record<string, WidgetWrapperProps>;
188
188
  layers: Record<string, WidgetLayer>;
@@ -195,7 +195,7 @@ export declare type WidgetsState = {
195
195
  currentEditableIndex: number;
196
196
  currentEditableWidgetId: string | undefined;
197
197
  };
198
- export declare type ArticleWidgetType = jArticleLittle & {
198
+ export type ArticleWidgetType = jArticleLittle & {
199
199
  articleWidgets: WidgetWrapperProps[];
200
200
  articleWidgetsCover: number | undefined;
201
201
  _audience: AudienceAutocomplete[];
@@ -1,5 +1,5 @@
1
1
  import { JamespotUserApi } from '../apis';
2
- import { ApiDefaultWrapper, PagingResults, jArticleLittle, jObjectAutocomplete, jObjectLittle, jObjectList, jUserList, Rights } from '../types';
2
+ import { ApiDefaultWrapper, PagingResults, jArticleLittle, jObjectAutocomplete, jObjectLittle, jObjectList, jUserList, Rights, jArticleView } from '../types';
3
3
  import { jCommentList } from '../types/comment';
4
4
  import { FetchResponseType, WindowBrowser } from '../window';
5
5
  import { Network } from './network';
@@ -12,6 +12,7 @@ export declare const validateApiWrapper: <T extends ApiDefaultWrapper<import("..
12
12
  export declare const validatePagingResults: <T>(res: PagingResults<T>) => void;
13
13
  export declare const validateObjectIsFormatLittle: <T extends jObjectLittle = jObjectLittle>(object: T) => void;
14
14
  export declare const validateObjectIsFormatList: <T extends jObjectList = jObjectList>(object: T) => void;
15
+ export declare const validateArticleIsFormatView: <T extends jArticleView = jArticleView>(object: T) => void;
15
16
  export declare const validateUserIsFormatList: <T extends jUserList = jUserList>(object: T) => void;
16
17
  export declare const validateCommentIsFormatList: <T extends jCommentList = jCommentList>(object: T) => void;
17
18
  export declare const validateObjectIsFormatAutocomplete: <T extends jObjectAutocomplete = jObjectAutocomplete>(object: T) => void;
@@ -3,11 +3,11 @@ import { AbortApiError, StandardApiError } from './network';
3
3
  declare function ensureIsBookmarkLink(bookmark: BookmarkCustom | BookmarkLink): bookmark is BookmarkLink;
4
4
  declare function ensureIsBookmarkCustom(bookmark: BookmarkCustom | BookmarkLink): bookmark is BookmarkCustom;
5
5
  declare function ensureIsBookmarkRawList(bookmark: jObjectBase | BookmarkRawList): bookmark is BookmarkRawList;
6
- declare type jObjectTypes = {
6
+ type jObjectTypes = {
7
7
  bookmarkLink: BookmarkRawList;
8
8
  };
9
9
  declare function ensureObjectIsType<T extends keyof jObjectTypes>(type: T, object: jObjectBase): object is jObjectTypes[T];
10
- declare type ChannelsTypes = {
10
+ type ChannelsTypes = {
11
11
  DYNAMIC: TVChannelDynamicList;
12
12
  SLIDESHOW: TVChannelSlideshowList;
13
13
  };
@@ -1,35 +1,35 @@
1
1
  /**
2
2
  * @see JRCImgProps
3
3
  */
4
- declare type WidthHeight = {
4
+ type WidthHeight = {
5
5
  width?: number;
6
6
  height?: number;
7
7
  };
8
8
  /**
9
9
  * @see JRCImgProps
10
10
  */
11
- declare type Size = {
11
+ type Size = {
12
12
  size?: string;
13
13
  };
14
14
  /**
15
15
  * @see JRCImgProps
16
16
  */
17
- declare type Format = {
17
+ type Format = {
18
18
  format?: string;
19
19
  };
20
20
  /**
21
21
  * @see JRCImgProps
22
22
  */
23
- declare type Timestamp = {
23
+ type Timestamp = {
24
24
  timestamp?: string | number;
25
25
  };
26
- declare type Args = Timestamp & {
26
+ type Args = Timestamp & {
27
27
  iconColor?: 'white';
28
28
  };
29
29
  /**
30
30
  * @see JRCImgProps
31
31
  */
32
- export declare type ImgUrlProps = {
32
+ export type ImgUrlProps = {
33
33
  url?: string;
34
34
  fallbackUrl?: string;
35
35
  size?: string;
@@ -4,14 +4,14 @@ export interface OF {
4
4
  o: string;
5
5
  f: string;
6
6
  }
7
- export declare type ApiError = {
7
+ export type ApiError = {
8
8
  error: number;
9
9
  };
10
- export declare type StandardApiError<T = BaseMessages> = ApiError & {
10
+ export type StandardApiError<T = BaseMessages> = ApiError & {
11
11
  errorMsg: string | undefined;
12
12
  messages: T;
13
13
  };
14
- export declare type AbortApiError = ApiError & {
14
+ export type AbortApiError = ApiError & {
15
15
  error: -1;
16
16
  aborted: true;
17
17
  };
@@ -1,2 +1,5 @@
1
1
  export declare function extractTaxonomiesFromObject(objet: Record<string, unknown>): Record<string, unknown>;
2
+ export declare function extractTaxonomiesFromObjectAndMapProperty(objet: Record<string, unknown>, property: string, format?: (o: any) => any): {
3
+ [k: string]: any;
4
+ };
2
5
  export declare function extractTaxonomiesFromObjectAndMapUri(objet: Record<string, unknown>): Record<string, unknown>;
@@ -1,7 +1,7 @@
1
- export declare type FetchResponseType<T> = {
1
+ export type FetchResponseType<T> = {
2
2
  json: () => Promise<T>;
3
3
  };
4
- export declare type FetchReturnType<T> = Promise<FetchResponseType<T>>;
4
+ export type FetchReturnType<T> = Promise<FetchResponseType<T>>;
5
5
  export interface WindowInterface {
6
6
  getBackendUrl: () => Promise<string>;
7
7
  fetch: <T>(url: string, init?: RequestInit) => FetchReturnType<T>;
package/package.json CHANGED
@@ -1,74 +1,73 @@
1
1
  {
2
- "name": "jamespot-user-api",
3
- "version": "1.0.114",
4
- "scripts": {
5
- "build": "npx webpack --env NODE_ENV=production",
6
- "build-dev-vm": "npx webpack --env NODE_ENV=development --env NODE_BUILD=VM",
7
- "dev": "npx webpack --env NODE_ENV=development",
8
- "dev-mock": "npx webpack --env NODE_ENV=development --env MOCK_MODE=true",
9
- "local": "npx webpack --env NODE_ENV=development --env WATCH=true",
10
- "local-mock": "npx webpack --env NODE_ENV=development --env MOCK_MODE=true --env WATCH=true",
11
- "prettier": "npx prettier --write ./",
12
- "watch-dev-vm": "webpack --env NODE_ENV=development NODE_RUN=VM WATCH=true",
13
- "lint": "npx eslint ./src/ --ext .ts,.tsx",
14
- "lint:fix": "npx eslint ./src/ --ext .ts,.tsx --fix ",
15
- "lint:ci": "eslint --output-file eslint_report.json --format json . --ext .ts,.js",
16
- "doc": "npx typedoc",
17
- "test": "jest",
18
- "test:mockVM": "jest -c ./jest.config.vm.ts",
19
- "prepare": "husky install"
20
- },
21
- "main": "lib/jamespot-user-api.js",
22
- "types": "lib/src/index.d.ts",
23
- "directories": {
24
- "lib": "lib/*"
25
- },
26
- "devDependencies": {
27
- "@babel/core": "^7.15.8",
28
- "@babel/plugin-proposal-class-properties": "^7.14.5",
29
- "@babel/plugin-proposal-object-rest-spread": "^7.15.6",
30
- "@babel/plugin-transform-arrow-functions": "^7.14.5",
31
- "@babel/plugin-transform-classes": "^7.14.9",
32
- "@babel/plugin-transform-modules-commonjs": "^7.15.0",
33
- "@babel/preset-env": "^7.15.8",
34
- "@babel/preset-typescript": "^7.15.0",
35
- "@types/form-data": "^2.5.0",
36
- "@types/jest": "^27.0.2",
37
- "@types/node": "^16.11.1",
38
- "@types/node-fetch": "^2.5.12",
39
- "@typescript-eslint/eslint-plugin": "^5.4.0",
40
- "@typescript-eslint/parser": "^5.4.0",
41
- "babel-loader": "^8.0.5",
42
- "babel-plugin-transform-es2015-arrow-functions": "^6.22.0",
43
- "chai": "^4.2.0",
44
- "dotenv": "^10.0.0",
45
- "eslint": "^8.2.0",
46
- "eslint-config-prettier": "^8.3.0",
47
- "form-data": "^4.0.0",
48
- "husky": "^7.0.4",
49
- "jest": "^27.3.1",
50
- "jest-browser": "^0.1.0",
51
- "jest-cli": "^27.0.6",
52
- "jsdom": "^18.0.0",
53
- "lint-staged": "^12.0.2",
54
- "node-fetch": "^2.6.5",
55
- "prettier": "^2.4.1",
56
- "ts-jest": "^27.0.7",
57
- "ts-loader": "^9.2.6",
58
- "ts-node": "^10.3.0",
59
- "typedoc": "^0.22.6",
60
- "typescript": "^4.4.4",
61
- "typescript-eslint-parser": "^22.0.0",
62
- "webpack": "^5.62.1",
63
- "webpack-cli": "^4.9.1"
64
- },
65
- "lint-staged": {
66
- "*.{js,jsx,ts,tsx}": [
67
- "npm run lint:fix",
68
- "npm run prettier"
69
- ],
70
- "*.{json,md}": [
71
- "npm run prettier"
72
- ]
73
- }
74
- }
2
+ "name": "jamespot-user-api",
3
+ "version": "1.0.116",
4
+ "main": "lib/jamespot-user-api.js",
5
+ "types": "lib/src/index.d.ts",
6
+ "directories": {
7
+ "lib": "lib/*"
8
+ },
9
+ "devDependencies": {
10
+ "@babel/core": "^7.15.8",
11
+ "@babel/plugin-proposal-class-properties": "^7.14.5",
12
+ "@babel/plugin-proposal-object-rest-spread": "^7.15.6",
13
+ "@babel/plugin-transform-arrow-functions": "^7.14.5",
14
+ "@babel/plugin-transform-classes": "^7.14.9",
15
+ "@babel/plugin-transform-modules-commonjs": "^7.15.0",
16
+ "@babel/preset-env": "^7.15.8",
17
+ "@babel/preset-typescript": "^7.15.0",
18
+ "@types/form-data": "^2.5.0",
19
+ "@types/jest": "^27.0.2",
20
+ "@types/node": "^16.11.1",
21
+ "@types/node-fetch": "^2.5.12",
22
+ "@typescript-eslint/eslint-plugin": "^5.4.0",
23
+ "@typescript-eslint/parser": "^5.4.0",
24
+ "babel-loader": "^8.0.5",
25
+ "babel-plugin-transform-es2015-arrow-functions": "^6.22.0",
26
+ "chai": "^4.2.0",
27
+ "dotenv": "^10.0.0",
28
+ "eslint": "^8.2.0",
29
+ "eslint-config-prettier": "^8.3.0",
30
+ "form-data": "^4.0.0",
31
+ "husky": "^7.0.4",
32
+ "jest": "^27.3.1",
33
+ "jest-browser": "^0.1.0",
34
+ "jest-cli": "^27.0.6",
35
+ "jsdom": "^18.0.0",
36
+ "lint-staged": "^12.0.2",
37
+ "node-fetch": "^2.6.5",
38
+ "prettier": "^2.4.1",
39
+ "ts-jest": "^27.0.7",
40
+ "ts-loader": "^9.2.6",
41
+ "ts-node": "^10.3.0",
42
+ "typedoc": "^0.22.6",
43
+ "typescript": "^4.4.4",
44
+ "typescript-eslint-parser": "^22.0.0",
45
+ "webpack": "^5.62.1",
46
+ "webpack-cli": "^4.9.1"
47
+ },
48
+ "lint-staged": {
49
+ "*.{js,jsx,ts,tsx}": [
50
+ "npm run lint:fix",
51
+ "npm run prettier"
52
+ ],
53
+ "*.{json,md}": [
54
+ "npm run prettier"
55
+ ]
56
+ },
57
+ "scripts": {
58
+ "build": "npx webpack --env NODE_ENV=production",
59
+ "build-dev-vm": "npx webpack --env NODE_ENV=development --env NODE_BUILD=VM",
60
+ "dev": "npx webpack --env NODE_ENV=development",
61
+ "dev-mock": "npx webpack --env NODE_ENV=development --env MOCK_MODE=true",
62
+ "local": "npx webpack --env NODE_ENV=development --env WATCH=true",
63
+ "local-mock": "npx webpack --env NODE_ENV=development --env MOCK_MODE=true --env WATCH=true",
64
+ "prettier": "npx prettier --write ./",
65
+ "watch-dev-vm": "webpack --env NODE_ENV=development NODE_RUN=VM WATCH=true",
66
+ "lint": "npx eslint ./src/ --ext .ts,.tsx",
67
+ "lint:fix": "npx eslint ./src/ --ext .ts,.tsx --fix ",
68
+ "lint:ci": "eslint --output-file eslint_report.json --format json . --ext .ts,.js",
69
+ "doc": "npx typedoc",
70
+ "test": "jest",
71
+ "test:mockVM": "jest -c ./jest.config.vm.ts"
72
+ }
73
+ }