@etohq/space 1.5.1-alpha.4

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2021 Etohq
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,3 @@
1
+ # Payment Module
2
+
3
+ A Payment is the result of a series of financial transactions performed as part of collecting a payment of a purchase. The Payment holds information about the payment provider as well as the state of it. You can associate a Payment with a Cart, an Order, an OrderEdit, or any other resource you’d like to have your customers pay for.
@@ -0,0 +1,6 @@
1
+ import { SpaceModuleService } from "./services";
2
+ declare const _default: import("@etohq/types").ModuleExports<typeof SpaceModuleService> & {
3
+ linkable: Record<string, any>;
4
+ };
5
+ export default _default;
6
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAA;;;;AAG9C,wBAEE"}
package/dist/index.js ADDED
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const _services_1 = require("./services");
4
+ const utils_1 = require("@etohq/framework/utils");
5
+ exports.default = (0, utils_1.Module)(utils_1.Modules.SPACE, {
6
+ service: _services_1.SpaceModuleService,
7
+ });
8
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;AAAA,yCAA8C;AAC9C,kDAAwD;AAExD,kBAAe,IAAA,cAAM,EAAC,eAAO,CAAC,KAAK,EAAE;IACnC,OAAO,EAAE,8BAAkB;CAC5B,CAAC,CAAA"}
@@ -0,0 +1,3 @@
1
+ export declare const joinerConfig: Omit<import("@etohq/types").ModuleJoinerConfig, "serviceName" | "primaryKeys" | "alias" | "linkableKeys"> & Required<Pick<import("@etohq/types").ModuleJoinerConfig, "serviceName" | "primaryKeys" | "alias" | "linkableKeys">>;
2
+ export default joinerConfig;
3
+ //# sourceMappingURL=joiner-config.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"joiner-config.d.ts","sourceRoot":"","sources":["../src/joiner-config.ts"],"names":[],"mappings":"AAQA,eAAO,MAAM,YAAY,iOAYvB,CAAA;AAEF,eAAe,YAAY,CAAA"}
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.joinerConfig = void 0;
7
+ const utils_1 = require("@etohq/framework/utils");
8
+ const space_1 = require("./models/space");
9
+ const space_profile_1 = require("./models/space-profile");
10
+ // You may add other model imports here as needed (e.g., Membership, Booking)
11
+ const schema_1 = __importDefault(require("./schema"));
12
+ exports.joinerConfig = (0, utils_1.defineJoinerConfig)(utils_1.Modules.SPACE, {
13
+ schema: schema_1.default,
14
+ linkableKeys: {
15
+ parent_id: "Space",
16
+ space_id: "SpaceProfile",
17
+ // Add additional linkable keys as appropriate
18
+ },
19
+ models: [
20
+ space_1.Space,
21
+ space_profile_1.SpaceProfile,
22
+ // Add other models here (e.g., Membership, Booking) if applicable
23
+ ],
24
+ });
25
+ exports.default = exports.joinerConfig;
26
+ //# sourceMappingURL=joiner-config.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"joiner-config.js","sourceRoot":"","sources":["../src/joiner-config.ts"],"names":[],"mappings":";;;;;;AAAA,kDAAoE;AAEpE,0CAAsC;AACtC,0DAAqD;AACrD,6EAA6E;AAE7E,sDAA6B;AAEhB,QAAA,YAAY,GAAG,IAAA,0BAAkB,EAAC,eAAO,CAAC,KAAK,EAAE;IAC5D,MAAM,EAAN,gBAAM;IACN,YAAY,EAAE;QACZ,SAAS,EAAE,OAAO;QAClB,QAAQ,EAAE,cAAc;QACxB,8CAA8C;KAC/C;IACD,MAAM,EAAE;QACN,aAAK;QACL,4BAAY;QACZ,kEAAkE;KACnE;CACF,CAAC,CAAA;AAEF,kBAAe,oBAAY,CAAA"}
@@ -0,0 +1,8 @@
1
+ export declare const SpaceProfile: import("@etohq/framework/utils").DmlEntity<import("@etohq/framework/utils").DMLEntitySchemaBuilder<{
2
+ id: import("@etohq/framework/utils").PrimaryKeyModifier<string, import("@etohq/framework/utils").IdProperty>;
3
+ uid: import("@etohq/framework/utils").TextProperty;
4
+ user_id: import("@etohq/framework/utils").TextProperty;
5
+ space_id: import("@etohq/framework/utils").TextProperty;
6
+ username: import("@etohq/framework/utils").TextProperty;
7
+ }>, "space_profile">;
8
+ //# sourceMappingURL=space-profile.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"space-profile.d.ts","sourceRoot":"","sources":["../../src/models/space-profile.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,YAAY;;;;;;oBA4BrB,CAAC"}
@@ -0,0 +1,35 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SpaceProfile = void 0;
4
+ // eto/packages/core/modules/space/src/models/space-profile.ts
5
+ const utils_1 = require("@etohq/framework/utils");
6
+ exports.SpaceProfile = utils_1.model
7
+ .define("space_profile", {
8
+ id: utils_1.model.id({ prefix: "space_profile" }).primaryKey(),
9
+ uid: utils_1.model.text(),
10
+ user_id: utils_1.model.text(),
11
+ space_id: utils_1.model.text(),
12
+ username: utils_1.model.text(),
13
+ })
14
+ .indexes([
15
+ {
16
+ unique: true,
17
+ on: ["user_id", "space_id"],
18
+ where: "deleted_at IS NULL",
19
+ },
20
+ {
21
+ unique: true,
22
+ on: ["username", "space_id"],
23
+ where: "deleted_at IS NULL",
24
+ },
25
+ {
26
+ on: ["uid"],
27
+ },
28
+ {
29
+ on: ["user_id"],
30
+ },
31
+ {
32
+ on: ["space_id"],
33
+ },
34
+ ]);
35
+ //# sourceMappingURL=space-profile.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"space-profile.js","sourceRoot":"","sources":["../../src/models/space-profile.ts"],"names":[],"mappings":";;;AAAA,8DAA8D;AAC9D,kDAA+C;AAElC,QAAA,YAAY,GAAG,aAAK;KAC9B,MAAM,CAAC,eAAe,EAAE;IACvB,EAAE,EAAE,aAAK,CAAC,EAAE,CAAC,EAAE,MAAM,EAAE,eAAe,EAAE,CAAC,CAAC,UAAU,EAAE;IACtD,GAAG,EAAE,aAAK,CAAC,IAAI,EAAE;IACjB,OAAO,EAAE,aAAK,CAAC,IAAI,EAAE;IACrB,QAAQ,EAAE,aAAK,CAAC,IAAI,EAAE;IACtB,QAAQ,EAAE,aAAK,CAAC,IAAI,EAAE;CACvB,CAAC;KACD,OAAO,CAAC;IACP;QACE,MAAM,EAAE,IAAI;QACZ,EAAE,EAAE,CAAC,SAAS,EAAE,UAAU,CAAC;QAC3B,KAAK,EAAE,oBAAoB;KAC5B;IACD;QACE,MAAM,EAAE,IAAI;QACZ,EAAE,EAAE,CAAC,UAAU,EAAE,UAAU,CAAC;QAC5B,KAAK,EAAE,oBAAoB;KAC5B;IACD;QACE,EAAE,EAAE,CAAC,KAAK,CAAC;KACZ;IACD;QACE,EAAE,EAAE,CAAC,SAAS,CAAC;KAChB;IACD;QACE,EAAE,EAAE,CAAC,UAAU,CAAC;KACjB;CACF,CAAC,CAAC"}
@@ -0,0 +1,51 @@
1
+ export declare enum SpaceVisibility {
2
+ PUBLIC = "public",
3
+ PRIVATE = "private",
4
+ UNLISTED = "unlisted"
5
+ }
6
+ export declare enum WeekStart {
7
+ SUNDAY = "sunday",
8
+ MONDAY = "monday",
9
+ TUESDAY = "tuesday",
10
+ WEDNESDAY = "wednesday",
11
+ THURSDAY = "thursday",
12
+ FRIDAY = "friday",
13
+ SATURDAY = "saturday"
14
+ }
15
+ export declare const Space: import("@etohq/framework/utils").DmlEntity<import("@etohq/framework/utils").DMLEntitySchemaBuilder<{
16
+ id: import("@etohq/framework/utils").PrimaryKeyModifier<string, import("@etohq/framework/utils").IdProperty>;
17
+ name: import("@etohq/framework/utils").TextProperty;
18
+ slug: import("@etohq/framework/utils").NullableModifier<string, import("@etohq/framework/utils").TextProperty>;
19
+ logo_url: import("@etohq/framework/utils").NullableModifier<string, import("@etohq/framework/utils").TextProperty>;
20
+ cal_video_logo: import("@etohq/framework/utils").NullableModifier<string, import("@etohq/framework/utils").TextProperty>;
21
+ app_logo: import("@etohq/framework/utils").NullableModifier<string, import("@etohq/framework/utils").TextProperty>;
22
+ app_icon_logo: import("@etohq/framework/utils").NullableModifier<string, import("@etohq/framework/utils").TextProperty>;
23
+ bio: import("@etohq/framework/utils").NullableModifier<string, import("@etohq/framework/utils").TextProperty>;
24
+ hide_branding: import("@etohq/framework/utils").BooleanProperty;
25
+ hide_team_profile_link: import("@etohq/framework/utils").BooleanProperty;
26
+ is_private: import("@etohq/framework/utils").BooleanProperty;
27
+ hide_book_a_team_member: import("@etohq/framework/utils").BooleanProperty;
28
+ metadata: import("@etohq/framework/utils").NullableModifier<Record<string, unknown>, import("@etohq/framework/utils").JSONProperty>;
29
+ theme: import("@etohq/framework/utils").NullableModifier<string, import("@etohq/framework/utils").TextProperty>;
30
+ rr_reset_interval: import("@etohq/framework/utils").NullableModifier<string, import("@etohq/framework/utils").TextProperty>;
31
+ rr_timestamp_basis: import("@etohq/framework/utils").NullableModifier<string, import("@etohq/framework/utils").TextProperty>;
32
+ brand_color: import("@etohq/framework/utils").NullableModifier<string, import("@etohq/framework/utils").TextProperty>;
33
+ dark_brand_color: import("@etohq/framework/utils").NullableModifier<string, import("@etohq/framework/utils").TextProperty>;
34
+ banner_url: import("@etohq/framework/utils").NullableModifier<string, import("@etohq/framework/utils").TextProperty>;
35
+ parent_id: import("@etohq/framework/utils").NullableModifier<string, import("@etohq/framework/utils").TextProperty>;
36
+ time_format: import("@etohq/framework/utils").NullableModifier<number, import("@etohq/framework/utils").NumberProperty>;
37
+ time_zone: import("@etohq/framework/utils").TextProperty;
38
+ week_start: import("@etohq/framework/utils").EnumProperty<typeof WeekStart>;
39
+ is_workspace: import("@etohq/framework/utils").BooleanProperty;
40
+ pending_payment: import("@etohq/framework/utils").BooleanProperty;
41
+ is_platform: import("@etohq/framework/utils").BooleanProperty;
42
+ created_by_oauth_client_id: import("@etohq/framework/utils").NullableModifier<string, import("@etohq/framework/utils").TextProperty>;
43
+ sms_lock_state: import("@etohq/framework/utils").NullableModifier<string, import("@etohq/framework/utils").TextProperty>;
44
+ sms_lock_reviewed_by_admin: import("@etohq/framework/utils").BooleanProperty;
45
+ include_managed_events_in_limits: import("@etohq/framework/utils").BooleanProperty;
46
+ credit_balance_id: import("@etohq/framework/utils").NullableModifier<string, import("@etohq/framework/utils").TextProperty>;
47
+ organization_onboarding_id: import("@etohq/framework/utils").NullableModifier<string, import("@etohq/framework/utils").TextProperty>;
48
+ managed_organization_id: import("@etohq/framework/utils").NullableModifier<string, import("@etohq/framework/utils").TextProperty>;
49
+ manager_organization_id: import("@etohq/framework/utils").NullableModifier<string, import("@etohq/framework/utils").TextProperty>;
50
+ }>, "space">;
51
+ //# sourceMappingURL=space.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"space.d.ts","sourceRoot":"","sources":["../../src/models/space.ts"],"names":[],"mappings":"AAEA,oBAAY,eAAe;IACzB,MAAM,WAAW;IACjB,OAAO,YAAY;IACnB,QAAQ,aAAa;CACtB;AAED,oBAAY,SAAS;IACnB,MAAM,WAAW;IACjB,MAAM,WAAW;IACjB,OAAO,YAAY;IACnB,SAAS,cAAc;IACvB,QAAQ,aAAa;IACrB,MAAM,WAAW;IACjB,QAAQ,aAAa;CACtB;AAGD,eAAO,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;YA8Cd,CAAA"}
@@ -0,0 +1,69 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Space = exports.WeekStart = exports.SpaceVisibility = void 0;
4
+ // eto/packages/core/modules/space/src/models/space.ts
5
+ const utils_1 = require("@etohq/framework/utils");
6
+ var SpaceVisibility;
7
+ (function (SpaceVisibility) {
8
+ SpaceVisibility["PUBLIC"] = "public";
9
+ SpaceVisibility["PRIVATE"] = "private";
10
+ SpaceVisibility["UNLISTED"] = "unlisted";
11
+ })(SpaceVisibility || (exports.SpaceVisibility = SpaceVisibility = {}));
12
+ var WeekStart;
13
+ (function (WeekStart) {
14
+ WeekStart["SUNDAY"] = "sunday";
15
+ WeekStart["MONDAY"] = "monday";
16
+ WeekStart["TUESDAY"] = "tuesday";
17
+ WeekStart["WEDNESDAY"] = "wednesday";
18
+ WeekStart["THURSDAY"] = "thursday";
19
+ WeekStart["FRIDAY"] = "friday";
20
+ WeekStart["SATURDAY"] = "saturday";
21
+ })(WeekStart || (exports.WeekStart = WeekStart = {}));
22
+ exports.Space = utils_1.model
23
+ .define("space", {
24
+ id: utils_1.model.id({ prefix: "space" }).primaryKey(),
25
+ name: utils_1.model.text(),
26
+ slug: utils_1.model.text().nullable(),
27
+ logo_url: utils_1.model.text().nullable(),
28
+ cal_video_logo: utils_1.model.text().nullable(),
29
+ app_logo: utils_1.model.text().nullable(),
30
+ app_icon_logo: utils_1.model.text().nullable(),
31
+ bio: utils_1.model.text().nullable(),
32
+ hide_branding: utils_1.model.boolean().default(false),
33
+ hide_team_profile_link: utils_1.model.boolean().default(false),
34
+ is_private: utils_1.model.boolean().default(false),
35
+ hide_book_a_team_member: utils_1.model.boolean().default(false),
36
+ metadata: utils_1.model.json().nullable(),
37
+ theme: utils_1.model.text().nullable(),
38
+ rr_reset_interval: utils_1.model.text().nullable(),
39
+ rr_timestamp_basis: utils_1.model.text().nullable(),
40
+ brand_color: utils_1.model.text().nullable(),
41
+ dark_brand_color: utils_1.model.text().nullable(),
42
+ banner_url: utils_1.model.text().nullable(),
43
+ parent_id: utils_1.model.text().nullable(),
44
+ time_format: utils_1.model.number().nullable(),
45
+ time_zone: utils_1.model.text().default("Europe/London"),
46
+ week_start: utils_1.model.enum(WeekStart).default(WeekStart.SUNDAY),
47
+ is_workspace: utils_1.model.boolean().default(false), // Renamed from is_organization
48
+ pending_payment: utils_1.model.boolean().default(false),
49
+ is_platform: utils_1.model.boolean().default(false),
50
+ created_by_oauth_client_id: utils_1.model.text().nullable(),
51
+ sms_lock_state: utils_1.model.text().nullable(),
52
+ sms_lock_reviewed_by_admin: utils_1.model.boolean().default(false),
53
+ include_managed_events_in_limits: utils_1.model.boolean().default(false),
54
+ credit_balance_id: utils_1.model.text().nullable(),
55
+ organization_onboarding_id: utils_1.model.text().nullable(),
56
+ managed_organization_id: utils_1.model.text().nullable(),
57
+ manager_organization_id: utils_1.model.text().nullable(),
58
+ })
59
+ .indexes([
60
+ {
61
+ unique: true,
62
+ on: ["slug", "parent_id"],
63
+ where: "deleted_at IS NULL",
64
+ },
65
+ {
66
+ on: ["parent_id"],
67
+ },
68
+ ]);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IACvC,0BAA0B,EAAE,aAAK,CAAC,OAAO,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC;IAC1D,gCAAgC,EAAE,aAAK,CAAC,OAAO,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC;IAChE,iBAAiB,EAAE,aAAK,CAAC,IAAI,EAAE,CAAC,QAAQ,EAAE;IAC1C,0BAA0B,EAAE,aAAK,CAAC,IAAI,EAAE,CAAC,QAAQ,EAAE;IACnD,uBAAuB,EAAE,aAAK,CAAC,IAAI,EAAE,CAAC,QAAQ,EAAE;IAChD,uBAAuB,EAAE,aAAK,CAAC,IAAI,EAAE,CAAC,QAAQ,EAAE;CACjD,CAAC;KACD,OAAO,CAAC;IACP;QACE,MAAM,EAAE,IAAI;QACZ,EAAE,EAAE,CAAC,MAAM,EAAE,WAAW,CAAC;QACzB,KAAK,EAAE,oBAAoB;KAC5B;IACD;QACE,EAAE,EAAE,CAAC,WAAW,CAAC;KAClB;CACF,CAAC,CAAA"}
@@ -0,0 +1,3 @@
1
+ declare const _default: "\ntype SpaceVisibility = 'public' | 'private' | 'unlisted'\ntype WeekStart = 'sunday' | 'monday' | 'tuesday' | 'wednesday' | 'thursday' | 'friday' | 'saturday'\n\ntype Space = {\n id: string\n name: string\n slug?: string | null\n logo_url?: string | null\n cal_video_logo?: string | null\n app_logo?: string | null\n app_icon_logo?: string | null\n bio?: string | null\n hide_branding: boolean\n hide_team_profile_link: boolean\n is_private: boolean\n hide_book_a_team_member: boolean\n metadata?: any | null\n theme?: string | null\n rr_reset_interval?: string | null\n rr_timestamp_basis?: string | null\n brand_color?: string | null\n dark_brand_color?: string | null\n banner_url?: string | null\n parent_id?: string | null\n time_format?: number | null\n time_zone: string\n week_start: WeekStart\n is_workspace: boolean\n pending_payment: boolean\n is_platform: boolean\n created_by_oauth_client_id?: string | null\n sms_lock_state?: string | null\n sms_lock_reviewed_by_admin: boolean\n include_managed_events_in_limits: boolean\n credit_balance_id?: string | null\n organization_onboarding_id?: string | null\n managed_organization_id?: string | null\n manager_organization_id?: string | null\n}\n\ntype SpaceProfile = {\n id: string\n uid: string\n user_id: string\n space_id: string\n username: string\n}\n\n\n\n";
2
+ export default _default;
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/schema/index.ts"],"names":[],"mappings":";AAAA,wBAmDC"}
@@ -0,0 +1,55 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.default = `
4
+ type SpaceVisibility = 'public' | 'private' | 'unlisted'
5
+ type WeekStart = 'sunday' | 'monday' | 'tuesday' | 'wednesday' | 'thursday' | 'friday' | 'saturday'
6
+
7
+ type Space = {
8
+ id: string
9
+ name: string
10
+ slug?: string | null
11
+ logo_url?: string | null
12
+ cal_video_logo?: string | null
13
+ app_logo?: string | null
14
+ app_icon_logo?: string | null
15
+ bio?: string | null
16
+ hide_branding: boolean
17
+ hide_team_profile_link: boolean
18
+ is_private: boolean
19
+ hide_book_a_team_member: boolean
20
+ metadata?: any | null
21
+ theme?: string | null
22
+ rr_reset_interval?: string | null
23
+ rr_timestamp_basis?: string | null
24
+ brand_color?: string | null
25
+ dark_brand_color?: string | null
26
+ banner_url?: string | null
27
+ parent_id?: string | null
28
+ time_format?: number | null
29
+ time_zone: string
30
+ week_start: WeekStart
31
+ is_workspace: boolean
32
+ pending_payment: boolean
33
+ is_platform: boolean
34
+ created_by_oauth_client_id?: string | null
35
+ sms_lock_state?: string | null
36
+ sms_lock_reviewed_by_admin: boolean
37
+ include_managed_events_in_limits: boolean
38
+ credit_balance_id?: string | null
39
+ organization_onboarding_id?: string | null
40
+ managed_organization_id?: string | null
41
+ manager_organization_id?: string | null
42
+ }
43
+
44
+ type SpaceProfile = {
45
+ id: string
46
+ uid: string
47
+ user_id: string
48
+ space_id: string
49
+ username: string
50
+ }
51
+
52
+
53
+
54
+ `;
55
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/schema/index.ts"],"names":[],"mappings":";;AAAA,kBAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmDd,CAAA"}
@@ -0,0 +1,2 @@
1
+ export { default as SpaceModuleService } from './space-module-service';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/services/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,wBAAwB,CAAA"}
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.SpaceModuleService = void 0;
7
+ var space_module_service_1 = require("./space-module-service");
8
+ Object.defineProperty(exports, "SpaceModuleService", { enumerable: true, get: function () { return __importDefault(space_module_service_1).default; } });
9
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/services/index.ts"],"names":[],"mappings":";;;;;;AAAA,+DAAsE;AAA7D,2IAAA,OAAO,OAAsB"}
@@ -0,0 +1,32 @@
1
+ import { Context, DAL, ModulesSdkTypes } from "@etohq/framework/types";
2
+ import { ModulesSdkUtils } from "@etohq/framework/utils";
3
+ import { CreateSpaceDTO, SpaceDTO, UpdateSpaceDTO, CreateSpaceProfileDTO, SpaceProfileDTO, UpdateSpaceProfileDTO, ISpaceModuleService } from "@etohq/framework/types";
4
+ type InjectedDependencies = {
5
+ baseRepository: DAL.RepositoryService;
6
+ spaceService: ModulesSdkTypes.IEtoInternalService<any>;
7
+ spaceProfileService: ModulesSdkTypes.IEtoInternalService<any>;
8
+ };
9
+ declare const SpaceModuleService_base: ModulesSdkUtils.EtoServiceReturnType<{
10
+ Space: {
11
+ dto: SpaceDTO;
12
+ };
13
+ SpaceProfile: {
14
+ dto: SpaceProfileDTO;
15
+ };
16
+ }>;
17
+ /**
18
+ * Space Module Service
19
+ * Manages spaces and space profiles using ETO patterns
20
+ */
21
+ export default class SpaceModuleService extends SpaceModuleService_base implements ISpaceModuleService {
22
+ protected baseRepository_: DAL.RepositoryService;
23
+ protected spaceService_: ModulesSdkTypes.IEtoInternalService<any>;
24
+ protected spaceProfileService_: ModulesSdkTypes.IEtoInternalService<any>;
25
+ constructor(dependencies: InjectedDependencies);
26
+ createSpace(data: CreateSpaceDTO, context?: Context): Promise<SpaceDTO>;
27
+ updateSpace(data: UpdateSpaceDTO, context?: Context): Promise<SpaceDTO>;
28
+ createSpaceProfile(data: CreateSpaceProfileDTO, context?: Context): Promise<SpaceProfileDTO>;
29
+ updateSpaceProfile(data: UpdateSpaceProfileDTO, context?: Context): Promise<SpaceProfileDTO>;
30
+ }
31
+ export {};
32
+ //# sourceMappingURL=space-module-service.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"space-module-service.d.ts","sourceRoot":"","sources":["../../src/services/space-module-service.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,OAAO,EACP,GAAG,EACH,eAAe,EAChB,MAAM,wBAAwB,CAAA;AAG/B,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAA;AACxD,OAAO,EACL,cAAc,EACd,QAAQ,EACR,cAAc,EACd,qBAAqB,EACrB,eAAe,EACf,qBAAqB,EACrB,mBAAmB,EACpB,MAAM,wBAAwB,CAAA;AAE/B,KAAK,oBAAoB,GAAG;IAC1B,cAAc,EAAE,GAAG,CAAC,iBAAiB,CAAA;IACrC,YAAY,EAAE,eAAe,CAAC,mBAAmB,CAAC,GAAG,CAAC,CAAA;IACtD,mBAAmB,EAAE,eAAe,CAAC,mBAAmB,CAAC,GAAG,CAAC,CAAA;CAC9D,CAAA;;WAcU;QAAE,GAAG,EAAE,QAAQ,CAAA;KAAE;kBACV;QAAE,GAAG,EAAE,eAAe,CAAA;KAAE;;AAP1C;;;GAGG;AACH,MAAM,CAAC,OAAO,OAAO,kBACnB,SAAQ,uBAIR,YAAW,mBAAmB;IAE9B,SAAS,CAAC,eAAe,EAAE,GAAG,CAAC,iBAAiB,CAAA;IAChD,SAAS,CAAC,aAAa,EAAE,eAAe,CAAC,mBAAmB,CAAC,GAAG,CAAC,CAAA;IACjE,SAAS,CAAC,oBAAoB,EAAE,eAAe,CAAC,mBAAmB,CAAC,GAAG,CAAC,CAAA;gBAE5D,YAAY,EAAE,oBAAoB;IASxC,WAAW,CACf,IAAI,EAAE,cAAc,EACpB,OAAO,CAAC,EAAE,OAAO,GAChB,OAAO,CAAC,QAAQ,CAAC;IAId,WAAW,CACf,IAAI,EAAE,cAAc,EACpB,OAAO,CAAC,EAAE,OAAO,GAChB,OAAO,CAAC,QAAQ,CAAC;IAId,kBAAkB,CACtB,IAAI,EAAE,qBAAqB,EAC3B,OAAO,CAAC,EAAE,OAAO,GAChB,OAAO,CAAC,eAAe,CAAC;IAIrB,kBAAkB,CACtB,IAAI,EAAE,qBAAqB,EAC3B,OAAO,CAAC,EAAE,OAAO,GAChB,OAAO,CAAC,eAAe,CAAC;CAG5B"}
@@ -0,0 +1,37 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const space_1 = require("../models/space");
4
+ const space_profile_1 = require("../models/space-profile");
5
+ const utils_1 = require("@etohq/framework/utils");
6
+ // Define models for EtoService code generation
7
+ const generateMethodForModels = {
8
+ Space: space_1.Space,
9
+ SpaceProfile: space_profile_1.SpaceProfile,
10
+ };
11
+ /**
12
+ * Space Module Service
13
+ * Manages spaces and space profiles using ETO patterns
14
+ */
15
+ class SpaceModuleService extends utils_1.ModulesSdkUtils.EtoService(generateMethodForModels) {
16
+ constructor(dependencies) {
17
+ // Pass dependencies and primary model to parent
18
+ super(dependencies, space_1.Space);
19
+ this.baseRepository_ = dependencies.baseRepository;
20
+ this.spaceService_ = dependencies.spaceService;
21
+ this.spaceProfileService_ = dependencies.spaceProfileService;
22
+ }
23
+ async createSpace(data, context) {
24
+ return this.spaceService_.create(data, context);
25
+ }
26
+ async updateSpace(data, context) {
27
+ return this.spaceService_.update(data, context);
28
+ }
29
+ async createSpaceProfile(data, context) {
30
+ return this.spaceProfileService_.create(data, context);
31
+ }
32
+ async updateSpaceProfile(data, context) {
33
+ return this.spaceProfileService_.update(data, context);
34
+ }
35
+ }
36
+ exports.default = SpaceModuleService;
37
+ //# sourceMappingURL=space-module-service.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"space-module-service.js","sourceRoot":"","sources":["../../src/services/space-module-service.ts"],"names":[],"mappings":";;AAKA,2CAAuC;AACvC,2DAAsD;AACtD,kDAAwD;AAiBxD,+CAA+C;AAC/C,MAAM,uBAAuB,GAAG;IAC9B,KAAK,EAAL,aAAK;IACL,YAAY,EAAZ,4BAAY;CACb,CAAA;AAED;;;GAGG;AACH,MAAqB,kBACnB,SAAQ,uBAAe,CAAC,UAAU,CAG/B,uBAAuB,CAAC;IAO3B,YAAY,YAAkC;QAC5C,gDAAgD;QAChD,KAAK,CAAC,YAAY,EAAE,aAAK,CAAC,CAAA;QAE1B,IAAI,CAAC,eAAe,GAAG,YAAY,CAAC,cAAc,CAAA;QAClD,IAAI,CAAC,aAAa,GAAG,YAAY,CAAC,YAAY,CAAA;QAC9C,IAAI,CAAC,oBAAoB,GAAG,YAAY,CAAC,mBAAmB,CAAA;IAC9D,CAAC;IAED,KAAK,CAAC,WAAW,CACf,IAAoB,EACpB,OAAiB;QAEjB,OAAO,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,CAAA;IACjD,CAAC;IAED,KAAK,CAAC,WAAW,CACf,IAAoB,EACpB,OAAiB;QAEjB,OAAO,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,CAAA;IACjD,CAAC;IAED,KAAK,CAAC,kBAAkB,CACtB,IAA2B,EAC3B,OAAiB;QAEjB,OAAO,IAAI,CAAC,oBAAoB,CAAC,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,CAAA;IACxD,CAAC;IAED,KAAK,CAAC,kBAAkB,CACtB,IAA2B,EAC3B,OAAiB;QAEjB,OAAO,IAAI,CAAC,oBAAoB,CAAC,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,CAAA;IACxD,CAAC;CACF;AA/CD,qCA+CC"}
@@ -0,0 +1 @@
1
+ {"root":["../src/index.ts","../src/joiner-config.ts","../src/models/space-profile.ts","../src/models/space.ts","../src/schema/index.ts","../src/services/index.ts","../src/services/space-module-service.ts"],"version":"5.8.3"}
package/package.json ADDED
@@ -0,0 +1,63 @@
1
+ {
2
+ "name": "@etohq/space",
3
+ "version": "1.5.1-alpha.4",
4
+ "description": "Eto Space module",
5
+ "main": "dist/index.js",
6
+ "types": "dist/index.d.ts",
7
+ "files": [
8
+ "dist",
9
+ "!dist/**/__tests__",
10
+ "!dist/**/__mocks__",
11
+ "!dist/**/__fixtures__"
12
+ ],
13
+ "engines": {
14
+ "node": ">=20"
15
+ },
16
+ "repository": {
17
+ "type": "git",
18
+ "url": "https://github.com/etohq/eto",
19
+ "directory": "packages/core/modules/space"
20
+ },
21
+ "publishConfig": {
22
+ "access": "public"
23
+ },
24
+ "author": "Eto",
25
+ "license": "MIT",
26
+ "devDependencies": {
27
+ "@mikro-orm/cli": "6.4.3",
28
+ "@mikro-orm/core": "6.4.3",
29
+ "@mikro-orm/migrations": "6.4.3",
30
+ "@mikro-orm/postgresql": "6.4.3",
31
+ "@swc/core": "1.7.28",
32
+ "@swc/jest": "0.2.36",
33
+ "@types/jest": "29.5.14",
34
+ "awilix": "8.0.1",
35
+ "jest": "29.7.0",
36
+ "rimraf": "5.0.2",
37
+ "tsc-alias": "1.8.6",
38
+ "typescript": "5.8.3",
39
+ "@etohq/framework": "1.5.1-alpha.4",
40
+ "@etohq/types": "1.5.1-alpha.4",
41
+ "@etohq/test-utils": "1.5.1-alpha.4"
42
+ },
43
+ "peerDependencies": {
44
+ "@mikro-orm/core": "6.4.3",
45
+ "@mikro-orm/migrations": "6.4.3",
46
+ "@mikro-orm/postgresql": "6.4.3",
47
+ "awilix": "8.0.1",
48
+ "@etohq/framework": "1.5.1-alpha.4",
49
+ "@etohq/types": "1.5.1-alpha.4"
50
+ },
51
+ "scripts": {
52
+ "watch": "tsc --build --watch",
53
+ "watch:test": "tsc --build tsconfig.spec.json --watch",
54
+ "build": "rimraf dist && tsc --build && npm run resolve:aliases",
55
+ "resolve:aliases": "tsc --showConfig -p tsconfig.json > tsconfig.resolved.json && tsc-alias -p tsconfig.resolved.json && rimraf tsconfig.resolved.json",
56
+ "test": "jest --runInBand --bail --passWithNoTests --forceExit -- src",
57
+ "test:integration": "jest --forceExit -- integration-tests/**/__tests__/**/*.ts",
58
+ "migration:initial": " MIKRO_ORM_CLI=./mikro-orm.config.dev.ts eto-mikro-orm migration:create --initial",
59
+ "migration:create": " MIKRO_ORM_CLI=./mikro-orm.config.dev.ts eto-mikro-orm migration:create",
60
+ "migration:up": " MIKRO_ORM_CLI=./mikro-orm.config.dev.ts eto-mikro-orm migration:up",
61
+ "orm:cache:clear": " MIKRO_ORM_CLI=./mikro-orm.config.dev.ts eto-mikro-orm cache:clear"
62
+ }
63
+ }