@prance/sdk 0.1.2

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 (40) hide show
  1. package/dist/client.d.ts +62 -0
  2. package/dist/client.d.ts.map +1 -0
  3. package/dist/gen/cognition/v1/enums.d.ts +39 -0
  4. package/dist/gen/cognition/v1/enums.d.ts.map +1 -0
  5. package/dist/gen/cognition/v1/prompts.d.ts +335 -0
  6. package/dist/gen/cognition/v1/prompts.d.ts.map +1 -0
  7. package/dist/gen/common/v1/common.d.ts +60 -0
  8. package/dist/gen/common/v1/common.d.ts.map +1 -0
  9. package/dist/gen/common/v1/enums.d.ts +49 -0
  10. package/dist/gen/common/v1/enums.d.ts.map +1 -0
  11. package/dist/gen/google/protobuf/timestamp.d.ts +129 -0
  12. package/dist/gen/google/protobuf/timestamp.d.ts.map +1 -0
  13. package/dist/gen/interviews/v1/agents.d.ts +130 -0
  14. package/dist/gen/interviews/v1/agents.d.ts.map +1 -0
  15. package/dist/gen/interviews/v1/avatars.d.ts +292 -0
  16. package/dist/gen/interviews/v1/avatars.d.ts.map +1 -0
  17. package/dist/gen/interviews/v1/enums.d.ts +41 -0
  18. package/dist/gen/interviews/v1/enums.d.ts.map +1 -0
  19. package/dist/gen/interviews/v1/interviews.d.ts +598 -0
  20. package/dist/gen/interviews/v1/interviews.d.ts.map +1 -0
  21. package/dist/gen/organizations/v1/contracts.d.ts +185 -0
  22. package/dist/gen/organizations/v1/contracts.d.ts.map +1 -0
  23. package/dist/gen/organizations/v1/organizations.d.ts +161 -0
  24. package/dist/gen/organizations/v1/organizations.d.ts.map +1 -0
  25. package/dist/gen/organizations/v1/projects.d.ts +332 -0
  26. package/dist/gen/organizations/v1/projects.d.ts.map +1 -0
  27. package/dist/gen/screenings/v1/enums.d.ts +21 -0
  28. package/dist/gen/screenings/v1/enums.d.ts.map +1 -0
  29. package/dist/gen/screenings/v1/screenings.d.ts +173 -0
  30. package/dist/gen/screenings/v1/screenings.d.ts.map +1 -0
  31. package/dist/gen/users/v1/candidates.d.ts +219 -0
  32. package/dist/gen/users/v1/candidates.d.ts.map +1 -0
  33. package/dist/gen/users/v1/enums.d.ts +39 -0
  34. package/dist/gen/users/v1/enums.d.ts.map +1 -0
  35. package/dist/gen/users/v1/users.d.ts +160 -0
  36. package/dist/gen/users/v1/users.d.ts.map +1 -0
  37. package/dist/index.d.ts +12 -0
  38. package/dist/index.d.ts.map +1 -0
  39. package/dist/index.js +20052 -0
  40. package/package.json +48 -0
