@kohost/api-client 7.25.0 → 7.25.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.
@@ -0,0 +1,23 @@
1
+ /**
2
+ * The four items a Vendor profile's Documents card asks for. Fixed, in this
3
+ * order, and not a taxonomy anyone edits: the card's job is to make what is
4
+ * missing legible at a glance, which a growing list would defeat. A document's
5
+ * stored `label` is free-form, so a checklist row is the item whose label
6
+ * matches its name.
7
+ */
8
+ export declare const VENDOR_DOCUMENT_CHECKLIST: readonly ["W-9", "Certificate of Insurance", "Signed Agreement", "Trade License"];
9
+ export type VendorDocumentChecklistItem = (typeof VENDOR_DOCUMENT_CHECKLIST)[number];
10
+ /** How far ahead of an expiry date a document reads as expiring. */
11
+ export declare const VENDOR_DOCUMENT_EXPIRING_SOON_DAYS = 30;
12
+ export type VendorDocumentExpiry = "expired" | "expiringSoon" | "current";
13
+ /**
14
+ * Where a document sits against its own expiry date, computed from
15
+ * `expiresAt` every time it is read and never stored. A stored flag would be
16
+ * wrong the day after it was written and would need a job to keep true; a date
17
+ * and a clock are enough.
18
+ *
19
+ * A document with no expiry has no status — a W-9 does not expire, and
20
+ * inventing "current" for it would put a reassuring badge on a document nobody
21
+ * checked.
22
+ */
23
+ export declare function vendorDocumentExpiry(expiresAt: string | Date | null | undefined, now?: Date): VendorDocumentExpiry | null;
@@ -0,0 +1,35 @@
1
+ /**
2
+ * The coverages Kohost records against a catalog Vendor. An enum rather than
3
+ * free text because the whole point of the record is answering "is this vendor
4
+ * covered for X" across the catalog, which two spellings of "general liability"
5
+ * would defeat. `other` is the escape hatch, and the carrier/limit fields say
6
+ * what it is.
7
+ */
8
+ export declare const VENDOR_INSURANCE_TYPES: readonly ["general-liability", "workers-comp", "auto", "umbrella", "professional", "other"];
9
+ export type VendorInsuranceType = (typeof VENDOR_INSURANCE_TYPES)[number];
10
+ export declare const VENDOR_INSURANCE_TYPE_LABELS: Record<VendorInsuranceType, string>;
11
+ export declare function isVendorInsuranceType(value: unknown): value is VendorInsuranceType;
12
+ /**
13
+ * What a complete Private Details record carries, in the order the catalog
14
+ * list reports it missing. Deliberately short: these are the facts Kohost
15
+ * needs before it can put a vendor in front of a campus, not everything the
16
+ * editor can hold.
17
+ */
18
+ export declare const VENDOR_REQUIRED_DETAILS: readonly ["Legal name", "EIN", "W-9", "Insurance", "License"];
19
+ export type VendorRequiredDetail = (typeof VENDOR_REQUIRED_DETAILS)[number];
20
+ interface VendorPrivateLike {
21
+ legalName?: string | null;
22
+ ein?: string | null;
23
+ w9OnFile?: boolean | null;
24
+ insurance?: readonly unknown[] | null;
25
+ licenses?: readonly unknown[] | null;
26
+ }
27
+ /**
28
+ * Which of {@link VENDOR_REQUIRED_DETAILS} a Vendor has nothing on file for,
29
+ * derived every time it is read. Emptiness is the only test — a record's
30
+ * contents, and whether it has expired, are the editor's business, so a vendor
31
+ * with a lapsed policy reads as having insurance details and an expiry
32
+ * warning rather than as missing them.
33
+ */
34
+ export declare function missingVendorDetails(privateDetails: VendorPrivateLike | null | undefined): VendorRequiredDetail[];
35
+ export {};
@@ -0,0 +1,17 @@
1
+ import { Entity } from "./entity.js";
2
+ import { validateVendorProfile as validate } from "../validate.js";
3
+ import { vendorProfileSchema, type VendorProfileSchema } from "../schemas/vendorProfile.js";
4
+ /**
5
+ * Data type for VendorProfile constructor - exported for backwards compatibility
6
+ */
7
+ export type VendorProfileData = VendorProfileSchema;
8
+ /**
9
+ * VendorProfile
10
+ */
11
+ export interface VendorProfile extends VendorProfileSchema {
12
+ }
13
+ export declare class VendorProfile extends Entity {
14
+ schema: typeof vendorProfileSchema;
15
+ validator: typeof validate;
16
+ constructor(data: VendorProfileSchema);
17
+ }
@@ -117,7 +117,6 @@ export declare const systemSchema: {
117
117
  readonly emergency: {
118
118
  readonly type: readonly ["string", "null"];
119
119
  readonly enum: readonly ["lockdown", "evacuate", null];
120
- readonly default: null;
121
120
  readonly description: "Active system wide emergency state";
122
121
  };
123
122
  readonly supportedEmergencies: {
@@ -132,7 +131,6 @@ export declare const systemSchema: {
132
131
  readonly trippedSensors: {
133
132
  readonly type: "array";
134
133
  readonly uniqueItems: true;
135
- readonly default: readonly [];
136
134
  readonly items: {
137
135
  readonly type: "string";
138
136
  readonly enum: readonly ["rain"];
@@ -122,7 +122,6 @@ const systemSchema = {
122
122
  "evacuate",
123
123
  null
124
124
  ],
125
- default: null,
126
125
  description: "Active system wide emergency state"
127
126
  },
128
127
  supportedEmergencies: {
@@ -137,7 +136,6 @@ const systemSchema = {
137
136
  trippedSensors: {
138
137
  type: "array",
139
138
  uniqueItems: true,
140
- default: [],
141
139
  items: {
142
140
  type: "string",
143
141
  enum: ["rain"]
@@ -1 +1 @@
1
- {"version":3,"file":"system.js","names":[],"sources":["../../.generated/schemas/system.ts"],"sourcesContent":["import defs, { ISODateString } from \"./definitions\";\nimport type { FromSchema } from \"json-schema-to-ts\";\nimport type { mediaFileSchema } from \"./mediaFile\";\n\nexport const systemSchema = {\n $schema: \"http://json-schema.org/draft-07/schema\",\n $id: \"system.json\",\n title: \"System\",\n type: \"object\",\n required: [\"id\", \"type\", \"driver\", \"entities\"],\n additionalProperties: false,\n properties: {\n id: {\n type: \"string\",\n },\n type: {\n type: \"string\",\n default: \"system\",\n enum: [\"system\"],\n },\n categories: {\n type: \"array\",\n uniqueItems: true,\n default: [],\n items: { \n enum: [\"access\", \"climate\", \"irrigation\", \"lighting\", \"media\", \"security\", \"sis\"] \n },\n description: \"The categories of functionality this system provides.\",\n },\n name: {\n type: \"string\",\n },\n driver: {\n $ref: \"definitions.json#/definitions/driver\",\n example: \"salto\",\n description: \"The driver value that implements the system\",\n },\n organizationId: {\n type: \"string\",\n description: \"The id of the organization that uses the system\",\n },\n propertyId: {\n type: \"string\",\n description: \"The id of the property that uses the system\",\n },\n entities: {\n type: \"array\",\n description: \"The entities produced by the system\",\n default: [],\n items: {\n type: \"object\",\n required: [\"systemId\"],\n properties: {\n id: {\n type: \"string\",\n description: \"The id of the entity\",\n },\n systemId: {\n type: \"string\",\n description: \"The id of the entity as known by the system\",\n },\n type: {\n type: \"string\",\n description: \"The type of the entity\",\n },\n discriminator: {\n type: \"string\",\n description: \"The discriminator of the entity\",\n },\n propertyIds: {\n type: \"array\",\n description:\n \"The ids of the properties where the entity is located\",\n items: {\n type: \"string\",\n },\n },\n },\n },\n },\n driverApiVersion: {\n type: \"string\",\n description: \"The version of the driver API used by the system\",\n },\n logo: {\n $ref: \"mediaFile.json#\",\n },\n config: {\n type: \"object\",\n additionalProperties: true,\n description: \"The runtime configuration of the system\",\n },\n contactInfo: {\n type: \"object\",\n additionalProperties: false,\n properties: {\n websiteUrl: {\n type: \"string\",\n description: \"The website URL of the system\",\n },\n email: {\n type: \"string\",\n description: \"The email address of the system\",\n },\n phone: {\n type: \"string\",\n description: \"The phone number of the system\",\n },\n itunesAppId: {\n type: \"string\",\n example: \"807316865\",\n },\n googleAppId: {\n type: \"string\",\n example: \"tw.com.geovision.gvaccesscontrol\",\n },\n },\n },\n emergency: {\n type: [\"string\", \"null\"],\n enum: [\"lockdown\", \"evacuate\", null],\n default: null,\n description: \"Active system wide emergency state\",\n },\n supportedEmergencies: {\n type: \"array\",\n uniqueItems: true,\n items: {\n type: \"string\",\n enum: [ \"lockdown\", \"evacuate\" ],\n },\n description: \"System wide emergencies the system can enter. Omitted means unknown (legacy); an empty array means none are supported.\",\n },\n trippedSensors: {\n type: \"array\",\n uniqueItems: true,\n default: [],\n items: {\n type: \"string\",\n enum: [\"rain\"],\n },\n description: \"Active sensors\",\n },\n supportedSensors: {\n type: \"array\",\n uniqueItems: true,\n items: {\n type: \"string\",\n enum: [ \"rain\" ],\n },\n description: \"System wide supported sensors.\",\n },\n health: {\n type: \"object\",\n properties: {\n offline: {\n type: \"boolean\",\n description: \"Whether the system is offline\",\n },\n lastHeartbeatAt: {\n type: \"string\",\n description:\n \"The date and time of the last communication with the system\",\n format: \"date-time\",\n },\n },\n },\n syncedAt: {\n $ref: \"definitions.json#/definitions/date\",\n description:\n \"When the system's roster (people and households) was last synced into the platform.\",\n },\n createdAt: {\n $ref: \"definitions.json#/definitions/date\",\n },\n updatedAt: {\n $ref: \"definitions.json#/definitions/date\",\n },\n deletedAt: {\n $ref: \"definitions.json#/definitions/date\",\n },\n },\n allOf: [\n {\n if: {\n properties: { categories: { contains: { const: \"access\" } } },\n required: [\"categories\"],\n },\n then: { required: [\"emergency\", \"supportedEmergencies\"] },\n },\n {\n if: {\n properties: { categories: { contains: { const: \"irrigation\" } } },\n required: [\"categories\"],\n },\n then: { required: [\"trippedSensors\", \"supportedSensors\"] },\n }\n ]\n} as const;\n\nexport type SystemSchema = FromSchema<\n typeof systemSchema,\n {\n references: [typeof defs, typeof mediaFileSchema];\n deserialize: [\n {\n pattern: {\n format: \"date-time\";\n };\n output: Date | ISODateString;\n },\n ];\n }\n>;\n"],"mappings":"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"}
1
+ {"version":3,"file":"system.js","names":[],"sources":["../../.generated/schemas/system.ts"],"sourcesContent":["import defs, { ISODateString } from \"./definitions\";\nimport type { FromSchema } from \"json-schema-to-ts\";\nimport type { mediaFileSchema } from \"./mediaFile\";\n\nexport const systemSchema = {\n $schema: \"http://json-schema.org/draft-07/schema\",\n $id: \"system.json\",\n title: \"System\",\n type: \"object\",\n required: [\"id\", \"type\", \"driver\", \"entities\"],\n additionalProperties: false,\n properties: {\n id: {\n type: \"string\",\n },\n type: {\n type: \"string\",\n default: \"system\",\n enum: [\"system\"],\n },\n categories: {\n type: \"array\",\n uniqueItems: true,\n default: [],\n items: { \n enum: [\"access\", \"climate\", \"irrigation\", \"lighting\", \"media\", \"security\", \"sis\"] \n },\n description: \"The categories of functionality this system provides.\",\n },\n name: {\n type: \"string\",\n },\n driver: {\n $ref: \"definitions.json#/definitions/driver\",\n example: \"salto\",\n description: \"The driver value that implements the system\",\n },\n organizationId: {\n type: \"string\",\n description: \"The id of the organization that uses the system\",\n },\n propertyId: {\n type: \"string\",\n description: \"The id of the property that uses the system\",\n },\n entities: {\n type: \"array\",\n description: \"The entities produced by the system\",\n default: [],\n items: {\n type: \"object\",\n required: [\"systemId\"],\n properties: {\n id: {\n type: \"string\",\n description: \"The id of the entity\",\n },\n systemId: {\n type: \"string\",\n description: \"The id of the entity as known by the system\",\n },\n type: {\n type: \"string\",\n description: \"The type of the entity\",\n },\n discriminator: {\n type: \"string\",\n description: \"The discriminator of the entity\",\n },\n propertyIds: {\n type: \"array\",\n description:\n \"The ids of the properties where the entity is located\",\n items: {\n type: \"string\",\n },\n },\n },\n },\n },\n driverApiVersion: {\n type: \"string\",\n description: \"The version of the driver API used by the system\",\n },\n logo: {\n $ref: \"mediaFile.json#\",\n },\n config: {\n type: \"object\",\n additionalProperties: true,\n description: \"The runtime configuration of the system\",\n },\n contactInfo: {\n type: \"object\",\n additionalProperties: false,\n properties: {\n websiteUrl: {\n type: \"string\",\n description: \"The website URL of the system\",\n },\n email: {\n type: \"string\",\n description: \"The email address of the system\",\n },\n phone: {\n type: \"string\",\n description: \"The phone number of the system\",\n },\n itunesAppId: {\n type: \"string\",\n example: \"807316865\",\n },\n googleAppId: {\n type: \"string\",\n example: \"tw.com.geovision.gvaccesscontrol\",\n },\n },\n },\n emergency: {\n type: [\"string\", \"null\"],\n enum: [\"lockdown\", \"evacuate\", null],\n description: \"Active system wide emergency state\",\n },\n supportedEmergencies: {\n type: \"array\",\n uniqueItems: true,\n items: {\n type: \"string\",\n enum: [ \"lockdown\", \"evacuate\" ],\n },\n description: \"System wide emergencies the system can enter. Omitted means unknown (legacy); an empty array means none are supported.\",\n },\n trippedSensors: {\n type: \"array\",\n uniqueItems: true,\n items: {\n type: \"string\",\n enum: [\"rain\"],\n },\n description: \"Active sensors\",\n },\n supportedSensors: {\n type: \"array\",\n uniqueItems: true,\n items: {\n type: \"string\",\n enum: [ \"rain\" ],\n },\n description: \"System wide supported sensors.\",\n },\n health: {\n type: \"object\",\n properties: {\n offline: {\n type: \"boolean\",\n description: \"Whether the system is offline\",\n },\n lastHeartbeatAt: {\n type: \"string\",\n description:\n \"The date and time of the last communication with the system\",\n format: \"date-time\",\n },\n },\n },\n syncedAt: {\n $ref: \"definitions.json#/definitions/date\",\n description:\n \"When the system's roster (people and households) was last synced into the platform.\",\n },\n createdAt: {\n $ref: \"definitions.json#/definitions/date\",\n },\n updatedAt: {\n $ref: \"definitions.json#/definitions/date\",\n },\n deletedAt: {\n $ref: \"definitions.json#/definitions/date\",\n },\n },\n allOf: [\n {\n if: {\n properties: { categories: { contains: { const: \"access\" } } },\n required: [\"categories\"],\n },\n then: { required: [\"emergency\", \"supportedEmergencies\"] },\n },\n {\n if: {\n properties: { categories: { contains: { const: \"irrigation\" } } },\n required: [\"categories\"],\n },\n then: { required: [\"trippedSensors\", \"supportedSensors\"] },\n }\n ]\n} as const;\n\nexport type SystemSchema = FromSchema<\n typeof systemSchema,\n {\n references: [typeof defs, typeof mediaFileSchema];\n deserialize: [\n {\n pattern: {\n format: \"date-time\";\n };\n output: Date | ISODateString;\n },\n ];\n }\n>;\n"],"mappings":"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"}
@@ -0,0 +1,188 @@
1
+ import defs, { ISODateString } from "./definitions.js";
2
+ import type { FromSchema } from "json-schema-to-ts";
3
+ import { mediaFileSchema } from "./mediaFile.js";
4
+ /**
5
+ * One Organization's relationship with a contractor. Either linked to a
6
+ * catalog Vendor (`vendorId` set — the business's identity is read from the
7
+ * catalog and never stored here) or custom (`vendorId` null — the Organization
8
+ * typed the contractor in and holds the identity itself). Which fields are
9
+ * required on which path is the use case's rule, not the schema's: the schema
10
+ * requires only `id`.
11
+ */
12
+ export declare const vendorProfileSchema: {
13
+ readonly $schema: "http://json-schema.org/draft-07/schema";
14
+ readonly $id: "vendorProfile.json";
15
+ readonly title: "VendorProfile";
16
+ readonly type: "object";
17
+ readonly required: readonly ["id"];
18
+ readonly additionalProperties: false;
19
+ readonly properties: {
20
+ readonly id: {
21
+ readonly $ref: "definitions.json#/definitions/id";
22
+ };
23
+ readonly type: {
24
+ readonly type: "string";
25
+ readonly default: "vendorProfile";
26
+ readonly enum: readonly ["vendorProfile"];
27
+ };
28
+ readonly vendorId: {
29
+ readonly type: readonly ["string", "null"];
30
+ readonly description: "The catalog Vendor this profile is linked to. Null means custom: the Organization holds the identity fields itself.";
31
+ };
32
+ readonly name: {
33
+ readonly type: readonly ["string", "null"];
34
+ };
35
+ readonly address: {
36
+ readonly anyOf: readonly [{
37
+ readonly $ref: "definitions.json#/definitions/address";
38
+ }, {
39
+ readonly type: "null";
40
+ }];
41
+ };
42
+ readonly latitude: {
43
+ readonly type: readonly ["number", "null"];
44
+ };
45
+ readonly longitude: {
46
+ readonly type: readonly ["number", "null"];
47
+ };
48
+ readonly placeId: {
49
+ readonly type: readonly ["string", "null"];
50
+ readonly description: "Google Places id the address was prefilled from.";
51
+ };
52
+ readonly photo: {
53
+ readonly anyOf: readonly [{
54
+ readonly $ref: "mediaFile.json#";
55
+ }, {
56
+ readonly type: "null";
57
+ }];
58
+ };
59
+ readonly email: {
60
+ readonly type: readonly ["string", "null"];
61
+ readonly format: "email";
62
+ };
63
+ readonly phone: {
64
+ readonly type: readonly ["string", "null"];
65
+ readonly pattern: "^\\+[0-9]{1,14}$";
66
+ };
67
+ readonly notes: {
68
+ readonly type: readonly ["string", "null"];
69
+ readonly maxLength: 1000;
70
+ };
71
+ readonly properties: {
72
+ readonly type: "array";
73
+ readonly description: "List of propertyIds where this vendor is enabled. Profiles are org-scoped; an empty list means every property.";
74
+ readonly default: readonly [];
75
+ readonly items: {
76
+ readonly type: "string";
77
+ };
78
+ };
79
+ readonly vendor: {
80
+ readonly type: readonly ["object", "null"];
81
+ readonly readOnly: true;
82
+ readonly description: "The linked catalog Vendor's listing state, filled in on every read and never stored. Null on a custom profile.";
83
+ readonly additionalProperties: false;
84
+ readonly required: readonly ["id", "kohostVerified", "status"];
85
+ readonly properties: {
86
+ readonly id: {
87
+ readonly type: "string";
88
+ };
89
+ readonly kohostVerified: {
90
+ readonly type: "boolean";
91
+ };
92
+ readonly status: {
93
+ readonly type: "string";
94
+ readonly enum: readonly ["unlisted", "listed"];
95
+ };
96
+ };
97
+ };
98
+ readonly private: {
99
+ readonly type: "object";
100
+ readonly description: "Private Details: the Organization's own account and compliance record for this contractor. Visible only to that Organization.";
101
+ readonly additionalProperties: false;
102
+ readonly properties: {
103
+ readonly accountNumber: {
104
+ readonly type: readonly ["string", "null"];
105
+ readonly maxLength: 100;
106
+ };
107
+ readonly paymentTerms: {
108
+ readonly type: readonly ["string", "null"];
109
+ readonly maxLength: 200;
110
+ };
111
+ readonly insuranceCarrier: {
112
+ readonly type: readonly ["string", "null"];
113
+ readonly maxLength: 200;
114
+ };
115
+ readonly policyNumber: {
116
+ readonly type: readonly ["string", "null"];
117
+ readonly maxLength: 100;
118
+ };
119
+ readonly coverageExpiresOn: {
120
+ readonly anyOf: readonly [{
121
+ readonly $ref: "definitions.json#/definitions/date";
122
+ }, {
123
+ readonly type: "null";
124
+ }];
125
+ readonly description: "When this campus's coverage for the vendor lapses. Null once an operator clears it.";
126
+ };
127
+ readonly documents: {
128
+ readonly type: "array";
129
+ readonly default: readonly [];
130
+ readonly items: {
131
+ readonly type: "object";
132
+ readonly additionalProperties: false;
133
+ readonly required: readonly ["id", "url", "label", "mimeType", "size", "uploadedAt"];
134
+ readonly properties: {
135
+ readonly id: {
136
+ readonly type: "string";
137
+ };
138
+ readonly url: {
139
+ readonly type: "string";
140
+ readonly format: "uri";
141
+ };
142
+ readonly label: {
143
+ readonly type: "string";
144
+ readonly maxLength: 200;
145
+ };
146
+ readonly expiresAt: {
147
+ readonly $ref: "definitions.json#/definitions/date";
148
+ };
149
+ readonly mimeType: {
150
+ readonly type: "string";
151
+ };
152
+ readonly size: {
153
+ readonly type: "integer";
154
+ readonly minimum: 0;
155
+ };
156
+ readonly uploadedAt: {
157
+ readonly $ref: "definitions.json#/definitions/date";
158
+ };
159
+ readonly uploadedBy: {
160
+ readonly type: readonly ["string", "null"];
161
+ };
162
+ };
163
+ };
164
+ };
165
+ };
166
+ };
167
+ readonly createdAt: {
168
+ readonly $ref: "definitions.json#/definitions/date";
169
+ };
170
+ readonly updatedAt: {
171
+ readonly $ref: "definitions.json#/definitions/date";
172
+ };
173
+ readonly deletedAt: {
174
+ readonly $ref: "definitions.json#/definitions/date";
175
+ };
176
+ };
177
+ };
178
+ export type VendorProfileSchema = FromSchema<typeof vendorProfileSchema, {
179
+ references: [typeof defs, typeof mediaFileSchema];
180
+ deserialize: [
181
+ {
182
+ pattern: {
183
+ format: "date-time";
184
+ };
185
+ output: Date | ISODateString;
186
+ }
187
+ ];
188
+ }>;
@@ -0,0 +1,36 @@
1
+ export interface AddVendorDocumentCommandConfig {
2
+ data?: {
3
+ id: string;
4
+ [key: string]: unknown;
5
+ } | null;
6
+ headers?: Record<string, string> | null;
7
+ query?: Record<string, unknown> | null;
8
+ }
9
+ export interface AddVendorDocumentCommandRequestConfig {
10
+ method: "post";
11
+ url: string;
12
+ data: {
13
+ id: string;
14
+ [key: string]: unknown;
15
+ } | null;
16
+ params: Record<string, unknown> | null;
17
+ headers: Record<string, string> | null;
18
+ [key: string]: unknown;
19
+ }
20
+ /**
21
+ *
22
+ */
23
+ export declare class AddVendorDocumentCommand {
24
+ url: string;
25
+ data: {
26
+ id: string;
27
+ [key: string]: unknown;
28
+ } | null;
29
+ query: Record<string, unknown> | null;
30
+ headers: Record<string, string> | null;
31
+ config: AddVendorDocumentCommandRequestConfig;
32
+ static params: readonly ["id"];
33
+ static url: string;
34
+ static method: "post";
35
+ constructor(commandConfig: AddVendorDocumentCommandConfig, options?: Record<string, unknown>);
36
+ }
@@ -0,0 +1,36 @@
1
+ export interface AddVendorProfileDocumentCommandConfig {
2
+ data?: {
3
+ id: string;
4
+ [key: string]: unknown;
5
+ } | null;
6
+ headers?: Record<string, string> | null;
7
+ query?: Record<string, unknown> | null;
8
+ }
9
+ export interface AddVendorProfileDocumentCommandRequestConfig {
10
+ method: "post";
11
+ url: string;
12
+ data: {
13
+ id: string;
14
+ [key: string]: unknown;
15
+ } | null;
16
+ params: Record<string, unknown> | null;
17
+ headers: Record<string, string> | null;
18
+ [key: string]: unknown;
19
+ }
20
+ /**
21
+ *
22
+ */
23
+ export declare class AddVendorProfileDocumentCommand {
24
+ url: string;
25
+ data: {
26
+ id: string;
27
+ [key: string]: unknown;
28
+ } | null;
29
+ query: Record<string, unknown> | null;
30
+ headers: Record<string, string> | null;
31
+ config: AddVendorProfileDocumentCommandRequestConfig;
32
+ static params: readonly ["id"];
33
+ static url: string;
34
+ static method: "post";
35
+ constructor(commandConfig: AddVendorProfileDocumentCommandConfig, options?: Record<string, unknown>);
36
+ }
@@ -0,0 +1,27 @@
1
+ export interface CreateImageUploadEndpointCommandConfig {
2
+ data?: Record<string, unknown> | null;
3
+ headers?: Record<string, string> | null;
4
+ query?: Record<string, unknown> | null;
5
+ }
6
+ export interface CreateImageUploadEndpointCommandRequestConfig {
7
+ method: "post";
8
+ url: string;
9
+ data: Record<string, unknown> | null;
10
+ params: Record<string, unknown> | null;
11
+ headers: Record<string, string> | null;
12
+ [key: string]: unknown;
13
+ }
14
+ /**
15
+ *
16
+ */
17
+ export declare class CreateImageUploadEndpointCommand {
18
+ url: string;
19
+ data: Record<string, unknown> | null;
20
+ query: Record<string, unknown> | null;
21
+ headers: Record<string, string> | null;
22
+ config: CreateImageUploadEndpointCommandRequestConfig;
23
+ static params: readonly [];
24
+ static url: string;
25
+ static method: "post";
26
+ constructor(commandConfig: CreateImageUploadEndpointCommandConfig, options?: Record<string, unknown>);
27
+ }
@@ -0,0 +1,27 @@
1
+ export interface CreateVendorProfileCommandConfig {
2
+ data?: Record<string, unknown> | unknown[] | null;
3
+ headers?: Record<string, string> | null;
4
+ query?: Record<string, unknown> | null;
5
+ }
6
+ export interface CreateVendorProfileCommandRequestConfig {
7
+ method: "post";
8
+ url: string;
9
+ data: Record<string, unknown> | unknown[] | null;
10
+ params: Record<string, unknown> | null;
11
+ headers: Record<string, string> | null;
12
+ [key: string]: unknown;
13
+ }
14
+ /**
15
+ *
16
+ */
17
+ export declare class CreateVendorProfileCommand {
18
+ url: string;
19
+ data: Record<string, unknown> | unknown[] | null;
20
+ query: Record<string, unknown> | null;
21
+ headers: Record<string, string> | null;
22
+ config: CreateVendorProfileCommandRequestConfig;
23
+ static params: readonly [];
24
+ static url: string;
25
+ static method: "post";
26
+ constructor(commandConfig: CreateVendorProfileCommandConfig, options?: Record<string, unknown>);
27
+ }
@@ -0,0 +1,36 @@
1
+ export interface DeleteVendorProfileCommandConfig {
2
+ data?: {
3
+ id: string;
4
+ [key: string]: unknown;
5
+ } | null;
6
+ headers?: Record<string, string> | null;
7
+ query?: Record<string, unknown> | null;
8
+ }
9
+ export interface DeleteVendorProfileCommandRequestConfig {
10
+ method: "delete";
11
+ url: string;
12
+ data: {
13
+ id: string;
14
+ [key: string]: unknown;
15
+ } | null;
16
+ params: Record<string, unknown> | null;
17
+ headers: Record<string, string> | null;
18
+ [key: string]: unknown;
19
+ }
20
+ /**
21
+ *
22
+ */
23
+ export declare class DeleteVendorProfileCommand {
24
+ url: string;
25
+ data: {
26
+ id: string;
27
+ [key: string]: unknown;
28
+ } | null;
29
+ query: Record<string, unknown> | null;
30
+ headers: Record<string, string> | null;
31
+ config: DeleteVendorProfileCommandRequestConfig;
32
+ static params: readonly ["id"];
33
+ static url: string;
34
+ static method: "delete";
35
+ constructor(commandConfig: DeleteVendorProfileCommandConfig, options?: Record<string, unknown>);
36
+ }
@@ -0,0 +1,36 @@
1
+ export interface DescribeVendorProfileCommandConfig {
2
+ data?: {
3
+ id: string;
4
+ [key: string]: unknown;
5
+ } | null;
6
+ headers?: Record<string, string> | null;
7
+ query?: Record<string, unknown> | null;
8
+ }
9
+ export interface DescribeVendorProfileCommandRequestConfig {
10
+ method: "get";
11
+ url: string;
12
+ data: {
13
+ id: string;
14
+ [key: string]: unknown;
15
+ } | null;
16
+ params: Record<string, unknown> | null;
17
+ headers: Record<string, string> | null;
18
+ [key: string]: unknown;
19
+ }
20
+ /**
21
+ *
22
+ */
23
+ export declare class DescribeVendorProfileCommand {
24
+ url: string;
25
+ data: {
26
+ id: string;
27
+ [key: string]: unknown;
28
+ } | null;
29
+ query: Record<string, unknown> | null;
30
+ headers: Record<string, string> | null;
31
+ config: DescribeVendorProfileCommandRequestConfig;
32
+ static params: readonly ["id"];
33
+ static url: string;
34
+ static method: "get";
35
+ constructor(commandConfig: DescribeVendorProfileCommandConfig, options?: Record<string, unknown>);
36
+ }
@@ -0,0 +1,27 @@
1
+ export interface ListVendorDirectoryCommandConfig {
2
+ data?: Record<string, unknown> | unknown[] | null;
3
+ headers?: Record<string, string> | null;
4
+ query?: Record<string, unknown> | null;
5
+ }
6
+ export interface ListVendorDirectoryCommandRequestConfig {
7
+ method: "get";
8
+ url: string;
9
+ data: Record<string, unknown> | unknown[] | null;
10
+ params: Record<string, unknown> | null;
11
+ headers: Record<string, string> | null;
12
+ [key: string]: unknown;
13
+ }
14
+ /**
15
+ * The org-facing Vendor directory: listed catalog Vendors with Private Details stripped, filtered by name.
16
+ */
17
+ export declare class ListVendorDirectoryCommand {
18
+ url: string;
19
+ data: Record<string, unknown> | unknown[] | null;
20
+ query: Record<string, unknown> | null;
21
+ headers: Record<string, string> | null;
22
+ config: ListVendorDirectoryCommandRequestConfig;
23
+ static params: readonly [];
24
+ static url: string;
25
+ static method: "get";
26
+ constructor(commandConfig: ListVendorDirectoryCommandConfig, options?: Record<string, unknown>);
27
+ }
@@ -0,0 +1,27 @@
1
+ export interface ListVendorProfilesCommandConfig {
2
+ data?: Record<string, unknown> | unknown[] | null;
3
+ headers?: Record<string, string> | null;
4
+ query?: Record<string, unknown> | null;
5
+ }
6
+ export interface ListVendorProfilesCommandRequestConfig {
7
+ method: "get";
8
+ url: string;
9
+ data: Record<string, unknown> | unknown[] | null;
10
+ params: Record<string, unknown> | null;
11
+ headers: Record<string, string> | null;
12
+ [key: string]: unknown;
13
+ }
14
+ /**
15
+ *
16
+ */
17
+ export declare class ListVendorProfilesCommand {
18
+ url: string;
19
+ data: Record<string, unknown> | unknown[] | null;
20
+ query: Record<string, unknown> | null;
21
+ headers: Record<string, string> | null;
22
+ config: ListVendorProfilesCommandRequestConfig;
23
+ static params: readonly [];
24
+ static url: string;
25
+ static method: "get";
26
+ constructor(commandConfig: ListVendorProfilesCommandConfig, options?: Record<string, unknown>);
27
+ }
@@ -0,0 +1,36 @@
1
+ export interface OpenUnsubscribePageCommandConfig {
2
+ data?: {
3
+ token: string;
4
+ [key: string]: unknown;
5
+ } | null;
6
+ headers?: Record<string, string> | null;
7
+ query?: Record<string, unknown> | null;
8
+ }
9
+ export interface OpenUnsubscribePageCommandRequestConfig {
10
+ method: "get";
11
+ url: string;
12
+ data: {
13
+ token: string;
14
+ [key: string]: unknown;
15
+ } | null;
16
+ params: Record<string, unknown> | null;
17
+ headers: Record<string, string> | null;
18
+ [key: string]: unknown;
19
+ }
20
+ /**
21
+ *
22
+ */
23
+ export declare class OpenUnsubscribePageCommand {
24
+ url: string;
25
+ data: {
26
+ token: string;
27
+ [key: string]: unknown;
28
+ } | null;
29
+ query: Record<string, unknown> | null;
30
+ headers: Record<string, string> | null;
31
+ config: OpenUnsubscribePageCommandRequestConfig;
32
+ static params: readonly ["token"];
33
+ static url: string;
34
+ static method: "get";
35
+ constructor(commandConfig: OpenUnsubscribePageCommandConfig, options?: Record<string, unknown>);
36
+ }