Variable rewardClaimApiConst
rewardClaimApi: {
"/v1/reward/claim": {
post: {
body: TUnion<
[
TIntersect<
[
TObject<{ identityId: TString }>,
TIntersect<
[
TObject<{ amount: ...; category: ...; note: ... }>,
TObject<{ walletAddress: ... }>,
],
>,
],
>,
TIntersect<
[
TObject<{ organizationId: TString }>,
TIntersect<
[
TObject<{ amount: ...; category: ...; note: ... }>,
TObject<{ walletAddress: ... }>,
],
>,
],
>,
],
>;
response: {
"201": TObject<
{
createdAt: TString;
id: TString;
receipt: TOptional<
TObject<
{ id: TString; type: TLiteral<"SOLANA_TRANSACTION_SIGNATURE"> },
>,
>;
returnedRewardId: TOptional<TString>;
reward: TObject<
{
amount: TObject<{ amount: TNumber; currency: TLiteral<(...)> }>;
category: TOptional<TString>;
createdAt: TString;
id: TString;
idempotencyKey: TString;
note: TOptional<TString>;
phone: TString;
transactionType: TUnsafe<"CREDIT" | "DEBIT">;
},
>;
status: TUnsafe<"PENDING" | "CLAIMED" | "RETURNED">;
updatedAt: TString;
},
>;
"400": TUnion<
[
TObject<{ code: TLiteral<"INVALID_PHONE">; message: TString }>,
TObject<{ code: TLiteral<"INVALID_ENTITY_TYPE">; message: TString }>,
TObject<{ code: TLiteral<"ENTITY_NOT_FOUND">; message: TString }>,
TObject<{ code: TLiteral<"IDEMPOTENCY_ERROR">; message: TString }>,
],
>;
};
summary: "Claim Reward";
};
};
"/v1/reward/claim/{id}": {
get: {
description: "Retrieve a specific reward claim by nominating the Reward Claim ID.";
params: TObject<{ id: TString }>;
response: {
"200": TObject<
{
createdAt: TString;
id: TString;
receipt: TOptional<
TObject<
{ id: TString; type: TLiteral<"SOLANA_TRANSACTION_SIGNATURE"> },
>,
>;
returnedRewardId: TOptional<TString>;
reward: TObject<
{
amount: TObject<{ amount: TNumber; currency: TLiteral<(...)> }>;
category: TOptional<TString>;
createdAt: TString;
id: TString;
idempotencyKey: TString;
note: TOptional<TString>;
phone: TString;
transactionType: TUnsafe<"CREDIT" | "DEBIT">;
},
>;
status: TUnsafe<"PENDING" | "CLAIMED" | "RETURNED">;
updatedAt: TString;
},
>;
"404": TObject<{ code: TLiteral<"NOT_FOUND">; message: TString }>;
};
summary: "Get Reward Claim";
};
};
} = ...
Type Declaration
Readonly/v1/reward/claim: {
post: {
body: TUnion<
[
TIntersect<
[
TObject<{ identityId: TString }>,
TIntersect<
[
TObject<{ amount: ...; category: ...; note: ... }>,
TObject<{ walletAddress: ... }>,
],
>,
],
>,
TIntersect<
[
TObject<{ organizationId: TString }>,
TIntersect<
[
TObject<{ amount: ...; category: ...; note: ... }>,
TObject<{ walletAddress: ... }>,
],
>,
],
>,
],
>;
response: {
"201": TObject<
{
createdAt: TString;
id: TString;
receipt: TOptional<
TObject<
{ id: TString; type: TLiteral<"SOLANA_TRANSACTION_SIGNATURE"> },
>,
>;
returnedRewardId: TOptional<TString>;
reward: TObject<
{
amount: TObject<{ amount: TNumber; currency: TLiteral<(...)> }>;
category: TOptional<TString>;
createdAt: TString;
id: TString;
idempotencyKey: TString;
note: TOptional<TString>;
phone: TString;
transactionType: TUnsafe<"CREDIT" | "DEBIT">;
},
>;
status: TUnsafe<"PENDING" | "CLAIMED" | "RETURNED">;
updatedAt: TString;
},
>;
"400": TUnion<
[
TObject<{ code: TLiteral<"INVALID_PHONE">; message: TString }>,
TObject<{ code: TLiteral<"INVALID_ENTITY_TYPE">; message: TString }>,
TObject<{ code: TLiteral<"ENTITY_NOT_FOUND">; message: TString }>,
TObject<{ code: TLiteral<"IDEMPOTENCY_ERROR">; message: TString }>,
],
>;
};
summary: "Claim Reward";
};
}
Readonly/v1/reward/claim/{id}: {
get: {
description: "Retrieve a specific reward claim by nominating the Reward Claim ID.";
params: TObject<{ id: TString }>;
response: {
"200": TObject<
{
createdAt: TString;
id: TString;
receipt: TOptional<
TObject<
{ id: TString; type: TLiteral<"SOLANA_TRANSACTION_SIGNATURE"> },
>,
>;
returnedRewardId: TOptional<TString>;
reward: TObject<
{
amount: TObject<{ amount: TNumber; currency: TLiteral<(...)> }>;
category: TOptional<TString>;
createdAt: TString;
id: TString;
idempotencyKey: TString;
note: TOptional<TString>;
phone: TString;
transactionType: TUnsafe<"CREDIT" | "DEBIT">;
},
>;
status: TUnsafe<"PENDING" | "CLAIMED" | "RETURNED">;
updatedAt: TString;
},
>;
"404": TObject<{ code: TLiteral<"NOT_FOUND">; message: TString }>;
};
summary: "Get Reward Claim";
};
}