Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include FluxC 2.99.0 modules with their git history and unit tests #21304

Draft
wants to merge 9,061 commits into
base: trunk
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
9061 commits
Select commit Hold shift + click to select a range
80697b0
Merge pull request #2995 from wordpress-mobile/observe-products-count
0nko Apr 26, 2024
8832afe
Add total followers to SubscriberType
aditi-bhatia Apr 27, 2024
57be9f5
Add "/stats/emails/summary" endpoint to wp-com-endpoints.txt
irfano Apr 29, 2024
aa43b1d
Add EmailsRestClient
irfano Apr 29, 2024
bcf6583
Add EmailsStore
irfano Apr 29, 2024
2843010
Merge pull request #2996 from wordpress-mobile/feature/add-emails-end…
aditi-bhatia Apr 30, 2024
5c266cd
Update StatsStore.kt
aditi-bhatia Apr 30, 2024
a5d852f
Update order
aditi-bhatia Apr 30, 2024
83e6908
Rename StatsType.SUBSCRIBERS to StatsType.SUBSCRIBERS_CHART
irfano Apr 30, 2024
ef003a7
Add SubscriberType.SUBSCRIBERS
irfano Apr 30, 2024
1200d04
Use migrateAddOn for Woo-specific table update
Apr 30, 2024
6040935
Merge pull request #3000 from wordpress-mobile/fix/db-v200-woo-migration
Apr 30, 2024
a9e170a
Merge branch 'trunk' of https://github.com/wordpress-mobile/WordPress…
aditi-bhatia Apr 30, 2024
c804bbf
Merge pull request #3001 from wordpress-mobile/release/2.77.1
0nko Apr 30, 2024
89bd6d3
Merge pull request #2999 from wordpress-mobile/feature/add-subscriber…
aditi-bhatia Apr 30, 2024
9d0b1c8
Merge branch 'trunk' of https://github.com/wordpress-mobile/WordPress…
aditi-bhatia Apr 30, 2024
1ff37ce
Fixes: try to catch exception for fun getListItems()
pantstamp May 1, 2024
8aad94c
Merge pull request #3002 from wordpress-mobile/issue/20375
zwarm May 1, 2024
99ee531
Fixes: publish post when device time is set manually
pantstamp May 2, 2024
9d43c10
Merge pull request #3003 from wordpress-mobile/issue/17375
zwarm May 2, 2024
6a80bea
Add direct Token update method
ThomazFB May 3, 2024
5c4435d
Allow direct updateToken call to be public
ThomazFB May 3, 2024
9fda60f
Return null when sending cached followers if the db is empty
irfano May 7, 2024
11d3b00
Add FollowerType.ALL
irfano May 9, 2024
5e6a5a5
Add FollowersSqlUtils
irfano May 9, 2024
7440c23
Add functions to FollowersStore to fetch all followers
irfano May 9, 2024
dba26a2
Fix InsightsStoreTest
irfano May 9, 2024
52d5b46
add shipping methods endpoint
May 9, 2024
98f2f9e
Merge pull request #3006 from wordpress-mobile/feature/all-type-optio…
aditi-bhatia May 10, 2024
3cd3560
add get shipping method by id endpoint
May 10, 2024
64b67d2
Merge pull request #3007 from wordpress-mobile/issue/11391-shipping-m…
atorresveiga May 10, 2024
cd3a51d
Merge pull request #3005 from wordpress-mobile/fix/empty-db-case-of-f…
aditi-bhatia May 10, 2024
a1e29e0
Add log lines to capture the string error message
zwarm May 10, 2024
cdef2fa
Use mockstatic for log
zwarm May 10, 2024
7664db2
Merge branch 'trunk' into issue/accept-direct-token-updates
ThomazFB May 10, 2024
edf33e5
Catch OutOfMemoryError while uploading encrypted log
irfano May 12, 2024
858ada0
Reformat mapUploadEncryptedLogError function
irfano May 12, 2024
401c464
Add OutOfMemoryException to mapUploadEncryptedLogError function
irfano May 12, 2024
270c385
- Removes: the redundant log mock
AjeshRPai May 13, 2024
694a996
- Revert: changes in PostUploadModelTest
AjeshRPai May 13, 2024
b9d7bb6
Merge pull request #3009 from wordpress-mobile/issue/capture-post-med…
AjeshRPai May 13, 2024
0c75b16
Move Token changes to WCWearableStore
ThomazFB May 16, 2024
5a4070a
Add jetpack ai transcription url
zwarm May 20, 2024
e74f062
Add utility methods for transcription calls
zwarm May 20, 2024
b2dbea9
Add unit tests for transcription utils
zwarm May 20, 2024
9d8b8a6
Extract helper methods into a utility class and add unit tests
zwarm May 20, 2024
609b6d1
Move helper methods to utils class
zwarm May 20, 2024
f9c7951
Update unit tests
zwarm May 20, 2024
4a73e96
Update to use utils class
zwarm May 20, 2024
cf25911
Add rest client for Jetpack AI transcript calls
zwarm May 20, 2024
f9400c6
Merge branch 'trunk' into issue/accept-direct-token-updates
ThomazFB May 20, 2024
74b4340
Adds new stock report endpoint
JorgeMucientes May 21, 2024
3813f81
Refactor: use object instead of class
zwarm May 22, 2024
663182c
Suppress exception detekt when parsing dto
zwarm May 22, 2024
b90b28d
Add support for JetpackAITranscription calls
zwarm May 22, 2024
d98b629
Address checkstyle and detekt issues.
zwarm May 22, 2024
4d79fc4
Adds: custom GsonBuilder for GsonRequest
pantstamp May 22, 2024
98796a1
Fixes: RemoteConfigRestClientTest
pantstamp May 23, 2024
05ce1de
Adds: NumberAwareMapDeserializerTest
pantstamp May 23, 2024
9f408cf
Fixes: checkstyle and detekt issues
pantstamp May 23, 2024
44deaef
Fixes: unit tests with syncGetRequest()
pantstamp May 23, 2024
8301e78
Merge pull request #3017 from wordpress-mobile/issue/20857
pantstamp May 24, 2024
3c2a72b
Keep image url authorisation headers when redirecting
May 24, 2024
bf9c2e5
Fixes style issue
May 24, 2024
b5b18a9
Add jetpack ai query url
zwarm May 24, 2024
4f7e51f
Add jetpack ai query call to the rest client
zwarm May 24, 2024
d2db896
Add jetpack ai query call to the jetpack ai store
zwarm May 24, 2024
95e3d62
Merge pull request #3011 from wordpress-mobile/issue/3010-handle-outo…
aditi-bhatia May 25, 2024
bdcc7a8
Add jetpack ai assistant feature url
zwarm May 26, 2024
80c8caa
Add jetpack ai assistant feature dto
zwarm May 26, 2024
8906c44
Add jetpack ai assistant feature model
zwarm May 26, 2024
96b66e0
Add jetpack ai assistant feature response
zwarm May 26, 2024
75eb3ba
Add call to fetch jetpack ai assistant feature and transform dto to r…
zwarm May 26, 2024
0da4894
Add jetpack ai assistant feature fetch
zwarm May 26, 2024
fee3556
Refactor: move JetpackAIQueryResponse out of rest client and adjust i…
zwarm May 26, 2024
a70b4a4
Refactor: move JetpackAITranscriptionResponse out of rest client and …
zwarm May 26, 2024
10cd566
Address missing blank line at end of file
zwarm May 26, 2024
0090d00
Merge branch 'issue/v2c-jetpack-ai-query-endpoint' into issue/v2c-ai-…
zwarm May 26, 2024
4b96840
Fix checkstyle blank line
zwarm May 26, 2024
f942541
Extracts interceptor in a separate file and adds tests
May 27, 2024
8b6eb64
Merge branch 'trunk' into task/handle-image-redirect-auth-2
May 27, 2024
99e6355
Merge pull request #3018 from wordpress-mobile/task/handle-image-redi…
May 27, 2024
75c08a1
Add changes to support the new min/max REST API
toupper May 27, 2024
3587eb5
Add networking and model for product variations
toupper May 27, 2024
8f0644c
Merge branch 'trunk' into issue/accept-direct-token-updates
ThomazFB May 27, 2024
930bb0d
Merge pull request #3004 from wordpress-mobile/issue/accept-direct-to…
ThomazFB May 28, 2024
e39dd41
Add missing properties
toupper May 28, 2024
9c75bc6
Merge pull request #3020 from wordpress-mobile/issue/11558-new-stock-…
JorgeMucientes May 28, 2024
4d234da
Merge pull request #3019 from wordpress-mobile/issue/v2c-jetpack-ai-q…
pantstamp May 28, 2024
7749c11
Merge pull request #3021 from wordpress-mobile/issue/v2c-ai-assistant…
pantstamp May 28, 2024
abdbe10
Add new endpoint for fetching sales reports on product variations
JorgeMucientes May 28, 2024
5ebbf1b
Remove temporary log lines and update test
zwarm May 29, 2024
679f48c
Merge pull request #3025 from wordpress-mobile/issue/remove-temp-log-…
AjeshRPai May 30, 2024
29e85df
Enhance error messaging
zwarm May 31, 2024
6eb2f42
Refactor: use AppLog.e instead of AppLog.d
zwarm May 31, 2024
2acc68d
Add too_many_requests for error type for rate limit 429s
zwarm May 31, 2024
d6bb541
Remove commented line
zwarm May 31, 2024
f4e5b66
Add JETPACK_AI_SERVICE_UNAVAILABLE error type
zwarm May 31, 2024
a0de99b
Merge pull request #3026 from wordpress-mobile/issue/v2c-enhance-erro…
zwarm May 31, 2024
1cbfde9
[Bug] Add null check if response is null.
notandyvee May 31, 2024
fc91ed4
[Bug] Used payload error vs empty string.
notandyvee Jun 3, 2024
59269f8
Merge pull request #3027 from wordpress-mobile/andy/fluxc-issue-3024
irfano Jun 4, 2024
7effe67
Adds OS version parameter
Jun 4, 2024
282e5c2
Merge pull request #3023 from wordpress-mobile/issue/11558-fetch-prod…
JorgeMucientes Jun 4, 2024
8936b4f
Adds a payload class to prevent the LongParameterList lint issue
Jun 6, 2024
1dbf984
Merge branch 'trunk' into task/os_version_rules
Jun 6, 2024
a6adffa
Adds: ExifUtils
pantstamp Jun 6, 2024
fd8e727
Adds the Android version as the default parameter value so that the c…
Jun 7, 2024
8b0f9c3
Adds back the back fetchFeatureFlags to keep compatibility with the c…
Jun 7, 2024
9823769
Add support for endpoint property upgrade-url
zwarm Jun 10, 2024
12ca852
Merge pull request #3030 from wordpress-mobile/issue/20295-location-m…
AjeshRPai Jun 10, 2024
70f78eb
Refactor to allow for null choices and make that an error
zwarm Jun 10, 2024
d8a4466
Merge pull request #3028 from wordpress-mobile/task/os_version_rules
Jun 11, 2024
57b4643
Merge pull request #3031 from wordpress-mobile/issue/update-voice-to-…
pantstamp Jun 11, 2024
cbae2fe
Use site name as blaze campaign title
JorgeMucientes Jun 13, 2024
b463bf5
Respect the API order in which campaigns are added to the DB
JorgeMucientes Jun 13, 2024
2ba8ca3
Fix unit test after starting to use `siteName` field for campaign title
JorgeMucientes Jun 13, 2024
54c835e
Merge pull request #3032 from wordpress-mobile/fix/11718-update-blaze…
JorgeMucientes Jun 14, 2024
0b21779
Ensure we order the campaigns based on numerical order of campaignId
JorgeMucientes Jun 14, 2024
e6cff13
Merge pull request #3022 from wordpress-mobile/issue/11590-min-max-qu…
toupper Jun 17, 2024
2ced931
Handle nulls in the response
zwarm Jun 18, 2024
2521e15
Set content to non-nullable
zwarm Jun 18, 2024
8bbe41c
Undo the last nonnull on content
zwarm Jun 18, 2024
31be3d1
Merge pull request #3035 from wordpress-mobile/issue/v2c-jetpack-ai-q…
zwarm Jun 19, 2024
09eb71e
Merge pull request #3033 from wordpress-mobile/issue/11321-blaze-impr…
hafizrahman Jun 20, 2024
aff0d56
Add endpoint for checking Google Ads account connection.
hafizrahman Jun 25, 2024
66c1537
Add actual google ads status fetch functionality.
hafizrahman Jun 25, 2024
22c1202
Add new functions to ask questions to jetpack-query endpoint
JorgeMucientes Jun 26, 2024
5b95c45
Merge pull request #3039 from wordpress-mobile/issue/11802-update-jet…
JorgeMucientes Jun 26, 2024
81bedfa
Merge pull request #3038 from wordpress-mobile/add/woo-gla-eligibilit…
JorgeMucientes Jun 27, 2024
f7f603b
Add GLA programs report endpoint
ThomazFB Jun 27, 2024
44cd506
Add endpoint for campaign list
hafizrahman Jul 1, 2024
edc6c5b
Merge pull request #3043 from wordpress-mobile/add/google-for-woo-loa…
hafizrahman Jul 4, 2024
987e1a0
Revert "Merge pull request #3003 from wordpress-mobile/issue/17375"
dcalhoun Jul 8, 2024
83d323f
Merge branch 'trunk' into issue/fetch-all-gla-programs
ThomazFB Jul 8, 2024
cea50b3
Catch NumberFormatException
nbradbury Jul 9, 2024
2c95de9
Reformat to avoid detekt issue, " Function isExpiringSoon has 3 retur…
nbradbury Jul 10, 2024
6831b0a
Merge pull request #3045 from wordpress-mobile/fix/update-published-p…
dcalhoun Jul 10, 2024
11a70a6
Merge pull request #3041 from wordpress-mobile/issue/fetch-all-gla-pr…
ThomazFB Jul 11, 2024
d903248
Merge pull request #3047 from wordpress-mobile/issue/3046-atomic-cook…
nbradbury Jul 11, 2024
c62f4bb
Add an optional parameter to set the max_tokens option
hichamboushaba Jul 12, 2024
76af626
Use `https` by default when we can't discovery the wp-json URL
hichamboushaba Jul 17, 2024
38c3860
Add a TODO comment about migrating to use `rest_route` instead
hichamboushaba Jul 17, 2024
d77a58f
Merge pull request #3053 from wordpress-mobile/fix-wpapi-login-http
JorgeMucientes Jul 17, 2024
35fbc34
Rename .java to .kt
hichamboushaba Jul 19, 2024
f293197
Convert file to Kotlin
hichamboushaba Jul 19, 2024
f2fe0aa
Support parsing multiple Link headers to extract the json endpoint
hichamboushaba Jul 19, 2024
aa3aa1e
Merge pull request #3055 from wordpress-mobile/wpapi/support-multiple…
hichamboushaba Jul 22, 2024
dca2bd8
Build: Remove kotlin android extensions config from fluxc module
ParaskP7 Jul 22, 2024
7d2e88c
Build: Replace kotlin android extensions with parcelize for fluxc
ParaskP7 Jul 22, 2024
36e4669
Build: Migrate to kotlin parcelize (via catalog's pr-sha combination)
ParaskP7 Jul 22, 2024
5a2f635
Build: Add jvm target to point to java 8 to kotlin options
ParaskP7 Jul 23, 2024
a77f204
Build: Move java related source/target compatibility into java block
ParaskP7 Jul 23, 2024
00c6bc9
Fix: Resolve coroutine related send blocking unresolved reference
ParaskP7 Jul 23, 2024
4e69fa3
Fix: Resolve coroutine related offer error
ParaskP7 Jul 23, 2024
32e02e6
Fix: Remove job from flow with default context to make it safe for flows
ParaskP7 Jul 23, 2024
857c987
Fix: Add any as upper bound for list item to make it non-nullable
ParaskP7 Jul 23, 2024
763b0d5
Fix: Resolve room related cascade/replace unresovled references
ParaskP7 Jul 23, 2024
dd68e61
Database: Update latest database schema for both wp/wc android databases
ParaskP7 Jul 23, 2024
e172d3a
Analysis: Resolve wildcard import warnings on custom redirect int. test
ParaskP7 Jul 23, 2024
d680ed4
Remove configuration for `release` build type
wzieba Jul 23, 2024
6be7a96
Rename proguard-rules.pro to consumer-rules.pro
wzieba Jul 23, 2024
8096af5
save list fetched
Jul 23, 2024
e64af0c
Merge pull request #3061 from wordpress-mobile/issue/11792-fetch-orde…
atorresveiga Jul 24, 2024
3ff4b5a
Revert "Database: Update latest database schema for both wp/wc androi…
ParaskP7 Jul 24, 2024
72ad536
Do not alter context in `CoroutineEngine#flowWithDefaultContext`
wzieba Jul 24, 2024
801823b
Merge pull request #3062 from wordpress-mobile/build/do_not_edit_context
ParaskP7 Jul 24, 2024
e1047eb
Merge branch 'trunk' of github.com:wordpress-mobile/WordPress-FluxC-A…
ParaskP7 Jul 24, 2024
ba650f8
Merge pull request #3059 from wordpress-mobile/build/update-kotlin-to…
ParaskP7 Jul 24, 2024
f4425e4
Merge branch 'trunk' into bump_agp_to_8_5_0
wzieba Jul 24, 2024
179320d
Update UserAgent to handle initialization on a background thread
hichamboushaba Jul 25, 2024
75df972
Fix tests
hichamboushaba Jul 25, 2024
922175b
Update the site duplication logic to not throw when IDC occurs
hichamboushaba Jul 24, 2024
d4f1ccc
Remove the outdated tests
hichamboushaba Jul 25, 2024
ea70a00
Update condition to allow keeping both duplicated websites
hichamboushaba Jul 29, 2024
0c15f21
Merge pull request #3066 from wordpress-mobile/tweat-duplication-logi…
hichamboushaba Aug 1, 2024
28a192e
Fix unit tests
hichamboushaba Aug 2, 2024
0a59ce9
Introduce parsedMetadata property to products
hichamboushaba Aug 2, 2024
32bfc89
Add new Blaze notification types
JorgeMucientes Aug 5, 2024
ec93bad
Remove deprecated usage
JorgeMucientes Aug 5, 2024
6d99055
Merge branch 'trunk' into bump_agp_to_8_5_0
wzieba Aug 6, 2024
76b48d4
Merge pull request #3065 from wordpress-mobile/bump_agp_to_8_5_0
wzieba Aug 6, 2024
cd4a932
Merge pull request #3070 from wordpress-mobile/woo/meta-data-refactor-1
hichamboushaba Aug 7, 2024
eaf69cd
Deps: Replace eventbus dependency with eventbus java in fluxc
ParaskP7 Aug 9, 2024
f6cd147
Deps: Remove androidx appcompat dependency from fluxc
ParaskP7 Aug 9, 2024
5bfefd1
Deps: Remove androidx recyclerview dependency from fluxc
ParaskP7 Aug 9, 2024
d446f45
Deps: Remove assertj core dependency on test from fluxc
ParaskP7 Aug 9, 2024
a70fceb
Build: Update dependency analysis configuration on fluxc processor
ParaskP7 Aug 9, 2024
3e43aa3
Introduce ProductDtoMapper to handle product mapping
hichamboushaba Aug 7, 2024
7932ad7
Update the product table to include columns for bundle min/max sizes
hichamboushaba Aug 8, 2024
1693b29
Pass argument "wpcom_supports_2fa" when requesting a new 2FA code
hichamboushaba Aug 12, 2024
c3c2808
Merge branch 'refs/heads/trunk' into issue/12191-display-blaze-push-s…
JorgeMucientes Aug 12, 2024
2e686b8
Build: Replace kapt with annotation processor for fluxc processor
ParaskP7 Aug 13, 2024
dcf8c3d
Merge pull request #3078 from wordpress-mobile/login/fix-sms-2fa
JorgeMucientes Aug 13, 2024
b318ee7
Merge branch 'trunk' of github.com:wordpress-mobile/WordPress-FluxC-A…
ParaskP7 Aug 14, 2024
eaab328
Merge pull request #3075 from wordpress-mobile/build/remove-unused-de…
ParaskP7 Aug 14, 2024
68ef663
Revert to using the `/token` endpoint for the login
hichamboushaba Aug 13, 2024
c364bfe
Merge pull request #3074 from wordpress-mobile/woo/meta-data-refactor-3
hichamboushaba Aug 15, 2024
428cf5c
Merge pull request #3073 from wordpress-mobile/woo/meta-data-refactor-2
hichamboushaba Aug 15, 2024
951fe7f
Merge pull request #3079 from wordpress-mobile/login/fix-sms-2fa-part-2
hichamboushaba Aug 16, 2024
d56b2bf
Force using Locale.ROOT when formatting dates to respect ISO format
hichamboushaba Aug 19, 2024
daf7bf7
Merge pull request #3071 from wordpress-mobile/issue/12191-display-bl…
irfano Aug 21, 2024
bbf672f
Merge pull request #3085 from wordpress-mobile/blaze/fix-date-formatting
JorgeMucientes Aug 21, 2024
733ac15
Share the same date formatter for all requests
hichamboushaba Aug 22, 2024
ed10033
Merge pull request #3087 from wordpress-mobile/blaze/fix-date-formatting
irfano Aug 22, 2024
db6a401
Add support for Blaze endless campaign aka Evergreen campaigns
JorgeMucientes Aug 21, 2024
7b5d0a0
Fix unit test compile issues
JorgeMucientes Aug 27, 2024
44d2311
Add missing field to support creating Evergreen campaigns
JorgeMucientes Aug 27, 2024
2afc483
Merge branch 'refs/heads/trunk' into issue/12390-update-models-to-sup…
JorgeMucientes Aug 28, 2024
d1910f3
Merge pull request #3086 from wordpress-mobile/issue/12390-update-mod…
irfano Aug 29, 2024
9cd67ca
refresh required after updating the list
Sep 5, 2024
4c4aec4
Merge pull request #3089 from wordpress-mobile/issue/12491-broken-pag…
atorresveiga Sep 5, 2024
24eca61
add not expired states
Sep 6, 2024
a30d9bb
take into account not expired states in getListState
Sep 6, 2024
68ce797
Merge pull request #3090 from wordpress-mobile/issue/12491-fix-load-more
atorresveiga Sep 6, 2024
2f2f788
Adds new campaign_id field to map from push notification payload
JorgeMucientes Sep 9, 2024
389751c
update unit tests
Sep 11, 2024
ae891d0
Merge pull request #3093 from wordpress-mobile/issue/12528-new-dimens…
atorresveiga Sep 11, 2024
674a747
Add campaigns/objectives endpoint to wp-com-v2-endpoints file
irfano Sep 14, 2024
3bb48c1
Add BlazeCampaignObjective model
irfano Sep 14, 2024
5f51bb5
Add BlazeCampaignObjectiveListResponse model
irfano Sep 14, 2024
c9c9041
Add fetchCampaignObjectives() to BlazeCreationRestClient
irfano Sep 14, 2024
c297dee
Add BlazeCampaignObjectives table
irfano Sep 14, 2024
8d01f15
Add the relevant objective functions to BlazeCampaignsDao
irfano Sep 14, 2024
0f469ec
Add fetchBlazeCampaignObjectives() to BlazeCampaignsStore
irfano Sep 14, 2024
b195d8c
Add observeBlazeCampaignObjectives() to BlazeCampaignsStore
irfano Sep 14, 2024
7895e79
Add a new column to hold the product password
hichamboushaba Sep 18, 2024
8bf6314
Add support to fetch WP media using v2 endpoint
JorgeMucientes Sep 18, 2024
660817d
Add missing objective field suitableForDescription
JorgeMucientes Sep 19, 2024
dc37ba6
Move Blaze objectives Dao outside of CampaignsDao
JorgeMucientes Sep 19, 2024
b6a07a9
Fix unit tests compile issues after dao refactor
JorgeMucientes Sep 19, 2024
ffe6e5c
Fix checkstyle issues
JorgeMucientes Sep 19, 2024
f7925b2
Merge pull request #3095 from wordpress-mobile/feature/campaigns-obje…
JorgeMucientes Sep 19, 2024
ff6aedd
Merge pull request #3097 from wordpress-mobile/issue/12146-fetch-medi…
JorgeMucientes Sep 19, 2024
fcbc268
Adds missing provider method for new Objective DAO
JorgeMucientes Sep 19, 2024
0b6d875
Merge pull request #3098 from wordpress-mobile/issue/12469-missing-pr…
JorgeMucientes Sep 20, 2024
c47e751
Deps: add back eventbus android dependency
ParaskP7 Sep 23, 2024
85250e0
Merge pull request #3100 from wordpress-mobile/deps/add-back-eventbus…
ParaskP7 Sep 24, 2024
13f2284
Merge pull request #3096 from wordpress-mobile/product-password
hichamboushaba Sep 24, 2024
aa97652
Revert "[ANR fix] Move UserAgent initialization to a background thread"
hichamboushaba Sep 24, 2024
8465fbf
Merge pull request #3101 from wordpress-mobile/revert-3067-fix-userag…
kidinov Sep 25, 2024
1e077f6
Add new objective parameter to create campaign request
JorgeMucientes Sep 26, 2024
719a572
Split Link header values into different items
JorgeMucientes Sep 27, 2024
9ac608d
Merge pull request #3103 from wordpress-mobile/issue/12660-add-object…
irfano Sep 30, 2024
0fcbe56
Use directly Link header value
JorgeMucientes Sep 30, 2024
70e780d
Revert accidentally committed change
JorgeMucientes Sep 30, 2024
a1ac0f6
Merge pull request #3104 from wordpress-mobile/fix/12715-fix-url-disc…
JorgeMucientes Sep 30, 2024
672e918
Revert accidentally committed change
JorgeMucientes Oct 3, 2024
10a6cf0
Merge pull request #3105 from wordpress-mobile/fix/make-objective-fie…
irfano Oct 3, 2024
89809e3
Merge branch 'filtered' of /Users/wzieba/FluxCForkFilter into fluxc_r…
wzieba Oct 16, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 1 addition & 0 deletions fluxc-annotations/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/build
26 changes: 26 additions & 0 deletions fluxc-annotations/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
plugins {
id "java"
alias(sharedLibs.plugins.automattic.publishToS3)
}

java {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8

withSourcesJar()
withJavadocJar()
}

project.afterEvaluate {
publishing {
publications {
FluxCAnnotationsPublication(MavenPublication) {
from components.java

groupId "org.wordpress.fluxc"
artifactId "fluxc-annotations"
// version is set by 'publish-to-s3' plugin
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package org.wordpress.android.fluxc.annotations;

import org.wordpress.android.fluxc.annotations.action.NoPayload;

import java.lang.annotation.ElementType;
import java.lang.annotation.Target;

/**
* Defines an individual action with optional payload. To annotate an option with no payload, don't set the
* {@link Action#payloadType}.
*/
@Target(ElementType.FIELD)
public @interface Action {
Class payloadType() default NoPayload.class;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
package org.wordpress.android.fluxc.annotations;

import java.lang.annotation.ElementType;
import java.lang.annotation.Target;

/**
* Defines an enum of actions related to a particular store.
*/
@Target(value = ElementType.TYPE)
public @interface ActionEnum {
String name() default "";
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
package org.wordpress.android.fluxc.annotations;

public abstract class AnnotationConfig {
public static final String PACKAGE = "org.wordpress.android.fluxc.generated";
public static final String PACKAGE_ENDPOINTS = PACKAGE + ".endpoint";
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
package org.wordpress.android.fluxc.annotations;

import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Target;

/**
* Declares a valid REST endpoint.
*/
@Documented
@Target({ElementType.FIELD, ElementType.METHOD})
public @interface Endpoint {
String value();
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
package org.wordpress.android.fluxc.annotations.action;

public class Action<T> {
private final IAction mActionType;
private final T mPayload;

public Action(IAction actionType, T payload) {
mActionType = actionType;
mPayload = payload;
}

public IAction getType() {
return mActionType;
}

public T getPayload() {
return mPayload;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package org.wordpress.android.fluxc.annotations.action;

public abstract class ActionBuilder {
public static Action<Void> generateNoPayloadAction(IAction actionType) {
return new Action<>(actionType, null);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
package org.wordpress.android.fluxc.annotations.action;

public interface IAction {
String toString();
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
package org.wordpress.android.fluxc.annotations.action;

public class NoPayload {
private NoPayload() {}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
package org.wordpress.android.fluxc.annotations.endpoint;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

public class EndpointNode {
private String mLocalEndpoint;
private EndpointNode mParent;
private List<EndpointNode> mChildren;

public EndpointNode(String localEndpoint) {
mLocalEndpoint = localEndpoint;
}

public String getLocalEndpoint() {
return mLocalEndpoint;
}

public void setLocalEndpoint(String localEndpoint) {
mLocalEndpoint = localEndpoint;
}

public EndpointNode getParent() {
return mParent;
}

public void setParent(EndpointNode parent) {
mParent = parent;
}

public void addChild(EndpointNode child) {
child.setParent(this);
if (mChildren == null) {
mChildren = new ArrayList<>();
}
mChildren.add(child);
}

public boolean hasChildren() {
return (mChildren != null && !mChildren.isEmpty());
}

public List<EndpointNode> getChildren() {
return mChildren;
}

public EndpointNode getRoot() {
if (mParent != null) {
return mParent.getRoot();
}
return this;
}

public void setChildren(List<EndpointNode> children) {
mChildren = children;
}

public String getFullEndpoint() {
String fullEndpoint = getLocalEndpoint().replaceAll("#[^/]*", ""); // Strip any type metadata, e.g. $name#String
if (getParent() == null) {
return fullEndpoint;
}
return getParent().getFullEndpoint() + fullEndpoint;
}

public String getCleanEndpointName() {
if (getLocalEndpoint().contains(":")) {
// For 'mixed' endpoints, e.g. item:$theItem, return the label part ('item')
return getLocalEndpoint().substring(0, getLocalEndpoint().indexOf(":")).replaceAll("-", "_");
} else {
return getLocalEndpoint().replaceAll("/|\\$|#.*|(?<!_or)(_ID|_id)|<|>|\\{|\\}", "")
.replaceAll("-", "_")
.replaceAll("\\.", "_");
}
}

public List<String> getEndpointTypes() {
Pattern pattern = Pattern.compile("#([^\\/]*)");
Matcher matcher = pattern.matcher(getLocalEndpoint());

if (matcher.find()) {
return Arrays.asList(matcher.group(1).split(","));
}

return Collections.emptyList();
}

public boolean isRoot() {
return mLocalEndpoint.equals("/");
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
package org.wordpress.android.fluxc.annotations.endpoint;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.nio.charset.Charset;

public class EndpointTreeGenerator {
public static EndpointNode process(InputStream inputStream) throws IOException {
BufferedReader in = new BufferedReader(new InputStreamReader(inputStream, Charset.forName("UTF-8")));

EndpointNode endpointTree = new EndpointNode("/");

String strLine;

while ((strLine = in.readLine()) != null) {
if (strLine.length() == 0) {
continue;
}
EndpointNode endpoint = new EndpointNode("");
boolean firstTime = true;
for (String str : strLine.replaceAll("^/|/$", "").split("/")) {
if (firstTime) {
endpoint.setLocalEndpoint(str + "/");
firstTime = false;
continue;
}
endpoint.addChild(new EndpointNode(str + "/"));
endpoint = endpoint.getChildren().get(0);
}
insertNodeInNode(endpoint.getRoot(), endpointTree);
}

in.close();

return endpointTree;
}

private static void insertNodeInNode(EndpointNode endpointNodeToInsert, EndpointNode endpointTree) {
if (endpointTree.hasChildren()) {
for (EndpointNode endpoint : endpointTree.getChildren()) {
if (endpoint.getLocalEndpoint().equals(endpointNodeToInsert.getLocalEndpoint())) {
if (endpointNodeToInsert.hasChildren()) {
insertNodeInNode(endpointNodeToInsert.getChildren().get(0), endpoint);
}
return;
}
}
}
endpointTree.addChild(endpointNodeToInsert);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
package org.wordpress.android.fluxc.annotations.endpoint;

public class JPAPIEndpoint {
private static final String JP_PREFIX_V4 = "jetpack/v4";

private final String mEndpoint;

public JPAPIEndpoint(String endpoint) {
mEndpoint = endpoint;
}

public JPAPIEndpoint(String endpoint, long id) {
this(endpoint + id + "/");
}

public JPAPIEndpoint(String endpoint, String value) {
this(endpoint + value + "/");
}

public String getEndpoint() {
return mEndpoint;
}

public String getPathV4() {
return "/" + JP_PREFIX_V4 + mEndpoint;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
package org.wordpress.android.fluxc.annotations.endpoint;

public class WCWPAPIEndpoint {
private static final String WC_PREFIX = "wc";

private static final String WC_PREFIX_V3 = "wc/v3";

private static final String WC_PREFIX_V1 = "wc/v1";

private static final String WC_PREFIX_V2 = "wc/v2";

private static final String WC_PREFIX_V4 = "wc/v4";

private static final String WC_PREFIX_V4_ANALYTICS = "wc-analytics";

private static final String WC_PREFIX_V1_ADDONS = "wc-product-add-ons/v1";

private static final String WC_PREFIX_TELEMETRY = "wc-telemetry";

private static final String WC_PREFIX_ADMIN = "wc-admin";

private final String mEndpoint;

public WCWPAPIEndpoint(String endpoint) {
mEndpoint = endpoint;
}

public WCWPAPIEndpoint(String endpoint, long id) {
this(endpoint + id + "/");
}

public WCWPAPIEndpoint(String endpoint, String value) {
this(endpoint + value + "/");
}

public String getEndpoint() {
return mEndpoint;
}

public String getPathV3() {
return "/" + WC_PREFIX_V3 + mEndpoint;
}

public String getPathV2() {
return "/" + WC_PREFIX_V2 + mEndpoint;
}

public String getPathV1() {
return "/" + WC_PREFIX_V1 + mEndpoint;
}

public String getPathV4() {
return "/" + WC_PREFIX_V4 + mEndpoint;
}

public String getPathNoVersion() {
return "/" + WC_PREFIX + mEndpoint;
}

public String getPathV4Analytics() {
return "/" + WC_PREFIX_V4_ANALYTICS + mEndpoint;
}

public String getPathV1Addons() {
return "/" + WC_PREFIX_V1_ADDONS + mEndpoint;
}

public String getPathWcTelemetry() {
return "/" + WC_PREFIX_TELEMETRY + mEndpoint;
}

public String getPathWcAdmin() {
return "/" + WC_PREFIX_ADMIN + mEndpoint;
}
}
Loading
Loading