@snagsolutions/sdk 0.1.0-alpha.44 → 0.1.0-alpha.46

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 (135) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/README.md +18 -16
  3. package/index.d.mts +4 -4
  4. package/index.d.ts +4 -4
  5. package/index.d.ts.map +1 -1
  6. package/index.js +1 -1
  7. package/index.js.map +1 -1
  8. package/index.mjs +1 -1
  9. package/index.mjs.map +1 -1
  10. package/package.json +1 -1
  11. package/resources/assets.d.ts +7 -1
  12. package/resources/assets.d.ts.map +1 -1
  13. package/resources/auctions/auctions.d.ts +266 -0
  14. package/resources/auctions/auctions.d.ts.map +1 -0
  15. package/resources/auctions/auctions.js +62 -0
  16. package/resources/auctions/auctions.js.map +1 -0
  17. package/resources/auctions/auctions.mjs +35 -0
  18. package/resources/auctions/auctions.mjs.map +1 -0
  19. package/resources/auctions/index.d.ts +3 -0
  20. package/resources/auctions/index.d.ts.map +1 -0
  21. package/resources/auctions/index.js +9 -0
  22. package/resources/auctions/index.js.map +1 -0
  23. package/resources/auctions/index.mjs +4 -0
  24. package/resources/auctions/index.mjs.map +1 -0
  25. package/resources/auctions/website-user-attributes/index.d.ts +3 -0
  26. package/resources/auctions/website-user-attributes/index.d.ts.map +1 -0
  27. package/resources/auctions/website-user-attributes/index.js +9 -0
  28. package/resources/auctions/website-user-attributes/index.js.map +1 -0
  29. package/resources/auctions/website-user-attributes/index.mjs +4 -0
  30. package/resources/auctions/website-user-attributes/index.mjs.map +1 -0
  31. package/resources/auctions/website-user-attributes/values.d.ts +94 -0
  32. package/resources/auctions/website-user-attributes/values.d.ts.map +1 -0
  33. package/resources/auctions/website-user-attributes/values.js +21 -0
  34. package/resources/auctions/website-user-attributes/values.js.map +1 -0
  35. package/resources/auctions/website-user-attributes/values.mjs +17 -0
  36. package/resources/auctions/website-user-attributes/values.mjs.map +1 -0
  37. package/resources/auctions/website-user-attributes/website-user-attributes.d.ts +108 -0
  38. package/resources/auctions/website-user-attributes/website-user-attributes.d.ts.map +1 -0
  39. package/resources/auctions/website-user-attributes/website-user-attributes.js +58 -0
  40. package/resources/auctions/website-user-attributes/website-user-attributes.js.map +1 -0
  41. package/resources/auctions/website-user-attributes/website-user-attributes.mjs +31 -0
  42. package/resources/auctions/website-user-attributes/website-user-attributes.mjs.map +1 -0
  43. package/resources/auctions/website-user-attributes.d.ts +2 -0
  44. package/resources/auctions/website-user-attributes.d.ts.map +1 -0
  45. package/resources/auctions/website-user-attributes.js +19 -0
  46. package/resources/auctions/website-user-attributes.js.map +1 -0
  47. package/resources/auctions/website-user-attributes.mjs +3 -0
  48. package/resources/auctions/website-user-attributes.mjs.map +1 -0
  49. package/resources/auctions.d.ts +1 -133
  50. package/resources/auctions.d.ts.map +1 -1
  51. package/resources/auctions.js +15 -22
  52. package/resources/auctions.js.map +1 -1
  53. package/resources/auctions.mjs +1 -20
  54. package/resources/auctions.mjs.map +1 -1
  55. package/resources/index.d.ts +2 -2
  56. package/resources/index.d.ts.map +1 -1
  57. package/resources/index.js +1 -1
  58. package/resources/index.js.map +1 -1
  59. package/resources/index.mjs +1 -1
  60. package/resources/index.mjs.map +1 -1
  61. package/resources/loyalty/index.d.ts +1 -1
  62. package/resources/loyalty/index.d.ts.map +1 -1
  63. package/resources/loyalty/index.js +2 -2
  64. package/resources/loyalty/index.js.map +1 -1
  65. package/resources/loyalty/index.mjs +1 -1
  66. package/resources/loyalty/index.mjs.map +1 -1
  67. package/resources/loyalty/loyalty.d.ts +3 -3
  68. package/resources/loyalty/loyalty.d.ts.map +1 -1
  69. package/resources/loyalty/loyalty.js +2 -2
  70. package/resources/loyalty/loyalty.js.map +1 -1
  71. package/resources/loyalty/loyalty.mjs +2 -2
  72. package/resources/loyalty/loyalty.mjs.map +1 -1
  73. package/resources/loyalty/rules.d.ts +10 -3
  74. package/resources/loyalty/rules.d.ts.map +1 -1
  75. package/resources/loyalty/rules.js +4 -4
  76. package/resources/loyalty/rules.js.map +1 -1
  77. package/resources/loyalty/rules.mjs +4 -4
  78. package/resources/loyalty/rules.mjs.map +1 -1
  79. package/resources/loyalty/transactions/index.d.ts +3 -0
  80. package/resources/loyalty/transactions/index.d.ts.map +1 -0
  81. package/resources/loyalty/transactions/index.js +9 -0
  82. package/resources/loyalty/transactions/index.js.map +1 -0
  83. package/resources/loyalty/transactions/index.mjs +4 -0
  84. package/resources/loyalty/transactions/index.mjs.map +1 -0
  85. package/resources/loyalty/transactions/rule-statuses.d.ts +104 -0
  86. package/resources/loyalty/transactions/rule-statuses.d.ts.map +1 -0
  87. package/resources/loyalty/transactions/rule-statuses.js +22 -0
  88. package/resources/loyalty/transactions/rule-statuses.js.map +1 -0
  89. package/resources/loyalty/transactions/rule-statuses.mjs +18 -0
  90. package/resources/loyalty/transactions/rule-statuses.mjs.map +1 -0
  91. package/resources/loyalty/transactions/transactions.d.ts +288 -0
  92. package/resources/loyalty/transactions/transactions.d.ts.map +1 -0
  93. package/resources/loyalty/transactions/transactions.js +58 -0
  94. package/resources/loyalty/transactions/transactions.js.map +1 -0
  95. package/resources/loyalty/transactions/transactions.mjs +31 -0
  96. package/resources/loyalty/transactions/transactions.mjs.map +1 -0
  97. package/resources/loyalty/transactions.d.ts +1 -253
  98. package/resources/loyalty/transactions.d.ts.map +1 -1
  99. package/resources/loyalty/transactions.js +15 -18
  100. package/resources/loyalty/transactions.js.map +1 -1
  101. package/resources/loyalty/transactions.mjs +1 -16
  102. package/resources/loyalty/transactions.mjs.map +1 -1
  103. package/resources/users/index.d.ts +1 -1
  104. package/resources/users/index.d.ts.map +1 -1
  105. package/resources/users/index.js.map +1 -1
  106. package/resources/users/index.mjs.map +1 -1
  107. package/resources/users/users.d.ts +60 -1
  108. package/resources/users/users.d.ts.map +1 -1
  109. package/resources/users/users.js +9 -0
  110. package/resources/users/users.js.map +1 -1
  111. package/resources/users/users.mjs +9 -0
  112. package/resources/users/users.mjs.map +1 -1
  113. package/src/index.ts +17 -1
  114. package/src/resources/assets.ts +8 -1
  115. package/src/resources/auctions/auctions.ts +417 -0
  116. package/src/resources/auctions/index.ts +18 -0
  117. package/src/resources/auctions/website-user-attributes/index.ts +18 -0
  118. package/src/resources/auctions/website-user-attributes/values.ts +137 -0
  119. package/src/resources/auctions/website-user-attributes/website-user-attributes.ts +183 -0
  120. package/src/resources/auctions/website-user-attributes.ts +3 -0
  121. package/src/resources/auctions.ts +1 -207
  122. package/src/resources/index.ts +11 -1
  123. package/src/resources/loyalty/index.ts +3 -1
  124. package/src/resources/loyalty/loyalty.ts +6 -2
  125. package/src/resources/loyalty/rules.ts +20 -4
  126. package/src/resources/loyalty/transactions/index.ts +18 -0
  127. package/src/resources/loyalty/transactions/rule-statuses.ts +160 -0
  128. package/src/resources/loyalty/transactions/transactions.ts +515 -0
  129. package/src/resources/loyalty/transactions.ts +1 -448
  130. package/src/resources/users/index.ts +4 -0
  131. package/src/resources/users/users.ts +88 -0
  132. package/src/version.ts +1 -1
  133. package/version.d.ts +1 -1
  134. package/version.js +1 -1
  135. package/version.mjs +1 -1