@@ -0,0 +1,185 @@
1
+ import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
2
+ import type { CallContext, CallOptions } from "nice-grpc-common";
3
+ import { AuditFields, PaginatedDataRequest } from "../../common/v1/common.js";
4
+ /**
5
+ * Mirrors contracts/schemas.ts `contractDetailsSchema`.
6
+ * name/notes are optional in the source.
7
+ */
8
+ export interface ContractDetails {
9
+ name?: string | undefined;
10
+ notes?: string | undefined;
11
+ startAt: Date | undefined;
12
+ endAt: Date | undefined;
13
+ interviewsQuota: number;
14
+ }
15
+ /** Persisted contract (Prisma `Contract`). */
16
+ export interface Contract {
17
+ id: string;
18
+ name: string;
19
+ notes: string;
20
+ interviewsQuota: number;
21
+ startAt: Date | undefined;
22
+ endAt: Date | undefined;
23
+ organizationId: string;
24
+ audit: AuditFields | undefined;
25
+ }
26
+ export interface ContractPage {
27
+ items: Contract[];
28
+ count: number;
29
+ }
30
+ export interface CreateContractRequest {
31
+ details: ContractDetails | undefined;
32
+ }
33
+ export interface CreateContractResponse {
34
+ contractId: string;
35
+ }
36
+ export interface UpdateContractRequest {
37
+ contractId: string;
38
+ details: ContractDetails | undefined;
39
+ }
40
+ export interface DeleteContractRequest {
41
+ contractId: string;
42
+ }
43
+ export interface GetContractsRequest {
44
+ pagination: PaginatedDataRequest | undefined;
45
+ }
46
+ /**
47
+ * Lookup: contracts for an organization, optionally only those active at a
48
+ * given instant. Lets peer services (e.g. interviews quota) read contracts
49
+ * without a cross-service join.
50
+ */
51
+ export interface ListContractsByOrganizationRequest {
52
+ organizationId: string;
53
+ /** When set, only contracts whose [start_at, end_at] covers this instant. */
54
+ activeAt?: Date | undefined;
55
+ }
56
+ export interface ListContractsByOrganizationResponse {
57
+ contracts: Contract[];
58
+ }
59
+ export interface UpdateContractResponse {
60
+ contract: Contract | undefined;
61
+ }
62
+ export interface DeleteContractResponse {
63
+ contract: Contract | undefined;
64
+ }
65
+ export interface GetContractsResponse {
66
+ page: ContractPage | undefined;
67
+ }
68
+ export declare const ContractDetails: MessageFns<ContractDetails>;
69
+ export declare const Contract: MessageFns<Contract>;
70
+ export declare const ContractPage: MessageFns<ContractPage>;
71
+ export declare const CreateContractRequest: MessageFns<CreateContractRequest>;
72
+ export declare const CreateContractResponse: MessageFns<CreateContractResponse>;
73
+ export declare const UpdateContractRequest: MessageFns<UpdateContractRequest>;
74
+ export declare const DeleteContractRequest: MessageFns<DeleteContractRequest>;
75
+ export declare const GetContractsRequest: MessageFns<GetContractsRequest>;
76
+ export declare const ListContractsByOrganizationRequest: MessageFns<ListContractsByOrganizationRequest>;
77
+ export declare const ListContractsByOrganizationResponse: MessageFns<ListContractsByOrganizationResponse>;
78
+ export declare const UpdateContractResponse: MessageFns<UpdateContractResponse>;
79
+ export declare const DeleteContractResponse: MessageFns<DeleteContractResponse>;
80
+ export declare const GetContractsResponse: MessageFns<GetContractsResponse>;
81
+ export type ContractsServiceDefinition = typeof ContractsServiceDefinition;
82
+ export declare const ContractsServiceDefinition: {
83
+ readonly name: "ContractsService";
84
+ readonly fullName: "organizations.v1.ContractsService";
85
+ readonly methods: {
86
+ /** authz: super-admin */
87
+ readonly createContract: {
88
+ readonly name: "CreateContract";
89
+ readonly requestType: typeof CreateContractRequest;
90
+ readonly requestStream: false;
91
+ readonly responseType: typeof CreateContractResponse;
92
+ readonly responseStream: false;
93
+ readonly options: {};
94
+ };
95
+ /** authz: super-admin */
96
+ readonly updateContract: {
97
+ readonly name: "UpdateContract";
98
+ readonly requestType: typeof UpdateContractRequest;
99
+ readonly requestStream: false;
100
+ readonly responseType: typeof UpdateContractResponse;
101
+ readonly responseStream: false;
102
+ readonly options: {};
103
+ };
104
+ /** authz: super-admin */
105
+ readonly deleteContract: {
106
+ readonly name: "DeleteContract";
107
+ readonly requestType: typeof DeleteContractRequest;
108
+ readonly requestStream: false;
109
+ readonly responseType: typeof DeleteContractResponse;
110
+ readonly responseStream: false;
111
+ readonly options: {};
112
+ };
113
+ /** authz: scoped to caller's current organization */
114
+ readonly getContracts: {
115
+ readonly name: "GetContracts";
116
+ readonly requestType: typeof GetContractsRequest;
117
+ readonly requestStream: false;
118
+ readonly responseType: typeof GetContractsResponse;
119
+ readonly responseStream: false;
120
+ readonly options: {};
121
+ };
122
+ /**
123
+ * Lookup: contracts for an organization (peer-service reads, e.g. quota).
124
+ * authz: authorizeUserByOrganization
125
+ */
126
+ readonly listContractsByOrganization: {
127
+ readonly name: "ListContractsByOrganization";
128
+ readonly requestType: typeof ListContractsByOrganizationRequest;
129
+ readonly requestStream: false;
130
+ readonly responseType: typeof ListContractsByOrganizationResponse;
131
+ readonly responseStream: false;
132
+ readonly options: {};
133
+ };
134
+ };
135
+ };
136
+ export interface ContractsServiceImplementation<CallContextExt = {}> {
137
+ /** authz: super-admin */
138
+ createContract(request: CreateContractRequest, context: CallContext & CallContextExt): Promise<DeepPartial<CreateContractResponse>>;
139
+ /** authz: super-admin */
140
+ updateContract(request: UpdateContractRequest, context: CallContext & CallContextExt): Promise<DeepPartial<UpdateContractResponse>>;
141
+ /** authz: super-admin */
142
+ deleteContract(request: DeleteContractRequest, context: CallContext & CallContextExt): Promise<DeepPartial<DeleteContractResponse>>;
143
+ /** authz: scoped to caller's current organization */
144
+ getContracts(request: GetContractsRequest, context: CallContext & CallContextExt): Promise<DeepPartial<GetContractsResponse>>;
145
+ /**
146
+ * Lookup: contracts for an organization (peer-service reads, e.g. quota).
147
+ * authz: authorizeUserByOrganization
148
+ */
149
+ listContractsByOrganization(request: ListContractsByOrganizationRequest, context: CallContext & CallContextExt): Promise<DeepPartial<ListContractsByOrganizationResponse>>;
150
+ }
151
+ export interface ContractsServiceClient<CallOptionsExt = {}> {
152
+ /** authz: super-admin */
153
+ createContract(request: DeepPartial<CreateContractRequest>, options?: CallOptions & CallOptionsExt): Promise<CreateContractResponse>;
154
+ /** authz: super-admin */
155
+ updateContract(request: DeepPartial<UpdateContractRequest>, options?: CallOptions & CallOptionsExt): Promise<UpdateContractResponse>;
156
+ /** authz: super-admin */
157
+ deleteContract(request: DeepPartial<DeleteContractRequest>, options?: CallOptions & CallOptionsExt): Promise<DeleteContractResponse>;
158
+ /** authz: scoped to caller's current organization */
159
+ getContracts(request: DeepPartial<GetContractsRequest>, options?: CallOptions & CallOptionsExt): Promise<GetContractsResponse>;
160
+ /**
161
+ * Lookup: contracts for an organization (peer-service reads, e.g. quota).
162
+ * authz: authorizeUserByOrganization
163
+ */
164
+ listContractsByOrganization(request: DeepPartial<ListContractsByOrganizationRequest>, options?: CallOptions & CallOptionsExt): Promise<ListContractsByOrganizationResponse>;
165
+ }
166
+ type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
167
+ type DeepPartial<T> = T extends Builtin ? T : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {} ? {
168
+ [K in keyof T]?: DeepPartial<T[K]>;
169
+ } : Partial<T>;
170
+ type KeysOfUnion<T> = T extends T ? keyof T : never;
171
+ type Exact<P, I extends P> = P extends Builtin ? P : P & {
172
+ [K in keyof P]: Exact<P[K], I[K]>;
173
+ } & {
174
+ [K in Exclude<keyof I, KeysOfUnion<P>>]: never;
175
+ };
176
+ interface MessageFns<T> {
177
+ encode(message: T, writer?: BinaryWriter): BinaryWriter;
178
+ decode(input: BinaryReader | Uint8Array, length?: number): T;
179
+ fromJSON(object: any): T;
180
+ toJSON(message: T): unknown;
181
+ create<I extends Exact<DeepPartial<T>, I>>(base?: I): T;
182
+ fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T;
183
+ }
184
+ export {};
185
+ //# sourceMappingURL=contracts.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"contracts.d.ts","sourceRoot":"","sources":["../../../../src/gen/organizations/v1/contracts.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACrE,OAAO,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AACjE,OAAO,EAAE,WAAW,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AAG9E;;;GAGG;AACH,MAAM,WAAW,eAAe;IAC9B,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3B,OAAO,EAAE,IAAI,GAAG,SAAS,CAAC;IAC1B,KAAK,EAAE,IAAI,GAAG,SAAS,CAAC;IACxB,eAAe,EAAE,MAAM,CAAC;CACzB;AAED,8CAA8C;AAC9C,MAAM,WAAW,QAAQ;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,eAAe,EAAE,MAAM,CAAC;IACxB,OAAO,EAAE,IAAI,GAAG,SAAS,CAAC;IAC1B,KAAK,EAAE,IAAI,GAAG,SAAS,CAAC;IACxB,cAAc,EAAE,MAAM,CAAC;IACvB,KAAK,EAAE,WAAW,GAAG,SAAS,CAAC;CAChC;AAED,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,QAAQ,EAAE,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,qBAAqB;IACpC,OAAO,EAAE,eAAe,GAAG,SAAS,CAAC;CACtC;AAED,MAAM,WAAW,sBAAsB;IACrC,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,q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CAAC,EAAE,CAAC,CAAC,EAAE,IAAI,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC;IACxD,WAAW,CAAC,CAAC,SAAS,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC;CAC/D"}
@@ -0,0 +1,161 @@
1
+ import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
2
+ import type { CallContext, CallOptions } from "nice-grpc-common";
3
+ import { Language } from "../../common/v1/enums.js";
4
+ /**
5
+ * Mirrors organizations/schemas.ts `organizationFeaturesSchema`. Every flag is
6
+ * optional in the source (tri-state); modeled with explicit presence.
7
+ */
8
+ export interface OrganizationFeatures {
9
+ avatars?: boolean | undefined;
10
+ candidates?: boolean | undefined;
11
+ prompts?: boolean | undefined;
12
+ screening?: boolean | undefined;
13
+ interviews?: boolean | undefined;
14
+ }
15
+ /** A prompt assignment on an organization (organizationPromptsSchema). */
16
+ export interface OrganizationPrompt {
17
+ promptId: string;
18
+ priority: number;
19
+ }
20
+ /** Mirrors organizations/schemas.ts `organizationSchema` (lib-local shape). */
21
+ export interface Organization {
22
+ id: string;
23
+ name: string;
24
+ image: string;
25
+ language: Language;
26
+ interviewGreeting: string;
27
+ interviewExpiryDays: number;
28
+ avatarId?: string | undefined;
29
+ features: OrganizationFeatures | undefined;
30
+ prompts: OrganizationPrompt[];
31
+ createdAt: Date | undefined;
32
+ createdBy?: string | undefined;
33
+ updatedAt: Date | undefined;
34
+ deletedAt?: Date | undefined;
35
+ deletedBy?: string | undefined;
36
+ }
37
+ /** updateInterviewSettingsSchema (pick of organizationSchema). */
38
+ export interface UpdateOrganizationDetailsRequest {
39
+ organizationId: string;
40
+ language: Language;
41
+ interviewGreeting: string;
42
+ interviewExpiryDays: number;
43
+ avatarId?: string | undefined;
44
+ }
45
+ export interface GetOrganizationsByUserRequest {
46
+ userId: string;
47
+ }
48
+ export interface GetOrganizationsByUserResponse {
49
+ items: Organization[];
50
+ }
51
+ export interface GetOrganizationByIdRequest {
52
+ organizationId: string;
53
+ }
54
+ /**
55
+ * getCurrentOrganization may return undefined; absence of `organization`
56
+ * represents that case.
57
+ */
58
+ export interface GetCurrentOrganizationResponse {
59
+ organization?: Organization | undefined;
60
+ }
61
+ export interface UpdateOrganizationDetailsResponse {
62
+ }
63
+ export interface GetOrganizationByIdResponse {
64
+ organization: Organization | undefined;
65
+ }
66
+ export interface GetCurrentOrganizationRequest {
67
+ }
68
+ export declare const OrganizationFeatures: MessageFns<OrganizationFeatures>;
69
+ export declare const OrganizationPrompt: MessageFns<OrganizationPrompt>;
70
+ export declare const Organization: MessageFns<Organization>;
71
+ export declare const UpdateOrganizationDetailsRequest: MessageFns<UpdateOrganizationDetailsRequest>;
72
+ export declare const GetOrganizationsByUserRequest: MessageFns<GetOrganizationsByUserRequest>;
73
+ export declare const GetOrganizationsByUserResponse: MessageFns<GetOrganizationsByUserResponse>;
74
+ export declare const GetOrganizationByIdRequest: MessageFns<GetOrganizationByIdRequest>;
75
+ export declare const GetCurrentOrganizationResponse: MessageFns<GetCurrentOrganizationResponse>;
76
+ export declare const UpdateOrganizationDetailsResponse: MessageFns<UpdateOrganizationDetailsResponse>;
77
+ export declare const GetOrganizationByIdResponse: MessageFns<GetOrganizationByIdResponse>;
78
+ export declare const GetCurrentOrganizationRequest: MessageFns<GetCurrentOrganizationRequest>;
79
+ export type OrganizationsServiceDefinition = typeof OrganizationsServiceDefinition;
80
+ export declare const OrganizationsServiceDefinition: {
81
+ readonly name: "OrganizationsService";
82
+ readonly fullName: "organizations.v1.OrganizationsService";
83
+ readonly methods: {
84
+ /** authz: org-admin or super-admin */
85
+ readonly updateOrganizationDetails: {
86
+ readonly name: "UpdateOrganizationDetails";
87
+ readonly requestType: typeof UpdateOrganizationDetailsRequest;
88
+ readonly requestStream: false;
89
+ readonly responseType: typeof UpdateOrganizationDetailsResponse;
90
+ readonly responseStream: false;
91
+ readonly options: {};
92
+ };
93
+ /** authz: authorizeUserByOrganization */
94
+ readonly getOrganizationsByUser: {
95
+ readonly name: "GetOrganizationsByUser";
96
+ readonly requestType: typeof GetOrganizationsByUserRequest;
97
+ readonly requestStream: false;
98
+ readonly responseType: typeof GetOrganizationsByUserResponse;
99
+ readonly responseStream: false;
100
+ readonly options: {};
101
+ };
102
+ /** authz: authorizeUserByOrganization */
103
+ readonly getOrganizationById: {
104
+ readonly name: "GetOrganizationById";
105
+ readonly requestType: typeof GetOrganizationByIdRequest;
106
+ readonly requestStream: false;
107
+ readonly responseType: typeof GetOrganizationByIdResponse;
108
+ readonly responseStream: false;
109
+ readonly options: {};
110
+ };
111
+ /** authz: caller's current organization (may be empty) */
112
+ readonly getCurrentOrganization: {
113
+ readonly name: "GetCurrentOrganization";
114
+ readonly requestType: typeof GetCurrentOrganizationRequest;
115
+ readonly requestStream: false;
116
+ readonly responseType: typeof GetCurrentOrganizationResponse;
117
+ readonly responseStream: false;
118
+ readonly options: {};
119
+ };
120
+ };
121
+ };
122
+ export interface OrganizationsServiceImplementation<CallContextExt = {}> {
123
+ /** authz: org-admin or super-admin */
124
+ updateOrganizationDetails(request: UpdateOrganizationDetailsRequest, context: CallContext & CallContextExt): Promise<DeepPartial<UpdateOrganizationDetailsResponse>>;
125
+ /** authz: authorizeUserByOrganization */
126
+ getOrganizationsByUser(request: GetOrganizationsByUserRequest, context: CallContext & CallContextExt): Promise<DeepPartial<GetOrganizationsByUserResponse>>;
127
+ /** authz: authorizeUserByOrganization */
128
+ getOrganizationById(request: GetOrganizationByIdRequest, context: CallContext & CallContextExt): Promise<DeepPartial<GetOrganizationByIdResponse>>;
129
+ /** authz: caller's current organization (may be empty) */
130
+ getCurrentOrganization(request: GetCurrentOrganizationRequest, context: CallContext & CallContextExt): Promise<DeepPartial<GetCurrentOrganizationResponse>>;
131
+ }
132
+ export interface OrganizationsServiceClient<CallOptionsExt = {}> {
133
+ /** authz: org-admin or super-admin */
134
+ updateOrganizationDetails(request: DeepPartial<UpdateOrganizationDetailsRequest>, options?: CallOptions & CallOptionsExt): Promise<UpdateOrganizationDetailsResponse>;
135
+ /** authz: authorizeUserByOrganization */
136
+ getOrganizationsByUser(request: DeepPartial<GetOrganizationsByUserRequest>, options?: CallOptions & CallOptionsExt): Promise<GetOrganizationsByUserResponse>;
137
+ /** authz: authorizeUserByOrganization */
138
+ getOrganizationById(request: DeepPartial<GetOrganizationByIdRequest>, options?: CallOptions & CallOptionsExt): Promise<GetOrganizationByIdResponse>;
139
+ /** authz: caller's current organization (may be empty) */
140
+ getCurrentOrganization(request: DeepPartial<GetCurrentOrganizationRequest>, options?: CallOptions & CallOptionsExt): Promise<GetCurrentOrganizationResponse>;
141
+ }
142
+ type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
143
+ type DeepPartial<T> = T extends Builtin ? T : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {} ? {
144
+ [K in keyof T]?: DeepPartial<T[K]>;
145
+ } : Partial<T>;
146
+ type KeysOfUnion<T> = T extends T ? keyof T : never;
147
+ type Exact<P, I extends P> = P extends Builtin ? P : P & {
148
+ [K in keyof P]: Exact<P[K], I[K]>;
149
+ } & {
150
+ [K in Exclude<keyof I, KeysOfUnion<P>>]: never;
151
+ };
152
+ interface MessageFns<T> {
153
+ encode(message: T, writer?: BinaryWriter): BinaryWriter;
154
+ decode(input: BinaryReader | Uint8Array, length?: number): T;
155
+ fromJSON(object: any): T;
156
+ toJSON(message: T): unknown;
157
+ create<I extends Exact<DeepPartial<T>, I>>(base?: I): T;
158
+ fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T;
159
+ }
160
+ export {};
161
+ //# sourceMappingURL=organizations.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"organizations.d.ts","sourceRoot":"","sources":["../../../../src/gen/organizations/v1/organizations.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,YAAY,EAAE,YA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