@managemint-solutions/sdk 0.38.0 → 0.38.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/README.md +27 -27
- package/dist/audit/dto.js +1 -1
- package/dist/audit/index.d.ts +12 -12
- package/dist/audit/index.js +9 -9
- package/dist/auth-client/index.d.ts +2 -2
- package/dist/auth-client/index.js +2 -2
- package/dist/auth.d.ts +3 -3
- package/dist/auth.js +3 -3
- package/dist/billing/dto.js +1 -1
- package/dist/billing/index.d.ts +4 -4
- package/dist/billing/index.js +5 -5
- package/dist/billing/invoices/dto.js +1 -1
- package/dist/billing/invoices/index.d.ts +6 -6
- package/dist/billing/invoices/index.js +7 -7
- package/dist/client.d.ts +3 -3
- package/dist/client.js +1 -1
- package/dist/clients/index.d.ts +1 -1
- package/dist/clients/index.js +1 -1
- package/dist/configs/dto.js +3 -3
- package/dist/configs/index.d.ts +3 -3
- package/dist/configs/index.js +3 -3
- package/dist/errors.d.ts +2 -2
- package/dist/errors.js +2 -2
- package/dist/feature-requests/dto.js +1 -1
- package/dist/feature-requests/index.d.ts +3 -3
- package/dist/feature-requests/index.js +2 -2
- package/dist/index.js +2 -2
- package/dist/nest/index.d.ts +5 -5
- package/dist/nest/index.js +4 -4
- package/dist/notifications/index.d.ts +8 -8
- package/dist/notifications/index.js +8 -8
- package/dist/organization-invites/index.d.ts +3 -3
- package/dist/organization-invites/index.js +2 -2
- package/dist/organization-payment-methods/index.d.ts +3 -3
- package/dist/organization-payment-methods/index.js +3 -3
- package/dist/organizations/index.d.ts +7 -7
- package/dist/organizations/index.js +7 -7
- package/dist/permissions/index.d.ts +6 -6
- package/dist/permissions/index.js +6 -6
- package/dist/pricebooks/index.d.ts +2 -2
- package/dist/pricebooks/index.js +3 -3
- package/dist/projects/dto.js +2 -2
- package/dist/projects/index.d.ts +1 -1
- package/dist/projects/index.js +2 -2
- package/dist/service-client/index.d.ts +5 -5
- package/dist/service-client/index.js +5 -5
- package/dist/support/dto.js +1 -1
- package/dist/supporting-files/dto.js +1 -1
- package/dist/supporting-files/index.js +5 -5
- package/dist/supporting-files/paths.d.ts +3 -3
- package/dist/supporting-files/paths.js +4 -4
- package/dist/tasks/dto.js +4 -4
- package/dist/tasks/index.d.ts +1 -1
- package/dist/tasks/index.js +2 -2
- package/dist/transforms.d.ts +6 -6
- package/dist/transforms.js +8 -8
- package/dist/users/dto.d.ts +3 -3
- package/dist/users/dto.js +4 -4
- package/dist/users/index.d.ts +2 -2
- package/dist/users/index.js +2 -2
- package/dist/users/paths.d.ts +2 -2
- package/dist/users/paths.js +2 -2
- package/dist/webhook-events/index.d.ts +3 -3
- package/dist/webhook-events/index.js +3 -3
- package/package.json +1 -1
package/dist/users/index.d.ts
CHANGED
|
@@ -23,7 +23,7 @@ export declare class UsersResource {
|
|
|
23
23
|
* The public profile behind a `*_by` / `manager_id` column. `user_profiles` is a
|
|
24
24
|
* `security_invoker = on` view granted to `authenticated` (the base table's tenant predicate
|
|
25
25
|
* scopes it), so this runs on the caller's own
|
|
26
|
-
* client
|
|
26
|
+
* client - it needs no service role.
|
|
27
27
|
*/
|
|
28
28
|
identityById(userId?: string | null): Promise<UserIdentity | null>;
|
|
29
29
|
/** The users who report to `managerId` - the direct reports a leave approver may act on. */
|
|
@@ -41,7 +41,7 @@ export declare class UsersResource {
|
|
|
41
41
|
* avatar change is audited like any other.
|
|
42
42
|
*
|
|
43
43
|
* The previous object is removed *after* the new URL is committed, and a failed cleanup is
|
|
44
|
-
* swallowed
|
|
44
|
+
* swallowed - an orphaned object is a storage bill, a failed upload is a broken avatar.
|
|
45
45
|
*/
|
|
46
46
|
setProfileImage(userId: string, file: File): Promise<UserRow>;
|
|
47
47
|
/**
|
package/dist/users/index.js
CHANGED
|
@@ -78,7 +78,7 @@ class UsersResource {
|
|
|
78
78
|
* The public profile behind a `*_by` / `manager_id` column. `user_profiles` is a
|
|
79
79
|
* `security_invoker = on` view granted to `authenticated` (the base table's tenant predicate
|
|
80
80
|
* scopes it), so this runs on the caller's own
|
|
81
|
-
* client
|
|
81
|
+
* client - it needs no service role.
|
|
82
82
|
*/
|
|
83
83
|
async identityById(userId) {
|
|
84
84
|
if (!userId)
|
|
@@ -142,7 +142,7 @@ class UsersResource {
|
|
|
142
142
|
* avatar change is audited like any other.
|
|
143
143
|
*
|
|
144
144
|
* The previous object is removed *after* the new URL is committed, and a failed cleanup is
|
|
145
|
-
* swallowed
|
|
145
|
+
* swallowed - an orphaned object is a storage bill, a failed upload is a broken avatar.
|
|
146
146
|
*/
|
|
147
147
|
async setProfileImage(userId, file) {
|
|
148
148
|
const { name, extension } = (0, paths_1.splitFileName)((0, paths_1.sanitizeFileName)(file.name));
|
package/dist/users/paths.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ export declare const PROFILE_PICTURES_BUCKET = "profile-pictures";
|
|
|
3
3
|
/**
|
|
4
4
|
* Where a member's avatar lives in the `profile-pictures` bucket.
|
|
5
5
|
*
|
|
6
|
-
* `organizationId/userId/timestamp-file`
|
|
6
|
+
* `organizationId/userId/timestamp-file` - the organization leads so the storage policy can
|
|
7
7
|
* scope by tenant, and the user id follows so it can scope by owner. Neither segment comes
|
|
8
8
|
* from the client.
|
|
9
9
|
*
|
|
@@ -17,7 +17,7 @@ export declare const profileImagePath: (organizationId: string, userId: string,
|
|
|
17
17
|
* The object key behind a stored `users.profile_image` URL, so the previous avatar can be
|
|
18
18
|
* removed when a new one replaces it.
|
|
19
19
|
*
|
|
20
|
-
* Returns null for anything that is not one of our own public URLs
|
|
20
|
+
* Returns null for anything that is not one of our own public URLs - the column also holds
|
|
21
21
|
* whatever `raw_user_meta_data` carried at signup (a Google or Gravatar URL), and those are
|
|
22
22
|
* not ours to delete.
|
|
23
23
|
*/
|
package/dist/users/paths.js
CHANGED
|
@@ -6,7 +6,7 @@ exports.PROFILE_PICTURES_BUCKET = 'profile-pictures';
|
|
|
6
6
|
/**
|
|
7
7
|
* Where a member's avatar lives in the `profile-pictures` bucket.
|
|
8
8
|
*
|
|
9
|
-
* `organizationId/userId/timestamp-file`
|
|
9
|
+
* `organizationId/userId/timestamp-file` - the organization leads so the storage policy can
|
|
10
10
|
* scope by tenant, and the user id follows so it can scope by owner. Neither segment comes
|
|
11
11
|
* from the client.
|
|
12
12
|
*
|
|
@@ -21,7 +21,7 @@ exports.profileImagePath = profileImagePath;
|
|
|
21
21
|
* The object key behind a stored `users.profile_image` URL, so the previous avatar can be
|
|
22
22
|
* removed when a new one replaces it.
|
|
23
23
|
*
|
|
24
|
-
* Returns null for anything that is not one of our own public URLs
|
|
24
|
+
* Returns null for anything that is not one of our own public URLs - the column also holds
|
|
25
25
|
* whatever `raw_user_meta_data` carried at signup (a Google or Gravatar URL), and those are
|
|
26
26
|
* not ours to delete.
|
|
27
27
|
*/
|
|
@@ -17,7 +17,7 @@ export type ClaimOutcome = {
|
|
|
17
17
|
kind: 'vanished';
|
|
18
18
|
};
|
|
19
19
|
/**
|
|
20
|
-
* The provider event logs
|
|
20
|
+
* The provider event logs - `paystack_webhook_events` and `resend_webhook_events`. Every policy
|
|
21
21
|
* on both is `false` for `authenticated`, including READ: the raw payloads are never exposed to
|
|
22
22
|
* end users, and an inbound webhook has no caller to run as.
|
|
23
23
|
*
|
|
@@ -30,7 +30,7 @@ export declare class WebhookEventsResource {
|
|
|
30
30
|
private readonly table;
|
|
31
31
|
constructor(supabase: TypedSupabaseClient, table: WebhookEventsTable);
|
|
32
32
|
/**
|
|
33
|
-
* The dedup test. One insert, straight to `processing`
|
|
33
|
+
* The dedup test. One insert, straight to `processing` - there is no useful window in which
|
|
34
34
|
* the row would sit at `received`.
|
|
35
35
|
*
|
|
36
36
|
* The unique index is partial (`where processing_status <> 'ignored_duplicate'`), so at
|
|
@@ -44,7 +44,7 @@ export declare class WebhookEventsResource {
|
|
|
44
44
|
findByEventKey(eventKey: string): Promise<WebhookEventRow | null>;
|
|
45
45
|
/**
|
|
46
46
|
* Reclaims a `failed` row for reprocessing, clearing the previous failure. Guarded on the
|
|
47
|
-
* row still being failed, because another redelivery may have reclaimed it first
|
|
47
|
+
* row still being failed, because another redelivery may have reclaimed it first - resolves
|
|
48
48
|
* to null when it did.
|
|
49
49
|
*
|
|
50
50
|
* This is the single most important detail in the pipeline: swallowing a redelivery of a
|
|
@@ -4,7 +4,7 @@ exports.WebhookEventsResource = void 0;
|
|
|
4
4
|
const errors_1 = require("../errors");
|
|
5
5
|
const UNIQUE_VIOLATION = '23505';
|
|
6
6
|
/**
|
|
7
|
-
* The provider event logs
|
|
7
|
+
* The provider event logs - `paystack_webhook_events` and `resend_webhook_events`. Every policy
|
|
8
8
|
* on both is `false` for `authenticated`, including READ: the raw payloads are never exposed to
|
|
9
9
|
* end users, and an inbound webhook has no caller to run as.
|
|
10
10
|
*
|
|
@@ -20,7 +20,7 @@ class WebhookEventsResource {
|
|
|
20
20
|
this.table = table;
|
|
21
21
|
}
|
|
22
22
|
/**
|
|
23
|
-
* The dedup test. One insert, straight to `processing`
|
|
23
|
+
* The dedup test. One insert, straight to `processing` - there is no useful window in which
|
|
24
24
|
* the row would sit at `received`.
|
|
25
25
|
*
|
|
26
26
|
* The unique index is partial (`where processing_status <> 'ignored_duplicate'`), so at
|
|
@@ -57,7 +57,7 @@ class WebhookEventsResource {
|
|
|
57
57
|
}
|
|
58
58
|
/**
|
|
59
59
|
* Reclaims a `failed` row for reprocessing, clearing the previous failure. Guarded on the
|
|
60
|
-
* row still being failed, because another redelivery may have reclaimed it first
|
|
60
|
+
* row still being failed, because another redelivery may have reclaimed it first - resolves
|
|
61
61
|
* to null when it did.
|
|
62
62
|
*
|
|
63
63
|
* This is the single most important detail in the pipeline: swallowing a redelivery of a
|
package/package.json
CHANGED