@@ -32,10 +32,10 @@ export class Rules extends APIResource {
32
32
  }
33
33
  return this._client.post(`/api/loyalty/rules/${id}/complete`, { body, ...options });
34
34
  }
35
- /**
36
- * This will return the processing status of quests for a specific user
37
- */
38
- getStatus(query, options) {
35
+ getStatus(query = {}, options) {
36
+ if (isRequestOptions(query)) {
37
+ return this.getStatus({}, query);
38
+ }
39
39
  return this._client.get('/api/loyalty/rules/status', { query, ...options });
40
40
  }
41
41
  }
@@ -1 +1 @@
1
- {"version":3,"file":"rules.mjs","sourceRoot":"","sources":["../../src/resources/loyalty/rules.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OACf,EAAE,gBAAgB,EAAE;AAG3B,MAAM,OAAO,KAAM,SAAQ,WAAW;IACpC;;OAEG;IACH,MAAM,CAAC,IAAsB,EAAE,OAA6B;QAC1D,OAAO,IAAI,CAAC,OAAO,C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,EAAE,WAAW,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACtF,CAAC;IAUD,SAAS,CACP,QAAmD,EAAE,EACrD,OAA6B;QAE7B,IAAI,gBAAgB,CAAC,KAAK,CAAC,EAAE;YAC3B,OAAO,IAAI,CAAC,SAAS,CAAC,EAAE,EAAE,KAAK,CAAC,CAAC;SAClC;QACD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,2BAA2B,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC9E,CAAC;CACF"}
@@ -0,0 +1,3 @@
1
+ export { RuleStatuses, type RuleStatusUpdateResponse, type RuleStatusListResponse, type RuleStatusUpdateParams, type RuleStatusListParams, } from "./rule-statuses.js";
2
+ export { Transactions, type TransactionCreateTransactionResponse, type TransactionGetTransactionEntriesResponse, type TransactionListRuleChainsResponse, type TransactionCreateTransactionParams, type TransactionGetTransactionEntriesParams, type TransactionListRuleChainsParams, } from "./transactions.js";
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/resources/loyalty/transactions/index.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,YAAY,EACZ,KAAK,wBAAwB,EAC7B,KAAK,sBAAsB,EAC3B,KAAK,sBAAsB,EAC3B,KAAK,oBAAoB,GAC1B,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,YAAY,EACZ,KAAK,oCAAoC,EACzC,KAAK,wCAAwC,EAC7C,KAAK,iCAAiC,EACtC,KAAK,kCAAkC,EACvC,KAAK,sCAAsC,EAC3C,KAAK,+BAA+B,GACrC,MAAM,gBAAgB,CAAC"}
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.Transactions = exports.RuleStatuses = void 0;
5
+ var rule_statuses_1 = require("./rule-statuses.js");
6
+ Object.defineProperty(exports, "RuleStatuses", { enumerable: true, get: function () { return rule_statuses_1.RuleStatuses; } });
7
+ var transactions_1 = require("./transactions.js");
8
+ Object.defineProperty(exports, "Transactions", { enumerable: true, get: function () { return transactions_1.Transactions; } });
9
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/resources/loyalty/transactions/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,oDAMyB;AALvB,6GAAA,YAAY,OAAA;AAMd,kDAQwB;AAPtB,4GAAA,YAAY,OAAA"}
@@ -0,0 +1,4 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+ export { RuleStatuses, } from "./rule-statuses.mjs";
3
+ export { Transactions, } from "./transactions.mjs";
4
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../../src/resources/loyalty/transactions/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EACL,YAAY,GAKb;OACM,EACL,YAAY,GAOb"}
@@ -0,0 +1,104 @@
1
+ import { APIResource } from "../../../resource.js";
2
+ import * as Core from "../../../core.js";
3
+ export declare class RuleStatuses extends APIResource {
4
+ /**
5
+ * Update a loyalty rule status
6
+ */
7
+ update(body: RuleStatusUpdateParams, options?: Core.RequestOptions): Core.APIPromise<RuleStatusUpdateResponse>;
8
+ /**
9
+ * Retrieve loyalty rule statuses
10
+ */
11
+ list(query?: RuleStatusListParams, options?: Core.RequestOptions): Core.APIPromise<RuleStatusListResponse>;
12
+ list(options?: Core.RequestOptions): Core.APIPromise<RuleStatusListResponse>;
13
+ }
14
+ export interface RuleStatusUpdateResponse {
15
+ id: string;
16
+ createdAt: string;
17
+ loyaltyRuleId: string;
18
+ organizationId: string;
19
+ progress: number;
20
+ updatedAt: string;
21
+ userId: string;
22
+ websiteId: string;
23
+ }
24
+ export interface RuleStatusListResponse {
25
+ data: Array<RuleStatusListResponse.Data>;
26
+ hasNextPage: boolean;
27
+ }
28
+ export declare namespace RuleStatusListResponse {
29
+ interface Data {
30
+ id: string;
31
+ createdAt: string;
32
+ loyaltyRuleId: string;
33
+ organizationId: string;
34
+ progress: number;
35
+ updatedAt: string;
36
+ userId: string;
37
+ websiteId: string;
38
+ }
39
+ }
40
+ export interface RuleStatusUpdateParams {
41
+ /**
42
+ * Unique identifier for the loyalty rule
43
+ */
44
+ loyaltyRuleId: string;
45
+ /**
46
+ * Increment progress of the loyalty rule
47
+ */
48
+ incProgress?: number;
49
+ /**
50
+ * Unique identifier for the organization
51
+ */
52
+ organizationId?: string;
53
+ /**
54
+ * Progress of the loyalty rule
55
+ */
56
+ progress?: number;
57
+ /**
58
+ * Unique identifier for the user, either userId or walletAddress must be provided
59
+ */
60
+ userId?: string;
61
+ /**
62
+ * Unique identifier for the wallet address, either userId or walletAddress must be
63
+ * provided
64
+ */
65
+ walletAddress?: string;
66
+ /**
67
+ * Unique identifier for the website
68
+ */
69
+ websiteId?: string;
70
+ }
71
+ export interface RuleStatusListParams {
72
+ /**
73
+ * Number of items to return
74
+ */
75
+ limit?: number | null;
76
+ /**
77
+ * Unique identifier for the loyalty rule[s]
78
+ */
79
+ loyaltyRuleId?: string | Array<string>;
80
+ /**
81
+ * Unique identifier for the organization
82
+ */
83
+ organizationId?: string;
84
+ /**
85
+ * Starting after item
86
+ */
87
+ startingAfter?: string;
88
+ /**
89
+ * User ID(s) to filter accounts by
90
+ */
91
+ userId?: string | Array<string>;
92
+ /**
93
+ * Wallet address(es) to filter accounts by
94
+ */
95
+ walletAddress?: string | Array<string>;
96
+ /**
97
+ * Unique identifier for the website
98
+ */
99
+ websiteId?: string;
100
+ }
101
+ export declare namespace RuleStatuses {
102
+ export { type RuleStatusUpdateResponse as RuleStatusUpdateResponse, type RuleStatusListResponse as RuleStatusListResponse, type RuleStatusUpdateParams as RuleStatusUpdateParams, type RuleStatusListParams as RuleStatusListParams, };
103
+ }
104
+ //# sourceMappingURL=rule-statuses.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rule-statuses.d.ts","sourceRoot":"","sources":["../../../src/resources/loyalty/transactions/rule-statuses.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,KAAK,IAAI,MAAM,eAAe,CAAC;AAEtC,qBAAa,YAAa,SAAQ,WAAW;IAC3C;;OAEG;IACH,MAAM,CACJ,IAAI,EAAE,sBAAsB,EAC5B,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,GAC5B,IAAI,CAAC,UAAU,CAAC,wBAAwB,CAAC;IAI5C;;OAEG;IACH,IAAI,CAAC,KAAK,CAAC,EAAE,oBAAoB,EAAE,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,UAAU,CAAC,sBAAsB,CAAC;IAC1G,IAAI,CAAC,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,UAAU,CAAC,sBAAsB,CAAC;CAU7E;AAED,MAAM,WAAW,wBAAwB;IACvC,EAAE,EAAE,MAAM,CAAC;IAEX,SAAS,EAAE,MAAM,CAAC;IAElB,aAAa,EAAE,MAAM,CAAC;IAEtB,cAAc,EAAE,MAAM,CAAC;IAEvB,QAAQ,EAAE,MAAM,CAAC;IAEjB,SAAS,EAAE,MAAM,CAAC;IAElB,MAAM,EAAE,MAAM,CAAC;IAEf,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,sBAAsB;IACrC,IAAI,EAAE,KAAK,CAAC,sBAAsB,CAAC,IAAI,CAAC,CAAC;IAEzC,WAAW,EAAE,OAAO,CAAC;CACtB;AAED,yBAAiB,sBAAsB,CAAC;IACtC,UAAiB,IAAI;QACnB,EAAE,EAAE,MAAM,CAAC;QAEX,SAAS,EAAE,MAAM,CAAC;QAElB,aAAa,EAAE,MAAM,CAAC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+1,22 @@
1
+ "use strict";
2
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.RuleStatuses = void 0;
5
+ const resource_1 = require("../../../resource.js");
6
+ const core_1 = require("../../../core.js");
7
+ class RuleStatuses extends resource_1.APIResource {
8
+ /**
9
+ * Update a loyalty rule status
10
+ */
11
+ update(body, options) {
12
+ return this._client.post('/api/loyalty/rule_statuses', { body, ...options });
13
+ }
14
+ list(query = {}, options) {
15
+ if ((0, core_1.isRequestOptions)(query)) {
16
+ return this.list({}, query);
17
+ }
18
+ return this._client.get('/api/loyalty/rule_statuses', { query, ...options });
19
+ }
20
+ }
21
+ exports.RuleStatuses = RuleStatuses;
22
+ //# sourceMappingURL=rule-statuses.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rule-statuses.js","sourceRoot":"","sources":["../../../src/resources/loyalty/transactions/rule-statuses.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,mDAAgD;AAChD,2CAAiD;AAGjD,MAAa,YAAa,SAAQ,sBAAW;IAC3C;;OAEG;IACH,MAAM,CACJ,IAA4B,EAC5B,OAA6B;QAE7B,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,4BAA4B,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC/E,CAAC;IAOD,IAAI,CACF,QAAoD,EAAE,EACtD,OAA6B;QAE7B,IAAI,IAAA,uBAAgB,EAAC,KAAK,CAAC,EAAE;YAC3B,OAAO,IAAI,CAAC,IAAI,CAAC,EAAE,EAAE,KAAK,CAAC,CAAC;SAC7B;QACD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,4BAA4B,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC/E,CAAC;CACF;AAzBD,oCAyBC"}
@@ -0,0 +1,18 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+ import { APIResource } from "../../../resource.mjs";
3
+ import { isRequestOptions } from "../../../core.mjs";
4
+ export class RuleStatuses extends APIResource {
5
+ /**
6
+ * Update a loyalty rule status
7
+ */
8
+ update(body, options) {
9
+ return this._client.post('/api/loyalty/rule_statuses', { body, ...options });
10
+ }
11
+ list(query = {}, options) {
12
+ if (isRequestOptions(query)) {
13
+ return this.list({}, query);
14
+ }
15
+ return this._client.get('/api/loyalty/rule_statuses', { query, ...options });
16
+ }
17
+ }
18
+ //# sourceMappingURL=rule-statuses.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rule-statuses.mjs","sourceRoot":"","sources":["../../../src/resources/loyalty/transactions/rule-statuses.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OACf,EAAE,gBAAgB,EAAE;AAG3B,MAAM,OAAO,YAAa,SAAQ,WAAW;IAC3C;;OAEG;IACH,MAAM,CACJ,IAA4B,EAC5B,OAA6B;QAE7B,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,4BAA4B,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC/E,CAAC;IAOD,IAAI,CACF,QAAoD,EAAE,EACtD,OAA6B;QAE7B,IAAI,gBAAgB,CAAC,KAAK,CAAC,EAAE;YAC3B,OAAO,IAAI,CAAC,IAAI,CAAC,EAAE,EAAE,KAAK,CAAC,CAAC;SAC7B;QACD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,4BAA4B,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC/E,CAAC;CACF"}
@@ -0,0 +1,288 @@
1
+ import { APIResource } from "../../../resource.js";
2
+ import * as Core from "../../../core.js";
3
+ import * as RuleStatusesAPI from "./rule-statuses.js";
4
+ import { RuleStatusListParams, RuleStatusListResponse, RuleStatusUpdateParams, RuleStatusUpdateResponse, RuleStatuses } from "./rule-statuses.js";
5
+ export declare class Transactions extends APIResource {
6
+ ruleStatuses: RuleStatusesAPI.RuleStatuses;
7
+ /**
8
+ * Create a loyalty transaction to update account balances.
9
+ */
10
+ createTransaction(body: TransactionCreateTransactionParams, options?: Core.RequestOptions): Core.APIPromise<TransactionCreateTransactionResponse>;
11
+ /**
12
+ * Fetch loyalty transaction entries for wallets or users, representing account
13
+ * balance changes.
14
+ */
15
+ getTransactionEntries(query?: TransactionGetTransactionEntriesParams, options?: Core.RequestOptions): Core.APIPromise<TransactionGetTransactionEntriesResponse>;
16
+ getTransactionEntries(options?: Core.RequestOptions): Core.APIPromise<TransactionGetTransactionEntriesResponse>;
17
+ /**
18
+ * Retrieve configured loyalty rule chains
19
+ */
20
+ listRuleChains(query: TransactionListRuleChainsParams, options?: Core.RequestOptions): Core.APIPromise<TransactionListRuleChainsResponse>;
21
+ }
22
+ export interface TransactionCreateTransactionResponse {
23
+ id: string;
24
+ createdAt: string;
25
+ description: string;
26
+ entries: Array<TransactionCreateTransactionResponse.Entry>;
27
+ updatedAt: string;
28
+ }
29
+ export declare namespace TransactionCreateTransactionResponse {
30
+ interface Entry {
31
+ amount: number;
32
+ /**
33
+ * Direction of the transaction entry
34
+ */
35
+ direction: 'credit' | 'debit';
36
+ walletAddress: string;
37
+ idempotencyKey?: string;
38
+ }
39
+ }
40
+ export interface TransactionGetTransactionEntriesResponse {
41
+ data: Array<TransactionGetTransactionEntriesResponse.Data>;
42
+ hasNextPage: boolean;
43
+ }
44
+ export declare namespace TransactionGetTransactionEntriesResponse {
45
+ /**
46
+ * Schema for a loyalty transaction entry
47
+ */
48
+ interface Data {
49
+ /**
50
+ * Unique identifier for the transaction entry
51
+ */
52
+ id: string;
53
+ /**
54
+ * Amount involved in the transaction
55
+ */
56
+ amount: number;
57
+ /**
58
+ * Timestamp when the transaction entry was created
59
+ */
60
+ createdAt: string;
61
+ /**
62
+ * Direction of the transaction entry
63
+ */
64
+ direction: 'credit' | 'debit';
65
+ /**
66
+ * Unique identifier for the loyalty account
67
+ */
68
+ loyaltyAccountId: string;
69
+ /**
70
+ * Details of the loyalty transaction
71
+ */
72
+ loyaltyTransaction: Data.LoyaltyTransaction;
73
+ /**
74
+ * Unique identifier for the organization
75
+ */
76
+ organizationId: string;
77
+ /**
78
+ * Type of the loyalty transaction
79
+ */
80
+ type: 'auction_bid' | 'direct_mint' | 'loyalty_rule' | 'api_key' | 'order';
81
+ /**
82
+ * Timestamp when the transaction entry was last updated
83
+ */
84
+ updatedAt: string;
85
+ /**
86
+ * Unique identifier for the website
87
+ */
88
+ websiteId: string;
89
+ /**
90
+ * Optional metadata for the transaction entry
91
+ */
92
+ metadata?: Record<string, unknown>;
93
+ }
94
+ namespace Data {
95
+ /**
96
+ * Details of the loyalty transaction
97
+ */
98
+ interface LoyaltyTransaction {
99
+ /**
100
+ * Unique identifier for the loyalty transaction
101
+ */
102
+ id: string;
103
+ /**
104
+ * Type of the loyalty transaction
105
+ */
106
+ type: 'auction_bid' | 'direct_mint' | 'loyalty_rule' | 'api_key' | 'order';
107
+ /**
108
+ * Details of the loyalty rule associated with the transaction
109
+ */
110
+ loyaltyRule?: LoyaltyTransaction.LoyaltyRule;
111
+ }
112
+ namespace LoyaltyTransaction {
113
+ /**
114
+ * Details of the loyalty rule associated with the transaction
115
+ */
116
+ interface LoyaltyRule {
117
+ /**
118
+ * Unique identifier for the loyalty rule
119
+ */
120
+ id: string;
121
+ /**
122
+ * Type of the loyalty rule
123
+ */
124
+ type: string;
125
+ /**
126
+ * Description of the loyalty rule
127
+ */
128
+ description?: string;
129
+ /**
130
+ * Optional metadata for the loyalty rule
131
+ */
132
+ metadata?: Record<string, unknown>;
133
+ /**
134
+ * Name of the loyalty rule
135
+ */
136
+ name?: string;
137
+ }
138
+ }
139
+ }
140
+ }
141
+ export interface TransactionListRuleChainsResponse {
142
+ data: Array<unknown>;
143
+ hasNextPage: boolean;
144
+ }
145
+ export interface TransactionCreateTransactionParams {
146
+ /**
147
+ * Description of the loyalty transaction
148
+ */
149
+ description: string;
150
+ /**
151
+ * Array of transaction entries
152
+ */
153
+ entries: Array<TransactionCreateTransactionParams.Entry>;
154
+ /**
155
+ * Unique identifier for the loyalty currency
156
+ */
157
+ loyaltyCurrencyId?: string;
158
+ }
159
+ export declare namespace TransactionCreateTransactionParams {
160
+ interface Entry {
161
+ /**
162
+ * Transaction entry amount.
163
+ */
164
+ amount: number;
165
+ /**
166
+ * Direction of the transaction entry for this wallet address
167
+ */
168
+ direction?: 'credit' | 'debit';
169
+ /**
170
+ * Idempotency key for the transaction entry. Creation will fail if already exists
171
+ * for this wallet address.
172
+ */
173
+ idempotencyKey?: string;
174
+ /**
175
+ * Unique identifier for the loyalty currency for the wallet. Can only use
176
+ * entry-level currency or transaction-level currency.
177
+ */
178
+ loyaltyCurrencyId?: string;
179
+ /**
180
+ * The wallet address of the user
181
+ */
182
+ walletAddress?: string;
183
+ }
184
+ }
185
+ export interface TransactionGetTransactionEntriesParams {
186
+ /**
187
+ * End date to filter by (exclusive, less than)
188
+ */
189
+ createdAtEnd?: string;
190
+ /**
191
+ * Start date to filter by (inclusive, greater than or equal to)
192
+ */
193
+ createdAtStart?: string;
194
+ /**
195
+ * Direction of the transaction entry to filter by
196
+ */
197
+ direction?: 'credit' | 'debit';
198
+ /**
199
+ * Key to ensure idempotency of the request
200
+ */
201
+ idempotencyKey?: string;
202
+ /**
203
+ * Maximum number of records to return (max 1000)
204
+ */
205
+ limit?: number;
206
+ /**
207
+ * UUID of the rule group (converted to lowercase)
208
+ */
209
+ loyaltyRuleGroupId?: string;
210
+ /**
211
+ * Unique identifier for the loyalty rule to filter by
212
+ */
213
+ loyaltyRuleId?: string;
214
+ loyaltyRuleType?: 'Bonus' | 'BoughtOn' | 'BoughtWithRoyalties' | 'DiscordMessages' | 'Listing' | 'Lodging' | 'MintOn' | 'PoapClaim' | 'SnagSocialsConnected' | 'SnapshotFullset' | 'SnapshotHold' | 'SoldOn' | 'SoldWithRoyalties' | 'TokenHold' | 'TwitterBio' | 'TwitterHashTagPost' | 'Retweet' | 'check_in' | 'code_entry' | 'connect_wallet' | 'connected_discord' | 'connected_email' | 'connected_epic' | 'connected_steam' | 'connected_telegram' | 'connected_twitter' | 'create_partner_account' | 'discord_member' | 'drip_x_follow' | 'drip_x_new_tweet' | 'drip_x_text_in_bio' | 'drip_x_text_in_comment' | 'drip_x_text_in_name' | 'drip_x_tweet' | 'external_rule' | 'link_click' | 'manual_upload' | 'profile_completed' | 'referred_user' | 'smart_contract_event' | 'snapshot_governance' | 'telegram_join' | 'telegram_messages' | 'text_input' | 'token_hold_erc20' | 'tweet_liked_by_project' | 'twitter_comment' | 'twitter_follow' | 'twitter_followers' | 'twitter_like' | 'twitter_post_hashtag' | 'quiz' | 'poll' | 'steam_wishlist' | Array<'Bonus' | 'BoughtOn' | 'BoughtWithRoyalties' | 'DiscordMessages' | 'Listing' | 'Lodging' | 'MintOn' | 'PoapClaim' | 'SnagSocialsConnected' | 'SnapshotFullset' | 'SnapshotHold' | 'SoldOn' | 'SoldWithRoyalties' | 'TokenHold' | 'TwitterBio' | 'TwitterHashTagPost' | 'Retweet' | 'check_in' | 'code_entry' | 'connect_wallet' | 'connected_discord' | 'connected_email' | 'connected_epic' | 'connected_steam' | 'connected_telegram' | 'connected_twitter' | 'create_partner_account' | 'discord_member' | 'drip_x_follow' | 'drip_x_new_tweet' | 'drip_x_text_in_bio' | 'drip_x_text_in_comment' | 'drip_x_text_in_name' | 'drip_x_tweet' | 'external_rule' | 'link_click' | 'manual_upload' | 'profile_completed' | 'referred_user' | 'smart_contract_event' | 'snapshot_governance' | 'telegram_join' | 'telegram_messages' | 'text_input' | 'token_hold_erc20' | 'tweet_liked_by_project' | 'twitter_comment' | 'twitter_follow' | 'twitter_followers' | 'twitter_like' | 'twitter_post_hashtag' | 'quiz' | 'poll' | 'steam_wishlist'>;
215
+ /**
216
+ * Unique identifier for the loyalty transaction to filter by
217
+ */
218
+ loyaltyTransactionId?: string;
219
+ /**
220
+ * Field to order the results by
221
+ */
222
+ orderBy?: 'createdAt' | 'updatedAt' | 'loyaltyAccountLockVersion';
223
+ /**
224
+ * Unique identifier for the organization to filter by
225
+ */
226
+ organizationId?: string;
227
+ /**
228
+ * Pagination cursor to start after a specific resource ID
229
+ */
230
+ startingAfter?: string;
231
+ /**
232
+ * Type of the loyalty transaction to filter by
233
+ */
234
+ type?: 'auction_bid' | 'direct_mint' | 'loyalty_rule' | 'api_key' | 'order';
235
+ /**
236
+ * When passed in return the list of fulfilled entries for loyalty rules. If a
237
+ * loyalty rule has a fulfilled entry this means the user cannot currently complete
238
+ * the rule. Must be passed in with userId or walletAddress.
239
+ */
240
+ userCompletedLoyaltyRuleId?: string | Array<string>;
241
+ /**
242
+ * External identifier for the user group controlled by you
243
+ */
244
+ userGroupExternalIdentifier?: string;
245
+ /**
246
+ * Unique identifier for the user group
247
+ */
248
+ userGroupId?: string;
249
+ /**
250
+ * User ID or array of User IDs to filter by
251
+ */
252
+ userId?: string | Array<string>;
253
+ /**
254
+ * Wallet address or array of wallet addresses to filter by
255
+ */
256
+ walletAddress?: string | Array<string>;
257
+ /**
258
+ * Identifier for the wallet group to filter by
259
+ */
260
+ walletGroupIdentifier?: string;
261
+ /**
262
+ * Unique identifier for the website to filter by
263
+ */
264
+ websiteId?: string;
265
+ }
266
+ export interface TransactionListRuleChainsParams {
267
+ /**
268
+ * Unique identifier for the organization
269
+ */
270
+ organizationId: string;
271
+ /**
272
+ * Unique identifier for the website
273
+ */
274
+ websiteId: string;
275
+ /**
276
+ * Number of rule chains to return
277
+ */
278
+ limit?: number | null;
279
+ /**
280
+ * Starting after the given rule chain ID
281
+ */
282
+ startingAfter?: string;
283
+ }
284
+ export declare namespace Transactions {
285
+ export { type TransactionCreateTransactionResponse as TransactionCreateTransactionResponse, type TransactionGetTransactionEntriesResponse as TransactionGetTransactionEntriesResponse, type TransactionListRuleChainsResponse as TransactionListRuleChainsResponse, type TransactionCreateTransactionParams as TransactionCreateTransactionParams, type TransactionGetTransactionEntriesParams as TransactionGetTransactionEntriesParams, type TransactionListRuleChainsParams as TransactionListRuleChainsParams, };
286
+ export { RuleStatuses as RuleStatuses, type RuleStatusUpdateResponse as RuleStatusUpdateResponse, type RuleStatusListResponse as RuleStatusListResponse, type RuleStatusUpdateParams as RuleStatusUpdateParams, type RuleStatusListParams as RuleStatusListParams, };
287
+ }
288
+ //# sourceMappingURL=transactions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"transactions.d.ts","sourceRoot":"","sources":["../../../src/resources/loyalty/transactions/transactions.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,KAAK,IAAI,MAAM,eAAe,CAAC;AACtC,OAAO,KAAK,eAAe,MAAM,iBAAiB,CAAC;AACnD,OAAO,EACL,oBAAoB,EACpB,sBAAsB,EACtB,sBAAsB,EACtB,wBAAwB,EACxB,YAAY,EACb,MAAM,iBAAiB,CAAC;AAEzB,qBAAa,YAAa,SAAQ,WAAW;IAC3C,YAAY,EAAE,eAAe,CAAC,YAAY,CAAkD;IAE5F;;OAEG;IACH,iBAAiB,CACf,IAAI,EAAE,kCAAkC,EACxC,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,GAC5B,IAAI,CAAC,UAAU,CAAC,oCAAoC,CAAC;IAIxD;;;OAGG;IACH,qBAAqB,CACnB,KAAK,CAAC,EAAE,sCAAsC,EAC9C,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,GAC5B,IAAI,CAAC,UAAU,CAAC,wCAAwC,CAAC;IAC5D,qBAAqB,CACnB,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,GAC5B,IAAI,CAAC,UAAU,CAAC,wCAAwC,CAAC;IAW5D;;OAEG;IACH,cAAc,CACZ,KAAK,EAAE,+BAA+B,EACtC,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,GAC5B,IAAI,CAAC,UAAU,CAAC,iCAAiC,CAAC;CAGtD;AAED,MAAM,WAAW,o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G;IACH,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAE/B;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,+BAA+B;IAC9C;;OAEG;IACH,cAAc,EAAE,MAAM,CAAC;IAEvB;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAEtB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAID,MAAM,CAAC,OAAO,WAAW,YAAY,CAAC;IACpC,OAAO,EACL,KAAK,oCAAoC,IAAI,oCAAoC,EACjF,KAAK,wCAAwC,IAAI,wCAAwC,EACzF,KAAK,iCAAiC,IAAI,iCAAiC,EAC3E,KAAK,kCAAkC,IAAI,kCAAkC,EAC7E,KAAK,sCAAsC,IAAI,sCAAsC,EACrF,KAAK,+BAA+B,IAAI,+BAA+B,GACxE,CAAC;IAEF,OAAO,EACL,YAAY,IAAI,YAAY,EAC5B,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,oBAAoB,IAAI,oBAAoB,GAClD,CAAC;CACH"}
@@ -0,0 +1,58 @@
1
+ "use strict";
2
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
3
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
4
+ if (k2 === undefined) k2 = k;
5
+ var desc = Object.getOwnPropertyDescriptor(m, k);
6
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
7
+ desc = { enumerable: true, get: function() { return m[k]; } };
8
+ }
9
+ Object.defineProperty(o, k2, desc);
10
+ }) : (function(o, m, k, k2) {
11
+ if (k2 === undefined) k2 = k;
12
+ o[k2] = m[k];
13
+ }));
14
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
15
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
16
+ }) : function(o, v) {
17
+ o["default"] = v;
18
+ });
19
+ var __importStar = (this && this.__importStar) || function (mod) {
20
+ if (mod && mod.__esModule) return mod;
21
+ var result = {};
22
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
23
+ __setModuleDefault(result, mod);
24
+ return result;
25
+ };
26
+ Object.defineProperty(exports, "__esModule", { value: true });
27
+ exports.Transactions = void 0;
28
+ const resource_1 = require("../../../resource.js");
29
+ const core_1 = require("../../../core.js");
30
+ const RuleStatusesAPI = __importStar(require("./rule-statuses.js"));
31
+ const rule_statuses_1 = require("./rule-statuses.js");
32
+ class Transactions extends resource_1.APIResource {
33
+ constructor() {
34
+ super(...arguments);
35
+ this.ruleStatuses = new RuleStatusesAPI.RuleStatuses(this._client);
36
+ }
37
+ /**
38
+ * Create a loyalty transaction to update account balances.
39
+ */
40
+ createTransaction(body, options) {
41
+ return this._client.post('/api/loyalty/transactions', { body, ...options });
42
+ }
43
+ getTransactionEntries(query = {}, options) {
44
+ if ((0, core_1.isRequestOptions)(query)) {
45
+ return this.getTransactionEntries({}, query);
46
+ }
47
+ return this._client.get('/api/loyalty/transaction_entries', { query, ...options });
48
+ }
49
+ /**
50
+ * Retrieve configured loyalty rule chains
51
+ */
52
+ listRuleChains(query, options) {
53
+ return this._client.get('/api/loyalty/rule_chains', { query, ...options });
54
+ }
55
+ }
56
+ exports.Transactions = Transactions;
57
+ Transactions.RuleStatuses = rule_statuses_1.RuleStatuses;
58
+ //# sourceMappingURL=transactions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"transactions.js","sourceRoot":"","sources":["../../../src/resources/loyalty/transactions/transactions.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;;;;;;;;;;;;;;;;;;;;;;;AAEtF,mDAAgD;AAChD,2CAAiD;AAEjD,oEAAmD;AACnD,sDAMyB;AAEzB,MAAa,YAAa,SAAQ,sBAAW;IAA7C;;QACE,iBAAY,GAAiC,IAAI,eAAe,CAAC,YAAY,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IA0C9F,CAAC;IAxCC;;OAEG;IACH,iBAAiB,CACf,IAAwC,EACxC,OAA6B;QAE7B,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,2BAA2B,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC9E,CAAC;IAaD,qBAAqB,CACnB,QAAsE,EAAE,EACxE,OAA6B;QAE7B,IAAI,IAAA,uBAAgB,EAAC,KAAK,CAAC,EAAE;YAC3B,OAAO,IAAI,CAAC,qBAAqB,CAAC,EAAE,EAAE,KAAK,CAAC,CAAC;SAC9C;QACD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,kCAAkC,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACrF,CAAC;IAED;;OAEG;IACH,cAAc,CACZ,KAAsC,EACtC,OAA6B;QAE7B,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,0BAA0B,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC7E,CAAC;CACF;AA3CD,oCA2CC;AAsbD,YAAY,CAAC,YAAY,GAAG,4BAAY,CAAC"}
@@ -0,0 +1,31 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+ import { APIResource } from "../../../resource.mjs";
3
+ import { isRequestOptions } from "../../../core.mjs";
4
+ import * as RuleStatusesAPI from "./rule-statuses.mjs";
5
+ import { RuleStatuses, } from "./rule-statuses.mjs";
6
+ export class Transactions extends APIResource {
7
+ constructor() {
8
+ super(...arguments);
9
+ this.ruleStatuses = new RuleStatusesAPI.RuleStatuses(this._client);
10
+ }
11
+ /**
12
+ * Create a loyalty transaction to update account balances.
13
+ */
14
+ createTransaction(body, options) {
15
+ return this._client.post('/api/loyalty/transactions', { body, ...options });
16
+ }
17
+ getTransactionEntries(query = {}, options) {
18
+ if (isRequestOptions(query)) {
19
+ return this.getTransactionEntries({}, query);
20
+ }
21
+ return this._client.get('/api/loyalty/transaction_entries', { query, ...options });
22
+ }
23
+ /**
24
+ * Retrieve configured loyalty rule chains
25
+ */
26
+ listRuleChains(query, options) {
27
+ return this._client.get('/api/loyalty/rule_chains', { query, ...options });
28
+ }
29
+ }
30
+ Transactions.RuleStatuses = RuleStatuses;
31
+ //# sourceMappingURL=transactions.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"transactions.mjs","sourceRoot":"","sources":["../../../src/resources/loyalty/transactions/transactions.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OACf,EAAE,gBAAgB,EAAE;OAEpB,KAAK,eAAe;OACpB,EAKL,YAAY,GACb;AAED,MAAM,OAAO,YAAa,SAAQ,WAAW;IAA7C;;QACE,iBAAY,GAAiC,IAAI,eAAe,CAAC,YAAY,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IA0C9F,CAAC;IAxCC;;OAEG;IACH,iBAAiB,CACf,IAAwC,EACxC,OAA6B;QAE7B,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,2BAA2B,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC9E,CAAC;IAaD,qBAAqB,CACnB,QAAsE,EAAE,EACxE,OAA6B;QAE7B,IAAI,gBAAgB,CAAC,KAAK,CAAC,EAAE;YAC3B,OAAO,IAAI,CAAC,qBAAqB,CAAC,EAAE,EAAE,KAAK,CAAC,CAAC;SAC9C;QACD,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,kCAAkC,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACrF,CAAC;IAED;;OAEG;IACH,cAAc,CACZ,KAAsC,EACtC,OAA6B;QAE7B,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,0BAA0B,EAAE,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC7E,CAAC;CACF;AAsbD,YAAY,CAAC,YAAY,GAAG,YAAY,CAAC"}