소스 검색

Regenerate the API models and update types

master
Jared Bell 3 시간 전
부모
커밋
8c1c25b84c
32개의 변경된 파일과 333개의 추가작업 그리고 13개의 파일을 삭제
  1. +1
    -1
      src/components/wizard/WizardStepper.vue
  2. +11
    -0
      src/generated/typescript/index.ts
  3. +4
    -0
      src/generated/typescript/models/AddAmendmentRequest.ts
  4. +5
    -0
      src/generated/typescript/models/AddCommentRequest.ts
  5. +8
    -8
      src/generated/typescript/models/AddProposalRequest.ts
  6. +4
    -0
      src/generated/typescript/models/Amendment.ts
  7. +4
    -0
      src/generated/typescript/models/AmendmentWithParagraphs.ts
  8. +4
    -0
      src/generated/typescript/models/AmendmentWithSummary.ts
  9. +12
    -0
      src/generated/typescript/models/CommentTargetType.ts
  10. +6
    -0
      src/generated/typescript/models/CommentWithUser.ts
  11. +9
    -1
      src/generated/typescript/models/EditProposalRequest.ts
  12. +19
    -0
      src/generated/typescript/models/FundingTypeData.ts
  13. +12
    -0
      src/generated/typescript/models/MoneyAmount.ts
  14. +18
    -0
      src/generated/typescript/models/PolicyTypeData.ts
  15. +4
    -0
      src/generated/typescript/models/Proposal.ts
  16. +32
    -0
      src/generated/typescript/models/ProposalCommonData.ts
  17. +19
    -0
      src/generated/typescript/models/ProposalEvent.ts
  18. +19
    -0
      src/generated/typescript/models/ProposalEventType.ts
  19. +9
    -0
      src/generated/typescript/models/ProposalMilestone.ts
  20. +12
    -0
      src/generated/typescript/models/ProposalParagraph.ts
  21. +6
    -1
      src/generated/typescript/models/ProposalParagraphRequest.ts
  22. +24
    -2
      src/generated/typescript/models/ProposalRevision.ts
  23. +3
    -0
      src/generated/typescript/models/ProposalRevisionBlock.ts
  24. +9
    -0
      src/generated/typescript/models/ProposalRevisionStatus.ts
  25. +9
    -0
      src/generated/typescript/models/ProposalRisk.ts
  26. +9
    -0
      src/generated/typescript/models/ProposalScope.ts
  27. +4
    -0
      src/generated/typescript/models/ProposalVote.ts
  28. +12
    -0
      src/generated/typescript/models/ProposalWithParagraphs.ts
  29. +4
    -0
      src/generated/typescript/models/SelectableAmendment.ts
  30. +6
    -0
      src/generated/typescript/models/SelectableComment.ts
  31. +12
    -0
      src/generated/typescript/models/SelectableProposal.ts
  32. +23
    -0
      src/generated/typescript/services/ProposalService.ts

+ 1
- 1
src/components/wizard/WizardStepper.vue 파일 보기

@@ -1,5 +1,5 @@
<template>
<ol class="flex flex-wrap items-center gap-y-2">
<ol class="flex items-center gap-y-2">
<li
v-for="(step, index) in steps"
:key="step.id"


+ 11
- 0
src/generated/typescript/index.ts 파일 보기

@@ -19,18 +19,29 @@ export type { AmendmentWithSummary } from './models/AmendmentWithSummary';
export type { Claims } from './models/Claims';
export type { CommentReaction } from './models/CommentReaction';
export type { CommentReactionSummary } from './models/CommentReactionSummary';
export { CommentTargetType } from './models/CommentTargetType';
export type { CommentWithUser } from './models/CommentWithUser';
export type { EditProposalRequest } from './models/EditProposalRequest';
export type { FreighterLoginRequest } from './models/FreighterLoginRequest';
export type { FreighterLoginResponse } from './models/FreighterLoginResponse';
export type { FundingTypeData } from './models/FundingTypeData';
export type { ListCommentsResponse } from './models/ListCommentsResponse';
export type { LoginRequest } from './models/LoginRequest';
export type { MoneyAmount } from './models/MoneyAmount';
export type { Organization } from './models/Organization';
export type { PolicyTypeData } from './models/PolicyTypeData';
export type { Proposal } from './models/Proposal';
export type { ProposalCommonData } from './models/ProposalCommonData';
export type { ProposalEvent } from './models/ProposalEvent';
export { ProposalEventType } from './models/ProposalEventType';
export type { ProposalMilestone } from './models/ProposalMilestone';
export type { ProposalParagraph } from './models/ProposalParagraph';
export type { ProposalParagraphRequest } from './models/ProposalParagraphRequest';
export type { ProposalRevision } from './models/ProposalRevision';
export type { ProposalRevisionBlock } from './models/ProposalRevisionBlock';
export { ProposalRevisionStatus } from './models/ProposalRevisionStatus';
export type { ProposalRisk } from './models/ProposalRisk';
export type { ProposalScope } from './models/ProposalScope';
export type { ProposalSponsor } from './models/ProposalSponsor';
export { ProposalState } from './models/ProposalState';
export type { ProposalVote } from './models/ProposalVote';


