@dazl/internal-api-client 1.26.7-alpha.0 → 1.26.8

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.
Files changed (48) hide show
  1. package/dist/client/index.d.ts +1 -0
  2. package/dist/client/index.d.ts.map +1 -1
  3. package/dist/client/index.js.map +1 -1
  4. package/dist/client/utils.gen.d.ts +1 -1
  5. package/dist/client/utils.gen.d.ts.map +1 -1
  6. package/dist/client/utils.gen.js.map +1 -1
  7. package/dist/client.gen.d.ts +2 -2
  8. package/dist/client.gen.d.ts.map +1 -1
  9. package/dist/client.gen.js.map +1 -1
  10. package/dist/core/auth.gen.d.ts +7 -0
  11. package/dist/core/auth.gen.d.ts.map +1 -1
  12. package/dist/core/auth.gen.js.map +1 -1
  13. package/dist/core/params.gen.d.ts +1 -1
  14. package/dist/core/params.gen.d.ts.map +1 -1
  15. package/dist/core/params.gen.js +6 -6
  16. package/dist/core/params.gen.js.map +1 -1
  17. package/dist/core/pathSerializer.gen.d.ts.map +1 -1
  18. package/dist/core/pathSerializer.gen.js.map +1 -1
  19. package/dist/core/queryKeySerializer.gen.d.ts +1 -1
  20. package/dist/core/queryKeySerializer.gen.d.ts.map +1 -1
  21. package/dist/core/queryKeySerializer.gen.js.map +1 -1
  22. package/dist/core/utils.gen.d.ts.map +1 -1
  23. package/dist/core/utils.gen.js.map +1 -1
  24. package/dist/db/generated-types.d.ts +11 -0
  25. package/dist/db/generated-types.d.ts.map +1 -1
  26. package/dist/index.d.ts +2 -2
  27. package/dist/index.d.ts.map +1 -1
  28. package/dist/index.js +1 -1
  29. package/dist/index.js.map +1 -1
  30. package/dist/sdk.gen.d.ts +89 -85
  31. package/dist/sdk.gen.d.ts.map +1 -1
  32. package/dist/sdk.gen.js +8 -0
  33. package/dist/sdk.gen.js.map +1 -1
  34. package/dist/types.gen.d.ts +136 -1
  35. package/dist/types.gen.d.ts.map +1 -1
  36. package/package.json +2 -2
  37. package/src/client/index.ts +1 -0
  38. package/src/client/utils.gen.ts +2 -2
  39. package/src/client.gen.ts +2 -2
  40. package/src/core/auth.gen.ts +7 -0
  41. package/src/core/params.gen.ts +10 -8
  42. package/src/core/pathSerializer.gen.ts +6 -6
  43. package/src/core/queryKeySerializer.gen.ts +1 -1
  44. package/src/core/utils.gen.ts +4 -4
  45. package/src/db/generated-types.ts +12 -0
  46. package/src/index.ts +2 -2
  47. package/src/sdk.gen.ts +95 -85
  48. package/src/types.gen.ts +148 -1
package/src/types.gen.ts CHANGED
@@ -4,6 +4,28 @@ export type ClientOptions = {
4
4
  baseUrl: `${string}://${string}` | (string & {});
5
5
  };
6
6
 
7
+ export type ManualSubtractCreditsEvent = {
8
+ type: 'manual-subtract';
9
+ dazlId: string;
10
+ timestamp?: string;
11
+ id: string;
12
+ creditsNumber: number;
13
+ projectId?: string;
14
+ featureSpecificBuckets?: Array<'GEMINI_CREDITS'>;
15
+ chatId?: string;
16
+ origin?: string;
17
+ /**
18
+ * sometimes we have a single logical operation that comes in multiple events. operationId allows us to correlate those events in the logs
19
+ */
20
+ operationId?: string;
21
+ };
22
+
23
+ export type CreditBucketCategories = {
24
+ default: 'DEFAULT';
25
+ all: 'DEFAULT' | 'GEMINI_CREDITS';
26
+ featureSpecific: 'GEMINI_CREDITS';
27
+ };
28
+
7
29
  export type ErrorResponse = {
8
30
  message: string;
9
31
  };
@@ -557,7 +579,12 @@ export type GetHasSufficientCreditsByDazlIdData = {
557
579
  path: {
558
580
  dazlId: string;
559
581
  };
560
- query?: never;
582
+ query?: {
583
+ /**
584
+ * a list of feature specific credit buckets that can be used for this operation, for example gemini module bucket.
585
+ */
586
+ featureBuckets?: Array<'GEMINI_CREDITS'>;
587
+ };
561
588
  url: '/billing/has-sufficient-credits/{dazlId}';
562
589
  };
