@adobe/spacecat-shared-data-access 2.64.0 → 2.64.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,17 @@
1
+ # [@adobe/spacecat-shared-data-access-v2.64.2](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-data-access-v2.64.1...@adobe/spacecat-shared-data-access-v2.64.2) (2025-09-23)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * remove IDP support ([#977](https://github.com/adobe/spacecat-shared/issues/977)) ([f2b4ad9](https://github.com/adobe/spacecat-shared/commit/f2b4ad95feeb6755cb6203c343c0ae4552cf8a76))
7
+
8
+ # [@adobe/spacecat-shared-data-access-v2.64.1](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-data-access-v2.64.0...@adobe/spacecat-shared-data-access-v2.64.1) (2025-09-20)
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * **deps:** update external fixes ([#969](https://github.com/adobe/spacecat-shared/issues/969)) ([d722c62](https://github.com/adobe/spacecat-shared/commit/d722c623193fdbf292d96d71236cb4396db7ce3b))
14
+
1
15
  # [@adobe/spacecat-shared-data-access-v2.64.0](https://github.com/adobe/spacecat-shared/compare/@adobe/spacecat-shared-data-access-v2.63.0...@adobe/spacecat-shared-data-access-v2.64.0) (2025-09-19)
2
16
 
3
17
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adobe/spacecat-shared-data-access",
3
- "version": "2.64.0",
3
+ "version": "2.64.2",
4
4
  "description": "Shared modules of the Spacecat Services - Data Access",
5
5
  "type": "module",
6
6
  "engines": {
@@ -36,8 +36,8 @@
36
36
  },
37
37
  "dependencies": {
38
38
  "@adobe/spacecat-shared-utils": "1.49.0",
39
- "@aws-sdk/client-dynamodb": "3.888.0",
40
- "@aws-sdk/lib-dynamodb": "3.888.0",
39
+ "@aws-sdk/client-dynamodb": "3.893.0",
40
+ "@aws-sdk/lib-dynamodb": "3.893.0",
41
41
  "@types/joi": "17.2.3",
42
42
  "aws-xray-sdk": "3.10.3",
43
43
  "electrodb": "3.4.5",
@@ -26,7 +26,6 @@ import KeyEventCollection from '../key-event/key-event.collection.js';
26
26
  import LatestAuditCollection from '../latest-audit/latest-audit.collection.js';
27
27
  import OpportunityCollection from '../opportunity/opportunity.collection.js';
28
28
  import OrganizationCollection from '../organization/organization.collection.js';
29
- import OrganizationIdentityProviderCollection from '../organization-identity-provider/organization-identity-provider.collection.js';
30
29
  import ScrapeJobCollection from '../scrape-job/scrape-job.collection.js';
31
30
  import ScrapeUrlCollection from '../scrape-url/scrape-url.collection.js';
32
31
  import SiteCandidateCollection from '../site-candidate/site-candidate.collection.js';
@@ -53,7 +52,6 @@ import KeyEventSchema from '../key-event/key-event.schema.js';
53
52
  import LatestAuditSchema from '../latest-audit/latest-audit.schema.js';
54
53
  import OpportunitySchema from '../opportunity/opportunity.schema.js';
55
54
  import OrganizationSchema from '../organization/organization.schema.js';
56
- import OrganizationIdentityProviderSchema from '../organization-identity-provider/organization-identity-provider.schema.js';
57
55
  import ScrapeJobSchema from '../scrape-job/scrape-job.schema.js';
58
56
  import ScrapeUrlSchema from '../scrape-url/scrape-url.schema.js';
59
57
  import SiteSchema from '../site/site.schema.js';
@@ -161,10 +159,6 @@ EntityRegistry.registerEntity(KeyEventSchema, KeyEventCollection);
161
159
  EntityRegistry.registerEntity(LatestAuditSchema, LatestAuditCollection);
162
160
  EntityRegistry.registerEntity(OpportunitySchema, OpportunityCollection);
163
161
  EntityRegistry.registerEntity(OrganizationSchema, OrganizationCollection);
164
- EntityRegistry.registerEntity(
165
- OrganizationIdentityProviderSchema,
166
- OrganizationIdentityProviderCollection,
167
- );
168
162
  EntityRegistry.registerEntity(ScrapeJobSchema, ScrapeJobCollection);
169
163
  EntityRegistry.registerEntity(ScrapeUrlSchema, ScrapeUrlCollection);
170
164
  EntityRegistry.registerEntity(SiteSchema, SiteCollection);
@@ -24,7 +24,6 @@ export * from './key-event/index.js';
24
24
  export * from './latest-audit/index.js';
25
25
  export * from './opportunity/index.js';
26
26
  export * from './organization/index.js';
27
- export * from './organization-identity-provider/index.js';
28
27
  export * from './scrape-job/index.js';
29
28
  export * from './scrape-url/index.js';
30
29
  export * from './site-candidate/index.js';
@@ -29,7 +29,6 @@ const schema = new SchemaBuilder(Organization, OrganizationCollection)
29
29
  // this will add an attribute 'organizationId' as well as an index 'byOrganizationId'
30
30
  .addReference('has_many', 'Sites')
31
31
  .addReference('has_many', 'Entitlements')
32
- .addReference('has_many', 'OrganizationIdentityProviders')
33
32
  .addReference('has_many', 'TrialUsers')
34
33
  .addAttribute('config', {
35
34
  type: 'any',
@@ -14,7 +14,6 @@ import { isIsoDate, isObject } from '@adobe/spacecat-shared-utils';
14
14
  import SchemaBuilder from '../base/schema.builder.js';
15
15
  import TrialUser from './trial-user.model.js';
16
16
  import TrialUserCollection from './trial-user.collection.js';
17
- import OrganizationIdentityProvider from '../organization-identity-provider/organization-identity-provider.model.js';
18
17
 
19
18
  /*
20
19
  Schema Doc: https://electrodb.dev/en/modeling/schema/
@@ -35,10 +34,6 @@ const schema = new SchemaBuilder(TrialUser, TrialUserCollection)
35
34
  type: Object.values(TrialUser.STATUSES),
36
35
  required: true,
37
36
  })
38
- .addAttribute('provider', {
39
- type: Object.values(OrganizationIdentityProvider.PROVIDER_TYPES),
40
- required: false,
41
- })
42
37
  .addAttribute('lastSeenAt', {
43
38
  type: 'string',
44
39
  validate: (value) => !value || isIsoDate(value),
@@ -59,10 +54,6 @@ const schema = new SchemaBuilder(TrialUser, TrialUserCollection)
59
54
  type: 'any',
60
55
  validate: (value) => !value || isObject(value),
61
56
  })
62
- .addAllIndex(['emailId'])
63
- .addIndex(
64
- { composite: ['provider'] },
65
- { composite: ['externalUserId'] },
66
- );
57
+ .addAllIndex(['emailId']);
67
58
 
68
59
  export default schema.build();
@@ -22,7 +22,6 @@ Indexes Doc: https://electrodb.dev/en/modeling/indexes/
22
22
  */
23
23
 
24
24
  const schema = new SchemaBuilder(TrialUserActivity, TrialUserActivityCollection)
25
- // Reference to OrganizationIdentityProvider (many-to-one relationship)
26
25
  .addReference('belongs_to', 'TrialUser')
27
26
  // Reference to Organization (many-to-one relationship)
28
27
  .addReference('belongs_to', 'Entitlement')
@@ -1,40 +0,0 @@
1
- /*
2
- * Copyright 2025 Adobe. All rights reserved.
3
- * This file is licensed to you under the Apache License, Version 2.0 (the "License");
4
- * you may not use this file except in compliance with the License. You may obtain a copy
5
- * of the License at http://www.apache.org/licenses/LICENSE-2.0
6
- *
7
- * Unless required by applicable law or agreed to in writing, software distributed under
8
- * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9
- * OF ANY KIND, either express or implied. See the License for the specific language
10
- * governing permissions and limitations under the License.
11
- */
12
-
13
- import type {
14
- BaseCollection, BaseModel, Organization, TrialUser,
15
- } from '../index';
16
-
17
- export type ProviderType = 'IMS' | 'MICROSOFT' | 'GOOGLE';
18
-
19
- export interface OrganizationIdentityProvider extends BaseModel {
20
- getMetadata(): object | null;
21
- getProvider(): ProviderType;
22
- getExternalId(): string;
23
- getOrganization(): Promise<Organization>;
24
- getTrialUsers(): Promise<TrialUser[]>;
25
- setMetadata(metadata: object): OrganizationIdentityProvider;
26
- setProvider(provider: ProviderType): OrganizationIdentityProvider;
27
- setExternalId(externalId: string): OrganizationIdentityProvider;
28
- }
29
-
30
- export interface OrganizationIdentityProviderCollection extends
31
- BaseCollection<OrganizationIdentityProvider> {
32
- allByProvider(provider: ProviderType): Promise<OrganizationIdentityProvider[]>;
33
- allByProviderAndExternalId(provider: ProviderType, externalId: string):
34
- Promise<OrganizationIdentityProvider[]>;
35
- allByOrganizationId(organizationId: string): Promise<OrganizationIdentityProvider[]>;
36
- findByProvider(provider: ProviderType): Promise<OrganizationIdentityProvider | null>;
37
- findByProviderAndExternalId(provider: ProviderType, externalId: string):
38
- Promise<OrganizationIdentityProvider | null>;
39
- findByOrganizationId(organizationId: string): Promise<OrganizationIdentityProvider | null>;
40
- }
@@ -1,19 +0,0 @@
1
- /*
2
- * Copyright 2025 Adobe. All rights reserved.
3
- * This file is licensed to you under the Apache License, Version 2.0 (the "License");
4
- * you may not use this file except in compliance with the License. You may obtain a copy
5
- * of the License at http://www.apache.org/licenses/LICENSE-2.0
6
- *
7
- * Unless required by applicable law or agreed to in writing, software distributed under
8
- * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9
- * OF ANY KIND, either express or implied. See the License for the specific language
10
- * governing permissions and limitations under the License.
11
- */
12
-
13
- import OrganizationIdentityProvider from './organization-identity-provider.model.js';
14
- import OrganizationIdentityProviderCollection from './organization-identity-provider.collection.js';
15
-
16
- export {
17
- OrganizationIdentityProvider,
18
- OrganizationIdentityProviderCollection,
19
- };
@@ -1,28 +0,0 @@
1
- /*
2
- * Copyright 2025 Adobe. All rights reserved.
3
- * This file is licensed to you under the Apache License, Version 2.0 (the "License");
4
- * you may not use this file except in compliance with the License. You may obtain a copy
5
- * of the License at http://www.apache.org/licenses/LICENSE-2.0
6
- *
7
- * Unless required by applicable law or agreed to in writing, software distributed under
8
- * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9
- * OF ANY KIND, either express or implied. See the License for the specific language
10
- * governing permissions and limitations under the License.
11
- */
12
-
13
- import BaseCollection from '../base/base.collection.js';
14
-
15
- /**
16
- * OrganizationIdentityProviderCollection - A collection class responsible for
17
- * managing OrganizationIdentityProvider entities.
18
- * Extends the BaseCollection to provide specific methods for interacting with
19
- * OrganizationIdentityProvider records.
20
- *
21
- * @class OrganizationIdentityProviderCollection
22
- * @extends BaseCollection
23
- */
24
- class OrganizationIdentityProviderCollection extends BaseCollection {
25
- // add custom methods here
26
- }
27
-
28
- export default OrganizationIdentityProviderCollection;
@@ -1,32 +0,0 @@
1
- /*
2
- * Copyright 2025 Adobe. All rights reserved.
3
- * This file is licensed to you under the Apache License, Version 2.0 (the "License");
4
- * you may not use this file except in compliance with the License. You may obtain a copy
5
- * of the License at http://www.apache.org/licenses/LICENSE-2.0
6
- *
7
- * Unless required by applicable law or agreed to in writing, software distributed under
8
- * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9
- * OF ANY KIND, either express or implied. See the License for the specific language
10
- * governing permissions and limitations under the License.
11
- */
12
-
13
- import BaseModel from '../base/base.model.js';
14
-
15
- /**
16
- * OrganizationIdentityProvider - A class representing an OrganizationIdentityProvider entity.
17
- * Provides methods to access and manipulate OrganizationIdentityProvider-specific data.
18
- *
19
- * @class OrganizationIdentityProvider
20
- * @extends BaseModel
21
- */
22
- class OrganizationIdentityProvider extends BaseModel {
23
- static PROVIDER_TYPES = {
24
- IMS: 'IMS',
25
- MICROSOFT: 'MICROSOFT',
26
- GOOGLE: 'GOOGLE',
27
- };
28
-
29
- // add your custom methods or overrides here
30
- }
31
-
32
- export default OrganizationIdentityProvider;
@@ -1,48 +0,0 @@
1
- /*
2
- * Copyright 2025 Adobe. All rights reserved.
3
- * This file is licensed to you under the Apache License, Version 2.0 (the "License");
4
- * you may not use this file except in compliance with the License. You may obtain a copy
5
- * of the License at http://www.apache.org/licenses/LICENSE-2.0
6
- *
7
- * Unless required by applicable law or agreed to in writing, software distributed under
8
- * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9
- * OF ANY KIND, either express or implied. See the License for the specific language
10
- * governing permissions and limitations under the License.
11
- */
12
-
13
- import { isObject } from '@adobe/spacecat-shared-utils';
14
- import SchemaBuilder from '../base/schema.builder.js';
15
- import OrganizationIdentityProvider from './organization-identity-provider.model.js';
16
- import OrganizationIdentityProviderCollection from './organization-identity-provider.collection.js';
17
-
18
- /*
19
- Schema Doc: https://electrodb.dev/en/modeling/schema/
20
- Attribute Doc: https://electrodb.dev/en/modeling/attributes/
21
- Indexes Doc: https://electrodb.dev/en/modeling/indexes/
22
- */
23
-
24
- const schema = new SchemaBuilder(
25
- OrganizationIdentityProvider,
26
- OrganizationIdentityProviderCollection,
27
- )
28
- // Reference to Organization (many-to-one relationship)
29
- .addReference('belongs_to', 'Organization')
30
- .addAttribute('metadata', {
31
- type: 'any',
32
- required: false,
33
- validate: (value) => !value || isObject(value),
34
- })
35
- .addAttribute('provider', {
36
- type: Object.values(OrganizationIdentityProvider.PROVIDER_TYPES),
37
- required: true,
38
- })
39
- .addAttribute('externalId', {
40
- type: 'string',
41
- required: true,
42
- })
43
- .addIndex(
44
- { composite: ['provider'] },
45
- { composite: ['externalId'] },
46
- );
47
-
48
- export default schema.build();