-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathactionCreators.js
More file actions
180 lines (152 loc) · 3.34 KB
/
actionCreators.js
File metadata and controls
180 lines (152 loc) · 3.34 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
import * as ActionTypes from './actionTypes'
export function hello () {
return { type: ActionTypes.HELLO_REQUESTED }
}
export function bye (session) {
return { type: ActionTypes.BYE_REQUESTED, session }
}
export function fetchPerson (id) {
return { type: ActionTypes.FETCH_PERSON_REQUESTED, id }
}
export function fetchPeople () {
return { type: ActionTypes.FETCH_PEOPLE_REQUESTED }
}
export function fetchPlaces () {
return { type: ActionTypes.FETCH_PLACES_REQUESTED }
}
export function fetchStates () {
return { type: ActionTypes.FETCH_STATES_REQUESTED }
}
export function fetchMunicipalities (stateId) {
return {
type: ActionTypes.FETCH_MUNICIPALITIES_REQUESTED,
stateId
}
}
export function fetchReviews () {
return { type: ActionTypes.FETCH_REVIEWS_REQUESTED }
}
export function fetchMatchings () {
return { type: ActionTypes.FETCH_MATCHINGS_REQUESTED }
}
export function fetchCategories () {
return { type: ActionTypes.FETCH_CATEGORIES_REQUESTED }
}
export function fetchProjects () {
return { type: ActionTypes.FETCH_PROJECTS_REQUESTED }
}
export function saveProject (project, image) {
return {
type: ActionTypes.SAVE_PROJECT_REQUESTED,
project,
image
}
}
export function savePerson (person, image) {
return {
type: ActionTypes.SAVE_PERSON_REQUESTED,
person,
image
}
}
export function fetchIntents () {
return { type: ActionTypes.FETCH_INTENTS_REQUESTED }
}
export function saveIntent (intent, image) {
return {
type: ActionTypes.SAVE_INTENT_REQUESTED,
intent,
image
}
}
export function follow (person, project) {
return {
type: ActionTypes.FOLLOW_REQUESTED,
following: {
type: 'Following',
person: person._id,
project: project._id
}
}
}
export function unfollow (following) {
return {
type: ActionTypes.UNFOLLOW_REQUESTED,
following
}
}
export function favor (person, intent) {
return {
type: ActionTypes.FAVOR_REQUESTED,
favoring: {
type: 'Favoring',
person: person._id,
intent: intent._id
}
}
}
export function unfavor (favoring) {
return {
type: ActionTypes.UNFAVOR_REQUESTED,
favoring
}
}
export function match (matching) {
return {
type: ActionTypes.MATCH_REQUESTED,
matching
}
}
export function saveConversation (conversation) {
return {
type: ActionTypes.SAVE_CONVERSATION_REQUESTED,
conversation
}
}
export function fetchMyConversations (person) {
return {
type: ActionTypes.FETCH_MY_CONVERSATIONS_REQUESTED,
person
}
}
export function fetchNotifications (person) {
return {
type: ActionTypes.FETCH_NOTIFICATIONS_REQUESTED,
person
}
}
export function addMessage (message) {
return {
type: ActionTypes.ADD_MESSAGE_REQUESTED,
message
}
}
export function addReview (review) {
return {
type: ActionTypes.ADD_REVIEW_REQUESTED,
review
}
}
export function saveSubscription (details, person) {
return {
type: ActionTypes.SAVE_SUBSCRIPTION_REQUESTED,
subscription: {
type: 'Subscription',
endpoint: details.endpoint,
keys: details.keys,
person: person._id
}
}
}
export function savePlace (place) {
return {
type: ActionTypes.SAVE_PLACE_REQUESTED,
place
}
}
export function saveNotification (notification) {
return {
type: ActionTypes.SAVE_NOTIFICATION_REQUESTED,
notification
}
}