563
590
 
@@ -1075,10 +1102,16 @@ export type GetUserInfoByDazlIdResponses = {
1075
1102
  * Returns balance and product details for user, from DB
1076
1103
  */
1077
1104
  200: {
1105
+ /**
1106
+ * this is deprecated, use creditBuckets instead
1107
+ */
1078
1108
  balance: number;
1079
1109
  productName: string | null;
1080
1110
  priceCredits: number | null;
1081
1111
  isSubscriptionFree: boolean;
1112
+ creditBuckets: {
1113
+ [key: string]: number;
1114
+ };
1082
1115
  };
1083
1116
  };
1084
1117
 
@@ -5850,3 +5883,117 @@ export type ReplaceCategValuesResponses = {
5850
5883
  };
5851
5884
 
5852
5885
  export type ReplaceCategValuesResponse = ReplaceCategValuesResponses[keyof ReplaceCategValuesResponses];
5886
+
5887
+ export type DeactivateUserPromotionData = {
5888
+ body?: never;
5889
+ path: {
5890
+ dazlUserId: string;
5891
+ promotionName: 'GEMINI_CREDITS_6_26';
5892
+ };
5893
+ query?: never;
5894
+ url: '/promotions/{dazlUserId}/{promotionName}';
5895
+ };
5896
+
5897
+ export type DeactivateUserPromotionErrors = {
5898
+ /**
5899
+ * Bad request - Invalid parameters or malformed JSON
5900
+ */
5901
+ 400: {
5902
+ message: string;
5903
+ issues?: string;
5904
+ };
5905
+ /**
5906
+ * Unauthorized
5907
+ */
5908
+ 401: ErrorResponse;
5909
+ /**
5910
+ * Forbidden
5911
+ */
5912
+ 403: ErrorResponse;
5913
+ /**
5914
+ * Not Found
5915
+ */
5916
+ 404: ErrorResponse;
5917
+ /**
5918
+ * Conflict
5919
+ */
5920
+ 409: ErrorResponse;
5921
+ /**
5922
+ * Internal server error
5923
+ */
5924
+ 500: ErrorResponse;
5925
+ /**
5926
+ * Service Unavailable
5927
+ */
5928
+ 503: ErrorResponse;
5929
+ };
5930
+
5931
+ export type DeactivateUserPromotionError = DeactivateUserPromotionErrors[keyof DeactivateUserPromotionErrors];
5932
+
5933
+ export type DeactivateUserPromotionResponses = {
5934
+ /**
5935
+ * Deactivates the user promotion
5936
+ */
5937
+ 200: {
5938
+ [key: string]: unknown;
5939
+ };
5940
+ };
5941
+
5942
+ export type DeactivateUserPromotionResponse = DeactivateUserPromotionResponses[keyof DeactivateUserPromotionResponses];
5943
+
5944
+ export type AddUserToPromotionData = {
5945
+ body?: never;
5946
+ path: {
5947
+ dazlUserId: string;
5948
+ promotionName: 'GEMINI_CREDITS_6_26';
5949
+ };
5950
+ query?: never;
5951
+ url: '/promotions/{dazlUserId}/{promotionName}';
5952
+ };
5953
+
5954
+ export type AddUserToPromotionErrors = {
5955
+ /**
5956
+ * Bad request - Invalid parameters or malformed JSON
5957
+ */
5958
+ 400: {
5959
+ message: string;
5960
+ issues?: string;
5961
+ };
5962
+ /**
5963
+ * Unauthorized
5964
+ */
5965
+ 401: ErrorResponse;
5966
+ /**
5967
+ * Forbidden
5968
+ */
5969
+ 403: ErrorResponse;
5970
+ /**
5971
+ * Not Found
5972
+ */
5973
+ 404: ErrorResponse;
5974
+ /**
5975
+ * Conflict
5976
+ */
5977
+ 409: ErrorResponse;
5978
+ /**
5979
+ * Internal server error
5980
+ */
5981
+ 500: ErrorResponse;
5982
+ /**
5983
+ * Service Unavailable
5984
+ */
5985
+ 503: ErrorResponse;
5986
+ };
5987
+
5988
+ export type AddUserToPromotionError = AddUserToPromotionErrors[keyof AddUserToPromotionErrors];
5989
+
5990
+ export type AddUserToPromotionResponses = {
5991
+ /**
5992
+ * Adds the user to the promotion and returns whether the promotion was granted
5993
+ */
5994
+ 200: {
5995
+ granted: boolean;
5996
+ };
5997
+ };
5998
+
5999
+ export type AddUserToPromotionResponse = AddUserToPromotionResponses[keyof AddUserToPromotionResponses];