@connectedxm/admin 2.3.19 → 2.4.1

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.
@@ -0,0 +1,17 @@
1
+ ---
2
+ description:
3
+ globs:
4
+ alwaysApply: false
5
+ ---
6
+ When creating a Mutation file to interact with a put, post, delete endpoint in the API you should follow the same template.
7
+
8
+ 1. First check for Params in the [params.ts](mdc:admin-sdk/src/params.ts) file
9
+ 2. Then check for the interfaces in [interfaces.ts](mdc:admin-sdk/src/interfaces.ts) file
10
+ 3. Create the file in the mutations folder
11
+ - a set of params
12
+ - the function to interact with the api
13
+ - the react-query mutation hook to use the function
14
+
15
+ Create Example: [useCreateAccount.ts](mdc:admin-sdk/src/mutations/account/useCreateAccount.ts)
16
+ Update Example: [useUpdateAccount.ts](mdc:admin-sdk/src/mutations/account/useUpdateAccount.ts)
17
+ Delete Example: [useDeleteAccount.ts](mdc:admin-sdk/src/mutations/account/useDeleteAccount.ts)
@@ -1,15 +1,16 @@
1
1
  ---
2
- description: adding new query functions to interface with a GET endpoint in the API
2
+ description:
3
3
  globs:
4
4
  alwaysApply: false
5
5
  ---
6
6
  When creating a Query function to interact with a get or list endpoint in the API you should follow the same template.
7
7
 
8
- Standard Parts of query file:
9
- - a QueryKey Function
10
- - a Setter function
11
- - the function to interact with the api
12
- - the react-query hook to use the function
8
+ 1. check or add the interfaces in [interfaces.ts](mdc:admin-sdk/src/interfaces.ts).ts file
9
+ 2. Standard Parts of query file:
10
+ - a QueryKey Function
11
+ - a Setter function
12
+ - the function to interact with the api
13
+ - the react-query hook to use the function
13
14
 
14
- Single Query Example: [useGetAccount.ts](mdc:src/queries/accounts/useGetAccount.ts)
15
- Infinite Query Example: [useGetAccounts.ts](mdc:src/queries/accounts/useGetAccounts.ts)
15
+ Single Query Example: [useGetAccount.ts](mdc:admin-web/src/queries/accounts/useGetAccount.ts)
16
+ Infinite Query Example: [useGetAccounts.ts](mdc:admin-web/src/queries/accounts/useGetAccounts.ts)