@ludo.ninja/api 2.4.1 → 2.4.3
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/build/config/index.js +6 -6
- package/build/cookies/index.js +14 -14
- package/build/graphql_tools/__generated__/schema.d.ts +267 -0
- package/build/graphql_tools/__generated__/schema.js +240 -5
- package/package.json +1 -1
- package/src/config/index.ts +6 -6
- package/src/cookies/index.ts +14 -14
- package/src/graphql_tools/__generated__/schema.ts +370 -0
- package/tsconfig.tsbuildinfo +1 -1
|
@@ -24,11 +24,11 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
24
24
|
};
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
26
|
exports.useFetchMyTasksQuery = exports.FetchMyTasksDocument = exports.useFetchMyExperienceV2LazyQuery = exports.useFetchMyExperienceV2Query = exports.FetchMyExperienceV2Document = exports.useFetchDynamicCollectionsDataLazyQuery = exports.useFetchDynamicCollectionsDataQuery = exports.FetchDynamicCollectionsDataDocument = exports.useFetchDynamicCollectionDataLazyQuery = exports.useFetchDynamicCollectionDataQuery = exports.FetchDynamicCollectionDataDocument = exports.useFetchCollectionsByIdsLazyQuery = exports.useFetchCollectionsByIdsQuery = exports.FetchCollectionsByIdsDocument = exports.useFetchCollectionsLazyQuery = exports.useFetchCollectionsQuery = exports.FetchCollectionsDocument = exports.useFetchCollectionLazyQuery = exports.useFetchCollectionQuery = exports.FetchCollectionDocument = exports.useLikeCollectionMutation = exports.LikeCollectionDocument = exports.useDislikeCollectionMutation = exports.DislikeCollectionDocument = exports.useFetchLikedLazyQuery = exports.useFetchLikedQuery = exports.FetchLikedDocument = exports.useFetchDynamicAssetsLikesLazyQuery = exports.useFetchDynamicAssetsLikesQuery = exports.FetchDynamicAssetsLikesDocument = exports.useFetchDynamicAssetLikesLazyQuery = exports.useFetchDynamicAssetLikesQuery = exports.FetchDynamicAssetLikesDocument = exports.useFetchAssetsLazyQuery = exports.useFetchAssetsQuery = exports.FetchAssetsDocument = exports.useFetchAssetByBlockchainLazyQuery = exports.useFetchAssetByBlockchainQuery = exports.FetchAssetByBlockchainDocument = exports.useFetchAssetLazyQuery = exports.useFetchAssetQuery = exports.FetchAssetDocument = exports.useLikeAssetMutation = exports.LikeAssetDocument = exports.useDislikeAssetMutation = exports.DislikeAssetDocument = exports.useFetchAdminXpPageLazyQuery = exports.useFetchAdminXpPageQuery = exports.FetchAdminXpPageDocument = exports.ISortDirection = void 0;
|
|
27
|
-
exports.
|
|
28
|
-
exports.
|
|
29
|
-
exports.
|
|
30
|
-
exports.
|
|
31
|
-
exports.useFindUserShowcaseItemsLazyQuery = exports.useFindUserShowcaseItemsQuery = exports.FindUserShowcaseItemsDocument = exports.useFindUserCreationsLazyQuery = exports.useFindUserCreationsQuery = exports.FindUserCreationsDocument = exports.useFindShowcaseItemsLazyQuery = exports.useFindShowcaseItemsQuery = exports.FindShowcaseItemsDocument = exports.useFindSetsLazyQuery = exports.useFindSetsQuery = void 0;
|
|
27
|
+
exports.CreateGalleryDocument = exports.useCreateFavoritesMutation = exports.CreateFavoritesDocument = exports.useCreateFavoriteListV2Mutation = exports.CreateFavoriteListV2Document = exports.useAddCreationsToGalleryV2Mutation = exports.AddCreationsToGalleryV2Document = exports.useAddCreationsToGalleryMutation = exports.AddCreationsToGalleryDocument = exports.useAddCollectionsToGalleryV2Mutation = exports.AddCollectionsToGalleryV2Document = exports.useAddCollectionsToGalleryMutation = exports.AddCollectionsToGalleryDocument = exports.useUploadGalleryBannerMutation = exports.UploadGalleryBannerDocument = exports.useAddAssetsToGalleryV2Mutation = exports.AddAssetsToGalleryV2Document = exports.useAddAssetsToGalleryMutation = exports.AddAssetsToGalleryDocument = exports.useFetchNftRanksLazyQuery = exports.useFetchNftRanksQuery = exports.FetchNftRanksDocument = exports.useFetchNftDataLazyQuery = exports.useFetchNftDataQuery = exports.FetchNftDataDocument = exports.useFetchExtensionOpportunitiesLazyQuery = exports.useFetchExtensionOpportunitiesQuery = exports.FetchExtensionOpportunitiesDocument = exports.useFetchExtensionCategoriesLazyQuery = exports.useFetchExtensionCategoriesQuery = exports.FetchExtensionCategoriesDocument = exports.useFetchExtensionBrandsLazyQuery = exports.useFetchExtensionBrandsQuery = exports.FetchExtensionBrandsDocument = exports.useFetchCollectionRanksLazyQuery = exports.useFetchCollectionRanksQuery = exports.FetchCollectionRanksDocument = exports.useVisitPageV2Mutation = exports.VisitPageV2Document = exports.useOpenOpportunityV2Mutation = exports.OpenOpportunityV2Document = exports.useHideOpportunityV2Mutation = exports.HideOpportunityV2Document = exports.useOnMyExperienceUpdatedSubscription = exports.OnMyExperienceUpdatedDocument = exports.useOnMyExperienceIncrementedSubscription = exports.OnMyExperienceIncrementedDocument = exports.useOnInviteCodeUsedSubscription = exports.OnInviteCodeUsedDocument = exports.useFetchMyTasksLazyQuery = void 0;
|
|
28
|
+
exports.useFetchUserGalleriesV2Query = exports.FetchUserGalleriesV2Document = exports.useFetchUserGalleriesLazyQuery = exports.useFetchUserGalleriesQuery = exports.FetchUserGalleriesDocument = exports.useFetchUserFavoritesV2LazyQuery = exports.useFetchUserFavoritesV2Query = exports.FetchUserFavoritesV2Document = exports.useFetchUserFavoritesLazyQuery = exports.useFetchUserFavoritesQuery = exports.FetchUserFavoritesDocument = exports.useFetchMyGalleriesV2LazyQuery = exports.useFetchMyGalleriesV2Query = exports.FetchMyGalleriesV2Document = exports.useFetchMyFavoritesV2LazyQuery = exports.useFetchMyFavoritesV2Query = exports.FetchMyFavoritesV2Document = exports.useFetchMyFavoritesLazyQuery = exports.useFetchMyFavoritesQuery = exports.FetchMyFavoritesDocument = exports.useFetchGalleryV2LazyQuery = exports.useFetchGalleryV2Query = exports.FetchGalleryV2Document = exports.useFetchGalleryCreationsLazyQuery = exports.useFetchGalleryCreationsQuery = exports.FetchGalleryCreationsDocument = exports.useFetchGalleryLazyQuery = exports.useFetchGalleryQuery = exports.FetchGalleryDocument = exports.useRemoveCreationFromGalleryV2Mutation = exports.RemoveCreationFromGalleryV2Document = exports.useRemoveCreationFromGalleryMutation = exports.RemoveCreationFromGalleryDocument = exports.useRemoveCollectionFromGalleryV2Mutation = exports.RemoveCollectionFromGalleryV2Document = exports.useRemoveCollectionFromGalleryMutation = exports.RemoveCollectionFromGalleryDocument = exports.useRemoveAssetFromGalleryV2Mutation = exports.RemoveAssetFromGalleryV2Document = exports.useRemoveAssetFromGalleryMutation = exports.RemoveAssetFromGalleryDocument = exports.useEditGalleryMutation = exports.EditGalleryDocument = exports.useDeleteGalleryBannerMutation = exports.DeleteGalleryBannerDocument = exports.useDeleteGalleryMutation = exports.DeleteGalleryDocument = exports.useCreateGalleryV2Mutation = exports.CreateGalleryV2Document = exports.useCreateGalleryMutation = void 0;
|
|
29
|
+
exports.CreateOpportunityDocument = exports.useFetchUserpicLazyQuery = exports.useFetchUserpicQuery = exports.FetchUserpicDocument = exports.useGetMyInviteCodesLazyQuery = exports.useGetMyInviteCodesQuery = exports.GetMyInviteCodesDocument = exports.useFetchUserWalletsLazyQuery = exports.useFetchUserWalletsQuery = exports.FetchUserWalletsDocument = exports.useFetchProfileLazyQuery = exports.useFetchProfileQuery = exports.FetchProfileDocument = exports.useUpdateProfileMutation = exports.UpdateProfileDocument = exports.useSignInTezosMutation = exports.SignInTezosDocument = exports.useSignInSolanaMutation = exports.SignInSolanaDocument = exports.useSignInMetamaskMutation = exports.SignInMetamaskDocument = exports.useSignInFlowMutation = exports.SignInFlowDocument = exports.useSignInElrondMutation = exports.SignInElrondDocument = exports.useSetMainWalletMutation = exports.SetMainWalletDocument = exports.useRevokeTokenMutation = exports.RevokeTokenDocument = exports.useRemoveWalletMutation = exports.RemoveWalletDocument = exports.useRefreshTokenMutation = exports.RefreshTokenDocument = exports.useUseInviteCodeMutation = exports.UseInviteCodeDocument = exports.useGenerateNewInviteCodesMutation = exports.GenerateNewInviteCodesDocument = exports.useCreateNonceMutation = exports.CreateNonceDocument = exports.useAddWalletTezosMutation = exports.AddWalletTezosDocument = exports.useAddWalletSolanaMutation = exports.AddWalletSolanaDocument = exports.useAddWalletMetamaskMutation = exports.AddWalletMetamaskDocument = exports.useAddWalletFlowMutation = exports.AddWalletFlowDocument = exports.useAddWalletElrondMutation = exports.AddWalletElrondDocument = exports.useFetchUserGalleriesV2LazyQuery = void 0;
|
|
30
|
+
exports.FetchCreationsByTypeDocument = exports.useFindCollectionsLazyQuery = exports.useFindCollectionsQuery = exports.FindCollectionsDocument = exports.useFetchAssetsCountLazyQuery = exports.useFetchAssetsCountQuery = exports.FetchAssetsCountDocument = exports.useFetchAllCreationsLazyQuery = exports.useFetchAllCreationsQuery = exports.FetchAllCreationsDocument = exports.useFetchSetsSearchResultTypeSelectionsLazyQuery = exports.useFetchSetsSearchResultTypeSelectionsQuery = exports.FetchSetsSearchResultTypeSelectionsDocument = exports.useFetchSearchResultStatusSelectionsLazyQuery = exports.useFetchSearchResultStatusSelectionsQuery = exports.FetchSearchResultStatusSelectionsDocument = exports.useFetchSearchResultCategorySelectionsLazyQuery = exports.useFetchSearchResultCategorySelectionsQuery = exports.FetchSearchResultCategorySelectionsDocument = exports.useFetchSearchResultBlockchainSelectionsLazyQuery = exports.useFetchSearchResultBlockchainSelectionsQuery = exports.FetchSearchResultBlockchainSelectionsDocument = exports.useFetchUserInterestsLazyQuery = exports.useFetchUserInterestsQuery = exports.FetchUserInterestsDocument = exports.useFetchUserExpectationsLazyQuery = exports.useFetchUserExpectationsQuery = exports.FetchUserExpectationsDocument = exports.useFetchSearchResultTimeSelectionsLazyQuery = exports.useFetchSearchResultTimeSelectionsQuery = exports.FetchSearchResultTimeSelectionsDocument = exports.useFetchSearchResultSelectionsLazyQuery = exports.useFetchSearchResultSelectionsQuery = exports.FetchSearchResultSelectionsDocument = exports.useFetchInterestsLazyQuery = exports.useFetchInterestsQuery = exports.FetchInterestsDocument = exports.useFetchExpectationsLazyQuery = exports.useFetchExpectationsQuery = exports.FetchExpectationsDocument = exports.useSaveUserInterestsMutation = exports.SaveUserInterestsDocument = exports.useSaveUserExpectationsMutation = exports.SaveUserExpectationsDocument = exports.useFetchOpportunitiesLazyQuery = exports.useFetchOpportunitiesQuery = exports.FetchOpportunitiesDocument = exports.useOpenOpportunityMutation = exports.OpenOpportunityDocument = exports.useCreateOpportunityMutation = void 0;
|
|
31
|
+
exports.useFindUserShowcaseItemsLazyQuery = exports.useFindUserShowcaseItemsQuery = exports.FindUserShowcaseItemsDocument = exports.useFindUserCreationsLazyQuery = exports.useFindUserCreationsQuery = exports.FindUserCreationsDocument = exports.useFindShowcaseItemsLazyQuery = exports.useFindShowcaseItemsQuery = exports.FindShowcaseItemsDocument = exports.useFindSetsLazyQuery = exports.useFindSetsQuery = exports.FindSetsDocument = exports.useFindProfilesByNameLazyQuery = exports.useFindProfilesByNameQuery = exports.FindProfilesByNameDocument = exports.useFindCreationsLazyQuery = exports.useFindCreationsQuery = exports.FindCreationsDocument = exports.useFetchUserPortfolioLazyQuery = exports.useFetchUserPortfolioQuery = exports.FetchUserPortfolioDocument = exports.useFindAllTopEntitiesByNameLazyQuery = exports.useFindAllTopEntitiesByNameQuery = exports.FindAllTopEntitiesByNameDocument = exports.useFetchCreationsByTypeLazyQuery = exports.useFetchCreationsByTypeQuery = void 0;
|
|
32
32
|
/* eslint-disable */
|
|
33
33
|
const client_1 = require("@apollo/client");
|
|
34
34
|
const Apollo = __importStar(require("@apollo/client"));
|
|
@@ -1103,6 +1103,117 @@ function useOnMyExperienceUpdatedSubscription(baseOptions) {
|
|
|
1103
1103
|
return Apollo.useSubscription(exports.OnMyExperienceUpdatedDocument, baseOptions);
|
|
1104
1104
|
}
|
|
1105
1105
|
exports.useOnMyExperienceUpdatedSubscription = useOnMyExperienceUpdatedSubscription;
|
|
1106
|
+
exports.HideOpportunityV2Document = (0, client_1.gql) `
|
|
1107
|
+
mutation HideOpportunityV2($opportunityId: ID!) {
|
|
1108
|
+
hideOpportunityV2(opportunityId: $opportunityId)
|
|
1109
|
+
}
|
|
1110
|
+
`;
|
|
1111
|
+
/**
|
|
1112
|
+
* __useHideOpportunityV2Mutation__
|
|
1113
|
+
*
|
|
1114
|
+
* To run a mutation, you first call `useHideOpportunityV2Mutation` within a React component and pass it any options that fit your needs.
|
|
1115
|
+
* When your component renders, `useHideOpportunityV2Mutation` returns a tuple that includes:
|
|
1116
|
+
* - A mutate function that you can call at any time to execute the mutation
|
|
1117
|
+
* - An object with fields that represent the current status of the mutation's execution
|
|
1118
|
+
*
|
|
1119
|
+
* @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2;
|
|
1120
|
+
*
|
|
1121
|
+
* @example
|
|
1122
|
+
* const [hideOpportunityV2Mutation, { data, loading, error }] = useHideOpportunityV2Mutation({
|
|
1123
|
+
* variables: {
|
|
1124
|
+
* opportunityId: // value for 'opportunityId'
|
|
1125
|
+
* },
|
|
1126
|
+
* });
|
|
1127
|
+
*/
|
|
1128
|
+
function useHideOpportunityV2Mutation(baseOptions) {
|
|
1129
|
+
return Apollo.useMutation(exports.HideOpportunityV2Document, baseOptions);
|
|
1130
|
+
}
|
|
1131
|
+
exports.useHideOpportunityV2Mutation = useHideOpportunityV2Mutation;
|
|
1132
|
+
exports.OpenOpportunityV2Document = (0, client_1.gql) `
|
|
1133
|
+
mutation OpenOpportunityV2($opportunityId: ID!) {
|
|
1134
|
+
openOpportunityV2(opportunityId: $opportunityId)
|
|
1135
|
+
}
|
|
1136
|
+
`;
|
|
1137
|
+
/**
|
|
1138
|
+
* __useOpenOpportunityV2Mutation__
|
|
1139
|
+
*
|
|
1140
|
+
* To run a mutation, you first call `useOpenOpportunityV2Mutation` within a React component and pass it any options that fit your needs.
|
|
1141
|
+
* When your component renders, `useOpenOpportunityV2Mutation` returns a tuple that includes:
|
|
1142
|
+
* - A mutate function that you can call at any time to execute the mutation
|
|
1143
|
+
* - An object with fields that represent the current status of the mutation's execution
|
|
1144
|
+
*
|
|
1145
|
+
* @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2;
|
|
1146
|
+
*
|
|
1147
|
+
* @example
|
|
1148
|
+
* const [openOpportunityV2Mutation, { data, loading, error }] = useOpenOpportunityV2Mutation({
|
|
1149
|
+
* variables: {
|
|
1150
|
+
* opportunityId: // value for 'opportunityId'
|
|
1151
|
+
* },
|
|
1152
|
+
* });
|
|
1153
|
+
*/
|
|
1154
|
+
function useOpenOpportunityV2Mutation(baseOptions) {
|
|
1155
|
+
return Apollo.useMutation(exports.OpenOpportunityV2Document, baseOptions);
|
|
1156
|
+
}
|
|
1157
|
+
exports.useOpenOpportunityV2Mutation = useOpenOpportunityV2Mutation;
|
|
1158
|
+
exports.VisitPageV2Document = (0, client_1.gql) `
|
|
1159
|
+
mutation VisitPageV2($domain: String!, $title: String!, $description: String, $tags: [String], $brandId: String, $category: String) {
|
|
1160
|
+
visitPageV2(
|
|
1161
|
+
domain: $domain
|
|
1162
|
+
title: $title
|
|
1163
|
+
description: $description
|
|
1164
|
+
tags: $tags
|
|
1165
|
+
brandId: $brandId
|
|
1166
|
+
category: $category
|
|
1167
|
+
) {
|
|
1168
|
+
opportunityId
|
|
1169
|
+
brandId
|
|
1170
|
+
categoryId
|
|
1171
|
+
opportunityStatus
|
|
1172
|
+
opportunityType
|
|
1173
|
+
notificationType
|
|
1174
|
+
name
|
|
1175
|
+
brandName
|
|
1176
|
+
brandDescription
|
|
1177
|
+
brandMedia
|
|
1178
|
+
brandUrl
|
|
1179
|
+
brandIndustry
|
|
1180
|
+
categoryName
|
|
1181
|
+
ludoUrl
|
|
1182
|
+
projectUrl
|
|
1183
|
+
activeFrom
|
|
1184
|
+
activeUntil
|
|
1185
|
+
media
|
|
1186
|
+
reportLink
|
|
1187
|
+
shareLink
|
|
1188
|
+
}
|
|
1189
|
+
}
|
|
1190
|
+
`;
|
|
1191
|
+
/**
|
|
1192
|
+
* __useVisitPageV2Mutation__
|
|
1193
|
+
*
|
|
1194
|
+
* To run a mutation, you first call `useVisitPageV2Mutation` within a React component and pass it any options that fit your needs.
|
|
1195
|
+
* When your component renders, `useVisitPageV2Mutation` returns a tuple that includes:
|
|
1196
|
+
* - A mutate function that you can call at any time to execute the mutation
|
|
1197
|
+
* - An object with fields that represent the current status of the mutation's execution
|
|
1198
|
+
*
|
|
1199
|
+
* @param baseOptions options that will be passed into the mutation, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options-2;
|
|
1200
|
+
*
|
|
1201
|
+
* @example
|
|
1202
|
+
* const [visitPageV2Mutation, { data, loading, error }] = useVisitPageV2Mutation({
|
|
1203
|
+
* variables: {
|
|
1204
|
+
* domain: // value for 'domain'
|
|
1205
|
+
* title: // value for 'title'
|
|
1206
|
+
* description: // value for 'description'
|
|
1207
|
+
* tags: // value for 'tags'
|
|
1208
|
+
* brandId: // value for 'brandId'
|
|
1209
|
+
* category: // value for 'category'
|
|
1210
|
+
* },
|
|
1211
|
+
* });
|
|
1212
|
+
*/
|
|
1213
|
+
function useVisitPageV2Mutation(baseOptions) {
|
|
1214
|
+
return Apollo.useMutation(exports.VisitPageV2Document, baseOptions);
|
|
1215
|
+
}
|
|
1216
|
+
exports.useVisitPageV2Mutation = useVisitPageV2Mutation;
|
|
1106
1217
|
exports.FetchCollectionRanksDocument = (0, client_1.gql) `
|
|
1107
1218
|
query FetchCollectionRanks($collectionKeys: [CollectionKey!]!) {
|
|
1108
1219
|
fetchCollectionRanks(collectionKeys: $collectionKeys) {
|
|
@@ -1139,6 +1250,130 @@ function useFetchCollectionRanksLazyQuery(baseOptions) {
|
|
|
1139
1250
|
return Apollo.useLazyQuery(exports.FetchCollectionRanksDocument, baseOptions);
|
|
1140
1251
|
}
|
|
1141
1252
|
exports.useFetchCollectionRanksLazyQuery = useFetchCollectionRanksLazyQuery;
|
|
1253
|
+
exports.FetchExtensionBrandsDocument = (0, client_1.gql) `
|
|
1254
|
+
query FetchExtensionBrands {
|
|
1255
|
+
fetchExtensionBrands {
|
|
1256
|
+
brandId
|
|
1257
|
+
name
|
|
1258
|
+
matchingWords
|
|
1259
|
+
description
|
|
1260
|
+
industry
|
|
1261
|
+
link
|
|
1262
|
+
media
|
|
1263
|
+
}
|
|
1264
|
+
}
|
|
1265
|
+
`;
|
|
1266
|
+
/**
|
|
1267
|
+
* __useFetchExtensionBrandsQuery__
|
|
1268
|
+
*
|
|
1269
|
+
* To run a query within a React component, call `useFetchExtensionBrandsQuery` and pass it any options that fit your needs.
|
|
1270
|
+
* When your component renders, `useFetchExtensionBrandsQuery` returns an object from Apollo Client that contains loading, error, and data properties
|
|
1271
|
+
* you can use to render your UI.
|
|
1272
|
+
*
|
|
1273
|
+
* @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options;
|
|
1274
|
+
*
|
|
1275
|
+
* @example
|
|
1276
|
+
* const { data, loading, error } = useFetchExtensionBrandsQuery({
|
|
1277
|
+
* variables: {
|
|
1278
|
+
* },
|
|
1279
|
+
* });
|
|
1280
|
+
*/
|
|
1281
|
+
function useFetchExtensionBrandsQuery(baseOptions) {
|
|
1282
|
+
return Apollo.useQuery(exports.FetchExtensionBrandsDocument, baseOptions);
|
|
1283
|
+
}
|
|
1284
|
+
exports.useFetchExtensionBrandsQuery = useFetchExtensionBrandsQuery;
|
|
1285
|
+
function useFetchExtensionBrandsLazyQuery(baseOptions) {
|
|
1286
|
+
return Apollo.useLazyQuery(exports.FetchExtensionBrandsDocument, baseOptions);
|
|
1287
|
+
}
|
|
1288
|
+
exports.useFetchExtensionBrandsLazyQuery = useFetchExtensionBrandsLazyQuery;
|
|
1289
|
+
exports.FetchExtensionCategoriesDocument = (0, client_1.gql) `
|
|
1290
|
+
query FetchExtensionCategories {
|
|
1291
|
+
fetchExtensionCategories {
|
|
1292
|
+
categoryId
|
|
1293
|
+
name
|
|
1294
|
+
matchingWords
|
|
1295
|
+
}
|
|
1296
|
+
}
|
|
1297
|
+
`;
|
|
1298
|
+
/**
|
|
1299
|
+
* __useFetchExtensionCategoriesQuery__
|
|
1300
|
+
*
|
|
1301
|
+
* To run a query within a React component, call `useFetchExtensionCategoriesQuery` and pass it any options that fit your needs.
|
|
1302
|
+
* When your component renders, `useFetchExtensionCategoriesQuery` returns an object from Apollo Client that contains loading, error, and data properties
|
|
1303
|
+
* you can use to render your UI.
|
|
1304
|
+
*
|
|
1305
|
+
* @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options;
|
|
1306
|
+
*
|
|
1307
|
+
* @example
|
|
1308
|
+
* const { data, loading, error } = useFetchExtensionCategoriesQuery({
|
|
1309
|
+
* variables: {
|
|
1310
|
+
* },
|
|
1311
|
+
* });
|
|
1312
|
+
*/
|
|
1313
|
+
function useFetchExtensionCategoriesQuery(baseOptions) {
|
|
1314
|
+
return Apollo.useQuery(exports.FetchExtensionCategoriesDocument, baseOptions);
|
|
1315
|
+
}
|
|
1316
|
+
exports.useFetchExtensionCategoriesQuery = useFetchExtensionCategoriesQuery;
|
|
1317
|
+
function useFetchExtensionCategoriesLazyQuery(baseOptions) {
|
|
1318
|
+
return Apollo.useLazyQuery(exports.FetchExtensionCategoriesDocument, baseOptions);
|
|
1319
|
+
}
|
|
1320
|
+
exports.useFetchExtensionCategoriesLazyQuery = useFetchExtensionCategoriesLazyQuery;
|
|
1321
|
+
exports.FetchExtensionOpportunitiesDocument = (0, client_1.gql) `
|
|
1322
|
+
query FetchExtensionOpportunities($userId: String, $brandId: String, $category: String) {
|
|
1323
|
+
fetchExtensionOpportunities(
|
|
1324
|
+
userId: $userId
|
|
1325
|
+
brandId: $brandId
|
|
1326
|
+
category: $category
|
|
1327
|
+
) {
|
|
1328
|
+
opportunityId
|
|
1329
|
+
brandId
|
|
1330
|
+
categoryId
|
|
1331
|
+
opportunityStatus
|
|
1332
|
+
opportunityType
|
|
1333
|
+
notificationType
|
|
1334
|
+
name
|
|
1335
|
+
brandName
|
|
1336
|
+
brandDescription
|
|
1337
|
+
brandMedia
|
|
1338
|
+
brandUrl
|
|
1339
|
+
brandIndustry
|
|
1340
|
+
categoryName
|
|
1341
|
+
ludoUrl
|
|
1342
|
+
projectUrl
|
|
1343
|
+
activeFrom
|
|
1344
|
+
activeUntil
|
|
1345
|
+
media
|
|
1346
|
+
reportLink
|
|
1347
|
+
shareLink
|
|
1348
|
+
}
|
|
1349
|
+
}
|
|
1350
|
+
`;
|
|
1351
|
+
/**
|
|
1352
|
+
* __useFetchExtensionOpportunitiesQuery__
|
|
1353
|
+
*
|
|
1354
|
+
* To run a query within a React component, call `useFetchExtensionOpportunitiesQuery` and pass it any options that fit your needs.
|
|
1355
|
+
* When your component renders, `useFetchExtensionOpportunitiesQuery` returns an object from Apollo Client that contains loading, error, and data properties
|
|
1356
|
+
* you can use to render your UI.
|
|
1357
|
+
*
|
|
1358
|
+
* @param baseOptions options that will be passed into the query, supported options are listed on: https://www.apollographql.com/docs/react/api/react-hooks/#options;
|
|
1359
|
+
*
|
|
1360
|
+
* @example
|
|
1361
|
+
* const { data, loading, error } = useFetchExtensionOpportunitiesQuery({
|
|
1362
|
+
* variables: {
|
|
1363
|
+
* userId: // value for 'userId'
|
|
1364
|
+
* brandId: // value for 'brandId'
|
|
1365
|
+
* category: // value for 'category'
|
|
1366
|
+
* },
|
|
1367
|
+
* });
|
|
1368
|
+
*/
|
|
1369
|
+
function useFetchExtensionOpportunitiesQuery(baseOptions) {
|
|
1370
|
+
return Apollo.useQuery(exports.FetchExtensionOpportunitiesDocument, baseOptions);
|
|
1371
|
+
}
|
|
1372
|
+
exports.useFetchExtensionOpportunitiesQuery = useFetchExtensionOpportunitiesQuery;
|
|
1373
|
+
function useFetchExtensionOpportunitiesLazyQuery(baseOptions) {
|
|
1374
|
+
return Apollo.useLazyQuery(exports.FetchExtensionOpportunitiesDocument, baseOptions);
|
|
1375
|
+
}
|
|
1376
|
+
exports.useFetchExtensionOpportunitiesLazyQuery = useFetchExtensionOpportunitiesLazyQuery;
|
|
1142
1377
|
exports.FetchNftDataDocument = (0, client_1.gql) `
|
|
1143
1378
|
query FetchNFTData($blockchain: String!, $contractAddress: String, $tokenId: String, $elrondId: String) {
|
|
1144
1379
|
fetchNFTData(
|
package/package.json
CHANGED
package/src/config/index.ts
CHANGED
|
@@ -21,7 +21,7 @@ import { hosts, schema } from "../index";
|
|
|
21
21
|
|
|
22
22
|
let isRefreshing = false;
|
|
23
23
|
let pendingRequests: never[] = [];
|
|
24
|
-
|
|
24
|
+
let mainDomain = "";
|
|
25
25
|
|
|
26
26
|
const resolvePendingRequests = () => {
|
|
27
27
|
pendingRequests.map((callback: any) => callback());
|
|
@@ -58,7 +58,7 @@ const errorLink = onError(({ graphQLErrors, networkError, operation, forward })
|
|
|
58
58
|
},
|
|
59
59
|
}) => {
|
|
60
60
|
console.log(tokenAuth, "newAuthToken");
|
|
61
|
-
refreshCookies(tokenAuth, tokenRefresh
|
|
61
|
+
refreshCookies(tokenAuth, tokenRefresh , mainDomain );
|
|
62
62
|
resolvePendingRequests();
|
|
63
63
|
return true;
|
|
64
64
|
},
|
|
@@ -69,7 +69,7 @@ const errorLink = onError(({ graphQLErrors, networkError, operation, forward })
|
|
|
69
69
|
mutation: schema.RevokeTokenDocument,
|
|
70
70
|
});
|
|
71
71
|
|
|
72
|
-
destroyCookies(
|
|
72
|
+
destroyCookies(mainDomain );
|
|
73
73
|
pendingRequests = [];
|
|
74
74
|
window.location.reload();
|
|
75
75
|
return false;
|
|
@@ -113,7 +113,7 @@ const errorLink = onError(({ graphQLErrors, networkError, operation, forward })
|
|
|
113
113
|
refreshToken: { tokenAuth, tokenRefresh },
|
|
114
114
|
},
|
|
115
115
|
}) => {
|
|
116
|
-
refreshCookies(tokenAuth, tokenRefresh
|
|
116
|
+
refreshCookies(tokenAuth, tokenRefresh ,mainDomain );
|
|
117
117
|
resolvePendingRequests();
|
|
118
118
|
return true;
|
|
119
119
|
},
|
|
@@ -124,7 +124,7 @@ const errorLink = onError(({ graphQLErrors, networkError, operation, forward })
|
|
|
124
124
|
mutation: schema.RevokeTokenDocument,
|
|
125
125
|
});
|
|
126
126
|
|
|
127
|
-
destroyCookies(
|
|
127
|
+
destroyCookies(mainDomain);
|
|
128
128
|
pendingRequests = [];
|
|
129
129
|
window.location.reload();
|
|
130
130
|
return false;
|
|
@@ -207,7 +207,7 @@ function createApolloClient() {
|
|
|
207
207
|
|
|
208
208
|
export function initializeApollo(initialState = null, domain?: string) {
|
|
209
209
|
const _apolloClient = apolloClient ?? createApolloClient();
|
|
210
|
-
|
|
210
|
+
mainDomain = domain || '';
|
|
211
211
|
|
|
212
212
|
// If your page has Next.js data fetching methods that use Apollo Client, the initial state
|
|
213
213
|
// gets hydrated here
|
package/src/cookies/index.ts
CHANGED
|
@@ -11,40 +11,40 @@ const assignCookies = (
|
|
|
11
11
|
inviteCode: string,
|
|
12
12
|
domain?: string,
|
|
13
13
|
) => {
|
|
14
|
-
if (userId) setCookie(null, "userId", userId, { maxAge: 2629800000, path: "/"
|
|
14
|
+
if (userId) setCookie(null, "userId", userId, { maxAge: 2629800000, path: "/" , domain });
|
|
15
15
|
if (wallets)
|
|
16
16
|
setCookie(null, "wallets", wallets.join(), {
|
|
17
17
|
maxAge: 2629800000,
|
|
18
18
|
path: "/",
|
|
19
|
-
|
|
19
|
+
domain,
|
|
20
20
|
sameSite: true,
|
|
21
21
|
});
|
|
22
22
|
if (authToken)
|
|
23
23
|
setCookie(null, "authToken", authToken, {
|
|
24
24
|
maxAge: 2629800000,
|
|
25
25
|
path: "/",
|
|
26
|
-
|
|
26
|
+
domain,
|
|
27
27
|
sameSite: true,
|
|
28
28
|
});
|
|
29
29
|
if (refreshToken)
|
|
30
30
|
setCookie(null, "refreshToken", refreshToken, {
|
|
31
31
|
maxAge: 2629800000,
|
|
32
32
|
path: "/",
|
|
33
|
-
|
|
33
|
+
domain,
|
|
34
34
|
sameSite: true,
|
|
35
35
|
});
|
|
36
36
|
if (newUser)
|
|
37
37
|
setCookie(null, "newUser", newUser, {
|
|
38
38
|
maxAge: 2629800000,
|
|
39
39
|
path: "/",
|
|
40
|
-
|
|
40
|
+
domain,
|
|
41
41
|
sameSite: true,
|
|
42
42
|
});
|
|
43
43
|
if (inviteCode)
|
|
44
44
|
setCookie(null, "inviteCode", inviteCode, {
|
|
45
45
|
maxAge: 2629800000,
|
|
46
46
|
path: "/",
|
|
47
|
-
|
|
47
|
+
domain,
|
|
48
48
|
sameSite: true,
|
|
49
49
|
});
|
|
50
50
|
};
|
|
@@ -54,14 +54,14 @@ const refreshCookies = (authToken: string, refreshToken: string, domain?: string
|
|
|
54
54
|
setCookie(null, "authToken", authToken, {
|
|
55
55
|
maxAge: 2629800000,
|
|
56
56
|
path: "/",
|
|
57
|
-
|
|
57
|
+
domain,
|
|
58
58
|
sameSite: true,
|
|
59
59
|
});
|
|
60
60
|
if (refreshToken)
|
|
61
61
|
setCookie(null, "refreshToken", refreshToken, {
|
|
62
62
|
maxAge: 2629800000,
|
|
63
63
|
path: "/",
|
|
64
|
-
|
|
64
|
+
domain,
|
|
65
65
|
sameSite: true,
|
|
66
66
|
});
|
|
67
67
|
};
|
|
@@ -95,12 +95,12 @@ const getCookies = (ctx?: Pick<next.NextPageContext, 'req'> | {
|
|
|
95
95
|
};
|
|
96
96
|
|
|
97
97
|
const destroyCookies = (domain?: string) => {
|
|
98
|
-
destroyCookie(null, "userId", { path: "/"
|
|
99
|
-
destroyCookie(null, "wallets", { path: "/"
|
|
100
|
-
destroyCookie(null, "authToken", { path: "/"
|
|
101
|
-
destroyCookie(null, "refreshToken", { path: "/"
|
|
102
|
-
destroyCookie(null, "newUser", { path: "/"
|
|
103
|
-
destroyCookie(null, "inviteCode", { path: "/"
|
|
98
|
+
destroyCookie(null, "userId", { path: "/" , domain });
|
|
99
|
+
destroyCookie(null, "wallets", { path: "/" , domain });
|
|
100
|
+
destroyCookie(null, "authToken", { path: "/" , domain });
|
|
101
|
+
destroyCookie(null, "refreshToken", { path: "/" , domain });
|
|
102
|
+
destroyCookie(null, "newUser", { path: "/" , domain });
|
|
103
|
+
destroyCookie(null, "inviteCode", { path: "/" , domain });
|
|
104
104
|
};
|
|
105
105
|
|
|
106
106
|
export { assignCookies, refreshCookies, destroyCookies, getCookies };
|