+ 4
- 0
src/generated/typescript/models/AddAmendmentRequest.ts 파일 보기

@@ -7,5 +7,9 @@ export type AddAmendmentRequest = {
name: string;
paragraphs: Array<string>;
proposalId: number;
/**
* Revision the amendment changes; defaults to the proposal's approved revision
*/
targetRevision?: number | null;
};


+ 5
- 0
src/generated/typescript/models/AddCommentRequest.ts 파일 보기

@@ -9,6 +9,11 @@ export type AddCommentRequest = {
*/
parentId?: number | null;
proposalId: number;
/**
* Id of the revision block to attach the comment to, if any. Must belong to a revision of
* the same proposal; omit to comment on the whole proposal.
*/
targetBlockId?: number | null;
userId: number;
};


+ 8
- 8
src/generated/typescript/models/AddProposalRequest.ts 파일 보기

@@ -4,20 +4,20 @@
/* eslint-disable */
import type { ProposalParagraphRequest } from './ProposalParagraphRequest';
export type AddProposalRequest = {
creator: string;
name: string;
/**
* Structured wizard fields shared by every proposal type
*/
commonData?: Record<string, any> | null;
/**
* Structured wizard fields specific to the proposal's type
*/
typeData?: Record<string, any> | null;
commonData?: any;
creator: string;
name: string;
paragraphs: Array<ProposalParagraphRequest>;
/**
* Kind of decision asked for; defaults to GENERAL
*/
proposalType?: string;
paragraphs: Array<ProposalParagraphRequest>;
/**
* Structured wizard fields specific to the proposal's type
*/
typeData?: any;
};


+ 4
- 0
src/generated/typescript/models/Amendment.ts 파일 보기

@@ -10,6 +10,10 @@ export type Amendment = {
name: string;
proposalId: number;
status: AmendmentStatus;
/**
* Revision the amendment targets and is applied on top of
*/
targetRevision: number;
updatedAt: string;
};


+ 4
- 0
src/generated/typescript/models/AmendmentWithParagraphs.ts 파일 보기

@@ -13,6 +13,10 @@ export type AmendmentWithParagraphs = {
paragraphs: Array<AmendmentParagraph>;
proposal_id: number;
status: AmendmentStatus;
/**
* Revision the amendment targets and is applied on top of
*/
target_revision: number;
updated_at: string;
};


+ 4
- 0
src/generated/typescript/models/AmendmentWithSummary.ts 파일 보기

@@ -12,6 +12,10 @@ export type AmendmentWithSummary = {
proposal_id: number;
status: AmendmentStatus;
summary?: string | null;
/**
* Revision the amendment targets and is applied on top of
*/
target_revision: number;
updated_at: string;
};


+ 12
- 0
src/generated/typescript/models/CommentTargetType.ts 파일 보기

@@ -0,0 +1,12 @@
/* generated using openapi-typescript-codegen -- do not edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
/**
* What a comment is attached to: the whole proposal, or one block of one revision. A block
* target pins the exact document version the comment responds to.
*/
export enum CommentTargetType {
PROPOSAL = 'PROPOSAL',
BLOCK = 'BLOCK',
}

+ 6
- 0
src/generated/typescript/models/CommentWithUser.ts 파일 보기

