@friggframework/core 2.0.0--canary.680.daae24e.0 → 2.0.0--canary.686.e94de4d.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/CHANGELOG.md +0 -11
- package/CLAUDE.md +28 -0
- package/README.md +105 -0
- package/application/commands/integration-commands.js +2 -2
- package/application/commands/scheduler-commands.js +11 -7
- package/application/commands/user-commands.js +17 -5
- package/core/Worker.js +31 -7
- package/core/create-handler.js +9 -0
- package/credential/use-cases/credential-operations-for-user.js +110 -25
- package/credential/use-cases/reauthorize-credential-for-user.js +15 -8
- package/database/config.js +48 -24
- package/database/documentdb-utils.js +6 -1
- package/database/encryption/README.md +0 -2
- package/database/encryption/encryption-config.js +10 -31
- package/database/encryption/encryption-schema-registry.js +99 -47
- package/database/encryption/field-encryption-service.js +5 -69
- package/database/organization-where.js +18 -0
- package/database/prisma.js +4 -2
- package/database/unique-violation.js +25 -0
- package/extensions/bootstrap-runner.js +43 -0
- package/extensions/extension-loader.js +187 -0
- package/extensions/index.js +41 -0
- package/extensions/initialize-app.js +123 -0
- package/extensions/route-mounter.js +103 -0
- package/extensions/schema-composer.js +188 -0
- package/generated/prisma-mongodb/edge.js +27 -4
- package/generated/prisma-mongodb/index-browser.js +24 -1
- package/generated/prisma-mongodb/index.d.ts +3227 -47
- package/generated/prisma-mongodb/index.js +27 -4
- package/generated/prisma-mongodb/package.json +1 -1
- package/generated/prisma-mongodb/schema.prisma +65 -0
- package/generated/prisma-mongodb/wasm.js +27 -4
- package/generated/prisma-postgresql/edge.js +27 -4
- package/generated/prisma-postgresql/index-browser.js +24 -1
- package/generated/prisma-postgresql/index.d.ts +3519 -67
- package/generated/prisma-postgresql/index.js +27 -4
- package/generated/prisma-postgresql/package.json +1 -1
- package/generated/prisma-postgresql/schema.prisma +61 -0
- package/generated/prisma-postgresql/wasm.js +27 -4
- package/handlers/app-definition-loader.js +103 -12
- package/handlers/routers/auth.js +40 -12
- package/handlers/routers/health.js +4 -2
- package/handlers/routers/integration-defined-routers.js +144 -92
- package/handlers/routers/integration-webhook-routers.js +102 -64
- package/index.js +63 -1
- package/infrastructure/scheduler/index.js +19 -6
- package/infrastructure/scheduler/netlify-scheduler-adapter.js +216 -0
- package/infrastructure/scheduler/scheduled-job-repository.js +118 -0
- package/infrastructure/scheduler/scheduler-service-factory.js +55 -7
- package/integrations/index.js +5 -0
- package/integrations/integration-router.js +115 -73
- package/integrations/repositories/integration-not-found.js +14 -0
- package/integrations/repositories/integration-repository-documentdb.js +35 -3
- package/integrations/repositories/integration-repository-interface.js +17 -1
- package/integrations/repositories/integration-repository-mongo.js +59 -76
- package/integrations/repositories/integration-repository-postgres.js +62 -76
- package/integrations/schedule-config.js +80 -0
- package/integrations/tests/doubles/test-integration-repository.js +12 -1
- package/integrations/use-cases/create-integration.js +55 -20
- package/integrations/use-cases/dispatch-ongoing-syncs.js +100 -0
- package/integrations/use-cases/get-integrations-for-user.js +80 -40
- package/integrations/use-cases/index.js +7 -1
- package/integrations/use-cases/integration-operations-for-user.js +55 -24
- package/integrations/use-cases/resolve-integration-ownership.js +177 -0
- package/integrations/utils/map-integration-dto.js +44 -1
- package/management-api/management-api-config.js +71 -2
- package/management-api/meta-router.js +21 -2
- package/management-api/openapi/components.js +40 -0
- package/management-api/openapi/v2-operations.js +16 -4
- package/management-api/route-registry.js +123 -6
- package/management-api/v2/dependencies.js +40 -15
- package/management-api/v2/dto.js +20 -0
- package/management-api/v2/handlers/authorization.js +1 -0
- package/management-api/v2/handlers/credentials.js +6 -2
- package/management-api/v2/handlers/entities.js +10 -7
- package/management-api/v2/handlers/integrations.js +6 -3
- package/management-api/v2/request.js +32 -1
- package/modules/entity-scope.js +15 -0
- package/modules/index.js +8 -0
- package/modules/module-factory.js +12 -0
- package/modules/module.js +53 -2
- package/modules/repositories/entity-not-found.js +18 -0
- package/modules/repositories/module-repository-documentdb.js +51 -6
- package/modules/repositories/module-repository-interface.js +19 -2
- package/modules/repositories/module-repository-mongo.js +67 -74
- package/modules/repositories/module-repository-postgres.js +66 -74
- package/modules/repositories/module-repository.js +2 -1
- package/modules/scope-config.js +192 -0
- package/modules/scope-policy.js +112 -0
- package/modules/scope-resolution.js +288 -0
- package/modules/scope-visibility.js +247 -0
- package/modules/tests/doubles/ownership-matching.js +18 -0
- package/modules/use-cases/authorize-entity-for-user.js +61 -0
- package/modules/use-cases/create-entity-from-credential.js +113 -0
- package/modules/use-cases/entity-operations-for-user.js +50 -13
- package/modules/use-cases/entity-types.js +31 -7
- package/modules/use-cases/execute-entity-proxy-request.js +50 -3
- package/modules/use-cases/get-authorization-requirements.js +2 -2
- package/modules/use-cases/get-entities-for-user.js +26 -13
- package/modules/use-cases/get-entity-module-for-user.js +34 -7
- package/modules/use-cases/get-entity-options-by-id.js +10 -4
- package/modules/use-cases/get-entity-options-by-type.js +1 -1
- package/modules/use-cases/get-module-instance-from-type.js +1 -1
- package/modules/use-cases/get-module.js +10 -4
- package/modules/use-cases/manage-access.js +21 -0
- package/modules/use-cases/multi-step-authorization.js +40 -13
- package/modules/use-cases/process-authorization-callback.js +53 -19
- package/modules/use-cases/refresh-entity-options.js +10 -4
- package/modules/use-cases/test-module-auth.js +10 -4
- package/package.json +6 -5
- package/prisma-mongodb/schema.prisma +65 -0
- package/prisma-postgresql/migrations/20261015000000_add_organization_membership/migration.sql +26 -0
- package/prisma-postgresql/migrations/20261016000000_add_entity_integration_organization/migration.sql +25 -0
- package/prisma-postgresql/migrations/20261017000000_add_scheduled_job/migration.sql +28 -0
- package/prisma-postgresql/schema.prisma +61 -0
- package/providers/index.js +23 -0
- package/providers/resolve-provider.js +93 -0
- package/providers/runtime-detection.js +124 -0
- package/queues/index.js +25 -0
- package/queues/providers/index.js +11 -0
- package/queues/providers/netlify-background-provider.js +150 -0
- package/queues/providers/qstash-queue-provider.js +219 -0
- package/queues/providers/sqs-queue-provider.js +70 -0
- package/queues/queue-client-interface.js +55 -0
- package/queues/queue-message-auth.js +193 -0
- package/queues/queue-provider-factory.js +101 -0
- package/queues/queue-provider.js +65 -0
- package/queues/sqs-queue-client.js +81 -0
- package/types/index.d.ts +1 -0
- package/types/modules/index.d.ts +139 -0
- package/types/user/index.d.ts +134 -0
- package/user/adopter-jwt-config.js +177 -0
- package/user/adopter-jwt-errors.js +59 -0
- package/user/adopter-token-verifier.js +122 -0
- package/user/app-user-helpers.js +97 -0
- package/user/create-user-authentication.js +64 -0
- package/user/membership.js +51 -0
- package/user/repositories/organization-membership-record.js +19 -0
- package/user/repositories/organization-membership-repository-documentdb.js +106 -0
- package/user/repositories/organization-membership-repository-factory.js +42 -0
- package/user/repositories/organization-membership-repository-interface.js +57 -0
- package/user/repositories/organization-membership-repository-mongo.js +13 -0
- package/user/repositories/organization-membership-repository-postgres.js +29 -0
- package/user/repositories/organization-membership-repository-prisma.js +81 -0
- package/user/repositories/user-repository-documentdb.js +27 -2
- package/user/repositories/user-repository-interface.js +18 -0
- package/user/repositories/user-repository-mongo.js +24 -0
- package/user/repositories/user-repository-postgres.js +18 -0
- package/user/tests/doubles/adopter-jwt-fixtures.js +220 -0
- package/user/use-cases/authenticate-user.js +7 -1
- package/user/use-cases/ensure-organization-membership.js +92 -0
- package/user/use-cases/find-individual-users-by-organization.js +54 -0
- package/user/use-cases/get-user-from-adopter-jwt.js +95 -124
- package/user/use-cases/get-user-from-x-frigg-headers.js +83 -80
- package/user/user.js +64 -1
- package/database/encryption/test-support/fake-ciphertext.js +0 -15
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
const { Module } = require('../module');
|
|
2
|
+
const { DEFAULT_SCOPE_POLICY } = require('../scope-policy');
|
|
2
3
|
|
|
3
4
|
class RefreshEntityOptions {
|
|
4
5
|
/**
|
|
@@ -6,9 +7,11 @@ class RefreshEntityOptions {
|
|
|
6
7
|
* @param {import('../repositories/module-repository-interface').ModuleRepositoryInterface} params.moduleRepository
|
|
7
8
|
* @param {} params.moduleDefinitions
|
|
8
9
|
*/
|
|
9
|
-
constructor({ moduleRepository, moduleDefinitions }) {
|
|
10
|
+
constructor({ moduleRepository, moduleDefinitions, scopePolicy }) {
|
|
10
11
|
this.moduleRepository = moduleRepository;
|
|
11
12
|
this.moduleDefinitions = moduleDefinitions;
|
|
13
|
+
// Who may load an entity follows its scope (ADR-056 §3.6).
|
|
14
|
+
this.scopePolicy = scopePolicy || DEFAULT_SCOPE_POLICY;
|
|
12
15
|
}
|
|
13
16
|
|
|
14
17
|
/**
|
|
@@ -36,7 +39,7 @@ class RefreshEntityOptions {
|
|
|
36
39
|
|
|
37
40
|
// Validate entity ownership
|
|
38
41
|
const isOwned = typeof userIdOrUser === 'object' && userIdOrUser?.ownsUserId
|
|
39
|
-
?
|
|
42
|
+
? this.scopePolicy.canUseEntity(userIdOrUser, entity)
|
|
40
43
|
: entity.userId?.toString() === userId?.toString();
|
|
41
44
|
|
|
42
45
|
if (!isOwned) {
|
|
@@ -58,8 +61,11 @@ class RefreshEntityOptions {
|
|
|
58
61
|
);
|
|
59
62
|
}
|
|
60
63
|
|
|
61
|
-
|
|
62
|
-
|
|
64
|
+
// Built for the entity's OWNER, not the caller: a caller may use an
|
|
65
|
+
// organization's entity, and a token refresh during this call must
|
|
66
|
+
// update the owner's credential, not create one under the caller.
|
|
67
|
+
const module = await Module.create({
|
|
68
|
+
userId: entity.userId ?? userId,
|
|
63
69
|
entity,
|
|
64
70
|
definition: moduleDefinition,
|
|
65
71
|
});
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
const { Module } = require('../module');
|
|
2
|
+
const { DEFAULT_SCOPE_POLICY } = require('../scope-policy');
|
|
2
3
|
|
|
3
4
|
class TestModuleAuth {
|
|
4
5
|
/**
|
|
@@ -6,9 +7,11 @@ class TestModuleAuth {
|
|
|
6
7
|
* @param {import('../repositories/module-repository-interface').ModuleRepositoryInterface} params.moduleRepository - Repository for module data operations.
|
|
7
8
|
* @param {Array<Object>} params.moduleDefinitions - Array of module definitions.
|
|
8
9
|
*/
|
|
9
|
-
constructor({ moduleRepository, moduleDefinitions }) {
|
|
10
|
+
constructor({ moduleRepository, moduleDefinitions, scopePolicy }) {
|
|
10
11
|
this.moduleRepository = moduleRepository;
|
|
11
12
|
this.moduleDefinitions = moduleDefinitions;
|
|
13
|
+
// Who may load an entity follows its scope (ADR-056 §3.6).
|
|
14
|
+
this.scopePolicy = scopePolicy || DEFAULT_SCOPE_POLICY;
|
|
12
15
|
}
|
|
13
16
|
|
|
14
17
|
/**
|
|
@@ -35,7 +38,7 @@ class TestModuleAuth {
|
|
|
35
38
|
|
|
36
39
|
// Validate entity ownership
|
|
37
40
|
const isOwned = typeof userIdOrUser === 'object' && userIdOrUser?.ownsUserId
|
|
38
|
-
?
|
|
41
|
+
? this.scopePolicy.canUseEntity(userIdOrUser, entity)
|
|
39
42
|
: entity.userId?.toString() === userId?.toString();
|
|
40
43
|
|
|
41
44
|
if (!isOwned) {
|
|
@@ -57,8 +60,11 @@ class TestModuleAuth {
|
|
|
57
60
|
);
|
|
58
61
|
}
|
|
59
62
|
|
|
60
|
-
|
|
61
|
-
|
|
63
|
+
// Built for the entity's OWNER, not the caller: a caller may use an
|
|
64
|
+
// organization's entity, and a token refresh during this call must
|
|
65
|
+
// update the owner's credential, not create one under the caller.
|
|
66
|
+
const module = await Module.create({
|
|
67
|
+
userId: entity.userId ?? userId,
|
|
62
68
|
entity,
|
|
63
69
|
definition: moduleDefinition,
|
|
64
70
|
});
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@friggframework/core",
|
|
3
3
|
"prettier": "@friggframework/prettier-config",
|
|
4
|
-
"version": "2.0.0--canary.
|
|
4
|
+
"version": "2.0.0--canary.686.e94de4d.0",
|
|
5
5
|
"dependencies": {
|
|
6
6
|
"@aws-sdk/client-apigatewaymanagementapi": "^3.588.0",
|
|
7
7
|
"@aws-sdk/client-kms": "^3.588.0",
|
|
@@ -28,6 +28,7 @@
|
|
|
28
28
|
"express-async-handler": "^1.2.0",
|
|
29
29
|
"form-data": "^4.0.6",
|
|
30
30
|
"fs-extra": "^11.2.0",
|
|
31
|
+
"jose": "^5.10.0",
|
|
31
32
|
"lodash": "4.18.1",
|
|
32
33
|
"lodash.get": "^4.4.2",
|
|
33
34
|
"node-fetch": "^2.6.7",
|
|
@@ -47,9 +48,9 @@
|
|
|
47
48
|
}
|
|
48
49
|
},
|
|
49
50
|
"devDependencies": {
|
|
50
|
-
"@friggframework/eslint-config": "2.0.0--canary.
|
|
51
|
-
"@friggframework/prettier-config": "2.0.0--canary.
|
|
52
|
-
"@friggframework/test": "2.0.0--canary.
|
|
51
|
+
"@friggframework/eslint-config": "2.0.0--canary.686.e94de4d.0",
|
|
52
|
+
"@friggframework/prettier-config": "2.0.0--canary.686.e94de4d.0",
|
|
53
|
+
"@friggframework/test": "2.0.0--canary.686.e94de4d.0",
|
|
53
54
|
"@prisma/client": "^6.19.3",
|
|
54
55
|
"@types/lodash": "4.17.15",
|
|
55
56
|
"@typescript-eslint/eslint-plugin": "^8.0.0",
|
|
@@ -89,5 +90,5 @@
|
|
|
89
90
|
"publishConfig": {
|
|
90
91
|
"access": "public"
|
|
91
92
|
},
|
|
92
|
-
"gitHead": "
|
|
93
|
+
"gitHead": "e94de4d57240076018ab43ee47ac0ecc5cab0cbb"
|
|
93
94
|
}
|
|
@@ -56,6 +56,14 @@ model User {
|
|
|
56
56
|
integrations Integration[]
|
|
57
57
|
processes Process[]
|
|
58
58
|
|
|
59
|
+
// Organization memberships (ADR-056 §3.6). `organizationId` above is the legacy
|
|
60
|
+
// single-org pointer: set on a person's first link, never moved afterwards, and
|
|
61
|
+
// read as an implicit membership when no row exists for it.
|
|
62
|
+
// As an individual: the organizations this person belongs to.
|
|
63
|
+
memberships OrganizationMembership[] @relation("IndividualMemberships")
|
|
64
|
+
// As an organization: the people who belong to it.
|
|
65
|
+
orgMembers OrganizationMembership[] @relation("OrganizationMemberships")
|
|
66
|
+
|
|
59
67
|
@@unique([username, appUserId])
|
|
60
68
|
@@index([type])
|
|
61
69
|
@@index([appUserId])
|
|
@@ -126,6 +134,14 @@ model Entity {
|
|
|
126
134
|
moduleName String?
|
|
127
135
|
externalId String?
|
|
128
136
|
|
|
137
|
+
// Organization this entity was connected in (ADR-056 §3.6): the active
|
|
138
|
+
// organization for `individual`, the owner for `organization`, null for
|
|
139
|
+
// `global`. Null on an `individual` entity is also what every row written
|
|
140
|
+
// before this column existed has, and what `individualAcross: 'all'` writes.
|
|
141
|
+
// Deliberately not a relation: a deleted organization must leave its rows
|
|
142
|
+
// invisible, not turn them into "unscoped" ones (SetNull would do that).
|
|
143
|
+
organizationId String? @db.ObjectId
|
|
144
|
+
|
|
129
145
|
data Json @default("{}")
|
|
130
146
|
|
|
131
147
|
createdAt DateTime @default(now())
|
|
@@ -142,6 +158,7 @@ model Entity {
|
|
|
142
158
|
associationObjects AssociationObject[]
|
|
143
159
|
|
|
144
160
|
@@index([userId])
|
|
161
|
+
@@index([userId, organizationId])
|
|
145
162
|
@@index([externalId])
|
|
146
163
|
@@index([moduleName])
|
|
147
164
|
@@index([credentialId])
|
|
@@ -159,6 +176,11 @@ model Integration {
|
|
|
159
176
|
user User? @relation(fields: [userId], references: [id], onDelete: Cascade)
|
|
160
177
|
status IntegrationStatus @default(IN_CREATION)
|
|
161
178
|
|
|
179
|
+
// Organization this integration was created in (ADR-056 §3.6): the active
|
|
180
|
+
// organization at create time. Null for rows that predate the column. Not a
|
|
181
|
+
// relation, for the same reason as Entity.organizationId.
|
|
182
|
+
organizationId String? @db.ObjectId
|
|
183
|
+
|
|
162
184
|
// Configuration and version
|
|
163
185
|
config Json? // Integration configuration object
|
|
164
186
|
version String?
|
|
@@ -183,6 +205,7 @@ model Integration {
|
|
|
183
205
|
processes Process[]
|
|
184
206
|
|
|
185
207
|
@@index([userId])
|
|
208
|
+
@@index([userId, organizationId])
|
|
186
209
|
@@index([status])
|
|
187
210
|
@@map("Integration")
|
|
188
211
|
}
|
|
@@ -480,3 +503,45 @@ model AuthorizationSession {
|
|
|
480
503
|
@@index([expiresAt])
|
|
481
504
|
@@map("AuthorizationSession")
|
|
482
505
|
}
|
|
506
|
+
|
|
507
|
+
// ============================================================================
|
|
508
|
+
// ORGANIZATION MEMBERSHIP (ADR-056 §3.6)
|
|
509
|
+
// ============================================================================
|
|
510
|
+
|
|
511
|
+
/// One person's membership of one organization. Unique on the pair, so adding a
|
|
512
|
+
/// membership is an idempotent upsert. `orgRole` is the organization role the
|
|
513
|
+
/// adopter token carried when the membership was created (MEMBER when it named none). NoAction on delete
|
|
514
|
+
/// because MongoDB gives no referential integrity: delete a user's memberships
|
|
515
|
+
/// before the user.
|
|
516
|
+
model OrganizationMembership {
|
|
517
|
+
id String @id @default(auto()) @map("_id") @db.ObjectId
|
|
518
|
+
individualUserId String @db.ObjectId
|
|
519
|
+
organizationUserId String @db.ObjectId
|
|
520
|
+
orgRole String @default("MEMBER")
|
|
521
|
+
createdAt DateTime @default(now())
|
|
522
|
+
|
|
523
|
+
individualUser User @relation("IndividualMemberships", fields: [individualUserId], references: [id], onDelete: NoAction, onUpdate: NoAction)
|
|
524
|
+
organizationUser User @relation("OrganizationMemberships", fields: [organizationUserId], references: [id], onDelete: NoAction, onUpdate: NoAction)
|
|
525
|
+
|
|
526
|
+
@@unique([individualUserId, organizationUserId])
|
|
527
|
+
@@index([organizationUserId])
|
|
528
|
+
@@map("OrganizationMembership")
|
|
529
|
+
}
|
|
530
|
+
|
|
531
|
+
/// One-time scheduled jobs for poll-and-dispatch scheduling pattern.
|
|
532
|
+
/// Used by providers without native one-time scheduling APIs (e.g., Netlify).
|
|
533
|
+
/// A cron function queries for due jobs and dispatches them to a queue.
|
|
534
|
+
model ScheduledJob {
|
|
535
|
+
id String @id @default(auto()) @map("_id") @db.ObjectId
|
|
536
|
+
scheduleName String @unique
|
|
537
|
+
scheduledAt DateTime
|
|
538
|
+
queueResourceId String
|
|
539
|
+
payload Json?
|
|
540
|
+
state String @default("PENDING")
|
|
541
|
+
|
|
542
|
+
createdAt DateTime @default(now())
|
|
543
|
+
updatedAt DateTime @updatedAt
|
|
544
|
+
|
|
545
|
+
@@index([state, scheduledAt])
|
|
546
|
+
@@map("ScheduledJob")
|
|
547
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
-- CreateTable
|
|
2
|
+
-- Organization memberships (ADR-056 §3.6). One row per person per organization.
|
|
3
|
+
-- "User"."organizationId" stays as the legacy single-org pointer. It is NOT
|
|
4
|
+
-- backfilled into this table: the domain (user/membership.js) reads it as an
|
|
5
|
+
-- implicit membership when no row exists (see docs/guides/organization-memberships.md).
|
|
6
|
+
CREATE TABLE "OrganizationMembership" (
|
|
7
|
+
"id" SERIAL NOT NULL,
|
|
8
|
+
"individualUserId" INTEGER NOT NULL,
|
|
9
|
+
"organizationUserId" INTEGER NOT NULL,
|
|
10
|
+
"orgRole" TEXT NOT NULL DEFAULT 'MEMBER',
|
|
11
|
+
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
|
12
|
+
|
|
13
|
+
CONSTRAINT "OrganizationMembership_pkey" PRIMARY KEY ("id")
|
|
14
|
+
);
|
|
15
|
+
|
|
16
|
+
-- CreateIndex
|
|
17
|
+
CREATE INDEX "OrganizationMembership_organizationUserId_idx" ON "OrganizationMembership"("organizationUserId");
|
|
18
|
+
|
|
19
|
+
-- CreateIndex
|
|
20
|
+
CREATE UNIQUE INDEX "OrganizationMembership_individualUserId_organizationUserId_key" ON "OrganizationMembership"("individualUserId", "organizationUserId");
|
|
21
|
+
|
|
22
|
+
-- AddForeignKey
|
|
23
|
+
ALTER TABLE "OrganizationMembership" ADD CONSTRAINT "OrganizationMembership_individualUserId_fkey" FOREIGN KEY ("individualUserId") REFERENCES "User"("id") ON DELETE CASCADE ON UPDATE NO ACTION;
|
|
24
|
+
|
|
25
|
+
-- AddForeignKey
|
|
26
|
+
ALTER TABLE "OrganizationMembership" ADD CONSTRAINT "OrganizationMembership_organizationUserId_fkey" FOREIGN KEY ("organizationUserId") REFERENCES "User"("id") ON DELETE CASCADE ON UPDATE NO ACTION;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
-- Entity and Integration carry the organization they were created in (ADR-056 §3.6).
|
|
2
|
+
-- Nullable, no default and no backfill: a row written before this migration keeps
|
|
3
|
+
-- NULL, and the domain (modules/entity-scope.js) reads NULL as "predates scoping"
|
|
4
|
+
-- (docs/guides/entity-scopes.md). No scope column: the owner's user type says it.
|
|
5
|
+
-- Deliberately no foreign key: a deleted organization must leave its rows
|
|
6
|
+
-- invisible, and ON DELETE SET NULL would turn them into unscoped ones.
|
|
7
|
+
--
|
|
8
|
+
-- Release note: the two CREATE INDEX statements below are plain (not
|
|
9
|
+
-- CONCURRENTLY, which Prisma migrations cannot run inside a transaction). Each
|
|
10
|
+
-- takes a SHARE lock on its table while it builds, so writes to "Entity" and
|
|
11
|
+
-- "Integration" wait for it. Both tables are small in a typical Frigg
|
|
12
|
+
-- deployment; on a very large one, create the indexes by hand first with
|
|
13
|
+
-- CREATE INDEX CONCURRENTLY IF NOT EXISTS under the same names, then deploy.
|
|
14
|
+
|
|
15
|
+
-- AlterTable
|
|
16
|
+
ALTER TABLE "Entity" ADD COLUMN "organizationId" INTEGER;
|
|
17
|
+
|
|
18
|
+
-- AlterTable
|
|
19
|
+
ALTER TABLE "Integration" ADD COLUMN "organizationId" INTEGER;
|
|
20
|
+
|
|
21
|
+
-- CreateIndex
|
|
22
|
+
CREATE INDEX "Entity_userId_organizationId_idx" ON "Entity"("userId", "organizationId");
|
|
23
|
+
|
|
24
|
+
-- CreateIndex
|
|
25
|
+
CREATE INDEX "Integration_userId_organizationId_idx" ON "Integration"("userId", "organizationId");
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
-- One-time scheduled jobs for the poll-and-dispatch scheduler
|
|
2
|
+
-- (NetlifySchedulerAdapter, friggframework/frigg#545): a cron function reads
|
|
3
|
+
-- PENDING rows that are due and dispatches them to a queue.
|
|
4
|
+
--
|
|
5
|
+
-- IF NOT EXISTS on purpose: #545 shipped this model in the Prisma schema with
|
|
6
|
+
-- no migration, so an app that ran its canary may already have the table from
|
|
7
|
+
-- `prisma db push`. On such a database this migration is a no-op; on a fresh
|
|
8
|
+
-- one it is the SQL `prisma migrate diff` generates.
|
|
9
|
+
|
|
10
|
+
-- CreateTable
|
|
11
|
+
CREATE TABLE IF NOT EXISTS "ScheduledJob" (
|
|
12
|
+
"id" SERIAL NOT NULL,
|
|
13
|
+
"scheduleName" TEXT NOT NULL,
|
|
14
|
+
"scheduledAt" TIMESTAMP(3) NOT NULL,
|
|
15
|
+
"queueResourceId" TEXT NOT NULL,
|
|
16
|
+
"payload" JSONB,
|
|
17
|
+
"state" TEXT NOT NULL DEFAULT 'PENDING',
|
|
18
|
+
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
|
19
|
+
"updatedAt" TIMESTAMP(3) NOT NULL,
|
|
20
|
+
|
|
21
|
+
CONSTRAINT "ScheduledJob_pkey" PRIMARY KEY ("id")
|
|
22
|
+
);
|
|
23
|
+
|
|
24
|
+
-- CreateIndex
|
|
25
|
+
CREATE UNIQUE INDEX IF NOT EXISTS "ScheduledJob_scheduleName_key" ON "ScheduledJob"("scheduleName");
|
|
26
|
+
|
|
27
|
+
-- CreateIndex
|
|
28
|
+
CREATE INDEX IF NOT EXISTS "ScheduledJob_state_scheduledAt_idx" ON "ScheduledJob"("state", "scheduledAt");
|
|
@@ -56,6 +56,14 @@ model User {
|
|
|
56
56
|
integrations Integration[]
|
|
57
57
|
processes Process[]
|
|
58
58
|
|
|
59
|
+
// Organization memberships (ADR-056 §3.6). `organizationId` above is the legacy
|
|
60
|
+
// single-org pointer: set on a person's first link, never moved afterwards, and
|
|
61
|
+
// read as an implicit membership when no row exists for it.
|
|
62
|
+
// As an individual: the organizations this person belongs to.
|
|
63
|
+
memberships OrganizationMembership[] @relation("IndividualMemberships")
|
|
64
|
+
// As an organization: the people who belong to it.
|
|
65
|
+
orgMembers OrganizationMembership[] @relation("OrganizationMemberships")
|
|
66
|
+
|
|
59
67
|
@@unique([username, appUserId])
|
|
60
68
|
@@index([type])
|
|
61
69
|
@@index([appUserId])
|
|
@@ -123,6 +131,14 @@ model Entity {
|
|
|
123
131
|
moduleName String?
|
|
124
132
|
externalId String?
|
|
125
133
|
|
|
134
|
+
// Organization this entity was connected in (ADR-056 §3.6): the active
|
|
135
|
+
// organization for `individual`, the owner for `organization`, null for
|
|
136
|
+
// `global`. Null on an `individual` entity is also what every row written
|
|
137
|
+
// before this column existed has, and what `individualAcross: 'all'` writes.
|
|
138
|
+
// Deliberately not a relation: a deleted organization must leave its rows
|
|
139
|
+
// invisible, not turn them into "unscoped" ones (SetNull would do that).
|
|
140
|
+
organizationId Int?
|
|
141
|
+
|
|
126
142
|
data Json @default("{}")
|
|
127
143
|
|
|
128
144
|
createdAt DateTime @default(now())
|
|
@@ -136,6 +152,7 @@ model Entity {
|
|
|
136
152
|
associationObjects AssociationObject[]
|
|
137
153
|
|
|
138
154
|
@@index([userId])
|
|
155
|
+
@@index([userId, organizationId])
|
|
139
156
|
@@index([externalId])
|
|
140
157
|
@@index([moduleName])
|
|
141
158
|
@@index([credentialId])
|
|
@@ -152,6 +169,11 @@ model Integration {
|
|
|
152
169
|
user User? @relation(fields: [userId], references: [id], onDelete: Cascade)
|
|
153
170
|
status IntegrationStatus @default(IN_CREATION)
|
|
154
171
|
|
|
172
|
+
// Organization this integration was created in (ADR-056 §3.6): the active
|
|
173
|
+
// organization at create time. Null for rows that predate the column. Not a
|
|
174
|
+
// relation, for the same reason as Entity.organizationId.
|
|
175
|
+
organizationId Int?
|
|
176
|
+
|
|
155
177
|
// Configuration and version
|
|
156
178
|
config Json? // Integration configuration object
|
|
157
179
|
version String?
|
|
@@ -175,6 +197,7 @@ model Integration {
|
|
|
175
197
|
processes Process[]
|
|
176
198
|
|
|
177
199
|
@@index([userId])
|
|
200
|
+
@@index([userId, organizationId])
|
|
178
201
|
@@index([status])
|
|
179
202
|
}
|
|
180
203
|
|
|
@@ -460,3 +483,41 @@ model AuthorizationSession {
|
|
|
460
483
|
@@index([userId, entityType])
|
|
461
484
|
@@index([expiresAt])
|
|
462
485
|
}
|
|
486
|
+
|
|
487
|
+
// ============================================================================
|
|
488
|
+
// ORGANIZATION MEMBERSHIP (ADR-056 §3.6)
|
|
489
|
+
// ============================================================================
|
|
490
|
+
|
|
491
|
+
/// One person's membership of one organization. Unique on the pair, so adding a
|
|
492
|
+
/// membership is an idempotent upsert. `orgRole` is the organization role the
|
|
493
|
+
/// adopter token carried when the membership was created (MEMBER when it named none).
|
|
494
|
+
model OrganizationMembership {
|
|
495
|
+
id Int @id @default(autoincrement())
|
|
496
|
+
individualUserId Int
|
|
497
|
+
organizationUserId Int
|
|
498
|
+
orgRole String @default("MEMBER")
|
|
499
|
+
createdAt DateTime @default(now())
|
|
500
|
+
|
|
501
|
+
individualUser User @relation("IndividualMemberships", fields: [individualUserId], references: [id], onDelete: Cascade, onUpdate: NoAction)
|
|
502
|
+
organizationUser User @relation("OrganizationMemberships", fields: [organizationUserId], references: [id], onDelete: Cascade, onUpdate: NoAction)
|
|
503
|
+
|
|
504
|
+
@@unique([individualUserId, organizationUserId])
|
|
505
|
+
@@index([organizationUserId])
|
|
506
|
+
}
|
|
507
|
+
|
|
508
|
+
/// One-time scheduled jobs for poll-and-dispatch scheduling pattern.
|
|
509
|
+
/// Used by providers without native one-time scheduling APIs (e.g., Netlify).
|
|
510
|
+
/// A cron function queries for due jobs and dispatches them to a queue.
|
|
511
|
+
model ScheduledJob {
|
|
512
|
+
id Int @id @default(autoincrement())
|
|
513
|
+
scheduleName String @unique
|
|
514
|
+
scheduledAt DateTime
|
|
515
|
+
queueResourceId String
|
|
516
|
+
payload Json?
|
|
517
|
+
state String @default("PENDING")
|
|
518
|
+
|
|
519
|
+
createdAt DateTime @default(now())
|
|
520
|
+
updatedAt DateTime @updatedAt
|
|
521
|
+
|
|
522
|
+
@@index([state, scheduledAt])
|
|
523
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
const {
|
|
2
|
+
resolveProvider,
|
|
3
|
+
determineProviderName,
|
|
4
|
+
providerPackageName,
|
|
5
|
+
KNOWN_PROVIDERS,
|
|
6
|
+
} = require('./resolve-provider');
|
|
7
|
+
const {
|
|
8
|
+
isDeployedRuntime,
|
|
9
|
+
isAwsLambdaRuntime,
|
|
10
|
+
isLocalRun,
|
|
11
|
+
resolveActiveProvider,
|
|
12
|
+
} = require('./runtime-detection');
|
|
13
|
+
|
|
14
|
+
module.exports = {
|
|
15
|
+
resolveProvider,
|
|
16
|
+
determineProviderName,
|
|
17
|
+
providerPackageName,
|
|
18
|
+
KNOWN_PROVIDERS,
|
|
19
|
+
isDeployedRuntime,
|
|
20
|
+
isAwsLambdaRuntime,
|
|
21
|
+
isLocalRun,
|
|
22
|
+
resolveActiveProvider,
|
|
23
|
+
};
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Provider Resolver
|
|
3
|
+
*
|
|
4
|
+
* Resolves a provider name from the appDefinition into the corresponding
|
|
5
|
+
* @friggframework/provider-{name} package. This is the bridge between
|
|
6
|
+
* `appDefinition.provider` and the provider plugin interface.
|
|
7
|
+
*
|
|
8
|
+
* Resolution order:
|
|
9
|
+
* 1. Explicit `providerName` argument
|
|
10
|
+
* 2. `appDefinition.provider`
|
|
11
|
+
* 3. `FRIGG_PROVIDER` environment variable
|
|
12
|
+
* 4. Default: 'aws'
|
|
13
|
+
*
|
|
14
|
+
* Package naming convention:
|
|
15
|
+
* provider: 'netlify' → require('@friggframework/provider-netlify')
|
|
16
|
+
* provider: 'aws' → require('@friggframework/provider-aws')
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* const provider = resolveProvider({ provider: 'netlify' });
|
|
20
|
+
* // provider.name === 'netlify'
|
|
21
|
+
* // provider.deploy(appDefinition, options)
|
|
22
|
+
* // provider.createHandler(options)
|
|
23
|
+
* // provider.QueueProvider (class)
|
|
24
|
+
* // etc.
|
|
25
|
+
*/
|
|
26
|
+
|
|
27
|
+
const KNOWN_PROVIDERS = ['aws', 'netlify'];
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Determine the provider name from available sources.
|
|
31
|
+
*
|
|
32
|
+
* @param {Object} [appDefinition] - Frigg app definition
|
|
33
|
+
* @param {string} [providerName] - Explicit override
|
|
34
|
+
* @returns {string} Provider name (e.g. 'netlify', 'aws')
|
|
35
|
+
*/
|
|
36
|
+
function determineProviderName(appDefinition, providerName) {
|
|
37
|
+
if (providerName) {
|
|
38
|
+
return providerName;
|
|
39
|
+
}
|
|
40
|
+
if (appDefinition?.provider) {
|
|
41
|
+
return appDefinition.provider;
|
|
42
|
+
}
|
|
43
|
+
if (process.env.FRIGG_PROVIDER) {
|
|
44
|
+
return process.env.FRIGG_PROVIDER;
|
|
45
|
+
}
|
|
46
|
+
return 'aws';
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Resolve a provider name to a package name.
|
|
51
|
+
*
|
|
52
|
+
* @param {string} name - Provider name (e.g. 'netlify')
|
|
53
|
+
* @returns {string} npm package name (e.g. '@friggframework/provider-netlify')
|
|
54
|
+
*/
|
|
55
|
+
function providerPackageName(name) {
|
|
56
|
+
return `@friggframework/provider-${name}`;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* Resolve and load the provider plugin for the given app definition.
|
|
61
|
+
*
|
|
62
|
+
* @param {Object} [appDefinition] - Frigg app definition (reads .provider)
|
|
63
|
+
* @param {Object} [options]
|
|
64
|
+
* @param {string} [options.provider] - Explicit provider name override
|
|
65
|
+
* @returns {Object} Provider plugin (conforms to the provider plugin interface)
|
|
66
|
+
* @throws {Error} If the provider package is not installed
|
|
67
|
+
*/
|
|
68
|
+
function resolveProvider(appDefinition, options = {}) {
|
|
69
|
+
const name = determineProviderName(appDefinition, options.provider);
|
|
70
|
+
const packageName = providerPackageName(name);
|
|
71
|
+
|
|
72
|
+
try {
|
|
73
|
+
return require(packageName);
|
|
74
|
+
} catch (error) {
|
|
75
|
+
if (error.code === 'MODULE_NOT_FOUND') {
|
|
76
|
+
const hint = KNOWN_PROVIDERS.includes(name)
|
|
77
|
+
? `Install it with: npm install ${packageName}`
|
|
78
|
+
: `Is '${name}' a valid Frigg provider? Known providers: ${KNOWN_PROVIDERS.join(', ')}`;
|
|
79
|
+
|
|
80
|
+
throw new Error(
|
|
81
|
+
`Provider '${name}' specified in appDefinition but package '${packageName}' is not installed.\n ${hint}`
|
|
82
|
+
);
|
|
83
|
+
}
|
|
84
|
+
throw error;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
module.exports = {
|
|
89
|
+
resolveProvider,
|
|
90
|
+
determineProviderName,
|
|
91
|
+
providerPackageName,
|
|
92
|
+
KNOWN_PROVIDERS,
|
|
93
|
+
};
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Deployed-runtime detection, provider-aware.
|
|
3
|
+
*
|
|
4
|
+
* "Deployed" decides whether a missing secret may be tolerated: a deployed
|
|
5
|
+
* function must fail closed whatever STAGE says, while a laptop, a test run or
|
|
6
|
+
* a local emulator may run in development mode. Reading only AWS Lambda's
|
|
7
|
+
* variables (AWS_LAMBDA_FUNCTION_NAME, LAMBDA_TASK_ROOT, AWS_EXECUTION_ENV)
|
|
8
|
+
* makes every other host look local: a Netlify Function with STAGE=dev would
|
|
9
|
+
* be treated like `frigg start`.
|
|
10
|
+
*
|
|
11
|
+
* So the active provider is asked as well. The provider is the app
|
|
12
|
+
* definition's `provider` or FRIGG_PROVIDER (which provider-netlify's
|
|
13
|
+
* generated function entry points set to 'netlify'), resolved to its
|
|
14
|
+
* @friggframework/provider-<name> package, and its `detect(env)` says whether
|
|
15
|
+
* the process runs on that platform.
|
|
16
|
+
*
|
|
17
|
+
* A local run is never deployed: serverless-offline / `serverless invoke
|
|
18
|
+
* local` (IS_OFFLINE, IS_LOCAL), `netlify dev` (NETLIFY_DEV=true) and Jest
|
|
19
|
+
* (JEST_WORKER_ID).
|
|
20
|
+
*/
|
|
21
|
+
const { resolveProvider } = require('./resolve-provider');
|
|
22
|
+
|
|
23
|
+
function isSet(value) {
|
|
24
|
+
return typeof value === 'string' && value.trim() !== '';
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
function isTrue(value) {
|
|
28
|
+
if (typeof value !== 'string') return false;
|
|
29
|
+
const normalized = value.trim().toLowerCase();
|
|
30
|
+
return normalized === 'true' || normalized === '1';
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* @param {Object} [env=process.env]
|
|
35
|
+
* @returns {boolean} true under a local emulator or test runner
|
|
36
|
+
*/
|
|
37
|
+
function isLocalRun(env = process.env) {
|
|
38
|
+
return (
|
|
39
|
+
isTrue(env.IS_OFFLINE) ||
|
|
40
|
+
isTrue(env.IS_LOCAL) ||
|
|
41
|
+
isTrue(env.NETLIFY_DEV) ||
|
|
42
|
+
isSet(env.JEST_WORKER_ID)
|
|
43
|
+
);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* The AWS Lambda runtime sets AWS_LAMBDA_FUNCTION_NAME, LAMBDA_TASK_ROOT and
|
|
48
|
+
* AWS_EXECUTION_ENV (AWS_Lambda_<runtime>).
|
|
49
|
+
*
|
|
50
|
+
* @param {Object} [env=process.env]
|
|
51
|
+
* @returns {boolean}
|
|
52
|
+
*/
|
|
53
|
+
function isAwsLambdaRuntime(env = process.env) {
|
|
54
|
+
return (
|
|
55
|
+
isSet(env.AWS_LAMBDA_FUNCTION_NAME) ||
|
|
56
|
+
isSet(env.LAMBDA_TASK_ROOT) ||
|
|
57
|
+
String(env.AWS_EXECUTION_ENV ?? '').startsWith('AWS_Lambda_')
|
|
58
|
+
);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* The provider plugin of the running app, or null for AWS (covered by
|
|
63
|
+
* isAwsLambdaRuntime) or when no provider is named or its package is absent.
|
|
64
|
+
*
|
|
65
|
+
* @param {Object} [env=process.env]
|
|
66
|
+
* @param {Object} [options]
|
|
67
|
+
* @param {Object} [options.appDefinition]
|
|
68
|
+
* @param {Function} [options.resolve=resolveProvider]
|
|
69
|
+
* @returns {Object|null}
|
|
70
|
+
*/
|
|
71
|
+
function resolveActiveProvider(env = process.env, { appDefinition, resolve = resolveProvider } = {}) {
|
|
72
|
+
const name = appDefinition?.provider || env.FRIGG_PROVIDER;
|
|
73
|
+
if (!isSet(name) || name === 'aws') return null;
|
|
74
|
+
try {
|
|
75
|
+
return resolve(null, { provider: name });
|
|
76
|
+
} catch (_) {
|
|
77
|
+
return null;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* True when the process runs as a deployed function on AWS Lambda or on the
|
|
83
|
+
* active provider's platform, and not under a local emulator or test runner.
|
|
84
|
+
*
|
|
85
|
+
* @param {Object} [env=process.env]
|
|
86
|
+
* @param {Object} [options]
|
|
87
|
+
* @param {Object} [options.provider] - provider plugin to ask (default: the active one)
|
|
88
|
+
* @param {Object} [options.appDefinition] - reads `provider`
|
|
89
|
+
* @returns {boolean}
|
|
90
|
+
*/
|
|
91
|
+
function isDeployedRuntime(env = process.env, { provider, appDefinition } = {}) {
|
|
92
|
+
if (isLocalRun(env)) return false;
|
|
93
|
+
if (isAwsLambdaRuntime(env)) return true;
|
|
94
|
+
if (provider === undefined) {
|
|
95
|
+
// A named non-AWS provider whose package cannot be loaded (or has no
|
|
96
|
+
// detect()) cannot say where we run. Fail closed: provider-netlify's
|
|
97
|
+
// generated entry points set FRIGG_PROVIDER, so treating that as local
|
|
98
|
+
// would let a deployed function accept unsigned queue messages.
|
|
99
|
+
const name = appDefinition?.provider || env.FRIGG_PROVIDER;
|
|
100
|
+
if (isSet(name) && name !== 'aws') {
|
|
101
|
+
const active = resolveActiveProvider(env, { appDefinition });
|
|
102
|
+
if (!active || typeof active.detect !== 'function') return true;
|
|
103
|
+
return askProvider(active, env, true);
|
|
104
|
+
}
|
|
105
|
+
return false;
|
|
106
|
+
}
|
|
107
|
+
if (!provider || typeof provider.detect !== 'function') return false;
|
|
108
|
+
return askProvider(provider, env, false);
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
function askProvider(active, env, onError) {
|
|
112
|
+
try {
|
|
113
|
+
return active.detect(env) === true;
|
|
114
|
+
} catch (_) {
|
|
115
|
+
return onError;
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
module.exports = {
|
|
120
|
+
isDeployedRuntime,
|
|
121
|
+
isAwsLambdaRuntime,
|
|
122
|
+
isLocalRun,
|
|
123
|
+
resolveActiveProvider,
|
|
124
|
+
};
|
package/queues/index.js
CHANGED
|
@@ -1,4 +1,29 @@
|
|
|
1
1
|
const { QueuerUtil } = require('./queuer-util');
|
|
2
|
+
const { QueueProvider } = require('./queue-provider');
|
|
3
|
+
const { QueueClientInterface } = require('./queue-client-interface');
|
|
4
|
+
const {
|
|
5
|
+
createQueueProvider,
|
|
6
|
+
determineProvider,
|
|
7
|
+
QUEUE_PROVIDERS,
|
|
8
|
+
} = require('./queue-provider-factory');
|
|
9
|
+
const {
|
|
10
|
+
NetlifyBackgroundProvider,
|
|
11
|
+
QStashQueueProvider,
|
|
12
|
+
} = require('./providers');
|
|
13
|
+
|
|
2
14
|
module.exports = {
|
|
3
15
|
QueuerUtil,
|
|
16
|
+
QueueProvider,
|
|
17
|
+
QueueClientInterface,
|
|
18
|
+
createQueueProvider,
|
|
19
|
+
determineProvider,
|
|
20
|
+
QUEUE_PROVIDERS,
|
|
21
|
+
NetlifyBackgroundProvider,
|
|
22
|
+
QStashQueueProvider,
|
|
23
|
+
get SqsQueueProvider() {
|
|
24
|
+
return require('./providers/sqs-queue-provider').SqsQueueProvider;
|
|
25
|
+
},
|
|
26
|
+
get SqsQueueClient() {
|
|
27
|
+
return require('./sqs-queue-client').SqsQueueClient;
|
|
28
|
+
},
|
|
4
29
|
};
|