@castleio/sdk 2.2.1 → 2.3.1
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/CHANGELOG.md +87 -62
- package/README.md +14 -15
- package/dist/package.json +28 -25
- package/dist/src/Castle.d.ts +8 -1
- package/dist/src/Castle.js +43 -8
- package/dist/src/Castle.js.map +1 -1
- package/dist/src/api/services/api-authenticate.service.js.map +1 -1
- package/dist/src/api/services/api-batch-upsert-list-items.service.d.ts +5 -0
- package/dist/src/api/services/api-batch-upsert-list-items.service.js +26 -0
- package/dist/src/api/services/api-batch-upsert-list-items.service.js.map +1 -0
- package/dist/src/api/services/api-count-list-items.service.d.ts +5 -0
- package/dist/src/api/services/api-count-list-items.service.js +26 -0
- package/dist/src/api/services/api-count-list-items.service.js.map +1 -0
- package/dist/src/api/services/api-delete-user-data.service.d.ts +5 -0
- package/dist/src/api/services/api-delete-user-data.service.js +26 -0
- package/dist/src/api/services/api-delete-user-data.service.js.map +1 -0
- package/dist/src/api/services/api-filter.service.js.map +1 -1
- package/dist/src/api/services/api-get-events-schema.service.d.ts +5 -0
- package/dist/src/api/services/api-get-events-schema.service.js +26 -0
- package/dist/src/api/services/api-get-events-schema.service.js.map +1 -0
- package/dist/src/api/services/api-group-events.service.d.ts +5 -0
- package/dist/src/api/services/api-group-events.service.js +26 -0
- package/dist/src/api/services/api-group-events.service.js.map +1 -0
- package/dist/src/api/services/api-request-user-data.service.d.ts +5 -0
- package/dist/src/api/services/api-request-user-data.service.js +26 -0
- package/dist/src/api/services/api-request-user-data.service.js.map +1 -0
- package/dist/src/api/services/api-risk.service.js.map +1 -1
- package/dist/src/api/services/api-search-events.service.d.ts +5 -0
- package/dist/src/api/services/api-search-events.service.js +26 -0
- package/dist/src/api/services/api-search-events.service.js.map +1 -0
- package/dist/src/api/services/api.service.js +1 -1
- package/dist/src/api/services/api.service.js.map +1 -1
- package/dist/src/api/services/index.d.ts +7 -0
- package/dist/src/api/services/index.js +7 -0
- package/dist/src/api/services/index.js.map +1 -1
- package/dist/src/command/services/command-batch-upsert-list-items.service.d.ts +16 -0
- package/dist/src/command/services/command-batch-upsert-list-items.service.js +12 -0
- package/dist/src/command/services/command-batch-upsert-list-items.service.js.map +1 -0
- package/dist/src/command/services/command-count-list-items.service.d.ts +16 -0
- package/dist/src/command/services/command-count-list-items.service.js +12 -0
- package/dist/src/command/services/command-count-list-items.service.js.map +1 -0
- package/dist/src/command/services/command-delete-user-data.service.d.ts +16 -0
- package/dist/src/command/services/command-delete-user-data.service.js +10 -0
- package/dist/src/command/services/command-delete-user-data.service.js.map +1 -0
- package/dist/src/command/services/command-generate.service.d.ts +3 -2
- package/dist/src/command/services/command-generate.service.js.map +1 -1
- package/dist/src/command/services/command-get-events-schema.service.d.ts +15 -0
- package/dist/src/command/services/command-get-events-schema.service.js +10 -0
- package/dist/src/command/services/command-get-events-schema.service.js.map +1 -0
- package/dist/src/command/services/command-group-events.service.d.ts +16 -0
- package/dist/src/command/services/command-group-events.service.js +10 -0
- package/dist/src/command/services/command-group-events.service.js.map +1 -0
- package/dist/src/command/services/command-request-user-data.service.d.ts +16 -0
- package/dist/src/command/services/command-request-user-data.service.js +10 -0
- package/dist/src/command/services/command-request-user-data.service.js.map +1 -0
- package/dist/src/command/services/command-search-events.service.d.ts +16 -0
- package/dist/src/command/services/command-search-events.service.js +10 -0
- package/dist/src/command/services/command-search-events.service.js.map +1 -0
- package/dist/src/command/services/index.d.ts +7 -0
- package/dist/src/command/services/index.js +7 -0
- package/dist/src/command/services/index.js.map +1 -1
- package/dist/src/configuration.js.map +1 -1
- package/dist/src/context/services/context-get-default.service.js.map +1 -1
- package/dist/src/context/services/context-prepare.service.d.ts +1 -1
- package/dist/src/context/services/context-sanitize.service.d.ts +1 -1
- package/dist/src/context/services/context-sanitize.service.js.map +1 -1
- package/dist/src/core/services/core-process-response.service.js +3 -1
- package/dist/src/core/services/core-process-response.service.js.map +1 -1
- package/dist/src/errors.d.ts +3 -0
- package/dist/src/errors.js +8 -1
- package/dist/src/errors.js.map +1 -1
- package/dist/src/failover/models/failover-strategy.js +1 -1
- package/dist/src/failover/models/failover-strategy.js.map +1 -1
- package/dist/src/headers/services/headers-extract.service.d.ts +1 -2
- package/dist/src/headers/services/headers-extract.service.js.map +1 -1
- package/dist/src/headers/services/headers-get-cookie.service.js.map +1 -1
- package/dist/src/ips/services/ips-extract.service.js.map +1 -1
- package/dist/src/logger/services/logger.service.js +1 -1
- package/dist/src/logger/services/logger.service.js.map +1 -1
- package/dist/src/models/action.js +1 -1
- package/dist/src/models/action.js.map +1 -1
- package/dist/src/models/events.d.ts +1 -1
- package/dist/src/models/events.js +3 -3
- package/dist/src/models/events.js.map +1 -1
- package/dist/src/payload/models/event_payload.d.ts +89 -0
- package/dist/src/payload/models/event_payload.js +29 -0
- package/dist/src/payload/models/event_payload.js.map +1 -0
- package/dist/src/payload/models/event_response.d.ts +346 -0
- package/dist/src/payload/models/event_response.js +51 -0
- package/dist/src/payload/models/event_response.js.map +1 -0
- package/dist/src/payload/models/filter_payload.d.ts +33 -11
- package/dist/src/payload/models/index.d.ts +3 -0
- package/dist/src/payload/models/index.js +3 -0
- package/dist/src/payload/models/index.js.map +1 -1
- package/dist/src/payload/models/list_item_payload.d.ts +16 -2
- package/dist/src/payload/models/log_payload.d.ts +0 -1
- package/dist/src/payload/models/payload.d.ts +0 -1
- package/dist/src/payload/models/privacy_payload.d.ts +8 -0
- package/dist/src/payload/models/privacy_payload.js +3 -0
- package/dist/src/payload/models/privacy_payload.js.map +1 -0
- package/dist/src/payload/models/risk_payload.d.ts +33 -9
- package/dist/src/payload/services/payload-prepare-service.d.ts +1 -0
- package/dist/src/validator/services/validator-present.service.js.map +1 -1
- package/package.json +28 -25
package/CHANGELOG.md
CHANGED
|
@@ -1,9 +1,32 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## Unreleased
|
|
4
|
+
|
|
5
|
+
## 2.3.1
|
|
6
|
+
|
|
7
|
+
- [#168](https://github.com/castle/castle-node/pull/168)
|
|
8
|
+
- make request_token and context optional based on skip parameters
|
|
9
|
+
- [#176](https://github.com/castle/castle-node/pull/176)
|
|
10
|
+
- support for POST events/query
|
|
11
|
+
- [#180](https://github.com/castle/castle-node/pull/180)
|
|
12
|
+
- Introduce APIs:
|
|
13
|
+
- events/schema, events/group
|
|
14
|
+
- POST privacy/users, DELETE privacy/users
|
|
15
|
+
- lists/:id/items/batch, lists/:id/items/count
|
|
16
|
+
|
|
17
|
+
## 2.2.2
|
|
18
|
+
|
|
19
|
+
- [#164](https://github.com/castle/castle-node/pull/164)
|
|
20
|
+
- handle rate limiting and general API errors
|
|
21
|
+
- [#159](https://github.com/castle/castle-node/pull/159)
|
|
22
|
+
- fix failed event status name
|
|
23
|
+
- [#160](https://github.com/castle/castle-node/pull/160) [#161](https://github.com/castle/castle-node/pull/161) [#162](https://github.com/castle/castle-node/pull/162) [#163](https://github.com/castle/castle-node/pull/163) [#165](https://github.com/castle/castle-node/pull/165)
|
|
24
|
+
- Bump dependencies
|
|
25
|
+
|
|
3
26
|
## 2.2.1
|
|
4
27
|
|
|
5
28
|
- [#157](https://github.com/castle/castle-node/pull/157)
|
|
6
|
-
|
|
29
|
+
- exposed more data types publicly
|
|
7
30
|
|
|
8
31
|
## 2.2.0
|
|
9
32
|
|
|
@@ -11,158 +34,160 @@
|
|
|
11
34
|
- [#152](https://github.com/castle/castle-node/pull/152)
|
|
12
35
|
- [#151](https://github.com/castle/castle-node/pull/151)
|
|
13
36
|
- [#150](https://github.com/castle/castle-node/pull/150)
|
|
14
|
-
|
|
37
|
+
- added more typings, consts and added List API
|
|
15
38
|
|
|
16
39
|
- [#154](https://github.com/castle/castle-node/pull/154)
|
|
17
40
|
- [#153](https://github.com/castle/castle-node/pull/153)
|
|
18
|
-
|
|
41
|
+
- dependencies bumps, removed express.js dependency
|
|
19
42
|
|
|
20
43
|
## 2.1.1
|
|
21
44
|
|
|
22
45
|
- [#146](https://github.com/castle/castle-node/pull/146)
|
|
23
|
-
|
|
46
|
+
- add and expose more typings
|
|
24
47
|
|
|
25
48
|
- [#147](https://github.com/castle/castle-node/pull/147)
|
|
26
|
-
|
|
49
|
+
- internal dependencies bumps
|
|
27
50
|
|
|
28
51
|
## 2.1.0
|
|
29
52
|
|
|
30
53
|
- [#142](https://github.com/castle/castle-node/pull/142)
|
|
31
|
-
|
|
54
|
+
- dependencies updates
|
|
32
55
|
|
|
33
56
|
- [#143](https://github.com/castle/castle-node/pull/143)
|
|
34
57
|
- [#144](https://github.com/castle/castle-node/pull/144)
|
|
35
|
-
|
|
58
|
+
- updated definitions to match API schema
|
|
36
59
|
|
|
37
60
|
## 2.0.1
|
|
38
61
|
|
|
39
62
|
- [#140](https://github.com/castle/castle-node/pull/140)
|
|
40
63
|
- [#138](https://github.com/castle/castle-node/pull/138)
|
|
41
|
-
|
|
64
|
+
- dependencies and readme updates
|
|
42
65
|
|
|
43
66
|
## 2.0.0
|
|
44
67
|
|
|
45
68
|
**BREAKING CHANGES:**
|
|
46
69
|
|
|
47
70
|
- [#135](https://github.com/castle/castle-node/pull/135)
|
|
48
|
-
|
|
71
|
+
- removed auto context building from the command payload generation. Follow https://docs.castle.io/ for passing the context to the commands. This version does not build context when castle commands are called. `ContextPrepareService` should be used explicitly.
|
|
49
72
|
|
|
50
73
|
**Enhancements**
|
|
51
74
|
|
|
52
75
|
- allowed to import errors classes and constants
|
|
53
76
|
|
|
54
77
|
- [#136](https://github.com/castle/castle-node/pull/136)
|
|
55
|
-
|
|
56
|
-
|
|
78
|
+
- fixes inconsistencies regarding failover responses between the commands
|
|
79
|
+
- removed unused code
|
|
57
80
|
|
|
58
81
|
## 1.2.0
|
|
59
82
|
|
|
60
83
|
**BugFix:**
|
|
61
84
|
|
|
62
85
|
- [#132](https://github.com/castle/castle-node/pull/132)
|
|
63
|
-
|
|
64
|
-
|
|
86
|
+
- fixed how options in the context prepare are merged
|
|
87
|
+
- changed/fixed how payload prepare options are merge
|
|
65
88
|
|
|
66
89
|
**Enhancements**
|
|
67
90
|
|
|
68
91
|
- [#133](https://github.com/castle/castle-node/pull/133)
|
|
69
|
-
|
|
92
|
+
- increased default timeout from 1000 to 1500
|
|
70
93
|
- [#133](https://github.com/castle/castle-node/pull/133)
|
|
71
|
-
|
|
94
|
+
- exposed ContextPrepareService
|
|
72
95
|
|
|
73
96
|
## 1.1.1
|
|
74
97
|
|
|
75
98
|
**Enhancements**
|
|
76
99
|
|
|
77
100
|
- [#131](https://github.com/castle/castle-node/pull/131)
|
|
78
|
-
|
|
101
|
+
- failover response enhancement, removed X-Castle header from allowlist
|
|
79
102
|
|
|
80
103
|
## 1.1.0
|
|
81
104
|
|
|
82
105
|
**Enhancements**
|
|
83
106
|
|
|
84
107
|
- [#127](https://github.com/castle/castle-node/pull/127)
|
|
85
|
-
|
|
108
|
+
- Introduce a new exception `InvalidRequestTokenError` for facilitating handling of all request token related errors
|
|
86
109
|
|
|
87
110
|
## 1.0.3
|
|
88
111
|
|
|
89
112
|
**BugFix:**
|
|
90
113
|
|
|
91
114
|
- [#120](https://github.com/castle/castle-node/pull/120)
|
|
92
|
-
|
|
115
|
+
- removes body in request for GET requests
|
|
93
116
|
|
|
94
117
|
## 1.0.2
|
|
95
118
|
|
|
96
119
|
**BugFix:**
|
|
97
120
|
|
|
98
121
|
- [#119](https://github.com/castle/castle-node/pull/119)
|
|
99
|
-
|
|
122
|
+
- fixed path resolving
|
|
100
123
|
|
|
101
124
|
## 1.0.1
|
|
102
125
|
|
|
103
126
|
**Enhancements:**
|
|
104
127
|
|
|
105
128
|
- [#117](https://github.com/castle/castle-node/pull/117)
|
|
106
|
-
|
|
129
|
+
- typings improvements
|
|
107
130
|
|
|
108
131
|
## 1.0.0
|
|
132
|
+
|
|
109
133
|
**BREAKING CHANGES:**
|
|
110
|
-
- remove `identify` and `review` commands - they are no longer supported
|
|
111
134
|
|
|
112
|
-
|
|
135
|
+
- remove `identify` and `review` commands - they are no longer supported
|
|
113
136
|
|
|
114
|
-
|
|
115
|
-
* [#97](https://github.com/castle/castle-node/pull/97)
|
|
137
|
+
- renamed setUseWhitelist with setUseAllowlist
|
|
116
138
|
|
|
117
|
-
|
|
118
|
-
|
|
139
|
+
- added better support for configuration, replaced apiUrl with baseUrl option
|
|
140
|
+
- [#97](https://github.com/castle/castle-node/pull/97)
|
|
141
|
+
|
|
142
|
+
- replace logLevel with logger in the config
|
|
143
|
+
- [#97](https://github.com/castle/castle-node/pull/111)
|
|
144
|
+
|
|
145
|
+
- dropped EVENTS const with list of events \* [#97](https://github.com/castle/castle-node/pull/114)
|
|
146
|
+
**Enhancements:**
|
|
147
|
+
- restructuring the codebase
|
|
148
|
+
- [#89](https://github.com/castle/castle-node/pull/89)
|
|
149
|
+
- [#90](https://github.com/castle/castle-node/pull/90)
|
|
150
|
+
- [#91](https://github.com/castle/castle-node/pull/91)
|
|
151
|
+
- [#100](https://github.com/castle/castle-node/pull/100)
|
|
152
|
+
- [#101](https://github.com/castle/castle-node/pull/101)
|
|
153
|
+
- [#102](https://github.com/castle/castle-node/pull/102)
|
|
154
|
+
- [#110](https://github.com/castle/castle-node/pull/110)
|
|
155
|
+
- [#110](https://github.com/castle/castle-node/pull/113)
|
|
156
|
+
|
|
157
|
+
- added failover and timeout support
|
|
158
|
+
- [#93](https://github.com/castle/castle-node/pull/93)
|
|
159
|
+
|
|
160
|
+
- added ability to set ip headers and proxies
|
|
161
|
+
- [#96](https://github.com/castle/castle-node/pull/96)
|
|
162
|
+
|
|
163
|
+
- added request context builder
|
|
164
|
+
- [#100](https://github.com/castle/castle-node/pull/100)
|
|
165
|
+
|
|
166
|
+
- added request context builder
|
|
167
|
+
- [#100](https://github.com/castle/castle-node/pull/100)
|
|
168
|
+
|
|
169
|
+
- added device endpoints
|
|
170
|
+
- [#106](https://github.com/castle/castle-node/pull/106)
|
|
171
|
+
- [#107](https://github.com/castle/castle-node/pull/107)
|
|
172
|
+
- [#108](https://github.com/castle/castle-node/pull/108)
|
|
173
|
+
- [#109](https://github.com/castle/castle-node/pull/109)
|
|
174
|
+
|
|
175
|
+
- added risk, filter, log endpoints
|
|
176
|
+
- [#112](https://github.com/castle/castle-node/pull/112)
|
|
119
177
|
|
|
120
|
-
- dropped EVENTS const with list of events
|
|
121
|
-
* [#97](https://github.com/castle/castle-node/pull/114)
|
|
122
|
-
**Enhancements:**
|
|
123
|
-
- restructuring the codebase
|
|
124
|
-
* [#89](https://github.com/castle/castle-node/pull/89)
|
|
125
|
-
* [#90](https://github.com/castle/castle-node/pull/90)
|
|
126
|
-
* [#91](https://github.com/castle/castle-node/pull/91)
|
|
127
|
-
* [#100](https://github.com/castle/castle-node/pull/100)
|
|
128
|
-
* [#101](https://github.com/castle/castle-node/pull/101)
|
|
129
|
-
* [#102](https://github.com/castle/castle-node/pull/102)
|
|
130
|
-
* [#110](https://github.com/castle/castle-node/pull/110)
|
|
131
|
-
* [#110](https://github.com/castle/castle-node/pull/113)
|
|
132
|
-
|
|
133
|
-
- added failover and timeout support
|
|
134
|
-
* [#93](https://github.com/castle/castle-node/pull/93)
|
|
135
|
-
|
|
136
|
-
- added ability to set ip headers and proxies
|
|
137
|
-
* [#96](https://github.com/castle/castle-node/pull/96)
|
|
138
|
-
|
|
139
|
-
- added request context builder
|
|
140
|
-
* [#100](https://github.com/castle/castle-node/pull/100)
|
|
141
|
-
|
|
142
|
-
- added request context builder
|
|
143
|
-
* [#100](https://github.com/castle/castle-node/pull/100)
|
|
144
|
-
|
|
145
|
-
- added device endpoints
|
|
146
|
-
* [#106](https://github.com/castle/castle-node/pull/106)
|
|
147
|
-
* [#107](https://github.com/castle/castle-node/pull/107)
|
|
148
|
-
* [#108](https://github.com/castle/castle-node/pull/108)
|
|
149
|
-
* [#109](https://github.com/castle/castle-node/pull/109)
|
|
150
|
-
|
|
151
|
-
- added risk, filter, log endpoints
|
|
152
|
-
* [#112](https://github.com/castle/castle-node/pull/112)
|
|
153
178
|
## 0.5.0
|
|
154
179
|
|
|
155
180
|
**Enhancements:**
|
|
156
181
|
|
|
157
182
|
- [#87](https://github.com/castle/castle-node/pull/87) added risk policy information to the authenticate response
|
|
158
183
|
|
|
159
|
-
|
|
160
184
|
## 0.4.7
|
|
185
|
+
|
|
161
186
|
**BREAKING CHANGES:**
|
|
162
187
|
|
|
163
188
|
- [#42](https://github.com/castle/castle-node//pull/42)
|
|
164
|
-
|
|
165
|
-
|
|
189
|
+
- remove `identify` and `review` commands - they are no longer supported
|
|
190
|
+
- renamed setUseWhitelist with setUseAllowlist
|
|
166
191
|
|
|
167
192
|
**Enhancements:**
|
|
168
193
|
|
package/README.md
CHANGED
|
@@ -42,20 +42,19 @@ const { Castle } = require('@castleio/sdk');
|
|
|
42
42
|
const castle = new Castle({ apiSecret: 'YOUR SECRET HERE' });
|
|
43
43
|
```
|
|
44
44
|
|
|
45
|
-
|
|
46
45
|
#### Config options
|
|
47
46
|
|
|
48
|
-
| Config option | Type
|
|
49
|
-
| ----------------- |
|
|
50
|
-
| apiSecret | `string`
|
|
51
|
-
| timeout | `number`
|
|
52
|
-
| allowlisted | `string[]`
|
|
53
|
-
| denylisted | `string[]`
|
|
54
|
-
| failoverStrategy | `FailoverStrategy` | `FailoverStrategy.allow`
|
|
55
|
-
| logger | `any`
|
|
56
|
-
| doNotTrack | `boolean`
|
|
57
|
-
| ipHeaders | `string[]`
|
|
58
|
-
| trustedProxies | `string[]`
|
|
59
|
-
| trustedProxyDepth
|
|
60
|
-
| trustProxyChain
|
|
61
|
-
| baseUrl | `string`
|
|
47
|
+
| Config option | Type | Default | Explanation |
|
|
48
|
+
| ----------------- | ------------------ | -------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
49
|
+
| apiSecret | `string` | | API key which can be found in the Castle dashboard https://dashboard.castle.io/settings/general |
|
|
50
|
+
| timeout | `number` | 1500 | Time before returning the failover strategy. |
|
|
51
|
+
| allowlisted | `string[]` | [] | by default, the SDK sends all HTTP headers, except for Cookie and Authorization. <br/><br/> If you decide to use a allowlist, the SDK will:<br/>- always send the User-Agent header<br/>- send scrubbed values of non-allowlisted headers<br/>- send proper values of allowlisted headers.<br/><br/>We highly suggest using denylist instead of allowlist, so that Castle can use as many data points as possible to secure your users. If you want to use the allowlist, this is the minimal amount of headers we recommend: DEFAULT_ALLOWLIST |
|
|
52
|
+
| denylisted | `string[]` | [] | Denylisted headers take precedence over allowlisted elements. We always denylist Cookie and Authentication headers. If you use any other headers that might contain sensitive information, you should denylist them |
|
|
53
|
+
| failoverStrategy | `FailoverStrategy` | `FailoverStrategy.allow` | If the request to our service would for some reason time out, this is where you select the automatic response from `authenticate`. Options are `FailoverStrategy.allow`, `FailoverStrategy.deny`, `FailoverStrategy.challenge`. |
|
|
54
|
+
| logger | `any` | | Logs Castle API requests and responses, has to respond to `info` method. |
|
|
55
|
+
| doNotTrack | `boolean` | False | setting it to true turns off all requests and triggers automatic failover on `authenticate`. Used for development and testing. |
|
|
56
|
+
| ipHeaders | `string[]` | [] | Castle needs the original IP of the client, not the IP of your proxy or load balancer. The SDK will only trust the proxy chain as defined in the configuration.We try to fetch the client IP based on X-Forwarded-For or Remote-Addr headers in that order, but sometimes the client IP may be stored in a different header or order. The SDK can be configured to look for the client IP address in headers that you specify.<br/>Sometimes, Cloud providers do not use consistent IP addresses to proxy requests. In this case, the client IP is usually preserved in a custom header. <br/>Example: Cloudflare preserves the client request in the 'Cf-Connecting-Ip' header. |
|
|
57
|
+
| trustedProxies | `string[]` | [] | If the specified header or X-Forwarded-For default contains a proxy chain with public IP addresses, then you must choose only one of the following (but not both): <br/>1. The trusted_proxies value must match the known proxy IPs. This option is preferable if the IP is static. <br/>2. The trusted_proxy_depth value must be set to the number of known trusted proxies in the chain (see below).This option is preferable if the IPs are ephemeral, but the depth is consistent. <br/>Additionally to make X-Forwarded-For and other headers work better discovering client ip address,and not the address of a reverse proxy server, you can define trusted proxies which will help to fetch proper ip from those headers. <br/>In order to extract the client IP of the X-Forwarded-For header and not the address of a reverse proxy server, you must define all trusted public proxies you can achieve this by listing all the proxies ip defined by string or regular expressions in the trusted_proxies setting <br/> |
|
|
58
|
+
| trustedProxyDepth | `number` | 0 | ...or by providing number of trusted proxies used in the chain, (note that you must pick one approach over the other. either trustProxyChain orr trustedProxies) |
|
|
59
|
+
| trustProxyChain | `boolean` | False | If there is no possibility to define options above and there is no other header that holds the client IP, then you may set this option to True to trust all of the proxy IPs in X-Forwarded-For , _Warning_: this mode is highly promiscuous and could lead to wrongly trusting a spoofed IP if the request passes through a malicious proxy |
|
|
60
|
+
| baseUrl | `string` | `https://api.castle.io/v1` | base Castle API url |
|
package/dist/package.json
CHANGED
|
@@ -2,8 +2,9 @@
|
|
|
2
2
|
"$schema": "http://json.schemastore.org/package",
|
|
3
3
|
"name": "@castleio/sdk",
|
|
4
4
|
"description": "Castle SDK for Node",
|
|
5
|
-
"version": "2.
|
|
5
|
+
"version": "2.3.1",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
|
+
"type": "module",
|
|
7
8
|
"repository": "git@github.com:castle/castle-node.git",
|
|
8
9
|
"author": {
|
|
9
10
|
"name": "castle.io",
|
|
@@ -19,6 +20,8 @@
|
|
|
19
20
|
"test": "jest",
|
|
20
21
|
"lint-fix": "eslint --fix --quiet '{src,test}/**/*.{js,ts,tsx}' '*.{js,ts,tsx}'",
|
|
21
22
|
"lint-verify": "eslint '{src,test}/**/*.{js,ts,tsx}' '*.{js,ts,tsx}'",
|
|
23
|
+
"format": "yarn run prettier --write '{src,test}/**/*.{js,ts,tsx,yml,yaml,json,md}' '*.{js,ts,tsx,yml,yaml,json,md}'",
|
|
24
|
+
"format:check": "yarn run prettier --check '{src,test}/**/*.{js,ts,tsx,yml,yaml,json,md}' '*.{js,ts,tsx,yml,yaml,json,md}'",
|
|
22
25
|
"prepush": "yarn build && yarn lint-fix",
|
|
23
26
|
"prepublishOnly": "yarn build"
|
|
24
27
|
},
|
|
@@ -31,34 +34,34 @@
|
|
|
31
34
|
}
|
|
32
35
|
},
|
|
33
36
|
"devDependencies": {
|
|
34
|
-
"@
|
|
35
|
-
"@types/jest": "
|
|
36
|
-
"@types/lodash.get": "4.4.
|
|
37
|
-
"@types/lodash.isempty": "4.4.
|
|
38
|
-
"@types/lodash.merge": "4.6.
|
|
39
|
-
"@types/lodash.pickby": "4.6.
|
|
40
|
-
"@types/lodash.reduce": "4.6.
|
|
41
|
-
"@types/node": "
|
|
42
|
-
"@types/node-fetch": "2.6.
|
|
43
|
-
"@typescript-eslint/eslint-plugin": "
|
|
44
|
-
"@typescript-eslint/parser": "
|
|
45
|
-
"eslint": "
|
|
46
|
-
"eslint-config-prettier": "
|
|
47
|
-
"eslint-plugin-import": "2.
|
|
37
|
+
"@eslint/eslintrc": "3.3.1",
|
|
38
|
+
"@types/jest": "30.0.0",
|
|
39
|
+
"@types/lodash.get": "4.4.9",
|
|
40
|
+
"@types/lodash.isempty": "4.4.9",
|
|
41
|
+
"@types/lodash.merge": "4.6.9",
|
|
42
|
+
"@types/lodash.pickby": "4.6.9",
|
|
43
|
+
"@types/lodash.reduce": "4.6.9",
|
|
44
|
+
"@types/node": "24.0.14",
|
|
45
|
+
"@types/node-fetch": "2.6.12",
|
|
46
|
+
"@typescript-eslint/eslint-plugin": "8.37.0",
|
|
47
|
+
"@typescript-eslint/parser": "8.37.0",
|
|
48
|
+
"eslint": "9.31.0",
|
|
49
|
+
"eslint-config-prettier": "10.1.5",
|
|
50
|
+
"eslint-plugin-import": "2.32.0",
|
|
48
51
|
"eslint-plugin-prefer-arrow": "1.2.3",
|
|
49
|
-
"eslint-plugin-prettier": "
|
|
50
|
-
"express": "
|
|
51
|
-
"fetch-mock": "
|
|
52
|
-
"husky": "
|
|
53
|
-
"jest": "
|
|
52
|
+
"eslint-plugin-prettier": "5.5.1",
|
|
53
|
+
"express": "5.1.0",
|
|
54
|
+
"fetch-mock": "11.1.5",
|
|
55
|
+
"husky": "9.1.7",
|
|
56
|
+
"jest": "30.0.4",
|
|
54
57
|
"mockdate": "3.0.5",
|
|
55
|
-
"prettier": "
|
|
56
|
-
"rimraf": "
|
|
58
|
+
"prettier": "3.6.2",
|
|
59
|
+
"rimraf": "6.0.1",
|
|
57
60
|
"source-map-support": "0.5.21",
|
|
58
61
|
"timeout-signal": "2.0.0",
|
|
59
|
-
"ts-jest": "29.
|
|
60
|
-
"ts-node": "10.9.
|
|
61
|
-
"typescript": "5.
|
|
62
|
+
"ts-jest": "29.4.0",
|
|
63
|
+
"ts-node": "10.9.2",
|
|
64
|
+
"typescript": "5.8.3"
|
|
62
65
|
},
|
|
63
66
|
"dependencies": {
|
|
64
67
|
"abort-controller": "^3.0.0",
|
package/dist/src/Castle.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { AuthenticateResult } from './models';
|
|
2
|
-
import type { Payload, LogPayload, FilterPayload, RiskPayload, DevicePayload, UserDevicePayload, CreateListItemPayload, CreateListPayload, UpdateListItemPayload, UpdateListPayload, ListItemPayload, ListPayload, SearchListItemsPayload, SearchListsPayload } from './payload/payload.module';
|
|
2
|
+
import type { Payload, LogPayload, FilterPayload, RiskPayload, DevicePayload, UserDevicePayload, CreateListItemPayload, CreateListPayload, UpdateListItemPayload, UpdateListPayload, ListItemPayload, ListPayload, SearchListItemsPayload, SearchListsPayload, SearchEventsPayload, SearchEventsResponse, GetEventsSchemaResponse, GroupEventsPayload, GroupEventsResponse, BatchUpsertListItemsPayload, CountListItemsPayload, DeleteUserDataPayload, RequestUserDataPayload } from './payload/payload.module';
|
|
3
3
|
import { Configuration, ConfigurationProperties } from './configuration';
|
|
4
4
|
export declare class Castle {
|
|
5
5
|
configuration: Configuration;
|
|
@@ -25,5 +25,12 @@ export declare class Castle {
|
|
|
25
25
|
fetchAllLists(): Promise<any>;
|
|
26
26
|
searchListItems(params: SearchListItemsPayload): Promise<any>;
|
|
27
27
|
searchLists(params: SearchListsPayload): Promise<any>;
|
|
28
|
+
batchUpdateListItems(params: BatchUpsertListItemsPayload): Promise<any>;
|
|
29
|
+
countListItems(params: CountListItemsPayload): Promise<any>;
|
|
30
|
+
searchEvents(params: SearchEventsPayload): Promise<SearchEventsResponse>;
|
|
31
|
+
getEventsSchema(): Promise<GetEventsSchemaResponse>;
|
|
32
|
+
groupEvents(params: GroupEventsPayload): Promise<GroupEventsResponse>;
|
|
33
|
+
requestUserData(params: RequestUserDataPayload): Promise<any>;
|
|
34
|
+
deleteUserData(params: DeleteUserDataPayload): Promise<any>;
|
|
28
35
|
private generateDoNotTrackResponse;
|
|
29
36
|
}
|
package/dist/src/Castle.js
CHANGED
|
@@ -63,23 +63,23 @@ class Castle {
|
|
|
63
63
|
return api_module_1.APITrackService.call(params, this.configuration);
|
|
64
64
|
});
|
|
65
65
|
}
|
|
66
|
-
getDevice(
|
|
67
|
-
return __awaiter(this,
|
|
66
|
+
getDevice(_a) {
|
|
67
|
+
return __awaiter(this, arguments, void 0, function* ({ device_token }) {
|
|
68
68
|
return api_module_1.APIGetDeviceService.call({ device_token }, this.configuration);
|
|
69
69
|
});
|
|
70
70
|
}
|
|
71
|
-
getDevicesForUser(
|
|
72
|
-
return __awaiter(this,
|
|
71
|
+
getDevicesForUser(_a) {
|
|
72
|
+
return __awaiter(this, arguments, void 0, function* ({ id, cid }) {
|
|
73
73
|
return api_module_1.APIGetDevicesForUserService.call({ id, cid }, this.configuration);
|
|
74
74
|
});
|
|
75
75
|
}
|
|
76
|
-
approveDevice(
|
|
77
|
-
return __awaiter(this,
|
|
76
|
+
approveDevice(_a) {
|
|
77
|
+
return __awaiter(this, arguments, void 0, function* ({ device_token }) {
|
|
78
78
|
return api_module_1.APIApproveDeviceService.call({ device_token }, this.configuration);
|
|
79
79
|
});
|
|
80
80
|
}
|
|
81
|
-
reportDevice(
|
|
82
|
-
return __awaiter(this,
|
|
81
|
+
reportDevice(_a) {
|
|
82
|
+
return __awaiter(this, arguments, void 0, function* ({ device_token }) {
|
|
83
83
|
return api_module_1.APIReportDeviceService.call({ device_token }, this.configuration);
|
|
84
84
|
});
|
|
85
85
|
}
|
|
@@ -143,6 +143,41 @@ class Castle {
|
|
|
143
143
|
return api_module_1.APISearchListsService.call(params, this.configuration);
|
|
144
144
|
});
|
|
145
145
|
}
|
|
146
|
+
batchUpdateListItems(params) {
|
|
147
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
148
|
+
return api_module_1.APIBatchUpsertListItemsService.call(params, this.configuration);
|
|
149
|
+
});
|
|
150
|
+
}
|
|
151
|
+
countListItems(params) {
|
|
152
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
153
|
+
return api_module_1.APICountListItemsService.call(params, this.configuration);
|
|
154
|
+
});
|
|
155
|
+
}
|
|
156
|
+
searchEvents(params) {
|
|
157
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
158
|
+
return api_module_1.APISearchEventsService.call(params, this.configuration);
|
|
159
|
+
});
|
|
160
|
+
}
|
|
161
|
+
getEventsSchema() {
|
|
162
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
163
|
+
return api_module_1.APIGetEventsSchemaService.call(this.configuration);
|
|
164
|
+
});
|
|
165
|
+
}
|
|
166
|
+
groupEvents(params) {
|
|
167
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
168
|
+
return api_module_1.APIGroupEventsService.call(params, this.configuration);
|
|
169
|
+
});
|
|
170
|
+
}
|
|
171
|
+
requestUserData(params) {
|
|
172
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
173
|
+
return api_module_1.APIRequestUserDataService.call(params, this.configuration);
|
|
174
|
+
});
|
|
175
|
+
}
|
|
176
|
+
deleteUserData(params) {
|
|
177
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
178
|
+
return api_module_1.APIDeleteUserDataService.call(params, this.configuration);
|
|
179
|
+
});
|
|
180
|
+
}
|
|
146
181
|
generateDoNotTrackResponse(userId) {
|
|
147
182
|
return {
|
|
148
183
|
policy: {
|
package/dist/src/Castle.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Castle.js","sourceRoot":"","sources":["../../src/Castle.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,
|
|
1
|
+
{"version":3,"file":"Castle.js","sourceRoot":"","sources":["../../src/Castle.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,iDA6B0B;AAC1B,gEAA8D;AA0B9D,mDAAyE;AAEzE,MAAa,MAAM;IAGjB,YAAY,gBAAyC;QACnD,IAAI,CAAC,aAAa,GAAG,IAAI,6BAAa,CAAC,gBAAgB,CAAC,CAAC;IAC3D,CAAC;IAEY,YAAY,CAAC,MAAe;;YACvC,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC;gBAClB,MAAM,IAAI,KAAK,CAAC,sDAAsD,CAAC,CAAC;YAC1E,CAAC;YAED,IAAI,IAAI,CAAC,aAAa,CAAC,UAAU,EAAE,CAAC;gBAClC,OAA2B,CACzB,IAAI,CAAC,0BAA0B,CAAC,MAAM,CAAC,OAAO,CAAC,CAChD,CAAC;YACJ,CAAC;YAED,OAAO,mCAAsB,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,aAAa,CAAC,CAAC;QACjE,CAAC;KAAA;IAEY,IAAI,CAAC,MAAmB;;YACnC,IAAI,IAAI,CAAC,aAAa,CAAC,UAAU,EAAE,CAAC;gBAClC,OAAO,IAAI,CAAC,0BAA0B,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;YACzD,CAAC;YAED,OAAO,2BAAc,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,aAAa,CAAC,CAAC;QACzD,CAAC;KAAA;IAEY,MAAM,CAAC,MAAqB;;YACvC,IAAI,IAAI,CAAC,aAAa,CAAC,UAAU,EAAE,CAAC;gBAClC,OAAO,IAAI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EAAE;gBACN,MAAM,EAAE,kCAAgB,CAAC,KAAK;aAC/B;YACD,MAAM,EAAE,kCAAgB,CAAC,KAAK;YAC9B,OAAO,EAAE,MAAM;YACf,QAAQ,EAAE,IAAI;YACd,eAAe,EAAE,cAAc;SAChC,CAAC;IACJ,CAAC;CACF;AAtKD,wBAsKC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api-authenticate.service.js","sourceRoot":"","sources":["../../../../src/api/services/api-authenticate.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AACA,yCAAmD;AAEnD,iEAA0E;AAC1E,oEAAkE;AAElE,+CAA2C;AAC3C,wEAA+C;AAE/C,MAAM,cAAc,GAAG,CACrB,MAAc,EACd,MAAc,EACd,aAA4B,EAC5B,GAAW,EACS,EAAE;IAItB,IAAI,aAAa,CAAC,gBAAgB,KAAK,kCAAgB,CAAC,KAAK,EAAE;
|
|
1
|
+
{"version":3,"file":"api-authenticate.service.js","sourceRoot":"","sources":["../../../../src/api/services/api-authenticate.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AACA,yCAAmD;AAEnD,iEAA0E;AAC1E,oEAAkE;AAElE,+CAA2C;AAC3C,wEAA+C;AAE/C,MAAM,cAAc,GAAG,CACrB,MAAc,EACd,MAAc,EACd,aAA4B,EAC5B,GAAW,EACS,EAAE;IAItB,IAAI,aAAa,CAAC,gBAAgB,KAAK,kCAAgB,CAAC,KAAK,EAAE,CAAC;QAC9D,MAAM,GAAG,CAAC;IACZ,CAAC;IAED,OAAO;QACL,MAAM,EAAE;YACN,MAAM,EAAE,aAAa,CAAC,gBAAgB;SACvC;QACD,MAAM,EAAE,aAAa,CAAC,gBAAgB;QACtC,OAAO,EAAE,MAAM;QACf,QAAQ,EAAE,IAAI;QACd,eAAe,EAAE,MAAM;KACxB,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,cAAc,GAAG,CAAC,CAAQ,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,YAAY,CAAC;AAEhD,QAAA,sBAAsB,GAAG;IACpC,IAAI,EAAE,CACJ,OAAgB,EAChB,aAA4B,EACC,EAAE;QAC/B,MAAM,UAAU,GAAG,IAAI,0BAAe,EAAE,CAAC;QACzC,MAAM,OAAO,GAAG,2CAA0B,CAAC,IAAI,CAC7C,UAAU,EACV,OAAO,EACP,aAAa,CACd,CAAC;QAEF,IAAI,iBAAiB,CAAC;QACtB,IAAI,CAAC;YACH,iBAAiB,GAAG,MAAM,wBAAU,CAAC,IAAI,CACvC,UAAU,EACV,OAAO,EACP,aAAa,CACd,CAAC;QACJ,CAAC;QAAC,OAAO,CAAC,EAAE,CAAC;YACX,IAAI,cAAc,CAAC,CAAC,CAAC,EAAE,CAAC;gBACtB,OAAO,cAAc,CAAC,OAAO,CAAC,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,CAAC,CAAC,CAAC;YACtE,CAAC;iBAAM,IAAI,CAAC,YAAY,4BAAmB,EAAE,CAAC;gBAC5C,OAAO,cAAc,CAAC,OAAO,CAAC,OAAO,EAAE,cAAc,EAAE,aAAa,CAAC,CAAC;YACxE,CAAC;iBAAM,CAAC;gBACN,MAAM,CAAC,CAAC;YACV,CAAC;QACH,CAAC;QAED,OAAO,iBAAiB,CAAC;IAC3B,CAAC,CAAA;CACF,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { Configuration } from '../../configuration';
|
|
2
|
+
import type { BatchUpsertListItemsPayload } from '../../payload/models';
|
|
3
|
+
export declare const APIBatchUpsertListItemsService: {
|
|
4
|
+
call: (options: BatchUpsertListItemsPayload, configuration: Configuration) => Promise<any>;
|
|
5
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
+
};
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.APIBatchUpsertListItemsService = void 0;
|
|
16
|
+
const command_module_1 = require("../../command/command.module");
|
|
17
|
+
const api_service_1 = require("./api.service");
|
|
18
|
+
const abort_controller_1 = __importDefault(require("abort-controller"));
|
|
19
|
+
exports.APIBatchUpsertListItemsService = {
|
|
20
|
+
call: (options, configuration) => __awaiter(void 0, void 0, void 0, function* () {
|
|
21
|
+
const controller = new abort_controller_1.default();
|
|
22
|
+
const command = command_module_1.CommandBatchUpsertListItemsService.call(controller, options, configuration);
|
|
23
|
+
return api_service_1.APIService.call(controller, command, configuration);
|
|
24
|
+
}),
|
|
25
|
+
};
|
|
26
|
+
//# sourceMappingURL=api-batch-upsert-list-items.service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"api-batch-upsert-list-items.service.js","sourceRoot":"","sources":["../../../../src/api/services/api-batch-upsert-list-items.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AACA,iEAAkF;AAClF,+CAA2C;AAC3C,wEAA+C;AAGlC,QAAA,8BAA8B,GAAG;IAC5C,IAAI,EAAE,CACJ,OAAoC,EACpC,aAA4B,EACd,EAAE;QAChB,MAAM,UAAU,GAAG,IAAI,0BAAe,EAAE,CAAC;QACzC,MAAM,OAAO,GAAG,mDAAkC,CAAC,IAAI,CACrD,UAAU,EACV,OAAO,EACP,aAAa,CACd,CAAC;QAEF,OAAO,wBAAU,CAAC,IAAI,CAAC,UAAU,EAAE,OAAO,EAAE,aAAa,CAAC,CAAC;IAC7D,CAAC,CAAA;CACF,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
|
+
};
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.APICountListItemsService = void 0;
|
|
16
|
+
const command_module_1 = require("../../command/command.module");
|
|
17
|
+
const api_service_1 = require("./api.service");
|
|
18
|
+
const abort_controller_1 = __importDefault(require("abort-controller"));
|
|
19
|
+
exports.APICountListItemsService = {
|
|
20
|
+
call: (options, configuration) => __awaiter(void 0, void 0, void 0, function* () {
|
|
21
|
+
const controller = new abort_controller_1.default();
|
|
22
|
+
const command = command_module_1.CommandCountListItemsService.call(controller, options, configuration);
|
|
23
|
+
return api_service_1.APIService.call(controller, command, configuration);
|
|
24
|
+
}),
|
|
25
|
+
};
|
|
26
|
+
//# sourceMappingURL=api-count-list-items.service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"api-count-list-items.service.js","sourceRoot":"","sources":["../../../../src/api/services/api-count-list-items.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AACA,iEAA4E;AAC5E,+CAA2C;AAC3C,wEAA+C;AAGlC,QAAA,wBAAwB,GAAG;IACtC,IAAI,EAAE,CACJ,OAA8B,EAC9B,aAA4B,EACd,EAAE;QAChB,MAAM,UAAU,GAAG,IAAI,0BAAe,EAAE,CAAC;QACzC,MAAM,OAAO,GAAG,6CAA4B,CAAC,IAAI,CAC/C,UAAU,EACV,OAAO,EACP,aAAa,CACd,CAAC;QAEF,OAAO,wBAAU,CAAC,IAAI,CAAC,UAAU,EAAE,OAAO,EAAE,aAAa,CAAC,CAAC;IAC7D,CAAC,CAAA;CACF,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { Configuration } from '../../configuration';
|
|
2
|
+
import { DeleteUserDataPayload } from '../../payload/models/privacy_payload';
|
|
3
|
+
export declare const APIDeleteUserDataService: {
|
|
4
|
+
call: (options: DeleteUserDataPayload, configuration: Configuration) => Promise<any>;
|
|
5
|
+
};
|