@managemint-solutions/sdk 0.1.0 → 0.2.0
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 -2
- package/dist/additional-details/dto.d.ts +27 -0
- package/dist/additional-details/dto.js +142 -0
- package/dist/additional-details/dto.js.map +1 -0
- package/dist/additional-details/index.d.ts +17 -0
- package/dist/additional-details/index.js +113 -0
- package/dist/additional-details/index.js.map +1 -0
- package/dist/additional-details/values.d.ts +11 -0
- package/dist/additional-details/values.js +37 -0
- package/dist/additional-details/values.js.map +1 -0
- package/dist/client.d.ts +2 -0
- package/dist/client.js +3 -0
- package/dist/client.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -11,14 +11,16 @@ npm install @managemint-solutions/sdk @supabase/supabase-js
|
|
|
11
11
|
|
|
12
12
|
`@supabase/supabase-js` (^2.103.0), `class-validator` (^0.15) and `class-transformer` (^0.5)
|
|
13
13
|
are peer dependencies — the request DTOs (`AddStatusDto`, `UpdateStatusDto`, `StatusIdDto`,
|
|
14
|
-
`GetStatusesDto`
|
|
14
|
+
`GetStatusesDto`, `AddAdditionalDetailsDto`, `UpdateAdditionalDetailsDto`,
|
|
15
|
+
`AdditionalDetailsIdDto`, `GetAdditionalDetailsDto`) ship with their class-validator
|
|
16
|
+
decorators so consumers validate against
|
|
15
17
|
the same rules the SDK's input types describe. `@nestjs/common` (^11) is an optional peer
|
|
16
18
|
dependency, needed only for the `@managemint-solutions/sdk/nest` subpath.
|
|
17
19
|
|
|
18
20
|
## Usage
|
|
19
21
|
|
|
20
22
|
```ts
|
|
21
|
-
import { createSupabaseClient
|
|
23
|
+
import { createSupabaseClient } from '@managemint-solutions/sdk';
|
|
22
24
|
import type { StatusEntity } from '@managemint-solutions/entities/status';
|
|
23
25
|
import { StatusEntityTypes } from '@managemint-solutions/entities/status/enum';
|
|
24
26
|
|
|
@@ -39,6 +41,29 @@ await supabase.statuses.update(created.mms_id, { label: 'Doing', colour: '#2ecc7
|
|
|
39
41
|
await supabase.statuses.remove(created.mms_id);
|
|
40
42
|
```
|
|
41
43
|
|
|
44
|
+
```ts
|
|
45
|
+
import { AdditionalDetailsEntityTypes, AdditionalDetailsTypes } from '@managemint-solutions/entities/additional-details/enum';
|
|
46
|
+
|
|
47
|
+
// Additional details hang off another entity, so reads and writes take (entity, entityId).
|
|
48
|
+
const details = await supabase.additionalDetails.list(AdditionalDetailsEntityTypes.PROJECT, projectId);
|
|
49
|
+
const detail = await supabase.additionalDetails.create(
|
|
50
|
+
AdditionalDetailsEntityTypes.PROJECT,
|
|
51
|
+
projectId,
|
|
52
|
+
{ key: 'Reference', value: 'INV-1001', type: AdditionalDetailsTypes.Text, copyable: true },
|
|
53
|
+
);
|
|
54
|
+
await supabase.additionalDetails.getById(detail.mms_id);
|
|
55
|
+
await supabase.additionalDetails.update(detail.mms_id, {
|
|
56
|
+
key: 'Reference',
|
|
57
|
+
value: 42,
|
|
58
|
+
type: AdditionalDetailsTypes.Number,
|
|
59
|
+
copyable: false,
|
|
60
|
+
});
|
|
61
|
+
await supabase.additionalDetails.remove(detail.mms_id);
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
The `value` column is `text`; the SDK serializes on write and casts back on read according to the
|
|
65
|
+
row's `type` (`number` → `Number`, `boolean`, `date` → `Date`, `url` → `URL`).
|
|
66
|
+
|
|
42
67
|
The client decodes `{ mms_id, organization_id }` from the JWT itself and scopes every query
|
|
43
68
|
by `organization_id`. `supabase.supabase` is the raw typed `@supabase/supabase-js` client
|
|
44
69
|
(`TypedSupabaseClient`) — the escape hatch for queries not yet covered by a resource.
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { type ValidationOptions } from 'class-validator';
|
|
2
|
+
import type { AddAdditionalDetailsDto as AddAdditionalDetailsDtoType, AdditionalDetailsIdDto as AdditionalDetailsIdDtoType, GetAdditionalDetailsDto as GetAdditionalDetailsDtoType, UpdateAdditionalDetailsDto as UpdateAdditionalDetailsDtoType } from '@managemint-solutions/entities/additional-details/dto';
|
|
3
|
+
import { AdditionalDetailsEntityTypes, AdditionalDetailsTypes } from '@managemint-solutions/entities/additional-details/enum';
|
|
4
|
+
import type { TablesInsert } from '../database.types';
|
|
5
|
+
/** Validates `value` against the sibling `type` property (the discriminator). */
|
|
6
|
+
export declare function IsAdditionalDetailsValueByType(typeProperty: string, validationOptions?: ValidationOptions): (object: object, propertyName: string) => void;
|
|
7
|
+
type AdditionalDetailsInsertColumns = Required<Pick<TablesInsert<'additional_details'>, 'key' | 'copyable'>>;
|
|
8
|
+
export declare class AdditionalDetailsIdDto implements AdditionalDetailsIdDtoType {
|
|
9
|
+
readonly additionalDetailsId: string;
|
|
10
|
+
}
|
|
11
|
+
export declare class GetAdditionalDetailsDto implements GetAdditionalDetailsDtoType {
|
|
12
|
+
readonly entity: AdditionalDetailsEntityTypes;
|
|
13
|
+
readonly entityId: string;
|
|
14
|
+
}
|
|
15
|
+
export declare class AddAdditionalDetailsDto implements AddAdditionalDetailsDtoType, AdditionalDetailsInsertColumns {
|
|
16
|
+
readonly key: string;
|
|
17
|
+
readonly value: string | number | boolean | Date | URL;
|
|
18
|
+
readonly type: AdditionalDetailsTypes;
|
|
19
|
+
readonly copyable: boolean;
|
|
20
|
+
}
|
|
21
|
+
export declare class UpdateAdditionalDetailsDto implements UpdateAdditionalDetailsDtoType, AdditionalDetailsInsertColumns {
|
|
22
|
+
readonly key: string;
|
|
23
|
+
readonly value: string | number | boolean;
|
|
24
|
+
readonly type: AdditionalDetailsTypes;
|
|
25
|
+
readonly copyable: boolean;
|
|
26
|
+
}
|
|
27
|
+
export {};
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.UpdateAdditionalDetailsDto = exports.AddAdditionalDetailsDto = exports.GetAdditionalDetailsDto = exports.AdditionalDetailsIdDto = void 0;
|
|
13
|
+
exports.IsAdditionalDetailsValueByType = IsAdditionalDetailsValueByType;
|
|
14
|
+
const class_validator_1 = require("class-validator");
|
|
15
|
+
const enum_1 = require("@managemint-solutions/entities/additional-details/enum");
|
|
16
|
+
/** Validates `value` against the sibling `type` property (the discriminator). */
|
|
17
|
+
function IsAdditionalDetailsValueByType(typeProperty, validationOptions) {
|
|
18
|
+
return function (object, propertyName) {
|
|
19
|
+
(0, class_validator_1.registerDecorator)({
|
|
20
|
+
name: 'isAdditionalDetailsValueByType',
|
|
21
|
+
target: object.constructor,
|
|
22
|
+
propertyName,
|
|
23
|
+
constraints: [typeProperty],
|
|
24
|
+
options: validationOptions,
|
|
25
|
+
validator: {
|
|
26
|
+
validate(value, args) {
|
|
27
|
+
const [typeKey] = args.constraints;
|
|
28
|
+
const selectedType = args.object[typeKey];
|
|
29
|
+
// Let enum validation on `type` report invalid type values.
|
|
30
|
+
if (!selectedType || !Object.values(enum_1.AdditionalDetailsTypes).includes(selectedType)) {
|
|
31
|
+
return true;
|
|
32
|
+
}
|
|
33
|
+
if (value === null || value === undefined) {
|
|
34
|
+
return false;
|
|
35
|
+
}
|
|
36
|
+
switch (selectedType) {
|
|
37
|
+
case enum_1.AdditionalDetailsTypes.Text:
|
|
38
|
+
return typeof value === 'string' && value.trim().length > 0;
|
|
39
|
+
case enum_1.AdditionalDetailsTypes.Number:
|
|
40
|
+
return typeof value === 'number' && Number.isFinite(value);
|
|
41
|
+
case enum_1.AdditionalDetailsTypes.Boolean:
|
|
42
|
+
return typeof value === 'boolean';
|
|
43
|
+
case enum_1.AdditionalDetailsTypes.DATE:
|
|
44
|
+
return typeof value === 'string' && !Number.isNaN(Date.parse(value));
|
|
45
|
+
case enum_1.AdditionalDetailsTypes.URL:
|
|
46
|
+
if (typeof value !== 'string') {
|
|
47
|
+
return false;
|
|
48
|
+
}
|
|
49
|
+
try {
|
|
50
|
+
const parsedUrl = new URL(value);
|
|
51
|
+
return parsedUrl.protocol === 'http:' || parsedUrl.protocol === 'https:';
|
|
52
|
+
}
|
|
53
|
+
catch {
|
|
54
|
+
return false;
|
|
55
|
+
}
|
|
56
|
+
default:
|
|
57
|
+
return true;
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
defaultMessage(args) {
|
|
61
|
+
const [typeKey] = args.constraints;
|
|
62
|
+
const selectedType = args.object[typeKey];
|
|
63
|
+
return `Value does not match provided type: ${String(selectedType)}`;
|
|
64
|
+
},
|
|
65
|
+
},
|
|
66
|
+
});
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
class AdditionalDetailsIdDto {
|
|
70
|
+
additionalDetailsId;
|
|
71
|
+
}
|
|
72
|
+
exports.AdditionalDetailsIdDto = AdditionalDetailsIdDto;
|
|
73
|
+
__decorate([
|
|
74
|
+
(0, class_validator_1.IsUUID)('4', { message: 'Invalid additional details ID format' }),
|
|
75
|
+
__metadata("design:type", String)
|
|
76
|
+
], AdditionalDetailsIdDto.prototype, "additionalDetailsId", void 0);
|
|
77
|
+
class GetAdditionalDetailsDto {
|
|
78
|
+
entity;
|
|
79
|
+
entityId;
|
|
80
|
+
}
|
|
81
|
+
exports.GetAdditionalDetailsDto = GetAdditionalDetailsDto;
|
|
82
|
+
__decorate([
|
|
83
|
+
(0, class_validator_1.IsEnum)(enum_1.AdditionalDetailsEntityTypes, { message: 'Invalid entity type' }),
|
|
84
|
+
__metadata("design:type", String)
|
|
85
|
+
], GetAdditionalDetailsDto.prototype, "entity", void 0);
|
|
86
|
+
__decorate([
|
|
87
|
+
(0, class_validator_1.IsUUID)('4', { message: 'Invalid entity ID format' }),
|
|
88
|
+
__metadata("design:type", String)
|
|
89
|
+
], GetAdditionalDetailsDto.prototype, "entityId", void 0);
|
|
90
|
+
class AddAdditionalDetailsDto {
|
|
91
|
+
key;
|
|
92
|
+
value;
|
|
93
|
+
type;
|
|
94
|
+
copyable;
|
|
95
|
+
}
|
|
96
|
+
exports.AddAdditionalDetailsDto = AddAdditionalDetailsDto;
|
|
97
|
+
__decorate([
|
|
98
|
+
(0, class_validator_1.IsString)({ message: 'Invalid key' }),
|
|
99
|
+
(0, class_validator_1.MinLength)(1, { message: 'Key cannot be empty' }),
|
|
100
|
+
(0, class_validator_1.MaxLength)(100, { message: 'Key cannot exceed 100 characters' }),
|
|
101
|
+
__metadata("design:type", String)
|
|
102
|
+
], AddAdditionalDetailsDto.prototype, "key", void 0);
|
|
103
|
+
__decorate([
|
|
104
|
+
(0, class_validator_1.IsDefined)({ message: 'Value is required' }),
|
|
105
|
+
IsAdditionalDetailsValueByType('type', { message: 'Value does not match the provided type' }),
|
|
106
|
+
__metadata("design:type", Object)
|
|
107
|
+
], AddAdditionalDetailsDto.prototype, "value", void 0);
|
|
108
|
+
__decorate([
|
|
109
|
+
(0, class_validator_1.IsEnum)(enum_1.AdditionalDetailsTypes, { message: 'Invalid additional details type' }),
|
|
110
|
+
__metadata("design:type", String)
|
|
111
|
+
], AddAdditionalDetailsDto.prototype, "type", void 0);
|
|
112
|
+
__decorate([
|
|
113
|
+
(0, class_validator_1.IsBoolean)({ message: 'Invalid copyable value' }),
|
|
114
|
+
__metadata("design:type", Boolean)
|
|
115
|
+
], AddAdditionalDetailsDto.prototype, "copyable", void 0);
|
|
116
|
+
class UpdateAdditionalDetailsDto {
|
|
117
|
+
key;
|
|
118
|
+
value;
|
|
119
|
+
type;
|
|
120
|
+
copyable;
|
|
121
|
+
}
|
|
122
|
+
exports.UpdateAdditionalDetailsDto = UpdateAdditionalDetailsDto;
|
|
123
|
+
__decorate([
|
|
124
|
+
(0, class_validator_1.IsString)({ message: 'Invalid key' }),
|
|
125
|
+
(0, class_validator_1.MinLength)(1, { message: 'Key cannot be empty' }),
|
|
126
|
+
(0, class_validator_1.MaxLength)(100, { message: 'Key cannot exceed 100 characters' }),
|
|
127
|
+
__metadata("design:type", String)
|
|
128
|
+
], UpdateAdditionalDetailsDto.prototype, "key", void 0);
|
|
129
|
+
__decorate([
|
|
130
|
+
(0, class_validator_1.IsDefined)({ message: 'Value is required' }),
|
|
131
|
+
IsAdditionalDetailsValueByType('type', { message: 'Value does not match the provided type' }),
|
|
132
|
+
__metadata("design:type", Object)
|
|
133
|
+
], UpdateAdditionalDetailsDto.prototype, "value", void 0);
|
|
134
|
+
__decorate([
|
|
135
|
+
(0, class_validator_1.IsEnum)(enum_1.AdditionalDetailsTypes, { message: 'Invalid additional details type' }),
|
|
136
|
+
__metadata("design:type", String)
|
|
137
|
+
], UpdateAdditionalDetailsDto.prototype, "type", void 0);
|
|
138
|
+
__decorate([
|
|
139
|
+
(0, class_validator_1.IsBoolean)({ message: 'Invalid copyable value' }),
|
|
140
|
+
__metadata("design:type", Boolean)
|
|
141
|
+
], UpdateAdditionalDetailsDto.prototype, "copyable", void 0);
|
|
142
|
+
//# sourceMappingURL=dto.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dto.js","sourceRoot":"","sources":["../../src/additional-details/dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAyBA,wEA4DC;AArFD,qDAWyB;AAOzB,iFAGgE;AAGhE,iFAAiF;AACjF,SAAgB,8BAA8B,CAC5C,YA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
|
|
|
1
|
+
import type { AdditionalDetailSummary, AdditionalDetailsEntity } from '@managemint-solutions/entities/additional-details';
|
|
2
|
+
import type { AddAdditionalDetailsDto, UpdateAdditionalDetailsDto } from '@managemint-solutions/entities/additional-details/dto';
|
|
3
|
+
import { AdditionalDetailsEntityTypes } from '@managemint-solutions/entities/additional-details/enum';
|
|
4
|
+
import type { AuthContext } from '../auth';
|
|
5
|
+
import type { TypedSupabaseClient } from '../client';
|
|
6
|
+
export * from './dto';
|
|
7
|
+
export * from './values';
|
|
8
|
+
export declare class AdditionalDetailsResource {
|
|
9
|
+
private readonly supabase;
|
|
10
|
+
private readonly auth;
|
|
11
|
+
constructor(supabase: TypedSupabaseClient, auth: AuthContext);
|
|
12
|
+
getById(additionalDetailsId: string): Promise<AdditionalDetailsEntity>;
|
|
13
|
+
list(entity: AdditionalDetailsEntityTypes, entityId: string): Promise<AdditionalDetailSummary[]>;
|
|
14
|
+
create(entity: AdditionalDetailsEntityTypes, entityId: string, input: AddAdditionalDetailsDto): Promise<AdditionalDetailsEntity>;
|
|
15
|
+
update(additionalDetailsId: string, input: UpdateAdditionalDetailsDto): Promise<AdditionalDetailsEntity>;
|
|
16
|
+
remove(additionalDetailsId: string): Promise<void>;
|
|
17
|
+
}
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.AdditionalDetailsResource = void 0;
|
|
18
|
+
const errors_1 = require("../errors");
|
|
19
|
+
const values_1 = require("./values");
|
|
20
|
+
__exportStar(require("./dto"), exports);
|
|
21
|
+
__exportStar(require("./values"), exports);
|
|
22
|
+
// The query is typed by the generated Database schema (so the select string and the
|
|
23
|
+
// insert/update payloads are checked); the public contract is the shared entities type.
|
|
24
|
+
// The two shapes legitimately differ, hence `as unknown as`: the embedded user_profiles rows
|
|
25
|
+
// are all-nullable view rows where the entity declares UserIdentity, the timestamps are ISO
|
|
26
|
+
// strings where the entity declares Date, and `value` is the `text` column where the entity
|
|
27
|
+
// declares the parsed string | number | boolean | Date | URL union that castValueByType produces.
|
|
28
|
+
const ADDITIONAL_DETAILS_SELECT = 'mms_id, created_at, created_by:user_profiles!created_by(*), updated_at, last_updated_by:user_profiles!last_updated_by(*), key, value, type, copyable';
|
|
29
|
+
const ADDITIONAL_DETAILS_SUMMARY_SELECT = 'mms_id, key, value, type, copyable';
|
|
30
|
+
const withCastValue = (detail) => ({
|
|
31
|
+
...detail,
|
|
32
|
+
value: (0, values_1.castValueByType)(detail.type, detail.value),
|
|
33
|
+
});
|
|
34
|
+
class AdditionalDetailsResource {
|
|
35
|
+
supabase;
|
|
36
|
+
auth;
|
|
37
|
+
constructor(supabase, auth) {
|
|
38
|
+
this.supabase = supabase;
|
|
39
|
+
this.auth = auth;
|
|
40
|
+
}
|
|
41
|
+
async getById(additionalDetailsId) {
|
|
42
|
+
const { data, error } = await this.supabase
|
|
43
|
+
.from('additional_details')
|
|
44
|
+
.select(ADDITIONAL_DETAILS_SELECT)
|
|
45
|
+
.eq('organization_id', this.auth.organization_id)
|
|
46
|
+
.eq('mms_id', additionalDetailsId)
|
|
47
|
+
.single();
|
|
48
|
+
if (error)
|
|
49
|
+
throw (0, errors_1.mapPostgrestError)(error);
|
|
50
|
+
return withCastValue(data);
|
|
51
|
+
}
|
|
52
|
+
async list(entity, entityId) {
|
|
53
|
+
const { data, error } = await this.supabase
|
|
54
|
+
.from('additional_details')
|
|
55
|
+
.select(ADDITIONAL_DETAILS_SUMMARY_SELECT)
|
|
56
|
+
.eq('organization_id', this.auth.organization_id)
|
|
57
|
+
.eq('entity_type', entity)
|
|
58
|
+
.eq('entity_id', entityId)
|
|
59
|
+
.order('key', { ascending: false });
|
|
60
|
+
if (error)
|
|
61
|
+
throw (0, errors_1.mapPostgrestError)(error);
|
|
62
|
+
return data.map(withCastValue);
|
|
63
|
+
}
|
|
64
|
+
async create(entity, entityId, input) {
|
|
65
|
+
const { data, error } = await this.supabase
|
|
66
|
+
.from('additional_details')
|
|
67
|
+
.insert({
|
|
68
|
+
organization_id: this.auth.organization_id,
|
|
69
|
+
entity_type: entity,
|
|
70
|
+
entity_id: entityId,
|
|
71
|
+
key: input.key,
|
|
72
|
+
value: (0, values_1.serializeValue)(input.value),
|
|
73
|
+
type: input.type,
|
|
74
|
+
copyable: input.copyable,
|
|
75
|
+
created_by: this.auth.mms_id,
|
|
76
|
+
})
|
|
77
|
+
.select(ADDITIONAL_DETAILS_SELECT)
|
|
78
|
+
.single();
|
|
79
|
+
if (error)
|
|
80
|
+
throw (0, errors_1.mapPostgrestError)(error);
|
|
81
|
+
return withCastValue(data);
|
|
82
|
+
}
|
|
83
|
+
async update(additionalDetailsId, input) {
|
|
84
|
+
const { data, error } = await this.supabase
|
|
85
|
+
.from('additional_details')
|
|
86
|
+
.update({
|
|
87
|
+
key: input.key,
|
|
88
|
+
value: (0, values_1.serializeValue)(input.value),
|
|
89
|
+
type: input.type,
|
|
90
|
+
copyable: input.copyable,
|
|
91
|
+
updated_at: new Date().toISOString(),
|
|
92
|
+
last_updated_by: this.auth.mms_id,
|
|
93
|
+
})
|
|
94
|
+
.eq('mms_id', additionalDetailsId)
|
|
95
|
+
.eq('organization_id', this.auth.organization_id)
|
|
96
|
+
.select(ADDITIONAL_DETAILS_SELECT)
|
|
97
|
+
.single();
|
|
98
|
+
if (error)
|
|
99
|
+
throw (0, errors_1.mapPostgrestError)(error);
|
|
100
|
+
return withCastValue(data);
|
|
101
|
+
}
|
|
102
|
+
async remove(additionalDetailsId) {
|
|
103
|
+
const { error } = await this.supabase
|
|
104
|
+
.from('additional_details')
|
|
105
|
+
.delete()
|
|
106
|
+
.eq('mms_id', additionalDetailsId)
|
|
107
|
+
.eq('organization_id', this.auth.organization_id);
|
|
108
|
+
if (error)
|
|
109
|
+
throw (0, errors_1.mapPostgrestError)(error);
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
exports.AdditionalDetailsResource = AdditionalDetailsResource;
|
|
113
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/additional-details/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAcA,sCAA8C;AAC9C,qCAA2D;AAE3D,wCAAsB;AACtB,2CAAyB;AAEzB,oFAAoF;AACpF,wFAAwF;AACxF,6FAA6F;AAC7F,4FAA4F;AAC5F,4FAA4F;AAC5F,kGAAkG;AAClG,MAAM,yBAAyB,GAC7B,sJAA+J,CAAC;AAElK,MAAM,iCAAiC,GAAG,oCAA6C,CAAC;AAExF,MAAM,aAAa,GAAG,CAA6C,MAAS,EAAE,EAAE,CAAC,CAAC;IAChF,GAAG,MAAM;IACT,KAAK,EAAE,IAAA,wBAAe,EAAC,MAAM,CAAC,IAA8B,EAAE,MAAM,CAAC,KAAK,CAAC;CAC5E,CAAC,CAAC;AAEH,MAAa,yBAAyB;IAEjB;IACA;IAFnB,YACmB,QAA6B,EAC7B,IAAiB;QADjB,aAAQ,GAAR,QAAQ,CAAqB;QAC7B,SAAI,GAAJ,IAAI,CAAa;IACjC,CA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AAC,MAAM,CAAC,mBAA2B;QACtC,MAAM,EAAE,KAAK,EAAE,GAAG,MAAM,IAAI,CAAC,QAAQ;aAClC,IAAI,CAAC,oBAAoB,CAAC;aAC1B,MAAM,EAAE;aACR,EAAE,CAAC,QAAQ,EAAE,mBAAmB,CAAC;aACjC,EAAE,CAAC,iBAAiB,EAAE,IAAI,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;QACpD,IAAI,KAAK;YAAE,MAAM,IAAA,0BAAiB,EAAC,KAAK,CAAC,CAAC;IAC5C,CAAC;CACF;AArFD,8DAqFC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { AdditionalDetailsTypes } from '@managemint-solutions/entities/additional-details/enum';
|
|
2
|
+
/**
|
|
3
|
+
* The `value` column is `text`, so every stored value comes back as a string. This casts it
|
|
4
|
+
* back to the JS shape the row's `type` promises. Non-strings and null/undefined pass through.
|
|
5
|
+
*/
|
|
6
|
+
export declare const castValueByType: (type: AdditionalDetailsTypes, value: unknown) => unknown;
|
|
7
|
+
/**
|
|
8
|
+
* What gets written to the `text` column. The generated Insert/Update requires `value: string`;
|
|
9
|
+
* `String()` reproduces the JSON → text coercion PostgREST used to do for number/boolean/string.
|
|
10
|
+
*/
|
|
11
|
+
export declare const serializeValue: (value: string | number | boolean | Date | URL) => string;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.serializeValue = exports.castValueByType = void 0;
|
|
4
|
+
const enum_1 = require("@managemint-solutions/entities/additional-details/enum");
|
|
5
|
+
/**
|
|
6
|
+
* The `value` column is `text`, so every stored value comes back as a string. This casts it
|
|
7
|
+
* back to the JS shape the row's `type` promises. Non-strings and null/undefined pass through.
|
|
8
|
+
*/
|
|
9
|
+
const castValueByType = (type, value) => {
|
|
10
|
+
if (value === null || value === undefined) {
|
|
11
|
+
return value;
|
|
12
|
+
}
|
|
13
|
+
if (typeof value !== 'string') {
|
|
14
|
+
return value;
|
|
15
|
+
}
|
|
16
|
+
switch (type) {
|
|
17
|
+
case enum_1.AdditionalDetailsTypes.Number:
|
|
18
|
+
return Number(value);
|
|
19
|
+
case enum_1.AdditionalDetailsTypes.Boolean:
|
|
20
|
+
return value.toLowerCase() === 'true';
|
|
21
|
+
case enum_1.AdditionalDetailsTypes.DATE:
|
|
22
|
+
return new Date(value);
|
|
23
|
+
case enum_1.AdditionalDetailsTypes.URL:
|
|
24
|
+
return new URL(value);
|
|
25
|
+
case enum_1.AdditionalDetailsTypes.Text:
|
|
26
|
+
default:
|
|
27
|
+
return value;
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
exports.castValueByType = castValueByType;
|
|
31
|
+
/**
|
|
32
|
+
* What gets written to the `text` column. The generated Insert/Update requires `value: string`;
|
|
33
|
+
* `String()` reproduces the JSON → text coercion PostgREST used to do for number/boolean/string.
|
|
34
|
+
*/
|
|
35
|
+
const serializeValue = (value) => value instanceof Date ? value.toISOString() : String(value);
|
|
36
|
+
exports.serializeValue = serializeValue;
|
|
37
|
+
//# sourceMappingURL=values.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"values.js","sourceRoot":"","sources":["../../src/additional-details/values.ts"],"names":[],"mappings":";;;AAAA,iFAAgG;AAEhG;;;GAGG;AACI,MAAM,eAAe,GAAG,CAAC,IAA4B,EAAE,KAAc,EAAW,EAAE;IACvF,IAAI,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;QAC1C,OAAO,KAAK,CAAC;IACf,CAAC;IAED,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;QAC9B,OAAO,KAAK,CAAC;IACf,CAAC;IAED,QAAQ,IAAI,EAAE,CAAC;QACb,KAAK,6BAAsB,CAAC,MAAM;YAChC,OAAO,MAAM,CAAC,KAAK,CAAC,CAAC;QACvB,KAAK,6BAAsB,CAAC,OAAO;YACjC,OAAO,KAAK,CAAC,WAAW,EAAE,KAAK,MAAM,CAAC;QACxC,KAAK,6BAAsB,CAAC,IAAI;YAC9B,OAAO,IAAI,IAAI,CAAC,KAAK,CAAC,CAAC;QACzB,KAAK,6BAAsB,CAAC,GAAG;YAC7B,OAAO,IAAI,GAAG,CAAC,KAAK,CAAC,CAAC;QACxB,KAAK,6BAAsB,CAAC,IAAI,CAAC;QACjC;YACE,OAAO,KAAK,CAAC;IACjB,CAAC;AACH,CAAC,CAAC;AAtBW,QAAA,eAAe,mBAsB1B;AAEF;;;GAGG;AACI,MAAM,cAAc,GAAG,CAAC,KAA6C,EAAU,EAAE,CACtF,KAAK,YAAY,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;AADjD,QAAA,cAAc,kBACmC"}
|
package/dist/client.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { type SupabaseClient as SupabaseJsClient } from '@supabase/supabase-js';
|
|
2
2
|
import type { Database } from './database.types';
|
|
3
3
|
import { type AuthContext } from './auth';
|
|
4
|
+
import { AdditionalDetailsResource } from './additional-details';
|
|
4
5
|
import { StatusesResource } from './statuses';
|
|
5
6
|
export type TypedSupabaseClient = SupabaseJsClient<Database>;
|
|
6
7
|
export type SupabaseClientConfig = {
|
|
@@ -12,6 +13,7 @@ export declare class SupabaseClient {
|
|
|
12
13
|
readonly supabase: TypedSupabaseClient;
|
|
13
14
|
readonly auth: AuthContext;
|
|
14
15
|
readonly statuses: StatusesResource;
|
|
16
|
+
readonly additionalDetails: AdditionalDetailsResource;
|
|
15
17
|
constructor(config: SupabaseClientConfig);
|
|
16
18
|
}
|
|
17
19
|
export declare const createSupabaseClient: (config: SupabaseClientConfig) => SupabaseClient;
|
package/dist/client.js
CHANGED
|
@@ -3,11 +3,13 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.createSupabaseClient = exports.SupabaseClient = void 0;
|
|
4
4
|
const supabase_js_1 = require("@supabase/supabase-js");
|
|
5
5
|
const auth_1 = require("./auth");
|
|
6
|
+
const additional_details_1 = require("./additional-details");
|
|
6
7
|
const statuses_1 = require("./statuses");
|
|
7
8
|
class SupabaseClient {
|
|
8
9
|
supabase; // escape hatch for not-yet-migrated queries
|
|
9
10
|
auth;
|
|
10
11
|
statuses;
|
|
12
|
+
additionalDetails;
|
|
11
13
|
constructor(config) {
|
|
12
14
|
this.auth = (0, auth_1.decodeAuthContext)(config.accessToken);
|
|
13
15
|
this.supabase = (0, supabase_js_1.createClient)(config.url, config.key, {
|
|
@@ -15,6 +17,7 @@ class SupabaseClient {
|
|
|
15
17
|
auth: { persistSession: false, autoRefreshToken: false },
|
|
16
18
|
});
|
|
17
19
|
this.statuses = new statuses_1.StatusesResource(this.supabase, this.auth);
|
|
20
|
+
this.additionalDetails = new additional_details_1.AdditionalDetailsResource(this.supabase, this.auth);
|
|
18
21
|
}
|
|
19
22
|
}
|
|
20
23
|
exports.SupabaseClient = SupabaseClient;
|
package/dist/client.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.js","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":";;;AAAA,uDAA8F;AAE9F,iCAA6D;AAC7D,yCAA8C;AAU9C,MAAa,cAAc;IAChB,QAAQ,CAAsB,CAAC,4CAA4C;IAC3E,IAAI,CAAc;IAClB,QAAQ,CAAmB;
|
|
1
|
+
{"version":3,"file":"client.js","sourceRoot":"","sources":["../src/client.ts"],"names":[],"mappings":";;;AAAA,uDAA8F;AAE9F,iCAA6D;AAC7D,6DAAiE;AACjE,yCAA8C;AAU9C,MAAa,cAAc;IAChB,QAAQ,CAAsB,CAAC,4CAA4C;IAC3E,IAAI,CAAc;IAClB,QAAQ,CAAmB;IAC3B,iBAAiB,CAA4B;IAEtD,YAAY,MAA4B;QACtC,IAAI,CAAC,IAAI,GAAG,IAAA,wBAAiB,EAAC,MAAM,CAAC,WAAW,CAAC,CAAC;QAClD,IAAI,CAAC,QAAQ,GAAG,IAAA,0BAAY,EAAW,MAAM,CAAC,GAAG,EAAE,MAAM,CAAC,GAAG,EAAE;YAC7D,MAAM,EAAE,EAAE,OAAO,EAAE,EAAE,aAAa,EAAE,UAAU,MAAM,CAAC,WAAW,EAAE,EAAE,EAAE;YACtE,IAAI,EAAE,EAAE,cAAc,EAAE,KAAK,EAAE,gBAAgB,EAAE,KAAK,EAAE;SACzD,CAAC,CAAC;QACH,IAAI,CAAC,QAAQ,GAAG,IAAI,2BAAgB,CAAC,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;QAC/D,IAAI,CAAC,iBAAiB,GAAG,IAAI,8CAAyB,CAAC,IAAI,CAAC,QAAQ,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;IACnF,CAAC;CACF;AAfD,wCAeC;AAEM,MAAM,oBAAoB,GAAG,CAAC,MAA4B,EAAkB,EAAE,CACnF,IAAI,cAAc,CAAC,MAAM,CAAC,CAAC;AADhB,QAAA,oBAAoB,wBACJ"}
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -18,4 +18,5 @@ __exportStar(require("./client"), exports);
|
|
|
18
18
|
__exportStar(require("./auth"), exports);
|
|
19
19
|
__exportStar(require("./errors"), exports);
|
|
20
20
|
__exportStar(require("./statuses"), exports);
|
|
21
|
+
__exportStar(require("./additional-details"), exports);
|
|
21
22
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAAyB;AACzB,yCAAuB;AACvB,2CAAyB;AACzB,6CAA2B"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAAyB;AACzB,yCAAuB;AACvB,2CAAyB;AACzB,6CAA2B;AAC3B,uDAAqC"}
|
package/package.json
CHANGED