@internxt/sdk 1.15.14 → 1.16.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.
Files changed (42) hide show
  1. package/dist/auth/index.js +180 -262
  2. package/dist/auth/types.js +2 -22
  3. package/dist/drive/backups/index.js +34 -32
  4. package/dist/drive/payments/index.d.ts +2 -32
  5. package/dist/drive/payments/index.js +75 -179
  6. package/dist/drive/payments/object-storage.js +34 -36
  7. package/dist/drive/payments/types/types.d.ts +6 -0
  8. package/dist/drive/referrals/index.js +19 -17
  9. package/dist/drive/share/index.js +168 -235
  10. package/dist/drive/storage/index.js +213 -302
  11. package/dist/drive/trash/index.js +40 -84
  12. package/dist/drive/users/index.js +95 -140
  13. package/dist/mail/index.d.ts +124 -2
  14. package/dist/mail/index.js +170 -16
  15. package/dist/mail/types.d.ts +50 -0
  16. package/dist/mail/types.js +6 -0
  17. package/dist/meet/index.js +31 -99
  18. package/dist/misc/location/index.js +10 -50
  19. package/dist/network/download.js +38 -107
  20. package/dist/network/errors/codes.js +8 -24
  21. package/dist/network/errors/context.js +9 -26
  22. package/dist/network/errors/download.js +6 -24
  23. package/dist/network/errors/upload.js +21 -48
  24. package/dist/network/index.js +120 -277
  25. package/dist/network/types.js +3 -4
  26. package/dist/network/upload.js +63 -133
  27. package/dist/payments/checkout.d.ts +1 -1
  28. package/dist/payments/checkout.js +56 -69
  29. package/dist/payments/types/index.d.ts +0 -3
  30. package/dist/send/send.js +17 -27
  31. package/dist/shared/headers/index.js +56 -42
  32. package/dist/shared/http/client.js +95 -207
  33. package/dist/shared/http/retryWithBackoff.js +36 -110
  34. package/dist/shared/types/errors.js +37 -51
  35. package/dist/workspaces/index.js +224 -264
  36. package/package.json +14 -15
  37. package/dist/mail/api.d.ts +0 -126
  38. package/dist/mail/api.js +0 -288
  39. package/dist/mail/crypto.d.ts +0 -66
  40. package/dist/mail/crypto.js +0 -156
  41. package/dist/mail/mail.d.ts +0 -162
  42. package/dist/mail/mail.js +0 -382
@@ -34,41 +34,44 @@ var __importStar = (this && this.__importStar) || (function () {
34
34
  })();
35
35
  Object.defineProperty(exports, "__esModule", { value: true });
36
36
  exports.Referrals = exports.ReferralTypes = void 0;
37
- var headers_1 = require("../../shared/headers");
38
- var client_1 = require("../../shared/http/client");
37
+ const headers_1 = require("../../shared/headers");
38
+ const client_1 = require("../../shared/http/client");
39
39
  exports.ReferralTypes = __importStar(require("./types"));
40
- var Referrals = /** @class */ (function () {
41
- function Referrals(apiUrl, appDetails, apiSecurity) {
40
+ class Referrals {
41
+ client;
42
+ appDetails;
43
+ apiSecurity;
44
+ static client(apiUrl, appDetails, apiSecurity) {
45
+ return new Referrals(apiUrl, appDetails, apiSecurity);
46
+ }
47
+ constructor(apiUrl, appDetails, apiSecurity) {
42
48
  this.client = client_1.HttpClient.create(apiUrl, apiSecurity.unauthorizedCallback, apiSecurity.retryOptions);
43
49
  this.appDetails = appDetails;
44
50
  this.apiSecurity = apiSecurity;
45
51
  }
46
- Referrals.client = function (apiUrl, appDetails, apiSecurity) {
47
- return new Referrals(apiUrl, appDetails, apiSecurity);
48
- };
49
52
  /**
50
53
  * Returns a list of referrals of this user
51
54
  */
52
- Referrals.prototype.getReferrals = function () {
55
+ getReferrals() {
53
56
  return this.client.get('/users-referrals', this.headers());
54
- };
57
+ }
55
58
  /**
56
59
  * Generates a referral token for the authenticated user
57
60
  */
58
- Referrals.prototype.createReferralToken = function () {
61
+ createReferralToken() {
59
62
  return this.client.post('/referral/token', {}, this.headers());
60
- };
63
+ }
61
64
  /**
62
65
  * Checks if the referral feature is enabled for the authenticated user
63
66
  */
64
- Referrals.prototype.isReferralEnabled = function () {
67
+ isReferralEnabled() {
65
68
  return this.client.get('/referral/enabled', this.headers());
66
- };
69
+ }
67
70
  /**
68
71
  * Returns the needed headers for the module requests
69
72
  * @private
70
73
  */
71
- Referrals.prototype.headers = function () {
74
+ headers() {
72
75
  return (0, headers_1.headersWithToken)({
73
76
  clientName: this.appDetails.clientName,
74
77
  clientVersion: this.appDetails.clientVersion,
@@ -77,7 +80,6 @@ var Referrals = /** @class */ (function () {
77
80
  desktopToken: this.appDetails.desktopHeader,
78
81
  customHeaders: this.appDetails.customHeaders,
79
82
  });
80
- };
81
- return Referrals;
82
- }());
83
+ }
84
+ }
83
85
  exports.Referrals = Referrals;