@plusscommunities/pluss-core-app 4.0.4-auth.0 → 6.0.0-auth.0
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/dist/module/actions/FollowerActions.js +34 -0
- package/dist/module/actions/FollowerActions.js.map +1 -0
- package/dist/module/actions/MediaActions.js +29 -0
- package/dist/module/actions/MediaActions.js.map +1 -0
- package/dist/module/actions/ResidentActions.js +26 -0
- package/dist/module/actions/ResidentActions.js.map +1 -0
- package/dist/module/actions/UserActions.js +223 -0
- package/dist/module/actions/UserActions.js.map +1 -0
- package/dist/module/actions/UserSettingsActions.js +14 -0
- package/dist/module/actions/UserSettingsActions.js.map +1 -0
- package/dist/module/actions/index.js +6 -0
- package/dist/module/actions/index.js.map +1 -0
- package/dist/module/actions/types.js +17 -0
- package/dist/module/actions/types.js.map +1 -0
- package/dist/module/apis/analyticsActions.js +20 -0
- package/dist/module/apis/analyticsActions.js.map +1 -0
- package/dist/module/apis/contactActions.js +27 -0
- package/dist/module/apis/contactActions.js.map +1 -0
- package/dist/module/apis/eventActions.js +161 -0
- package/dist/module/apis/eventActions.js.map +1 -0
- package/dist/module/apis/fileActions.js +86 -0
- package/dist/module/apis/fileActions.js.map +1 -0
- package/dist/module/apis/followerActions.js +38 -0
- package/dist/module/apis/followerActions.js.map +1 -0
- package/dist/module/apis/index.js +12 -0
- package/dist/module/apis/index.js.map +1 -0
- package/dist/module/apis/notificationActions.js +60 -0
- package/dist/module/apis/notificationActions.js.map +1 -0
- package/dist/module/apis/profileActions.js +14 -0
- package/dist/module/apis/profileActions.js.map +1 -0
- package/dist/module/apis/reactionActions.js +76 -0
- package/dist/module/apis/reactionActions.js.map +1 -0
- package/dist/module/apis/stringActions.js +30 -0
- package/dist/module/apis/stringActions.js.map +1 -0
- package/dist/module/apis/typeActions.js +15 -0
- package/dist/module/apis/typeActions.js.map +1 -0
- package/dist/module/apis/userActions.js +104 -0
- package/dist/module/apis/userActions.js.map +1 -0
- package/dist/module/assets/icons/reactions/heart.png +0 -0
- package/dist/module/assets/icons/reactions/party.png +0 -0
- package/dist/module/assets/icons/reactions/sad.png +0 -0
- package/dist/module/assets/icons/reactions/smile.png +0 -0
- package/dist/module/colours.js +168 -0
- package/dist/module/colours.js.map +1 -0
- package/dist/module/components/AddButton.js +43 -0
- package/dist/module/components/AddButton.js.map +1 -0
- package/dist/module/components/AddToCalendarButton.js +225 -0
- package/dist/module/components/AddToCalendarButton.js.map +1 -0
- package/dist/module/components/Attachment.js +54 -0
- package/dist/module/components/Attachment.js.map +1 -0
- package/dist/module/components/AudienceSelectorLauncher.js +64 -0
- package/dist/module/components/AudienceSelectorLauncher.js.map +1 -0
- package/dist/module/components/AudienceSelectorPage.js +350 -0
- package/dist/module/components/AudienceSelectorPage.js.map +1 -0
- package/dist/module/components/AutoOffsetImage.js +186 -0
- package/dist/module/components/AutoOffsetImage.js.map +1 -0
- package/dist/module/components/BackButton.js +58 -0
- package/dist/module/components/BackButton.js.map +1 -0
- package/dist/module/components/CategoryTabs.js +154 -0
- package/dist/module/components/CategoryTabs.js.map +1 -0
- package/dist/module/components/CommentReply.js +328 -0
- package/dist/module/components/CommentReply.js.map +1 -0
- package/dist/module/components/CommentSection.js +822 -0
- package/dist/module/components/CommentSection.js.map +1 -0
- package/dist/module/components/ConfirmPopup.js +108 -0
- package/dist/module/components/ConfirmPopup.js.map +1 -0
- package/dist/module/components/ConfirmationPopup.js +72 -0
- package/dist/module/components/ConfirmationPopup.js.map +1 -0
- package/dist/module/components/DropDownItem.js +74 -0
- package/dist/module/components/DropDownItem.js.map +1 -0
- package/dist/module/components/DropDownMenu.js +41 -0
- package/dist/module/components/DropDownMenu.js.map +1 -0
- package/dist/module/components/EmptyStateMain.js +50 -0
- package/dist/module/components/EmptyStateMain.js.map +1 -0
- package/dist/module/components/EmptyStateWidget.js +47 -0
- package/dist/module/components/EmptyStateWidget.js.map +1 -0
- package/dist/module/components/FontScaleButton.js +36 -0
- package/dist/module/components/FontScaleButton.js.map +1 -0
- package/dist/module/components/FontScalePopup.js +75 -0
- package/dist/module/components/FontScalePopup.js.map +1 -0
- package/dist/module/components/FormCard.js +25 -0
- package/dist/module/components/FormCard.js.map +1 -0
- package/dist/module/components/FormCardSection.js +212 -0
- package/dist/module/components/FormCardSection.js.map +1 -0
- package/dist/module/components/FormCardSectionOptionLauncher.js +72 -0
- package/dist/module/components/FormCardSectionOptionLauncher.js.map +1 -0
- package/dist/module/components/FormattedText.js +131 -0
- package/dist/module/components/FormattedText.js.map +1 -0
- package/dist/module/components/GenericInput.js +148 -0
- package/dist/module/components/GenericInput.js.map +1 -0
- package/dist/module/components/GenericInputSection.js +158 -0
- package/dist/module/components/GenericInputSection.js.map +1 -0
- package/dist/module/components/Header.js +458 -0
- package/dist/module/components/Header.js.map +1 -0
- package/dist/module/components/ImagePopup.js +240 -0
- package/dist/module/components/ImagePopup.js.map +1 -0
- package/dist/module/components/ImageUploadProgress.js +68 -0
- package/dist/module/components/ImageUploadProgress.js.map +1 -0
- package/dist/module/components/ImageUploader.js +795 -0
- package/dist/module/components/ImageUploader.js.map +1 -0
- package/dist/module/components/InlineButton.js +65 -0
- package/dist/module/components/InlineButton.js.map +1 -0
- package/dist/module/components/Input.js +154 -0
- package/dist/module/components/Input.js.map +1 -0
- package/dist/module/components/LoadingCircles.js +220 -0
- package/dist/module/components/LoadingCircles.js.map +1 -0
- package/dist/module/components/LoadingIndicator.js +86 -0
- package/dist/module/components/LoadingIndicator.js.map +1 -0
- package/dist/module/components/LoadingStateWidget.js +46 -0
- package/dist/module/components/LoadingStateWidget.js.map +1 -0
- package/dist/module/components/MediaPlayer.js +418 -0
- package/dist/module/components/MediaPlayer.js.map +1 -0
- package/dist/module/components/MiddlePopup.js +43 -0
- package/dist/module/components/MiddlePopup.js.map +1 -0
- package/dist/module/components/PDFPopup.js +191 -0
- package/dist/module/components/PDFPopup.js.map +1 -0
- package/dist/module/components/PlussChat.js +986 -0
- package/dist/module/components/PlussChat.js.map +1 -0
- package/dist/module/components/PlussChatMessage.js +262 -0
- package/dist/module/components/PlussChatMessage.js.map +1 -0
- package/dist/module/components/PlussChatTime.js +58 -0
- package/dist/module/components/PlussChatTime.js.map +1 -0
- package/dist/module/components/Popup.js +125 -0
- package/dist/module/components/Popup.js.map +1 -0
- package/dist/module/components/PopupMenu.js +119 -0
- package/dist/module/components/PopupMenu.js.map +1 -0
- package/dist/module/components/PositionedImage.js +313 -0
- package/dist/module/components/PositionedImage.js.map +1 -0
- package/dist/module/components/ProfilePic.js +106 -0
- package/dist/module/components/ProfilePic.js.map +1 -0
- package/dist/module/components/RadioButton.js +77 -0
- package/dist/module/components/RadioButton.js.map +1 -0
- package/dist/module/components/Reaction.js +116 -0
- package/dist/module/components/Reaction.js.map +1 -0
- package/dist/module/components/Reactions.js +71 -0
- package/dist/module/components/Reactions.js.map +1 -0
- package/dist/module/components/SharingTools.js +154 -0
- package/dist/module/components/SharingTools.js.map +1 -0
- package/dist/module/components/Spinner.js +22 -0
- package/dist/module/components/Spinner.js.map +1 -0
- package/dist/module/components/StickyFooter.js +34 -0
- package/dist/module/components/StickyFooter.js.map +1 -0
- package/dist/module/components/TextStyle.js +45 -0
- package/dist/module/components/TextStyle.js.map +1 -0
- package/dist/module/components/Toggle.js +65 -0
- package/dist/module/components/Toggle.js.map +1 -0
- package/dist/module/components/TouchableSearchBar.js +67 -0
- package/dist/module/components/TouchableSearchBar.js.map +1 -0
- package/dist/module/components/UserListPopup.js +135 -0
- package/dist/module/components/UserListPopup.js.map +1 -0
- package/dist/module/components/UserListing.js +267 -0
- package/dist/module/components/UserListing.js.map +1 -0
- package/dist/module/components/VideoPopup.js +113 -0
- package/dist/module/components/VideoPopup.js.map +1 -0
- package/dist/module/components/WarningPopup.js +82 -0
- package/dist/module/components/WarningPopup.js.map +1 -0
- package/dist/module/components/expo-image-picker-multiple/ImageBrowser.js +289 -0
- package/dist/module/components/expo-image-picker-multiple/ImageBrowser.js.map +1 -0
- package/dist/module/components/expo-image-picker-multiple/ImageTile.js +116 -0
- package/dist/module/components/expo-image-picker-multiple/ImageTile.js.map +1 -0
- package/dist/module/components/index.js +55 -0
- package/dist/module/components/index.js.map +1 -0
- package/dist/module/components/react-native-expo-image-cropper/ExpoImageManipulator.js +385 -0
- package/dist/module/components/react-native-expo-image-cropper/ExpoImageManipulator.js.map +1 -0
- package/dist/module/components/react-native-expo-image-cropper/ImageCropOverlay.js +387 -0
- package/dist/module/components/react-native-expo-image-cropper/ImageCropOverlay.js.map +1 -0
- package/dist/module/config.js +32 -0
- package/dist/module/config.js.map +1 -0
- package/dist/module/constants.js +19 -0
- package/dist/module/constants.js.map +1 -0
- package/dist/module/fonts/index.js +2 -0
- package/dist/module/fonts/index.js.map +1 -0
- package/dist/module/fonts/pluss60-icons.js +5 -0
- package/dist/module/fonts/pluss60-icons.js.map +1 -0
- package/dist/module/fonts/pluss60-icons.json +1097 -0
- package/dist/module/helper.js +397 -0
- package/dist/module/helper.js.map +1 -0
- package/dist/module/index.js +13 -0
- package/dist/module/index.js.map +1 -0
- package/dist/module/js/images/detectFaces.js +30 -0
- package/dist/module/js/images/detectFaces.js.map +1 -0
- package/dist/module/js/images/findLandmarkRange.js +93 -0
- package/dist/module/js/images/findLandmarkRange.js.map +1 -0
- package/dist/module/js/images/getScaledOffset.js +81 -0
- package/dist/module/js/images/getScaledOffset.js.map +1 -0
- package/dist/module/js/site/getSiteLevelFromState.js +29 -0
- package/dist/module/js/site/getSiteLevelFromState.js.map +1 -0
- package/dist/module/js/site/isTVEnabled.js +10 -0
- package/dist/module/js/site/isTVEnabled.js.map +1 -0
- package/dist/module/session.js +58 -0
- package/dist/module/session.js.map +1 -0
- package/dist/module/styles.js +67 -0
- package/dist/module/styles.js.map +1 -0
- package/package.json +20 -24
- package/src/js/images/detectFaces.js +8 -4
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import Axios from 'axios';
|
|
2
|
+
import { getUrl, generateImageName, randomString } from '../helper';
|
|
3
|
+
import { authedFunction } from '../session';
|
|
4
|
+
export const fileActions = {
|
|
5
|
+
getPresignedUrl: async (filename, contentType) => {
|
|
6
|
+
// const newFilename = filename.replace(/[^a-z0-9+.]+/gi, '').toLowerCase();
|
|
7
|
+
const signedUrlRes = await authedFunction({
|
|
8
|
+
method: 'GET',
|
|
9
|
+
url: getUrl('media', 'get/presignedurl', {
|
|
10
|
+
filename,
|
|
11
|
+
contentType
|
|
12
|
+
})
|
|
13
|
+
});
|
|
14
|
+
return signedUrlRes.data;
|
|
15
|
+
},
|
|
16
|
+
getUploadUrl: (userId, fileName) => {
|
|
17
|
+
const newFilename = fileName.replace(/[^a-z0-9+.]+/gi, '').toLowerCase();
|
|
18
|
+
return `uploads/users/${userId}/public/${randomString()}/${newFilename}`;
|
|
19
|
+
},
|
|
20
|
+
uploadUserMediaWithProgress: async (blob, url, progressCallback = null) => {
|
|
21
|
+
return fileActions.uploadBlobAWS(url, blob, progressCallback);
|
|
22
|
+
},
|
|
23
|
+
imageToBlob: async imageUri => {
|
|
24
|
+
const response = await fetch(imageUri);
|
|
25
|
+
return response.blob();
|
|
26
|
+
},
|
|
27
|
+
uploadBlobAWS: async (uri, blob, progressCallback = null) => {
|
|
28
|
+
return Axios.put(uri, blob, {
|
|
29
|
+
headers: {
|
|
30
|
+
'Content-Type': blob.type
|
|
31
|
+
},
|
|
32
|
+
transformRequest: d => d,
|
|
33
|
+
onUploadProgress: progress => progressCallback && progressCallback({
|
|
34
|
+
uri,
|
|
35
|
+
loaded: progress.loaded,
|
|
36
|
+
total: progress.total,
|
|
37
|
+
percentage: `${Math.floor(progress.loaded / progress.total * 100)}%`
|
|
38
|
+
})
|
|
39
|
+
});
|
|
40
|
+
},
|
|
41
|
+
getStockPhotos: async () => {
|
|
42
|
+
const response = await authedFunction({
|
|
43
|
+
method: 'GET',
|
|
44
|
+
url: 'https://pluss60.pluss60-api.com/media-demo/library'
|
|
45
|
+
});
|
|
46
|
+
// Convert to images object
|
|
47
|
+
const images = response.data.map(image => {
|
|
48
|
+
return {
|
|
49
|
+
uri: image
|
|
50
|
+
};
|
|
51
|
+
});
|
|
52
|
+
return images;
|
|
53
|
+
},
|
|
54
|
+
getMediaFolders: site => {
|
|
55
|
+
const query = {
|
|
56
|
+
site
|
|
57
|
+
};
|
|
58
|
+
return authedFunction({
|
|
59
|
+
method: 'GET',
|
|
60
|
+
url: getUrl('media', 'folders', query)
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
// addMediaFolder: (site, name, images) => {
|
|
64
|
+
// return authedFunction({
|
|
65
|
+
// method: 'POST',
|
|
66
|
+
// url: getUrl('media', 'addFolder'),
|
|
67
|
+
// data: {
|
|
68
|
+
// site,
|
|
69
|
+
// name,
|
|
70
|
+
// images,
|
|
71
|
+
// },
|
|
72
|
+
// });
|
|
73
|
+
// },
|
|
74
|
+
// addImagesToFolder: (id, site, images) => {
|
|
75
|
+
// return authedFunction({
|
|
76
|
+
// method: 'POST',
|
|
77
|
+
// url: getUrl('media', 'addImages'),
|
|
78
|
+
// data: {
|
|
79
|
+
// id,
|
|
80
|
+
// site,
|
|
81
|
+
// images,
|
|
82
|
+
// },
|
|
83
|
+
// });
|
|
84
|
+
// },
|
|
85
|
+
};
|
|
86
|
+
//# sourceMappingURL=fileActions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["Axios","getUrl","generateImageName","randomString","authedFunction","fileActions","getPresignedUrl","filename","contentType","signedUrlRes","method","url","data","getUploadUrl","userId","fileName","newFilename","replace","toLowerCase","uploadUserMediaWithProgress","blob","progressCallback","uploadBlobAWS","imageToBlob","imageUri","response","fetch","uri","put","headers","type","transformRequest","d","onUploadProgress","progress","loaded","total","percentage","Math","floor","getStockPhotos","images","map","image","getMediaFolders","site","query"],"sources":["fileActions.js"],"sourcesContent":["import Axios from 'axios';\nimport { getUrl, generateImageName, randomString } from '../helper';\nimport { authedFunction } from '../session';\n\nexport const fileActions = {\n getPresignedUrl: async (filename, contentType) => {\n // const newFilename = filename.replace(/[^a-z0-9+.]+/gi, '').toLowerCase();\n const signedUrlRes = await authedFunction({\n method: 'GET',\n url: getUrl('media', 'get/presignedurl', { filename, contentType }),\n });\n return signedUrlRes.data;\n },\n getUploadUrl: (userId, fileName) => {\n const newFilename = fileName.replace(/[^a-z0-9+.]+/gi, '').toLowerCase();\n return `uploads/users/${userId}/public/${randomString()}/${newFilename}`;\n },\n uploadUserMediaWithProgress: async (blob, url, progressCallback = null) => {\n return fileActions.uploadBlobAWS(url, blob, progressCallback);\n },\n imageToBlob: async imageUri => {\n const response = await fetch(imageUri);\n return response.blob();\n },\n uploadBlobAWS: async (uri, blob, progressCallback = null) => {\n return Axios.put(uri, blob, {\n headers: {\n 'Content-Type': blob.type,\n },\n transformRequest: d => d,\n onUploadProgress: progress =>\n progressCallback &&\n progressCallback({\n uri,\n loaded: progress.loaded,\n total: progress.total,\n percentage: `${Math.floor((progress.loaded / progress.total) * 100)}%`,\n }),\n });\n },\n getStockPhotos: async () => {\n const response = await authedFunction({\n method: 'GET',\n url: 'https://pluss60.pluss60-api.com/media-demo/library',\n });\n // Convert to images object\n const images = response.data.map(image => {\n return { uri: image };\n });\n return images;\n },\n getMediaFolders: site => {\n const query = { site };\n return authedFunction({\n method: 'GET',\n url: getUrl('media', 'folders', query),\n });\n },\n // addMediaFolder: (site, name, images) => {\n // return authedFunction({\n // method: 'POST',\n // url: getUrl('media', 'addFolder'),\n // data: {\n // site,\n // name,\n // images,\n // },\n // });\n // },\n // addImagesToFolder: (id, site, images) => {\n // return authedFunction({\n // method: 'POST',\n // url: getUrl('media', 'addImages'),\n // data: {\n // id,\n // site,\n // images,\n // },\n // });\n // },\n};\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,MAAM,EAAEC,iBAAiB,EAAEC,YAAY,QAAQ,WAAW;AACnE,SAASC,cAAc,QAAQ,YAAY;AAE3C,OAAO,MAAMC,WAAW,GAAG;EACzBC,eAAe,EAAE,MAAAA,CAAOC,QAAQ,EAAEC,WAAW,KAAK;IAChD;IACA,MAAMC,YAAY,GAAG,MAAML,cAAc,CAAC;MACxCM,MAAM,EAAE,KAAK;MACbC,GAAG,EAAEV,MAAM,CAAC,OAAO,EAAE,kBAAkB,EAAE;QAAEM,QAAQ;QAAEC;MAAY,CAAC;IACpE,CAAC,CAAC;IACF,OAAOC,YAAY,CAACG,IAAI;EAC1B,CAAC;EACDC,YAAY,EAAEA,CAACC,MAAM,EAAEC,QAAQ,KAAK;IAClC,MAAMC,WAAW,GAAGD,QAAQ,CAACE,OAAO,CAAC,gBAAgB,EAAE,EAAE,CAAC,CAACC,WAAW,CAAC,CAAC;IACxE,OAAQ,iBAAgBJ,MAAO,WAAUX,YAAY,CAAC,CAAE,IAAGa,WAAY,EAAC;EAC1E,CAAC;EACDG,2BAA2B,EAAE,MAAAA,CAAOC,IAAI,EAAET,GAAG,EAAEU,gBAAgB,GAAG,IAAI,KAAK;IACzE,OAAOhB,WAAW,CAACiB,aAAa,CAACX,GAAG,EAAES,IAAI,EAAEC,gBAAgB,CAAC;EAC/D,CAAC;EACDE,WAAW,EAAE,MAAMC,QAAQ,IAAI;IAC7B,MAAMC,QAAQ,GAAG,MAAMC,KAAK,CAACF,QAAQ,CAAC;IACtC,OAAOC,QAAQ,CAACL,IAAI,CAAC,CAAC;EACxB,CAAC;EACDE,aAAa,EAAE,MAAAA,CAAOK,GAAG,EAAEP,IAAI,EAAEC,gBAAgB,GAAG,IAAI,KAAK;IAC3D,OAAOrB,KAAK,CAAC4B,GAAG,CAACD,GAAG,EAAEP,IAAI,EAAE;MAC1BS,OAAO,EAAE;QACP,cAAc,EAAET,IAAI,CAACU;MACvB,CAAC;MACDC,gBAAgB,EAAEC,CAAC,IAAIA,CAAC;MACxBC,gBAAgB,EAAEC,QAAQ,IACxBb,gBAAgB,IAChBA,gBAAgB,CAAC;QACfM,GAAG;QACHQ,MAAM,EAAED,QAAQ,CAACC,MAAM;QACvBC,KAAK,EAAEF,QAAQ,CAACE,KAAK;QACrBC,UAAU,EAAG,GAAEC,IAAI,CAACC,KAAK,CAAEL,QAAQ,CAACC,MAAM,GAAGD,QAAQ,CAACE,KAAK,GAAI,GAAG,CAAE;MACtE,CAAC;IACL,CAAC,CAAC;EACJ,CAAC;EACDI,cAAc,EAAE,MAAAA,CAAA,KAAY;IAC1B,MAAMf,QAAQ,GAAG,MAAMrB,cAAc,CAAC;MACpCM,MAAM,EAAE,KAAK;MACbC,GAAG,EAAE;IACP,CAAC,CAAC;IACF;IACA,MAAM8B,MAAM,GAAGhB,QAAQ,CAACb,IAAI,CAAC8B,GAAG,CAACC,KAAK,IAAI;MACxC,OAAO;QAAEhB,GAAG,EAAEgB;MAAM,CAAC;IACvB,CAAC,CAAC;IACF,OAAOF,MAAM;EACf,CAAC;EACDG,eAAe,EAAEC,IAAI,IAAI;IACvB,MAAMC,KAAK,GAAG;MAAED;IAAK,CAAC;IACtB,OAAOzC,cAAc,CAAC;MACpBM,MAAM,EAAE,KAAK;MACbC,GAAG,EAAEV,MAAM,CAAC,OAAO,EAAE,SAAS,EAAE6C,KAAK;IACvC,CAAC,CAAC;EACJ;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;AACF,CAAC"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { getUrl, getAuthTokenHeader } from '../helper';
|
|
2
|
+
import { authedFunction } from '../session';
|
|
3
|
+
export const followerActions = {
|
|
4
|
+
addFollower: async (contact, userID) => {
|
|
5
|
+
const request = {
|
|
6
|
+
method: 'POST',
|
|
7
|
+
url: getUrl('followers', 'addFollower'),
|
|
8
|
+
data: {
|
|
9
|
+
contact,
|
|
10
|
+
userID
|
|
11
|
+
},
|
|
12
|
+
headers: {}
|
|
13
|
+
};
|
|
14
|
+
request.headers.authorization = await getAuthTokenHeader();
|
|
15
|
+
return authedFunction(request);
|
|
16
|
+
},
|
|
17
|
+
removeFollower: async (contactID, userID) => {
|
|
18
|
+
const request = {
|
|
19
|
+
method: 'POST',
|
|
20
|
+
url: getUrl('followers', 'removeFollower'),
|
|
21
|
+
data: {
|
|
22
|
+
contactID,
|
|
23
|
+
userID
|
|
24
|
+
},
|
|
25
|
+
headers: {}
|
|
26
|
+
};
|
|
27
|
+
request.headers.authorization = await getAuthTokenHeader();
|
|
28
|
+
return authedFunction(request);
|
|
29
|
+
},
|
|
30
|
+
getFollowing: async () => {
|
|
31
|
+
const request = {
|
|
32
|
+
method: 'GET',
|
|
33
|
+
url: getUrl('followers', 'getFollowing')
|
|
34
|
+
};
|
|
35
|
+
return authedFunction(request);
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
//# sourceMappingURL=followerActions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["getUrl","getAuthTokenHeader","authedFunction","followerActions","addFollower","contact","userID","request","method","url","data","headers","authorization","removeFollower","contactID","getFollowing"],"sources":["followerActions.js"],"sourcesContent":["import { getUrl, getAuthTokenHeader } from '../helper';\nimport { authedFunction } from '../session';\n\nexport const followerActions = {\n addFollower: async (contact, userID) => {\n const request = {\n method: 'POST',\n url: getUrl('followers', 'addFollower'),\n data: { contact, userID },\n headers: {},\n };\n request.headers.authorization = await getAuthTokenHeader();\n return authedFunction(request);\n },\n removeFollower: async (contactID, userID) => {\n const request = {\n method: 'POST',\n url: getUrl('followers', 'removeFollower'),\n data: { contactID, userID },\n headers: {},\n };\n request.headers.authorization = await getAuthTokenHeader();\n return authedFunction(request);\n },\n getFollowing: async () => {\n const request = {\n method: 'GET',\n url: getUrl('followers', 'getFollowing'),\n };\n return authedFunction(request);\n },\n};\n"],"mappings":"AAAA,SAASA,MAAM,EAAEC,kBAAkB,QAAQ,WAAW;AACtD,SAASC,cAAc,QAAQ,YAAY;AAE3C,OAAO,MAAMC,eAAe,GAAG;EAC7BC,WAAW,EAAE,MAAAA,CAAOC,OAAO,EAAEC,MAAM,KAAK;IACtC,MAAMC,OAAO,GAAG;MACdC,MAAM,EAAE,MAAM;MACdC,GAAG,EAAET,MAAM,CAAC,WAAW,EAAE,aAAa,CAAC;MACvCU,IAAI,EAAE;QAAEL,OAAO;QAAEC;MAAO,CAAC;MACzBK,OAAO,EAAE,CAAC;IACZ,CAAC;IACDJ,OAAO,CAACI,OAAO,CAACC,aAAa,GAAG,MAAMX,kBAAkB,CAAC,CAAC;IAC1D,OAAOC,cAAc,CAACK,OAAO,CAAC;EAChC,CAAC;EACDM,cAAc,EAAE,MAAAA,CAAOC,SAAS,EAAER,MAAM,KAAK;IAC3C,MAAMC,OAAO,GAAG;MACdC,MAAM,EAAE,MAAM;MACdC,GAAG,EAAET,MAAM,CAAC,WAAW,EAAE,gBAAgB,CAAC;MAC1CU,IAAI,EAAE;QAAEI,SAAS;QAAER;MAAO,CAAC;MAC3BK,OAAO,EAAE,CAAC;IACZ,CAAC;IACDJ,OAAO,CAACI,OAAO,CAACC,aAAa,GAAG,MAAMX,kBAAkB,CAAC,CAAC;IAC1D,OAAOC,cAAc,CAACK,OAAO,CAAC;EAChC,CAAC;EACDQ,YAAY,EAAE,MAAAA,CAAA,KAAY;IACxB,MAAMR,OAAO,GAAG;MACdC,MAAM,EAAE,KAAK;MACbC,GAAG,EAAET,MAAM,CAAC,WAAW,EAAE,cAAc;IACzC,CAAC;IACD,OAAOE,cAAc,CAACK,OAAO,CAAC;EAChC;AACF,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export * from './reactionActions';
|
|
2
|
+
export * from './fileActions';
|
|
3
|
+
export * from './followerActions';
|
|
4
|
+
export * from './contactActions';
|
|
5
|
+
export * from './eventActions';
|
|
6
|
+
export * from './analyticsActions';
|
|
7
|
+
export * from './notificationActions';
|
|
8
|
+
export * from './stringActions';
|
|
9
|
+
export * from './typeActions';
|
|
10
|
+
export { default as userActions } from './userActions';
|
|
11
|
+
export { default as profileActions } from './profileActions';
|
|
12
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["default","userActions","profileActions"],"sources":["index.js"],"sourcesContent":["export * from './reactionActions';\nexport * from './fileActions';\nexport * from './followerActions';\nexport * from './contactActions';\nexport * from './eventActions';\nexport * from './analyticsActions';\nexport * from './notificationActions';\nexport * from './stringActions';\nexport * from './typeActions';\nexport { default as userActions } from './userActions';\nexport { default as profileActions } from './profileActions';\n"],"mappings":"AAAA,cAAc,mBAAmB;AACjC,cAAc,eAAe;AAC7B,cAAc,mBAAmB;AACjC,cAAc,kBAAkB;AAChC,cAAc,gBAAgB;AAC9B,cAAc,oBAAoB;AAClC,cAAc,uBAAuB;AACrC,cAAc,iBAAiB;AAC/B,cAAc,eAAe;AAC7B,SAASA,OAAO,IAAIC,WAAW,QAAQ,eAAe;AACtD,SAASD,OAAO,IAAIE,cAAc,QAAQ,kBAAkB"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { getUrl } from '../helper';
|
|
2
|
+
import { authedFunction } from '../session';
|
|
3
|
+
export const notificationActions = {
|
|
4
|
+
getAppNotificationSetting: () => {
|
|
5
|
+
return authedFunction({
|
|
6
|
+
method: 'GET',
|
|
7
|
+
url: getUrl('notifications', 'getState/get', {
|
|
8
|
+
type: 'app'
|
|
9
|
+
})
|
|
10
|
+
});
|
|
11
|
+
},
|
|
12
|
+
muteApp: () => {
|
|
13
|
+
return authedFunction({
|
|
14
|
+
method: 'POST',
|
|
15
|
+
url: getUrl('notifications', 'updateState/mute'),
|
|
16
|
+
data: {
|
|
17
|
+
type: 'app'
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
},
|
|
21
|
+
unmuteApp: () => {
|
|
22
|
+
return authedFunction({
|
|
23
|
+
method: 'POST',
|
|
24
|
+
url: getUrl('notifications', 'updateState/unmute'),
|
|
25
|
+
data: {
|
|
26
|
+
type: 'app'
|
|
27
|
+
}
|
|
28
|
+
});
|
|
29
|
+
},
|
|
30
|
+
getEntityNotificationSetting: (type, id) => {
|
|
31
|
+
return authedFunction({
|
|
32
|
+
method: 'GET',
|
|
33
|
+
url: getUrl('notifications', 'getState/get', {
|
|
34
|
+
type,
|
|
35
|
+
id
|
|
36
|
+
})
|
|
37
|
+
});
|
|
38
|
+
},
|
|
39
|
+
muteEntity: (type, id) => {
|
|
40
|
+
return authedFunction({
|
|
41
|
+
method: 'POST',
|
|
42
|
+
url: getUrl('notifications', 'updateState/mute'),
|
|
43
|
+
data: {
|
|
44
|
+
type,
|
|
45
|
+
id
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
},
|
|
49
|
+
unmuteEntity: (type, id) => {
|
|
50
|
+
return authedFunction({
|
|
51
|
+
method: 'POST',
|
|
52
|
+
url: getUrl('notifications', 'updateState/unmute'),
|
|
53
|
+
data: {
|
|
54
|
+
type,
|
|
55
|
+
id
|
|
56
|
+
}
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
//# sourceMappingURL=notificationActions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["getUrl","authedFunction","notificationActions","getAppNotificationSetting","method","url","type","muteApp","data","unmuteApp","getEntityNotificationSetting","id","muteEntity","unmuteEntity"],"sources":["notificationActions.js"],"sourcesContent":["import { getUrl } from '../helper';\nimport { authedFunction } from '../session';\n\nexport const notificationActions = {\n getAppNotificationSetting: () => {\n return authedFunction({\n method: 'GET',\n url: getUrl('notifications', 'getState/get', {\n type: 'app',\n }),\n });\n },\n muteApp: () => {\n return authedFunction({\n method: 'POST',\n url: getUrl('notifications', 'updateState/mute'),\n data: { type: 'app' },\n });\n },\n unmuteApp: () => {\n return authedFunction({\n method: 'POST',\n url: getUrl('notifications', 'updateState/unmute'),\n data: { type: 'app' },\n });\n },\n getEntityNotificationSetting: (type, id) => {\n return authedFunction({\n method: 'GET',\n url: getUrl('notifications', 'getState/get', { type, id }),\n });\n },\n muteEntity: (type, id) => {\n return authedFunction({\n method: 'POST',\n url: getUrl('notifications', 'updateState/mute'),\n data: { type, id },\n });\n },\n unmuteEntity: (type, id) => {\n return authedFunction({\n method: 'POST',\n url: getUrl('notifications', 'updateState/unmute'),\n data: { type, id },\n });\n },\n};\n"],"mappings":"AAAA,SAASA,MAAM,QAAQ,WAAW;AAClC,SAASC,cAAc,QAAQ,YAAY;AAE3C,OAAO,MAAMC,mBAAmB,GAAG;EACjCC,yBAAyB,EAAEA,CAAA,KAAM;IAC/B,OAAOF,cAAc,CAAC;MACpBG,MAAM,EAAE,KAAK;MACbC,GAAG,EAAEL,MAAM,CAAC,eAAe,EAAE,cAAc,EAAE;QAC3CM,IAAI,EAAE;MACR,CAAC;IACH,CAAC,CAAC;EACJ,CAAC;EACDC,OAAO,EAAEA,CAAA,KAAM;IACb,OAAON,cAAc,CAAC;MACpBG,MAAM,EAAE,MAAM;MACdC,GAAG,EAAEL,MAAM,CAAC,eAAe,EAAE,kBAAkB,CAAC;MAChDQ,IAAI,EAAE;QAAEF,IAAI,EAAE;MAAM;IACtB,CAAC,CAAC;EACJ,CAAC;EACDG,SAAS,EAAEA,CAAA,KAAM;IACf,OAAOR,cAAc,CAAC;MACpBG,MAAM,EAAE,MAAM;MACdC,GAAG,EAAEL,MAAM,CAAC,eAAe,EAAE,oBAAoB,CAAC;MAClDQ,IAAI,EAAE;QAAEF,IAAI,EAAE;MAAM;IACtB,CAAC,CAAC;EACJ,CAAC;EACDI,4BAA4B,EAAEA,CAACJ,IAAI,EAAEK,EAAE,KAAK;IAC1C,OAAOV,cAAc,CAAC;MACpBG,MAAM,EAAE,KAAK;MACbC,GAAG,EAAEL,MAAM,CAAC,eAAe,EAAE,cAAc,EAAE;QAAEM,IAAI;QAAEK;MAAG,CAAC;IAC3D,CAAC,CAAC;EACJ,CAAC;EACDC,UAAU,EAAEA,CAACN,IAAI,EAAEK,EAAE,KAAK;IACxB,OAAOV,cAAc,CAAC;MACpBG,MAAM,EAAE,MAAM;MACdC,GAAG,EAAEL,MAAM,CAAC,eAAe,EAAE,kBAAkB,CAAC;MAChDQ,IAAI,EAAE;QAAEF,IAAI;QAAEK;MAAG;IACnB,CAAC,CAAC;EACJ,CAAC;EACDE,YAAY,EAAEA,CAACP,IAAI,EAAEK,EAAE,KAAK;IAC1B,OAAOV,cAAc,CAAC;MACpBG,MAAM,EAAE,MAAM;MACdC,GAAG,EAAEL,MAAM,CAAC,eAAe,EAAE,oBAAoB,CAAC;MAClDQ,IAAI,EAAE;QAAEF,IAAI;QAAEK;MAAG;IACnB,CAAC,CAAC;EACJ;AACF,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { getUrl } from '../helper';
|
|
2
|
+
import { authedFunction } from '../session';
|
|
3
|
+
const profileActions = {
|
|
4
|
+
getUserTagsBySite: site => {
|
|
5
|
+
return authedFunction({
|
|
6
|
+
method: 'GET',
|
|
7
|
+
url: getUrl('profile', 'usertags/site', {
|
|
8
|
+
site
|
|
9
|
+
})
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
};
|
|
13
|
+
export default profileActions;
|
|
14
|
+
//# sourceMappingURL=profileActions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["getUrl","authedFunction","profileActions","getUserTagsBySite","site","method","url"],"sources":["profileActions.js"],"sourcesContent":["import { getUrl } from '../helper';\nimport { authedFunction } from '../session';\n\nconst profileActions = {\n getUserTagsBySite: site => {\n return authedFunction({\n method: 'GET',\n url: getUrl('profile', 'usertags/site', { site }),\n });\n },\n};\n\nexport default profileActions;\n"],"mappings":"AAAA,SAASA,MAAM,QAAQ,WAAW;AAClC,SAASC,cAAc,QAAQ,YAAY;AAE3C,MAAMC,cAAc,GAAG;EACrBC,iBAAiB,EAAEC,IAAI,IAAI;IACzB,OAAOH,cAAc,CAAC;MACpBI,MAAM,EAAE,KAAK;MACbC,GAAG,EAAEN,MAAM,CAAC,SAAS,EAAE,eAAe,EAAE;QAAEI;MAAK,CAAC;IAClD,CAAC,CAAC;EACJ;AACF,CAAC;AAED,eAAeF,cAAc"}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import _ from 'lodash';
|
|
2
|
+
import { getUrl } from '../helper';
|
|
3
|
+
import { authedFunction } from '../session';
|
|
4
|
+
export const reactionActions = {
|
|
5
|
+
add: (entityId, entityType, reaction, site) => {
|
|
6
|
+
return authedFunction({
|
|
7
|
+
method: 'POST',
|
|
8
|
+
url: getUrl('reactions', 'add'),
|
|
9
|
+
data: {
|
|
10
|
+
entityId,
|
|
11
|
+
entityType,
|
|
12
|
+
reaction,
|
|
13
|
+
site
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
},
|
|
17
|
+
remove: (entityId, entityType, reaction) => {
|
|
18
|
+
return authedFunction({
|
|
19
|
+
method: 'POST',
|
|
20
|
+
url: getUrl('reactions', 'remove'),
|
|
21
|
+
data: {
|
|
22
|
+
entityId,
|
|
23
|
+
entityType,
|
|
24
|
+
reaction
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
},
|
|
28
|
+
addComment: (entityId, entityType, entityName, site, comment, image, parentId) => {
|
|
29
|
+
const data = {
|
|
30
|
+
entityId,
|
|
31
|
+
entityType,
|
|
32
|
+
entityName,
|
|
33
|
+
site,
|
|
34
|
+
comment,
|
|
35
|
+
parentId
|
|
36
|
+
};
|
|
37
|
+
if (!_.isEmpty(image)) data.image = image;
|
|
38
|
+
return authedFunction({
|
|
39
|
+
method: 'POST',
|
|
40
|
+
url: getUrl('reactions', 'comments/add'),
|
|
41
|
+
data
|
|
42
|
+
});
|
|
43
|
+
},
|
|
44
|
+
removeComment: id => {
|
|
45
|
+
return authedFunction({
|
|
46
|
+
method: 'POST',
|
|
47
|
+
url: getUrl('reactions', 'comments/remove'),
|
|
48
|
+
data: {
|
|
49
|
+
id
|
|
50
|
+
}
|
|
51
|
+
});
|
|
52
|
+
},
|
|
53
|
+
reportComment: id => {
|
|
54
|
+
return authedFunction({
|
|
55
|
+
method: 'POST',
|
|
56
|
+
url: getUrl('reactions', 'comments/report'),
|
|
57
|
+
data: {
|
|
58
|
+
id
|
|
59
|
+
}
|
|
60
|
+
});
|
|
61
|
+
},
|
|
62
|
+
getComments: (entityId, entityType, minTime) => {
|
|
63
|
+
const query = {
|
|
64
|
+
entityId,
|
|
65
|
+
entityType
|
|
66
|
+
};
|
|
67
|
+
if (minTime) {
|
|
68
|
+
query.minTime = minTime;
|
|
69
|
+
}
|
|
70
|
+
return authedFunction({
|
|
71
|
+
method: 'GET',
|
|
72
|
+
url: getUrl('reactions', 'comments/get', query)
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
};
|
|
76
|
+
//# sourceMappingURL=reactionActions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_","getUrl","authedFunction","reactionActions","add","entityId","entityType","reaction","site","method","url","data","remove","addComment","entityName","comment","image","parentId","isEmpty","removeComment","id","reportComment","getComments","minTime","query"],"sources":["reactionActions.js"],"sourcesContent":["import _ from 'lodash';\nimport { getUrl } from '../helper';\nimport { authedFunction } from '../session';\n\nexport const reactionActions = {\n add: (entityId, entityType, reaction, site) => {\n return authedFunction({\n method: 'POST',\n url: getUrl('reactions', 'add'),\n data: {\n entityId,\n entityType,\n reaction,\n site,\n },\n });\n },\n remove: (entityId, entityType, reaction) => {\n return authedFunction({\n method: 'POST',\n url: getUrl('reactions', 'remove'),\n data: {\n entityId,\n entityType,\n reaction,\n },\n });\n },\n addComment: (entityId, entityType, entityName, site, comment, image, parentId) => {\n const data = {\n entityId,\n entityType,\n entityName,\n site,\n comment,\n parentId,\n };\n if (!_.isEmpty(image)) data.image = image;\n return authedFunction({\n method: 'POST',\n url: getUrl('reactions', 'comments/add'),\n data,\n });\n },\n removeComment: id => {\n return authedFunction({\n method: 'POST',\n url: getUrl('reactions', 'comments/remove'),\n data: {\n id,\n },\n });\n },\n reportComment: id => {\n return authedFunction({\n method: 'POST',\n url: getUrl('reactions', 'comments/report'),\n data: {\n id,\n },\n });\n },\n getComments: (entityId, entityType, minTime) => {\n const query = {\n entityId,\n entityType,\n };\n if (minTime) {\n query.minTime = minTime;\n }\n return authedFunction({\n method: 'GET',\n url: getUrl('reactions', 'comments/get', query),\n });\n },\n};\n"],"mappings":"AAAA,OAAOA,CAAC,MAAM,QAAQ;AACtB,SAASC,MAAM,QAAQ,WAAW;AAClC,SAASC,cAAc,QAAQ,YAAY;AAE3C,OAAO,MAAMC,eAAe,GAAG;EAC7BC,GAAG,EAAEA,CAACC,QAAQ,EAAEC,UAAU,EAAEC,QAAQ,EAAEC,IAAI,KAAK;IAC7C,OAAON,cAAc,CAAC;MACpBO,MAAM,EAAE,MAAM;MACdC,GAAG,EAAET,MAAM,CAAC,WAAW,EAAE,KAAK,CAAC;MAC/BU,IAAI,EAAE;QACJN,QAAQ;QACRC,UAAU;QACVC,QAAQ;QACRC;MACF;IACF,CAAC,CAAC;EACJ,CAAC;EACDI,MAAM,EAAEA,CAACP,QAAQ,EAAEC,UAAU,EAAEC,QAAQ,KAAK;IAC1C,OAAOL,cAAc,CAAC;MACpBO,MAAM,EAAE,MAAM;MACdC,GAAG,EAAET,MAAM,CAAC,WAAW,EAAE,QAAQ,CAAC;MAClCU,IAAI,EAAE;QACJN,QAAQ;QACRC,UAAU;QACVC;MACF;IACF,CAAC,CAAC;EACJ,CAAC;EACDM,UAAU,EAAEA,CAACR,QAAQ,EAAEC,UAAU,EAAEQ,UAAU,EAAEN,IAAI,EAAEO,OAAO,EAAEC,KAAK,EAAEC,QAAQ,KAAK;IAChF,MAAMN,IAAI,GAAG;MACXN,QAAQ;MACRC,UAAU;MACVQ,UAAU;MACVN,IAAI;MACJO,OAAO;MACPE;IACF,CAAC;IACD,IAAI,CAACjB,CAAC,CAACkB,OAAO,CAACF,KAAK,CAAC,EAAEL,IAAI,CAACK,KAAK,GAAGA,KAAK;IACzC,OAAOd,cAAc,CAAC;MACpBO,MAAM,EAAE,MAAM;MACdC,GAAG,EAAET,MAAM,CAAC,WAAW,EAAE,cAAc,CAAC;MACxCU;IACF,CAAC,CAAC;EACJ,CAAC;EACDQ,aAAa,EAAEC,EAAE,IAAI;IACnB,OAAOlB,cAAc,CAAC;MACpBO,MAAM,EAAE,MAAM;MACdC,GAAG,EAAET,MAAM,CAAC,WAAW,EAAE,iBAAiB,CAAC;MAC3CU,IAAI,EAAE;QACJS;MACF;IACF,CAAC,CAAC;EACJ,CAAC;EACDC,aAAa,EAAED,EAAE,IAAI;IACnB,OAAOlB,cAAc,CAAC;MACpBO,MAAM,EAAE,MAAM;MACdC,GAAG,EAAET,MAAM,CAAC,WAAW,EAAE,iBAAiB,CAAC;MAC3CU,IAAI,EAAE;QACJS;MACF;IACF,CAAC,CAAC;EACJ,CAAC;EACDE,WAAW,EAAEA,CAACjB,QAAQ,EAAEC,UAAU,EAAEiB,OAAO,KAAK;IAC9C,MAAMC,KAAK,GAAG;MACZnB,QAAQ;MACRC;IACF,CAAC;IACD,IAAIiB,OAAO,EAAE;MACXC,KAAK,CAACD,OAAO,GAAGA,OAAO;IACzB;IACA,OAAOrB,cAAc,CAAC;MACpBO,MAAM,EAAE,KAAK;MACbC,GAAG,EAAET,MAAM,CAAC,WAAW,EAAE,cAAc,EAAEuB,KAAK;IAChD,CAAC,CAAC;EACJ;AACF,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import axios from 'axios';
|
|
2
|
+
import { authedFunction } from '../session';
|
|
3
|
+
import { getUrl } from '../helper';
|
|
4
|
+
export const stringActions = {
|
|
5
|
+
getString: (site, id, useDefault) => {
|
|
6
|
+
const url = getUrl('strings', `get/${site}_${id}`, useDefault ? {
|
|
7
|
+
useDefault
|
|
8
|
+
} : undefined);
|
|
9
|
+
return axios({
|
|
10
|
+
method: 'GET',
|
|
11
|
+
url
|
|
12
|
+
}).catch(error => {
|
|
13
|
+
console.log('getString error', error);
|
|
14
|
+
throw error;
|
|
15
|
+
});
|
|
16
|
+
},
|
|
17
|
+
setString: (site, key, value) => {
|
|
18
|
+
const url = getUrl('strings', 'set');
|
|
19
|
+
return authedFunction({
|
|
20
|
+
method: 'POST',
|
|
21
|
+
url,
|
|
22
|
+
data: {
|
|
23
|
+
site,
|
|
24
|
+
key,
|
|
25
|
+
value
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
//# sourceMappingURL=stringActions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["axios","authedFunction","getUrl","stringActions","getString","site","id","useDefault","url","undefined","method","catch","error","console","log","setString","key","value","data"],"sources":["stringActions.js"],"sourcesContent":["import axios from 'axios';\nimport { authedFunction } from '../session';\nimport { getUrl } from '../helper';\n\nexport const stringActions = {\n getString: (site, id, useDefault) => {\n const url = getUrl('strings', `get/${site}_${id}`, useDefault ? { useDefault } : undefined);\n return axios({\n method: 'GET',\n url,\n }).catch(error => {\n console.log('getString error', error);\n throw error;\n });\n },\n setString: (site, key, value) => {\n const url = getUrl('strings', 'set');\n return authedFunction({\n method: 'POST',\n url,\n data: {\n site,\n key,\n value,\n },\n });\n },\n};\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,cAAc,QAAQ,YAAY;AAC3C,SAASC,MAAM,QAAQ,WAAW;AAElC,OAAO,MAAMC,aAAa,GAAG;EAC3BC,SAAS,EAAEA,CAACC,IAAI,EAAEC,EAAE,EAAEC,UAAU,KAAK;IACnC,MAAMC,GAAG,GAAGN,MAAM,CAAC,SAAS,EAAG,OAAMG,IAAK,IAAGC,EAAG,EAAC,EAAEC,UAAU,GAAG;MAAEA;IAAW,CAAC,GAAGE,SAAS,CAAC;IAC3F,OAAOT,KAAK,CAAC;MACXU,MAAM,EAAE,KAAK;MACbF;IACF,CAAC,CAAC,CAACG,KAAK,CAACC,KAAK,IAAI;MAChBC,OAAO,CAACC,GAAG,CAAC,iBAAiB,EAAEF,KAAK,CAAC;MACrC,MAAMA,KAAK;IACb,CAAC,CAAC;EACJ,CAAC;EACDG,SAAS,EAAEA,CAACV,IAAI,EAAEW,GAAG,EAAEC,KAAK,KAAK;IAC/B,MAAMT,GAAG,GAAGN,MAAM,CAAC,SAAS,EAAE,KAAK,CAAC;IACpC,OAAOD,cAAc,CAAC;MACpBS,MAAM,EAAE,MAAM;MACdF,GAAG;MACHU,IAAI,EAAE;QACJb,IAAI;QACJW,GAAG;QACHC;MACF;IACF,CAAC,CAAC;EACJ;AACF,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { getUrl } from '../helper';
|
|
2
|
+
import { authedFunction } from '../session';
|
|
3
|
+
export const typeActions = {
|
|
4
|
+
getUserTypes: site => {
|
|
5
|
+
const url = getUrl('types', 'getusertypes');
|
|
6
|
+
return authedFunction({
|
|
7
|
+
method: 'POST',
|
|
8
|
+
url,
|
|
9
|
+
data: {
|
|
10
|
+
site
|
|
11
|
+
}
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
};
|
|
15
|
+
//# sourceMappingURL=typeActions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["getUrl","authedFunction","typeActions","getUserTypes","site","url","method","data"],"sources":["typeActions.js"],"sourcesContent":["import { getUrl } from '../helper';\nimport { authedFunction } from '../session';\n\nexport const typeActions = {\n getUserTypes: site => {\n const url = getUrl('types', 'getusertypes');\n return authedFunction({\n method: 'POST',\n url,\n data: { site },\n });\n },\n};\n"],"mappings":"AAAA,SAASA,MAAM,QAAQ,WAAW;AAClC,SAASC,cAAc,QAAQ,YAAY;AAE3C,OAAO,MAAMC,WAAW,GAAG;EACzBC,YAAY,EAAEC,IAAI,IAAI;IACpB,MAAMC,GAAG,GAAGL,MAAM,CAAC,OAAO,EAAE,cAAc,CAAC;IAC3C,OAAOC,cAAc,CAAC;MACpBK,MAAM,EAAE,MAAM;MACdD,GAAG;MACHE,IAAI,EAAE;QAAEH;MAAK;IACf,CAAC,CAAC;EACJ;AACF,CAAC"}
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
// import axios from 'axios';
|
|
2
|
+
// import Constants from 'expo-constants';
|
|
3
|
+
import { getUrl } from '../helper';
|
|
4
|
+
import { authedFunction } from '../session';
|
|
5
|
+
export default {
|
|
6
|
+
// registerUserToken: token => {
|
|
7
|
+
// return authedFunction({
|
|
8
|
+
// method: 'POST',
|
|
9
|
+
// url: getUrl('notifications', 'registerNotificationToken'),
|
|
10
|
+
// data: { token, deviceId: Constants.installationId },
|
|
11
|
+
// });
|
|
12
|
+
// },
|
|
13
|
+
// unregisterUserToken: () => {
|
|
14
|
+
// return authedFunction({
|
|
15
|
+
// method: 'POST',
|
|
16
|
+
// url: getUrl('notifications', 'unregisterNotificationToken'),
|
|
17
|
+
// data: { deviceId: Constants.installationId },
|
|
18
|
+
// });
|
|
19
|
+
// },
|
|
20
|
+
// updateProfile: input => {
|
|
21
|
+
// return authedFunction({
|
|
22
|
+
// method: 'POST',
|
|
23
|
+
// url: getUrl('users', 'updateProfile'),
|
|
24
|
+
// data: {
|
|
25
|
+
// details: input,
|
|
26
|
+
// },
|
|
27
|
+
// });
|
|
28
|
+
// },
|
|
29
|
+
getLinkedUsers: userID => {
|
|
30
|
+
return authedFunction({
|
|
31
|
+
method: 'GET',
|
|
32
|
+
url: getUrl('linkedusers', 'getLinkedTo', {
|
|
33
|
+
userID
|
|
34
|
+
})
|
|
35
|
+
});
|
|
36
|
+
},
|
|
37
|
+
getLinkedToMe: userID => {
|
|
38
|
+
return authedFunction({
|
|
39
|
+
method: 'GET',
|
|
40
|
+
url: getUrl('linkedusers', 'getLinkedToMe', {
|
|
41
|
+
userID
|
|
42
|
+
})
|
|
43
|
+
});
|
|
44
|
+
},
|
|
45
|
+
// getInviteCode: site => {
|
|
46
|
+
// return authedFunction({
|
|
47
|
+
// method: 'GET',
|
|
48
|
+
// url: getUrl('users', 'invite/get', { site }),
|
|
49
|
+
// });
|
|
50
|
+
// },
|
|
51
|
+
// generateInviteCode: site => {
|
|
52
|
+
// return authedFunction({
|
|
53
|
+
// method: 'POST',
|
|
54
|
+
// url: getUrl('users', 'invite/generate'),
|
|
55
|
+
// data: {
|
|
56
|
+
// site,
|
|
57
|
+
// },
|
|
58
|
+
// });
|
|
59
|
+
// },
|
|
60
|
+
// validateInviteCode: code => {
|
|
61
|
+
// return axios({
|
|
62
|
+
// method: 'POST',
|
|
63
|
+
// url: getUrl('users', 'invite/validate'),
|
|
64
|
+
// data: {
|
|
65
|
+
// code,
|
|
66
|
+
// },
|
|
67
|
+
// }).catch(error => {
|
|
68
|
+
// console.log('validateInviteCode error', error);
|
|
69
|
+
// throw error;
|
|
70
|
+
// });
|
|
71
|
+
// },
|
|
72
|
+
// signUpViaInviteCode: (user, code, info) => {
|
|
73
|
+
// return axios({
|
|
74
|
+
// method: 'POST',
|
|
75
|
+
// url: getUrl('users', 'invite/signup'),
|
|
76
|
+
// data: {
|
|
77
|
+
// user,
|
|
78
|
+
// code,
|
|
79
|
+
// info,
|
|
80
|
+
// },
|
|
81
|
+
// }).catch(error => {
|
|
82
|
+
// console.log('signUpViaInviteCode error', error);
|
|
83
|
+
// throw error;
|
|
84
|
+
// });
|
|
85
|
+
// },
|
|
86
|
+
getSiteUsers: site => {
|
|
87
|
+
return authedFunction({
|
|
88
|
+
method: 'GET',
|
|
89
|
+
url: getUrl('users', 'getsite', {
|
|
90
|
+
site
|
|
91
|
+
})
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
// getUsers: site => {
|
|
95
|
+
// return authedFunction({
|
|
96
|
+
// method: 'POST',
|
|
97
|
+
// url: getUrl('users', 'get'),
|
|
98
|
+
// data: {
|
|
99
|
+
// site,
|
|
100
|
+
// },
|
|
101
|
+
// });
|
|
102
|
+
// },
|
|
103
|
+
};
|
|
104
|
+
//# sourceMappingURL=userActions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["getUrl","authedFunction","getLinkedUsers","userID","method","url","getLinkedToMe","getSiteUsers","site"],"sources":["userActions.js"],"sourcesContent":["// import axios from 'axios';\n// import Constants from 'expo-constants';\nimport { getUrl } from '../helper';\nimport { authedFunction } from '../session';\n\nexport default {\n // registerUserToken: token => {\n // return authedFunction({\n // method: 'POST',\n // url: getUrl('notifications', 'registerNotificationToken'),\n // data: { token, deviceId: Constants.installationId },\n // });\n // },\n // unregisterUserToken: () => {\n // return authedFunction({\n // method: 'POST',\n // url: getUrl('notifications', 'unregisterNotificationToken'),\n // data: { deviceId: Constants.installationId },\n // });\n // },\n // updateProfile: input => {\n // return authedFunction({\n // method: 'POST',\n // url: getUrl('users', 'updateProfile'),\n // data: {\n // details: input,\n // },\n // });\n // },\n getLinkedUsers: userID => {\n return authedFunction({\n method: 'GET',\n url: getUrl('linkedusers', 'getLinkedTo', { userID }),\n });\n },\n getLinkedToMe: userID => {\n return authedFunction({\n method: 'GET',\n url: getUrl('linkedusers', 'getLinkedToMe', { userID }),\n });\n },\n // getInviteCode: site => {\n // return authedFunction({\n // method: 'GET',\n // url: getUrl('users', 'invite/get', { site }),\n // });\n // },\n // generateInviteCode: site => {\n // return authedFunction({\n // method: 'POST',\n // url: getUrl('users', 'invite/generate'),\n // data: {\n // site,\n // },\n // });\n // },\n // validateInviteCode: code => {\n // return axios({\n // method: 'POST',\n // url: getUrl('users', 'invite/validate'),\n // data: {\n // code,\n // },\n // }).catch(error => {\n // console.log('validateInviteCode error', error);\n // throw error;\n // });\n // },\n // signUpViaInviteCode: (user, code, info) => {\n // return axios({\n // method: 'POST',\n // url: getUrl('users', 'invite/signup'),\n // data: {\n // user,\n // code,\n // info,\n // },\n // }).catch(error => {\n // console.log('signUpViaInviteCode error', error);\n // throw error;\n // });\n // },\n getSiteUsers: site => {\n return authedFunction({\n method: 'GET',\n url: getUrl('users', 'getsite', { site }),\n });\n },\n // getUsers: site => {\n // return authedFunction({\n // method: 'POST',\n // url: getUrl('users', 'get'),\n // data: {\n // site,\n // },\n // });\n // },\n};\n"],"mappings":"AAAA;AACA;AACA,SAASA,MAAM,QAAQ,WAAW;AAClC,SAASC,cAAc,QAAQ,YAAY;AAE3C,eAAe;EACb;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACAC,cAAc,EAAEC,MAAM,IAAI;IACxB,OAAOF,cAAc,CAAC;MACpBG,MAAM,EAAE,KAAK;MACbC,GAAG,EAAEL,MAAM,CAAC,aAAa,EAAE,aAAa,EAAE;QAAEG;MAAO,CAAC;IACtD,CAAC,CAAC;EACJ,CAAC;EACDG,aAAa,EAAEH,MAAM,IAAI;IACvB,OAAOF,cAAc,CAAC;MACpBG,MAAM,EAAE,KAAK;MACbC,GAAG,EAAEL,MAAM,CAAC,aAAa,EAAE,eAAe,EAAE;QAAEG;MAAO,CAAC;IACxD,CAAC,CAAC;EACJ,CAAC;EACD;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACAI,YAAY,EAAEC,IAAI,IAAI;IACpB,OAAOP,cAAc,CAAC;MACpBG,MAAM,EAAE,KAAK;MACbC,GAAG,EAAEL,MAAM,CAAC,OAAO,EAAE,SAAS,EAAE;QAAEQ;MAAK,CAAC;IAC1C,CAAC,CAAC;EACJ;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;AACF,CAAC"}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|