@haatlabs-core/notifications 0.29.0 → 0.29.2
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/cjs/nest/options.d.ts +6 -0
- package/dist/cjs/nest-auth/index.d.ts +1 -1
- package/dist/cjs/nest-auth/index.js +2 -1
- package/dist/nest/options.d.ts +6 -0
- package/dist/nest/options.js.map +1 -1
- package/dist/nest-auth/index.d.ts +1 -1
- package/dist/nest-auth/index.js +2 -1
- package/dist/nest-auth/index.js.map +1 -1
- package/package.json +11 -11
|
@@ -14,6 +14,12 @@ export interface NotificationCaller {
|
|
|
14
14
|
userId: string | null;
|
|
15
15
|
/** The caller's role in the organization (OWNER, ADMIN, MEMBER, VIEWER). */
|
|
16
16
|
role: string;
|
|
17
|
+
/**
|
|
18
|
+
* The store a session signed in from inside the store's admin (a Shopify embed), whose staff
|
|
19
|
+
* may be no person of the app's: `recipientOf` can give them the store's inbox. Null or
|
|
20
|
+
* absent for every other caller.
|
|
21
|
+
*/
|
|
22
|
+
storeId?: string | null;
|
|
17
23
|
}
|
|
18
24
|
/**
|
|
19
25
|
* Sign-in, as this package needs it: the adapter the app wires.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { NotificationsAuth, Provide } from '../nest/options.js';
|
|
2
2
|
/**
|
|
3
3
|
* The auth adapter for the platform's own sign-in (@haatlabs-core/nest-auth): the caller is the
|
|
4
|
-
* principal `AuthModule`'s guard signed in.
|
|
4
|
+
* principal `AuthModule`'s guard signed in, with its store when it signed in from the embed.
|
|
5
5
|
*
|
|
6
6
|
* NotificationsModule.forRoot({ auth: nestAuthAdapter, … })
|
|
7
7
|
*/
|
|
@@ -27,7 +27,8 @@ const nestAuthAdapter = {
|
|
|
27
27
|
return principal ? {
|
|
28
28
|
organizationId: principal.organizationId,
|
|
29
29
|
userId: principal.userId,
|
|
30
|
-
role: principal.role
|
|
30
|
+
role: principal.role,
|
|
31
|
+
storeId: principal.via === "embedded" ? principal.storeId ?? null : null
|
|
31
32
|
} : null;
|
|
32
33
|
}
|
|
33
34
|
})
|
package/dist/nest/options.d.ts
CHANGED
|
@@ -14,6 +14,12 @@ export interface NotificationCaller {
|
|
|
14
14
|
userId: string | null;
|
|
15
15
|
/** The caller's role in the organization (OWNER, ADMIN, MEMBER, VIEWER). */
|
|
16
16
|
role: string;
|
|
17
|
+
/**
|
|
18
|
+
* The store a session signed in from inside the store's admin (a Shopify embed), whose staff
|
|
19
|
+
* may be no person of the app's: `recipientOf` can give them the store's inbox. Null or
|
|
20
|
+
* absent for every other caller.
|
|
21
|
+
*/
|
|
22
|
+
storeId?: string | null;
|
|
17
23
|
}
|
|
18
24
|
/**
|
|
19
25
|
* Sign-in, as this package needs it: the adapter the app wires.
|
package/dist/nest/options.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"options.js","sourceRoot":"","sources":["../../src/nest/options.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"options.js","sourceRoot":"","sources":["../../src/nest/options.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AA0C5C,+EAA+E;AAC/E,MAAM,CAAC,MAAM,sBAAsB,GAAG,MAAM,CAAC;AAC7C,4EAA4E;AAC5E,MAAM,CAAC,MAAM,0BAA0B,GAAG,EAAE,GAAG,MAAM,CAAC;AAkCtD,MAAM,KAAK,GAAG,CAAC,IAAY,EAAU,EAAE,CAAC,MAAM,CAAC,GAAG,CAAC,2BAA2B,IAAI,EAAE,CAAC,CAAC;AACtF,MAAM,CAAC,MAAM,qBAAqB,GAAG,KAAK,CAAC,uBAAuB,CAAC,CAAC;AACpE,MAAM,CAAC,MAAM,uBAAuB,GAAG,KAAK,CAAC,yBAAyB,CAAC,CAAC;AACxE,MAAM,CAAC,MAAM,mBAAmB,GAAG,KAAK,CAAC,qBA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C,MAA0B;IAE1B,MAAM,SAAS,GAAG,OAAO,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;IAC9C,IAAI,CAAC,SAAS;QAAE,MAAM,IAAI,QAAQ,CAAC,WAAW,EAAE,wCAAwC,CAAC,CAAC;IAC1F,OAAO,SAAS,CAAC;AACnB,CAAC;AAED,yFAAyF;AACzF,MAAM,UAAU,QAAQ,CAAC,IAAuB,EAAE,OAAyB;IACzE,MAAM,MAAM,GAAG,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;IACtC,IAAI,CAAC,MAAM;QAAE,MAAM,IAAI,QAAQ,CAAC,iBAAiB,EAAE,yBAAyB,CAAC,CAAC;IAC9E,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { NotificationsAuth, Provide } from '../nest/options.js';
|
|
2
2
|
/**
|
|
3
3
|
* The auth adapter for the platform's own sign-in (@haatlabs-core/nest-auth): the caller is the
|
|
4
|
-
* principal `AuthModule`'s guard signed in.
|
|
4
|
+
* principal `AuthModule`'s guard signed in, with its store when it signed in from the embed.
|
|
5
5
|
*
|
|
6
6
|
* NotificationsModule.forRoot({ auth: nestAuthAdapter, … })
|
|
7
7
|
*/
|
package/dist/nest-auth/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* The auth adapter for the platform's own sign-in (@haatlabs-core/nest-auth): the caller is the
|
|
3
|
-
* principal `AuthModule`'s guard signed in.
|
|
3
|
+
* principal `AuthModule`'s guard signed in, with its store when it signed in from the embed.
|
|
4
4
|
*
|
|
5
5
|
* NotificationsModule.forRoot({ auth: nestAuthAdapter, … })
|
|
6
6
|
*/
|
|
@@ -13,6 +13,7 @@ export const nestAuthAdapter = {
|
|
|
13
13
|
organizationId: principal.organizationId,
|
|
14
14
|
userId: principal.userId,
|
|
15
15
|
role: principal.role,
|
|
16
|
+
storeId: principal.via === 'embedded' ? (principal.storeId ?? null) : null,
|
|
16
17
|
}
|
|
17
18
|
: null;
|
|
18
19
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/nest-auth/index.ts"],"names":[],"mappings":"AAMA;;;;;GAKG;AACH,MAAM,CAAC,MAAM,eAAe,GAA+B;IACzD,UAAU,EAAE,GAAsB,EAAE,CAAC,CAAC;QACpC,QAAQ,EAAE,CAAC,OAAyB,EAAE,EAAE;YACtC,MAAM,SAAS,GAAG,OAAO,CAAC,YAAY,EAAE,CAAC,UAAU,EAAkB,CAAC,SAAS,CAAC;YAChF,OAAO,SAAS;gBACd,CAAC,CAAC;oBACE,cAAc,EAAE,SAAS,CAAC,cAAc;oBACxC,MAAM,EAAE,SAAS,CAAC,MAAM;oBACxB,IAAI,EAAE,SAAS,CAAC,IAAI;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/nest-auth/index.ts"],"names":[],"mappings":"AAMA;;;;;GAKG;AACH,MAAM,CAAC,MAAM,eAAe,GAA+B;IACzD,UAAU,EAAE,GAAsB,EAAE,CAAC,CAAC;QACpC,QAAQ,EAAE,CAAC,OAAyB,EAAE,EAAE;YACtC,MAAM,SAAS,GAAG,OAAO,CAAC,YAAY,EAAE,CAAC,UAAU,EAAkB,CAAC,SAAS,CAAC;YAChF,OAAO,SAAS;gBACd,CAAC,CAAC;oBACE,cAAc,EAAE,SAAS,CAAC,cAAc;oBACxC,MAAM,EAAE,SAAS,CAAC,MAAM;oBACxB,IAAI,EAAE,SAAS,CAAC,IAAI;oBACpB,OAAO,EAAE,SAAS,CAAC,GAAG,KAAK,UAAU,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,OAAO,IAAI,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI;iBAC3E;gBACH,CAAC,CAAC,IAAI,CAAC;QACX,CAAC;KACF,CAAC;CACH,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@haatlabs-core/notifications",
|
|
3
|
-
"version": "0.29.
|
|
3
|
+
"version": "0.29.2",
|
|
4
4
|
"description": "In-app notifications for NestJS apps: event registry, preferences, inbox, live stream, email and web push.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"haatlabs",
|
|
@@ -84,11 +84,11 @@
|
|
|
84
84
|
"reflect-metadata": "^0.2.2",
|
|
85
85
|
"rxjs": "^7.8.2",
|
|
86
86
|
"testcontainers": "^12.2.0",
|
|
87
|
-
"@haatlabs-core/
|
|
88
|
-
"@haatlabs-core/
|
|
89
|
-
"@haatlabs-core/tsconfig": "0.29.
|
|
90
|
-
"@haatlabs-core/
|
|
91
|
-
"@haatlabs-core/
|
|
87
|
+
"@haatlabs-core/mailer": "0.29.2",
|
|
88
|
+
"@haatlabs-core/queue": "0.29.2",
|
|
89
|
+
"@haatlabs-core/tsconfig": "0.29.2",
|
|
90
|
+
"@haatlabs-core/vitest-config": "0.29.2",
|
|
91
|
+
"@haatlabs-core/nest-auth": "0.29.2"
|
|
92
92
|
},
|
|
93
93
|
"dependencies": {
|
|
94
94
|
"@types/web-push": "^3.6.4",
|
|
@@ -96,11 +96,11 @@
|
|
|
96
96
|
"ioredis": "^6.0.0",
|
|
97
97
|
"web-push": "^4.0.0",
|
|
98
98
|
"zod": "^4.6.5",
|
|
99
|
-
"@haatlabs-core/
|
|
100
|
-
"@haatlabs-core/
|
|
101
|
-
"@haatlabs-core/
|
|
102
|
-
"@haatlabs-core/
|
|
103
|
-
"@haatlabs-core/
|
|
99
|
+
"@haatlabs-core/config-core": "0.29.2",
|
|
100
|
+
"@haatlabs-core/db-core": "0.29.2",
|
|
101
|
+
"@haatlabs-core/errors": "0.29.2",
|
|
102
|
+
"@haatlabs-core/nest-common": "0.29.2",
|
|
103
|
+
"@haatlabs-core/logger": "0.29.2"
|
|
104
104
|
},
|
|
105
105
|
"peerDependencies": {
|
|
106
106
|
"@nestjs/common": "^12.1.2",
|