Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
788de85
feat: SITES-40623 - token system in Spacecat
sandsinh Feb 17, 2026
1ee7367
Merge branch 'main' into SITES-40623
sandsinh Mar 8, 2026
9dc72ff
fix: adds grant suggestion
sandsinh Mar 9, 2026
5240910
fix: cleanup
sandsinh Mar 9, 2026
46178f4
fix: update schema
sandsinh Mar 10, 2026
2057799
fix: remove unnecessary changes
sandsinh Mar 10, 2026
a4e071a
fix: revert unnecessary changes
sandsinh Mar 10, 2026
eb758a5
Merge branch 'main' into SITES-40623
sandsinh Mar 10, 2026
0012617
chore: remove spacecat-shared-utils token grant changes (moved to SIT…
sandsinh Mar 10, 2026
54845cd
fix: adds utils lib
sandsinh Mar 10, 2026
128a258
fix: update package lock
sandsinh Mar 10, 2026
ad4331c
Merge branch 'main' into SITES-40623
sandsinh Mar 10, 2026
cc18b56
Merge branch 'main' into SITES-40623
sandsinh Mar 10, 2026
99ff418
fix: update token schema
sandsinh Mar 10, 2026
0040232
fix: remove unnecessary code
sandsinh Mar 11, 2026
b84160f
fix: update token schema
sandsinh Mar 12, 2026
3b83205
fix: adds collection functions
sandsinh Mar 12, 2026
6c2f758
fix: adds grant id in the response
sandsinh Mar 12, 2026
d9c777b
fix: update docker image
sandsinh Mar 13, 2026
04b6231
fix: adds coverage
sandsinh Mar 13, 2026
4e5c65a
Merge branch 'main' into SITES-40623
sandsinh Mar 13, 2026
b6569d5
fix: adds Suggestion grants schema
sandsinh Mar 13, 2026
e0b5928
fix: update package
sandsinh Mar 13, 2026
07de127
fix: remove unnecessary changes
sandsinh Mar 16, 2026
7124f1d
Merge branch 'main' into SITES-40623
sandsinh Mar 16, 2026
a8e2fdf
fix: address review comments
sandsinh Mar 18, 2026
1f3882c
Merge branch 'main' into SITES-40623
sandsinh Mar 18, 2026
173eb01
fix: update package.json
sandsinh Mar 18, 2026
d65d42a
Merge branch 'main' into SITES-40623
sandsinh Mar 19, 2026
c15470a
fix: update deps
sandsinh Mar 19, 2026
ef50c71
fix: update package-lock
sandsinh Mar 19, 2026
1b15883
fix: update IT tests
sandsinh Mar 19, 2026
52c77dc
fix: IT test
sandsinh Mar 19, 2026
9fa3bf4
fix: cleanups
sandsinh Mar 19, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 22 additions & 29 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/spacecat-shared-data-access/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
},
"dependencies": {
"@adobe/fetch": "^4.2.3",
"@adobe/spacecat-shared-utils": "1.101.0",
"@adobe/spacecat-shared-utils": "1.105.0",
"@supabase/postgrest-js": "2.99.1",
"@aws-sdk/client-s3": "^3.940.0",
"@types/joi": "17.2.3",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,12 @@ import SiteEnrollmentCollection from '../site-enrollment/site-enrollment.collect
import SiteTopFormCollection from '../site-top-form/site-top-form.collection.js';
import SiteTopPageCollection from '../site-top-page/site-top-page.collection.js';
import SuggestionCollection from '../suggestion/suggestion.collection.js';
import SuggestionGrantCollection from '../suggestion-grant/suggestion-grant.collection.js';
import PageIntentCollection from '../page-intent/page-intent.collection.js';
import ReportCollection from '../report/report.collection.js';
import TrialUserCollection from '../trial-user/trial-user.collection.js';
import TrialUserActivityCollection from '../trial-user-activity/trial-user-activity.collection.js';
import TokenCollection from '../token/token.collection.js';
import PageCitabilityCollection from '../page-citability/page-citability.collection.js';
import PlgOnboardingCollection from '../plg-onboarding/plg-onboarding.collection.js';
import SentimentGuidelineCollection from '../sentiment-guideline/sentiment-guideline.collection.js';
Expand Down Expand Up @@ -71,10 +73,12 @@ import SiteEnrollmentSchema from '../site-enrollment/site-enrollment.schema.js';
import SiteTopFormSchema from '../site-top-form/site-top-form.schema.js';
import SiteTopPageSchema from '../site-top-page/site-top-page.schema.js';
import SuggestionSchema from '../suggestion/suggestion.schema.js';
import SuggestionGrantSchema from '../suggestion-grant/suggestion-grant.schema.js';
import PageIntentSchema from '../page-intent/page-intent.schema.js';
import ReportSchema from '../report/report.schema.js';
import TrialUserSchema from '../trial-user/trial-user.schema.js';
import TrialUserActivitySchema from '../trial-user-activity/trial-user-activity.schema.js';
import TokenSchema from '../token/token.schema.js';
import PageCitabilitySchema from '../page-citability/page-citability.schema.js';
import PlgOnboardingSchema from '../plg-onboarding/plg-onboarding.schema.js';
import SentimentGuidelineSchema from '../sentiment-guideline/sentiment-guideline.schema.js';
Expand Down Expand Up @@ -199,10 +203,12 @@ EntityRegistry.registerEntity(SiteEnrollmentSchema, SiteEnrollmentCollection);
EntityRegistry.registerEntity(SiteTopFormSchema, SiteTopFormCollection);
EntityRegistry.registerEntity(SiteTopPageSchema, SiteTopPageCollection);
EntityRegistry.registerEntity(SuggestionSchema, SuggestionCollection);
EntityRegistry.registerEntity(SuggestionGrantSchema, SuggestionGrantCollection);
EntityRegistry.registerEntity(PageIntentSchema, PageIntentCollection);
EntityRegistry.registerEntity(ReportSchema, ReportCollection);
EntityRegistry.registerEntity(TrialUserSchema, TrialUserCollection);
EntityRegistry.registerEntity(TrialUserActivitySchema, TrialUserActivityCollection);
EntityRegistry.registerEntity(TokenSchema, TokenCollection);
EntityRegistry.registerEntity(PageCitabilitySchema, PageCitabilityCollection);
EntityRegistry.registerEntity(PlgOnboardingSchema, PlgOnboardingCollection);
EntityRegistry.registerEntity(SentimentGuidelineSchema, SentimentGuidelineCollection);
Expand Down
2 changes: 2 additions & 0 deletions packages/spacecat-shared-data-access/src/models/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,12 @@ export * from './site-top-form/index.js';
export * from './site-top-page/index.js';
export * from './site/index.js';
export * from './suggestion/index.js';
export * from './suggestion-grant/index.js';
export * from './page-intent/index.js';
export * from './report/index.js';
export * from './trial-user/index.js';
export * from './trial-user-activity/index.js';
export * from './token/index.js';
export * from './page-citability/index.js';
export * from './plg-onboarding/index.js';
export * from './sentiment-guideline/index.js';
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
/*
* Copyright 2025 Adobe. All rights reserved.
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. You may obtain a copy
* of the License at http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
* OF ANY KIND, either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/

import type { BaseCollection, BaseModel } from '../index';

export interface SuggestionGrant extends BaseModel {
getGrantId(): string;
getSuggestionId(): string;
getSiteId(): string;
getTokenId(): string;
getTokenType(): string;
getGrantedAt(): string;
}

export interface SuggestionGrantCollection extends BaseCollection<SuggestionGrant> {
findBySuggestionIds(suggestionIds: string[]): Promise<{ data: Array<{ suggestion_id: string; grant_id: string }>; error: object | null }>;
invokeGrantSuggestionsRpc(suggestionIds: string[], siteId: string, tokenType: string, cycle: string): Promise<{ data: Array | null; error: object | null }>;
splitSuggestionsByGrantStatus(suggestionIds: string[]): Promise<{ grantedIds: string[]; notGrantedIds: string[]; grantIds: string[] }>;
isSuggestionGranted(suggestionId: string): Promise<boolean>;
grantSuggestions(suggestionIds: string[], siteId: string, tokenType: string): Promise<{ success: boolean; reason?: string; grantedSuggestions?: Array }>;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/*
* Copyright 2025 Adobe. All rights reserved.
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. You may obtain a copy
* of the License at http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
* OF ANY KIND, either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/

import SuggestionGrant from './suggestion-grant.model.js';
import SuggestionGrantCollection from './suggestion-grant.collection.js';

export {
SuggestionGrant,
SuggestionGrantCollection,
};
Loading
Loading