@@ -2,6 +2,7 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { CommentTargetType } from './CommentTargetType';
export type CommentWithUser = {
content?: string | null;
createdAt: string;
@@ -10,6 +11,11 @@ export type CommentWithUser = {
isCurrent: boolean;
parentId?: number | null;
proposalId: number;
/**
* Block id when `target_type` is `Block`; None when it is `Proposal`
*/
targetBlockId?: number | null;
targetType: CommentTargetType;
updatedAt: string;
userId?: number | null;
username?: string | null;


+ 9
- 1
src/generated/typescript/models/EditProposalRequest.ts 파일 보기

@@ -8,9 +8,13 @@ export type EditProposalRequest = {
* The revision the edit was made against; must be the proposal's current revision
*/
baseRevision: number;
/**
* Structured wizard fields shared by every proposal type; replaces the current values
*/
commonData?: any;
name: string;
/**
* The complete new set of paragraphs, replacing the current ones
* The complete new set of blocks, replacing the current ones
*/
paragraphs: Array<ProposalParagraphRequest>;
proposalId: number;
@@ -18,5 +22,9 @@ export type EditProposalRequest = {
* Optional description of the change
*/
summary?: string | null;
/**
* Structured wizard fields specific to the proposal's type; replaces the current values
*/
typeData?: any;
};


+ 19
- 0
src/generated/typescript/models/FundingTypeData.ts 파일 보기

@@ -0,0 +1,19 @@
/* generated using openapi-typescript-codegen -- do not edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { MoneyAmount } from './MoneyAmount';
import type { ProposalMilestone } from './ProposalMilestone';
/**
* Structured fields specific to a funding proposal, kept in `proposal_revisions.type_data`.
*/
export type FundingTypeData = {
/**
* What must be true for the work to count as finished
*/
finishedCriteria?: Array<string>;
maximumAuthorization?: (MoneyAmount | null);
milestones?: Array<ProposalMilestone>;
targetCompletionDate?: string | null;
};


+ 12
- 0
src/generated/typescript/models/MoneyAmount.ts 파일 보기

@@ -0,0 +1,12 @@
/* generated using openapi-typescript-codegen -- do not edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
export type MoneyAmount = {
/**
* Minor units (cents for USD)
*/
amountMinor: number;
currencyCode: string;
};


+ 18
- 0
src/generated/typescript/models/PolicyTypeData.ts 파일 보기

@@ -0,0 +1,18 @@
/* generated using openapi-typescript-codegen -- do not edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
/**
* Structured fields specific to a policy proposal, kept in `proposal_revisions.type_data`.
*/
export type PolicyTypeData = {
/**
* When the policy takes effect once approved
*/
effectiveDate?: string | null;
/**
* Existing policy or rule being changed, if any
*/
supersedes?: string | null;
};


+ 4
- 0
src/generated/typescript/models/Proposal.ts 파일 보기

@@ -7,6 +7,10 @@ export type Proposal = {
creator: string;
name: string;
organizationId: number;
/**
* Kind of decision asked for; drives which structured fields are required
*/
proposalType: string;
updatedAt: string;
};


+ 32
- 0
src/generated/typescript/models/ProposalCommonData.ts 파일 보기

@@ -0,0 +1,32 @@
/* generated using openapi-typescript-codegen -- do not edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { ProposalScope } from './ProposalScope';
/**
* Structured fields shared by every proposal type, kept in `proposal_revisions.common_data`.
*/
export type ProposalCommonData = {
/**
* Declared conflicts of interest
*/
conflictDisclosure?: string | null;
/**
* What the proposal asks members to approve
*/
decisionRequested?: string | null;
/**
* Why the proposal is needed
*/
rationale?: string | null;
/**
* Who is responsible for carrying the decision out
*/
responsibleParty?: string | null;
/**
* Declared risks and their mitigations
*/
risks?: any[] | null;
scope?: (ProposalScope | null);
};


+ 19
- 0
src/generated/typescript/models/ProposalEvent.ts 파일 보기

@@ -0,0 +1,19 @@
/* generated using openapi-typescript-codegen -- do not edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { ProposalEventType } from './ProposalEventType';
/**
* One entry in a proposal's timeline and audit trail
*/
export type ProposalEvent = {
actorUserId?: number | null;
amendmentId?: number | null;
createdAt: string;
eventData: any;
eventType: ProposalEventType;
id: number;
proposalId: number;
proposalRevisionId?: number | null;
};


+ 19
- 0
src/generated/typescript/models/ProposalEventType.ts 파일 보기

@@ -0,0 +1,19 @@
/* generated using openapi-typescript-codegen -- do not edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
export enum ProposalEventType {
PROPOSAL_CREATED = 'PROPOSAL_CREATED',
REVISION_CREATED = 'REVISION_CREATED',
PROPOSAL_SUBMITTED = 'PROPOSAL_SUBMITTED',
PROPOSAL_SPONSORED = 'PROPOSAL_SPONSORED',
PROPOSAL_UNSPONSORED = 'PROPOSAL_UNSPONSORED',
VOTING_OPENED = 'VOTING_OPENED',
VOTE_CAST = 'VOTE_CAST',
PROPOSAL_APPROVED = 'PROPOSAL_APPROVED',
PROPOSAL_REJECTED = 'PROPOSAL_REJECTED',
PROPOSAL_NO_QUORUM = 'PROPOSAL_NO_QUORUM',
AMENDMENT_CREATED = 'AMENDMENT_CREATED',
AMENDMENT_APPROVED = 'AMENDMENT_APPROVED',
REVISION_SUPERSEDED = 'REVISION_SUPERSEDED',
}

+ 9
- 0
src/generated/typescript/models/ProposalMilestone.ts 파일 보기

@@ -0,0 +1,9 @@
/* generated using openapi-typescript-codegen -- do not edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
export type ProposalMilestone = {
dueDate?: string | null;
title: string;
};


+ 12
- 0
src/generated/typescript/models/ProposalParagraph.ts 파일 보기

@@ -8,7 +8,19 @@
export type ProposalParagraph = {
id: number;
index: number;
/**
* Display structure of the block
*/
kind: string;
paragraphText: string;
proposalId: number;
/**
* Navigation and comment-targeting key
*/
sectionKey?: string | null;
/**
* Display title of a user-defined section
*/
sectionTitle?: string | null;
};


+ 6
- 1
src/generated/typescript/models/ProposalParagraphRequest.ts 파일 보기

@@ -2,13 +2,18 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
/**
* One block of a proposal as submitted through the API. `kind` and the section fields mirror the
* columns on `proposal_revision_blocks` so a wizard can assemble headings, lists, and custom
* sections alongside plain paragraphs.
*/
export type ProposalParagraphRequest = {
index: number;
paragraphText: string;
/**
* Display structure: paragraph, heading, bullet_list, numbered_list, quote, callout, ...
*/
kind?: string;
paragraphText: string;
/**
* Navigation and comment-targeting key; `custom_<slug>` for user-defined sections
*/


+ 24
- 2
src/generated/typescript/models/ProposalRevision.ts 파일 보기

@@ -3,11 +3,24 @@
/* tslint:disable */
/* eslint-disable */
import type { ProposalRevisionBlock } from './ProposalRevisionBlock';
import type { ProposalRevisionStatus } from './ProposalRevisionStatus';
/**
* One revision in a proposal's draft history: a full snapshot of its title and paragraphs.
* Revisions are never modified.
* One revision in a proposal's draft history: a full snapshot of its title, structured data, and
* blocks. Revisions are never modified.
*/
export type ProposalRevision = {
/**
* Revision this edit was made against
*/
basedOnRevision?: number | null;
/**
* Structured wizard fields shared by every proposal type
*/
commonData: any;
/**
* SHA-256 of the revision's name, data, and blocks; None for legacy revisions
*/
contentHash?: any[] | null;
createdAt: string;
id: number;
name: string;
@@ -17,7 +30,16 @@ export type ProposalRevision = {
paragraphs: Array<ProposalRevisionBlock>;
proposalId: number;
revision: number;
/**
* Version of the structured-data layout used
*/
schemaVersion: number;
status: ProposalRevisionStatus;
summary?: string | null;
/**
* Structured wizard fields specific to the proposal's type
*/
typeData: any;
/**
* The user who made the edit
*/


+ 3
- 0
src/generated/typescript/models/ProposalRevisionBlock.ts 파일 보기

@@ -4,6 +4,9 @@
/* eslint-disable */
export type ProposalRevisionBlock = {
index: number;
kind: string;
paragraphText: string;
sectionKey?: string | null;
sectionTitle?: string | null;
};


+ 9
- 0
src/generated/typescript/models/ProposalRevisionStatus.ts 파일 보기

@@ -0,0 +1,9 @@
/* generated using openapi-typescript-codegen -- do not edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
export enum ProposalRevisionStatus {
DRAFT = 'DRAFT',
SUBMITTED = 'SUBMITTED',
FROZEN = 'FROZEN',
}

+ 9
- 0
src/generated/typescript/models/ProposalRisk.ts 파일 보기

@@ -0,0 +1,9 @@
/* generated using openapi-typescript-codegen -- do not edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
export type ProposalRisk = {
description: string;
mitigation?: string | null;
};


+ 9
- 0
src/generated/typescript/models/ProposalScope.ts 파일 보기

@@ -0,0 +1,9 @@
/* generated using openapi-typescript-codegen -- do not edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
export type ProposalScope = {
excluded?: Array<string>;
included?: Array<string>;
};


+ 4
- 0
src/generated/typescript/models/ProposalVote.ts 파일 보기

@@ -8,6 +8,10 @@ export type ProposalVote = {
createdAt: string;
id: number;
proposalId: number;
/**
* Exact revision the voter saw when voting
*/
revision: number;
userId: number;
};


+ 12
- 0
src/generated/typescript/models/ProposalWithParagraphs.ts 파일 보기

@@ -5,17 +5,29 @@
import type { ProposalParagraph } from './ProposalParagraph';
import type { ProposalState } from './ProposalState';
export type ProposalWithParagraphs = {
/**
* Structured wizard fields shared by every proposal type
*/
commonData: any;
createdAt: string;
creator: string;
id: number;
name: string;
paragraphs: Array<ProposalParagraph>;
/**
* Kind of decision asked for
*/
proposalType: string;
/**
* Current draft revision, which may be older than the latest after a rollback; send as
* `baseRevision` when editing. 0 if the proposal has no recorded revisions
*/
revision: number;
state: ProposalState;
/**
* Structured wizard fields specific to the proposal's type
*/
typeData: any;
updatedAt?: string | null;
};


+ 4
- 0
src/generated/typescript/models/SelectableAmendment.ts 파일 보기

@@ -11,6 +11,10 @@ export type SelectableAmendment = {
name: string;
proposalId: number;
status: AmendmentStatus;
/**
* Revision the amendment targets and is applied on top of
*/
targetRevision: number;
updatedAt: string;
};


+ 6
- 0
src/generated/typescript/models/SelectableComment.ts 파일 보기

@@ -2,6 +2,7 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { CommentTargetType } from './CommentTargetType';
export type SelectableComment = {
content?: string | null;
createdAt: string;
@@ -9,6 +10,11 @@ export type SelectableComment = {
isCurrent: boolean;
parentId?: number | null;
proposalId: number;
/**
* Block id when `target_type` is `Block`; None when it is `Proposal`
*/
targetBlockId?: number | null;
targetType: CommentTargetType;
updatedAt: string;
userId?: number | null;
};


+ 12
- 0
src/generated/typescript/models/SelectableProposal.ts 파일 보기

@@ -4,6 +4,11 @@
/* eslint-disable */
import type { ProposalState } from './ProposalState';
export type SelectableProposal = {
approvedAt?: string | null;
/**
* Exact revision members approved; frozen forever. None until the proposal is approved
*/
approvedRevision?: number | null;
createdAt: string;
creator: string;
/**
@@ -13,7 +18,14 @@ export type SelectableProposal = {
id: number;
name: string;
organizationId: number;
/**
* Kind of decision asked for; drives which structured fields are required
*/
proposalType: string;
state: ProposalState;
submittedAt?: string | null;
updatedAt?: string | null;
votingClosesAt?: string | null;
votingOpensAt?: string | null;
};


+ 23
- 0
src/generated/typescript/services/ProposalService.ts 파일 보기

@@ -4,6 +4,7 @@
/* eslint-disable */
import type { AddProposalRequest } from '../models/AddProposalRequest';
import type { EditProposalRequest } from '../models/EditProposalRequest';
import type { ProposalEvent } from '../models/ProposalEvent';
import type { ProposalRevision } from '../models/ProposalRevision';
import type { ProposalSponsor } from '../models/ProposalSponsor';
import type { ProposalVote } from '../models/ProposalVote';
@@ -100,6 +101,28 @@ export class ProposalService {
},
});
}
/**
* @param proposalId
* @returns ProposalEvent The proposal's event timeline, newest first
* @throws ApiError
*/
public static listProposalEvents(
proposalId: number,
): CancelablePromise<Array<ProposalEvent>> {
return __request(OpenAPI, {
method: 'GET',
url: '/api/v1/proposal/events',
query: {
'proposalId': proposalId,
},
errors: {
400: `Bad request`,
401: `Missing, invalid, or expired token`,
404: `Proposal not found`,
500: `Internal server error`,
},
});
}
/**
* @param id
* @returns any Proposal retrieved successfully


불러오는 중...
취소
저장