@flatfile/listener 0.3.8 → 0.3.9
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/index.d.ts +2 -1
- package/dist/index.js +3 -2
- package/dist/index.mjs +3 -2
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -48,6 +48,7 @@ declare class FlatfileEvent extends AuthenticatedClient {
|
|
|
48
48
|
readonly context: any;
|
|
49
49
|
readonly payload: any;
|
|
50
50
|
readonly cache: EventCache;
|
|
51
|
+
readonly namespace: string[];
|
|
51
52
|
constructor(src: Event, accessToken?: string, apiUrl?: string);
|
|
52
53
|
/**
|
|
53
54
|
* Should return either event body if expanded already or fetch data from the
|
|
@@ -236,7 +237,7 @@ declare class FlatfileListener extends EventHandler {
|
|
|
236
237
|
* @param namespace
|
|
237
238
|
* @param cb
|
|
238
239
|
*/
|
|
239
|
-
namespace(
|
|
240
|
+
namespace(namespaces: string | string[], cb?: SubFn<this>): this;
|
|
240
241
|
/**
|
|
241
242
|
* Filter by namespace
|
|
242
243
|
*
|
package/dist/index.js
CHANGED
|
@@ -251,6 +251,7 @@ var FlatfileEvent = class extends AuthenticatedClient {
|
|
|
251
251
|
this.target = src.target || "";
|
|
252
252
|
this.origin = src.origin || {};
|
|
253
253
|
this.action = src.context?.actionName || "";
|
|
254
|
+
this.namespace = src.namespaces || [];
|
|
254
255
|
}
|
|
255
256
|
/**
|
|
256
257
|
* Should return either event body if expanded already or fetch data from the
|
|
@@ -584,8 +585,8 @@ var FlatfileListener = class extends EventHandler {
|
|
|
584
585
|
* @param namespace
|
|
585
586
|
* @param cb
|
|
586
587
|
*/
|
|
587
|
-
namespace(
|
|
588
|
-
return this.filter({
|
|
588
|
+
namespace(namespaces, cb) {
|
|
589
|
+
return this.filter({ namespaces }, cb);
|
|
589
590
|
}
|
|
590
591
|
/**
|
|
591
592
|
* Filter by namespace
|
package/dist/index.mjs
CHANGED
|
@@ -208,6 +208,7 @@ var FlatfileEvent = class extends AuthenticatedClient {
|
|
|
208
208
|
this.target = src.target || "";
|
|
209
209
|
this.origin = src.origin || {};
|
|
210
210
|
this.action = src.context?.actionName || "";
|
|
211
|
+
this.namespace = src.namespaces || [];
|
|
211
212
|
}
|
|
212
213
|
/**
|
|
213
214
|
* Should return either event body if expanded already or fetch data from the
|
|
@@ -541,8 +542,8 @@ var FlatfileListener = class extends EventHandler {
|
|
|
541
542
|
* @param namespace
|
|
542
543
|
* @param cb
|
|
543
544
|
*/
|
|
544
|
-
namespace(
|
|
545
|
-
return this.filter({
|
|
545
|
+
namespace(namespaces, cb) {
|
|
546
|
+
return this.filter({ namespaces }, cb);
|
|
546
547
|
}
|
|
547
548
|
/**
|
|
548
549
|
* Filter by namespace
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@flatfile/listener",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.9",
|
|
4
4
|
"description": "A PubSub Listener for configuring and using Flatfile",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.mjs",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"flat": "^5.0.2"
|
|
36
36
|
},
|
|
37
37
|
"peerDependencies": {
|
|
38
|
-
"@flatfile/api": "^1.
|
|
38
|
+
"@flatfile/api": "^1.5.10",
|
|
39
39
|
"axios": "^1.4.0"
|
|
40
40
|
}
|
|
41
41
|
}
|