@stackfactor/client-api 1.0.23 → 1.0.25

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/index.js CHANGED
@@ -41,8 +41,8 @@ module.exports = {
41
41
  groups,
42
42
  learningContent,
43
43
  logger,
44
- RESONSE_TYPE: constants.RESONSE_TYPE,
45
- responseType: axios.responseType,
44
+ PERMISIONS: constants.PERMISIONS,
45
+ responseType: constants.RESONSE_TYPE,
46
46
  role,
47
47
  roleTemplate,
48
48
  shouldReturnError: axios.shouldReturnError,
package/lib/axios.js CHANGED
@@ -67,145 +67,6 @@ module.exports = {
67
67
  };
68
68
  },
69
69
 
70
- responseType: {
71
- /**
72
- * The requested resource corresponds to any one of a set of representations, each with its own specific location.
73
- */
74
- MULTIPLE_CHOICES: 300,
75
- /**
76
- * The resource has moved permanently. Please refer to the documentation.
77
- */
78
- MOVED_PERMANENTLY: 301,
79
- /**
80
- * The resource has moved temporarily. Please refer to the documentation.
81
- */
82
- FOUND: 302,
83
- /**
84
- * The resource can be found under a different URI.
85
- */
86
- SEE_OTHER: 303,
87
- /**
88
- * The resource is available and not modified.
89
- */
90
- NOT_MODIFIED: 304,
91
- /**
92
- * The requested resource must be accessed through the proxy given by the Location field.
93
- */
94
- USE_PROXY: 305,
95
- /**
96
- * The resource resides temporarily under a different URI.
97
- */
98
- TEMPORARY_REDIRECT: 307,
99
- /**
100
- * Invalid syntax for this request was provided.
101
- */
102
- BAD_REQUEST: 400,
103
- /**
104
- * You are unauthorized to access the requested resource. Please log in.
105
- */
106
- UNAUTHORIZED: 401,
107
- /**
108
- * Your account is not authorized to access the requested resource.
109
- */
110
- FORBIDDEN: 403,
111
- /**
112
- * We could not find the resource you requested. Please refer to the documentation for the list of resources.
113
- */
114
- NOT_FOUND: 404,
115
- /**
116
- * This method type is not currently supported.
117
- */
118
- METHOD_NOT_ALLOWED: 405,
119
- /**
120
- * Acceptance header is invalid for this endpoint resource.
121
- */
122
- NOT_ACCEPTABLE: 406,
123
- /**
124
- * Authentication with proxy is required.
125
- */
126
- PROXY_AUTHENTICATION_REQUIRED: 407,
127
- /**
128
- * Client did not produce a request within the time that the server was prepared to wait.
129
- */
130
- REQUEST_TIMEOUT: 408,
131
- /**
132
- * The request could not be completed due to a conflict with the current state of the resource.
133
- */
134
- CONFLICT: 409,
135
- /**
136
- * The requested resource is no longer available and has been permanently removed.
137
- */
138
- GONE: 410,
139
- /**
140
- * Length of the content is required, please include it with the request.
141
- */
142
- LENGTH_REQUIRED: 411,
143
- /**
144
- * The request did not match the pre-conditions of the requested resource.
145
- */
146
- PRECONDITION_FAILED: 412,
147
- /**
148
- * The request entity is larger than the server is willing or able to process.
149
- */
150
- REQUEST_ENTITY_TOO_LARGE: 413,
151
- /**
152
- * The request URI is longer than the server is willing to interpret.
153
- */
154
- REQUEST_URI_TOO_LONG: 414,
155
- /**
156
- * The requested resource does not support the media type provided.
157
- */
158
- UNSUPPORTED_MEDIA_TYPE: 415,
159
- /**
160
- * The requested range for the resource is not available.
161
- */
162
- REQUESTED_RANGE_NOT_SATISFIABLE: 416,
163
- /**
164
- * Unable to meet the expectation given in the Expect request header.
165
- */
166
- EXPECTATION_FAILED: 417,
167
- /**
168
- * The requested resource is missing required arguments.
169
- */
170
- MISSING_ARGUMENTS: 419,
171
- /**
172
- * The requested resource does not support one or more of the given parameters.
173
- */
174
- INVALID_ARGUMENTS: 420,
175
- /**
176
- * The request was well-formed but was unable to be followed due to semantic errors.
177
- */
178
- UNPROCESSABLE_ENTITY: 422,
179
- /**
180
- * Unexpected internal server error.
181
- */
182
- INTERNAL_SERVER_ERROR: 500,
183
- /**
184
- * The requested resource is recognized but not implemented.
185
- */
186
- NOT_IMPLEMENTED: 501,
187
- /**
188
- * Invalid response received when acting as a proxy or gateway.
189
- */
190
- BAD_GATEWAY: 502,
191
- /**
192
- * The server is currently unavailable.
193
- */
194
- SERVICE_UNAVAILABLE: 503,
195
- /**
196
- * Did not receive a timely response from upstream server while acting as a gateway or proxy.
197
- */
198
- GATEWAY_TIMEOUT: 504,
199
- /**
200
- * The HTTP protocol version used in the request message is not supported.
201
- */
202
- HTTP_VERSION_NOT_SUPPORTED: 505,
203
- /**
204
- * A failure occurred during initialization of services. API will be unavailable.
205
- */
206
- INITIALIZATION_FAILURE: 550,
207
- },
208
-
209
70
  /**
210
71
  * Returns true if an exception should be handled to the business and presentation layer
211
72
  * @param {Boolean} returnAllExceptions - If set true all exceptions will be passed
package/lib/constants.js CHANGED
@@ -74,7 +74,27 @@ const RESPONSE_TYPE = {
74
74
  INITIALIZATION_FAILURE: 550,
75
75
  };
76
76
 
77
+ const PERMISIONS = {
78
+ ADMIN_AUTHOR_CONTENT: "5ea3d1152839450e16e72bba",
79
+ ADMIN_PROMOTE_CONTENT: "5ea3d10bea252025c8ec351b",
80
+ ADMIN_MANAGE_CONTENT_PROVIDERS: "61970935cee185acf08111f6",
81
+ AUTHOR_CONTENT: "5fac210560e43de7c6b4a208",
82
+ MANAGE_BILLING: "5e1570cd03f676213bfdcd08",
83
+ MANAGE_CONTENT_PROVIDERS: "5f0fa12f16a720fde58ea820",
84
+ MANAGE_GROUPS: "5dd612fe59e518ac87b8cf8e",
85
+ MANAGE_OWN_PROFILE_INFORMATION_AUTO_APP: "5fac210e7e6539d37a897c94",
86
+ MANAGE_ORGANIZATION_INFORMATION: "5dd612d5338ea9a6ae6326da",
87
+ MANAGE_OWN_SKILL_SET_AUTO_APPROVE: "5fac21164351c6727a34cd4e",
88
+ MANAGE_SETTINGS: "5e1570e087d836dc77888a5f",
89
+ MANAGE_TEAM_INFORMATION_AUTO_APPROVE: "5fac211e6c8f874bd7137b98",
90
+ MANAGE_TEAMS: "5dd61314afc2455a89b1a37b",
91
+ MANAGE_USERS: "5dd612e40f0bc559c41a2b29",
92
+ PROMOTE_CONTENT: "5fac2126427ce31f8a92c0cb",
93
+ MANAGE_PLAN_TEMPLATES: "5dd61305a73c68b44c3f0827",
94
+ };
95
+
77
96
  module.exports = {
78
97
  DOCUMENT_VERSION: DOCUMENT_VERSION,
98
+ PERMISIONS: PERMISIONS,
79
99
  RESPONSE_TYPE: RESPONSE_TYPE,
80
100
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stackfactor/client-api",
3
- "version": "1.0.23",
3
+ "version": "1.0.25",
4
4
  "description": "Node.js library for the StackFactor API",
5
5
  "main": "index.js",
6
6
  "exports": {