modal 0.5.3 → 0.5.4
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.
- package/dist/index.cjs +96 -16
- package/dist/index.d.cts +26 -1
- package/dist/index.d.ts +26 -1
- package/dist/index.js +96 -16
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -43969,6 +43969,33 @@ var SecretService = class {
|
|
|
43969
43969
|
throw err;
|
|
43970
43970
|
}
|
|
43971
43971
|
}
|
|
43972
|
+
/**
|
|
43973
|
+
* Delete a named {@link Secret}.
|
|
43974
|
+
*
|
|
43975
|
+
* Warning: Deletion is irreversible and will affect any Apps currently using the Secret.
|
|
43976
|
+
*/
|
|
43977
|
+
async delete(name, params) {
|
|
43978
|
+
try {
|
|
43979
|
+
const secret = await this.fromName(name, {
|
|
43980
|
+
environment: params?.environment
|
|
43981
|
+
});
|
|
43982
|
+
await this.#client.cpClient.secretDelete({
|
|
43983
|
+
secretId: secret.secretId
|
|
43984
|
+
});
|
|
43985
|
+
this.#client.logger.debug(
|
|
43986
|
+
"Deleted Secret",
|
|
43987
|
+
"secret_name",
|
|
43988
|
+
name,
|
|
43989
|
+
"secret_id",
|
|
43990
|
+
secret.secretId
|
|
43991
|
+
);
|
|
43992
|
+
} catch (err) {
|
|
43993
|
+
if (err instanceof NotFoundError && params?.allowMissing) {
|
|
43994
|
+
return;
|
|
43995
|
+
}
|
|
43996
|
+
throw err;
|
|
43997
|
+
}
|
|
43998
|
+
}
|
|
43972
43999
|
};
|
|
43973
44000
|
var Secret = class {
|
|
43974
44001
|
secretId;
|
|
@@ -45128,26 +45155,51 @@ var QueueService = class {
|
|
|
45128
45155
|
* Reference a {@link Queue} by name.
|
|
45129
45156
|
*/
|
|
45130
45157
|
async fromName(name, params = {}) {
|
|
45131
|
-
|
|
45132
|
-
|
|
45133
|
-
|
|
45134
|
-
|
|
45135
|
-
|
|
45136
|
-
|
|
45137
|
-
|
|
45138
|
-
|
|
45139
|
-
|
|
45140
|
-
|
|
45141
|
-
|
|
45142
|
-
|
|
45143
|
-
|
|
45158
|
+
try {
|
|
45159
|
+
const resp = await this.#client.cpClient.queueGetOrCreate({
|
|
45160
|
+
deploymentName: name,
|
|
45161
|
+
objectCreationType: params.createIfMissing ? 1 /* OBJECT_CREATION_TYPE_CREATE_IF_MISSING */ : void 0,
|
|
45162
|
+
environmentName: this.#client.environmentName(params.environment)
|
|
45163
|
+
});
|
|
45164
|
+
this.#client.logger.debug(
|
|
45165
|
+
"Retrieved Queue",
|
|
45166
|
+
"queue_id",
|
|
45167
|
+
resp.queueId,
|
|
45168
|
+
"queue_name",
|
|
45169
|
+
name
|
|
45170
|
+
);
|
|
45171
|
+
return new Queue(this.#client, resp.queueId, name);
|
|
45172
|
+
} catch (err) {
|
|
45173
|
+
if (err instanceof import_nice_grpc7.ClientError && err.code === import_nice_grpc7.Status.NOT_FOUND)
|
|
45174
|
+
throw new NotFoundError(err.details);
|
|
45175
|
+
throw err;
|
|
45176
|
+
}
|
|
45144
45177
|
}
|
|
45145
45178
|
/**
|
|
45146
45179
|
* Delete a {@link Queue} by name.
|
|
45180
|
+
*
|
|
45181
|
+
* Warning: Deletion is irreversible and will affect any Apps currently using the Queue.
|
|
45147
45182
|
*/
|
|
45148
45183
|
async delete(name, params = {}) {
|
|
45149
|
-
|
|
45150
|
-
|
|
45184
|
+
try {
|
|
45185
|
+
const queue = await this.fromName(name, {
|
|
45186
|
+
environment: params.environment,
|
|
45187
|
+
createIfMissing: false
|
|
45188
|
+
});
|
|
45189
|
+
await this.#client.cpClient.queueDelete({ queueId: queue.queueId });
|
|
45190
|
+
this.#client.logger.debug(
|
|
45191
|
+
"Deleted Queue",
|
|
45192
|
+
"queue_name",
|
|
45193
|
+
name,
|
|
45194
|
+
"queue_id",
|
|
45195
|
+
queue.queueId
|
|
45196
|
+
);
|
|
45197
|
+
} catch (err) {
|
|
45198
|
+
if (err instanceof NotFoundError && params.allowMissing) {
|
|
45199
|
+
return;
|
|
45200
|
+
}
|
|
45201
|
+
throw err;
|
|
45202
|
+
}
|
|
45151
45203
|
}
|
|
45152
45204
|
};
|
|
45153
45205
|
var Queue = class _Queue {
|
|
@@ -46465,6 +46517,34 @@ var VolumeService = class {
|
|
|
46465
46517
|
);
|
|
46466
46518
|
return new Volume(resp.volumeId, void 0, false, ephemeralHbManager);
|
|
46467
46519
|
}
|
|
46520
|
+
/**
|
|
46521
|
+
* Delete a named {@link Volume}.
|
|
46522
|
+
*
|
|
46523
|
+
* Warning: Deletion is irreversible and will affect any Apps currently using the Volume.
|
|
46524
|
+
*/
|
|
46525
|
+
async delete(name, params) {
|
|
46526
|
+
try {
|
|
46527
|
+
const volume = await this.fromName(name, {
|
|
46528
|
+
environment: params?.environment,
|
|
46529
|
+
createIfMissing: false
|
|
46530
|
+
});
|
|
46531
|
+
await this.#client.cpClient.volumeDelete({
|
|
46532
|
+
volumeId: volume.volumeId
|
|
46533
|
+
});
|
|
46534
|
+
this.#client.logger.debug(
|
|
46535
|
+
"Deleted Volume",
|
|
46536
|
+
"volume_name",
|
|
46537
|
+
name,
|
|
46538
|
+
"volume_id",
|
|
46539
|
+
volume.volumeId
|
|
46540
|
+
);
|
|
46541
|
+
} catch (err) {
|
|
46542
|
+
if (err instanceof NotFoundError && params?.allowMissing) {
|
|
46543
|
+
return;
|
|
46544
|
+
}
|
|
46545
|
+
throw err;
|
|
46546
|
+
}
|
|
46547
|
+
}
|
|
46468
46548
|
};
|
|
46469
46549
|
var Volume = class _Volume {
|
|
46470
46550
|
volumeId;
|
|
@@ -46695,7 +46775,7 @@ var AuthTokenManager = class {
|
|
|
46695
46775
|
|
|
46696
46776
|
// src/version.ts
|
|
46697
46777
|
function getSDKVersion() {
|
|
46698
|
-
return true ? "0.5.
|
|
46778
|
+
return true ? "0.5.4" : "0.0.0";
|
|
46699
46779
|
}
|
|
46700
46780
|
|
|
46701
46781
|
// src/logger.ts
|
package/dist/index.d.cts
CHANGED
|
@@ -5082,6 +5082,11 @@ type SecretFromNameParams = {
|
|
|
5082
5082
|
type SecretFromObjectParams = {
|
|
5083
5083
|
environment?: string;
|
|
5084
5084
|
};
|
|
5085
|
+
/** Optional parameters for {@link SecretService#delete client.secrets.delete()}. */
|
|
5086
|
+
type SecretDeleteParams = {
|
|
5087
|
+
environment?: string;
|
|
5088
|
+
allowMissing?: boolean;
|
|
5089
|
+
};
|
|
5085
5090
|
/**
|
|
5086
5091
|
* Service for managing {@link Secret Secrets}.
|
|
5087
5092
|
*
|
|
@@ -5098,6 +5103,12 @@ declare class SecretService {
|
|
|
5098
5103
|
fromName(name: string, params?: SecretFromNameParams): Promise<Secret>;
|
|
5099
5104
|
/** Create a {@link Secret} from a plain object of key-value pairs. */
|
|
5100
5105
|
fromObject(entries: Record<string, string>, params?: SecretFromObjectParams): Promise<Secret>;
|
|
5106
|
+
/**
|
|
5107
|
+
* Delete a named {@link Secret}.
|
|
5108
|
+
*
|
|
5109
|
+
* Warning: Deletion is irreversible and will affect any Apps currently using the Secret.
|
|
5110
|
+
*/
|
|
5111
|
+
delete(name: string, params?: SecretDeleteParams): Promise<void>;
|
|
5101
5112
|
}
|
|
5102
5113
|
/** Secrets provide a dictionary of environment variables for {@link Image}s. */
|
|
5103
5114
|
declare class Secret {
|
|
@@ -5147,6 +5158,11 @@ type VolumeFromNameParams = {
|
|
|
5147
5158
|
type VolumeEphemeralParams = {
|
|
5148
5159
|
environment?: string;
|
|
5149
5160
|
};
|
|
5161
|
+
/** Optional parameters for {@link VolumeService#delete client.volumes.delete()}. */
|
|
5162
|
+
type VolumeDeleteParams = {
|
|
5163
|
+
environment?: string;
|
|
5164
|
+
allowMissing?: boolean;
|
|
5165
|
+
};
|
|
5150
5166
|
/**
|
|
5151
5167
|
* Service for managing {@link Volume}s.
|
|
5152
5168
|
*
|
|
@@ -5168,6 +5184,12 @@ declare class VolumeService {
|
|
|
5168
5184
|
* It persists until closeEphemeral() is called, or the process exits.
|
|
5169
5185
|
*/
|
|
5170
5186
|
ephemeral(params?: VolumeEphemeralParams): Promise<Volume>;
|
|
5187
|
+
/**
|
|
5188
|
+
* Delete a named {@link Volume}.
|
|
5189
|
+
*
|
|
5190
|
+
* Warning: Deletion is irreversible and will affect any Apps currently using the Volume.
|
|
5191
|
+
*/
|
|
5192
|
+
delete(name: string, params?: VolumeDeleteParams): Promise<void>;
|
|
5171
5193
|
}
|
|
5172
5194
|
/** Volumes provide persistent storage that can be mounted in Modal {@link Function_ Function}s. */
|
|
5173
5195
|
declare class Volume {
|
|
@@ -5419,6 +5441,7 @@ type QueueFromNameParams = {
|
|
|
5419
5441
|
/** Optional parameters for {@link QueueService#delete client.queues.delete()}. */
|
|
5420
5442
|
type QueueDeleteParams = {
|
|
5421
5443
|
environment?: string;
|
|
5444
|
+
allowMissing?: boolean;
|
|
5422
5445
|
};
|
|
5423
5446
|
/** Optional parameters for {@link QueueService#ephemeral client.queues.ephemeral()}. */
|
|
5424
5447
|
type QueueEphemeralParams = {
|
|
@@ -5447,6 +5470,8 @@ declare class QueueService {
|
|
|
5447
5470
|
fromName(name: string, params?: QueueFromNameParams): Promise<Queue>;
|
|
5448
5471
|
/**
|
|
5449
5472
|
* Delete a {@link Queue} by name.
|
|
5473
|
+
*
|
|
5474
|
+
* Warning: Deletion is irreversible and will affect any Apps currently using the Queue.
|
|
5450
5475
|
*/
|
|
5451
5476
|
delete(name: string, params?: QueueDeleteParams): Promise<void>;
|
|
5452
5477
|
}
|
|
@@ -6093,4 +6118,4 @@ declare class SandboxTimeoutError extends Error {
|
|
|
6093
6118
|
|
|
6094
6119
|
declare function checkForRenamedParams(params: any, renames: Record<string, string>): void;
|
|
6095
6120
|
|
|
6096
|
-
export { AlreadyExistsError, App, type AppFromNameParams, AppService, type ClientOptions, CloudBucketMount, Cls, type ClsFromNameParams, ClsInstance, ClsService, type ClsWithBatchingParams, type ClsWithConcurrencyParams, type ClsWithOptionsParams, ContainerProcess, type DeleteOptions, type EphemeralOptions, FunctionCall, type FunctionCallCancelParams, type FunctionCallGetParams, FunctionCallService, type FunctionFromNameParams, FunctionService, type FunctionStats, FunctionTimeoutError, type FunctionUpdateAutoscalerParams, Function_, Image, type ImageDeleteParams, type ImageDockerfileCommandsParams, ImageService, InternalFailure, InvalidError, type LogLevel, type Logger, type LookupOptions, ModalClient, type ModalClientParams, type ModalReadStream, type ModalWriteStream, NotFoundError, type Profile, Proxy, type ProxyFromNameParams, ProxyService, Queue, type QueueClearParams, type QueueDeleteParams, QueueEmptyError, type QueueEphemeralParams, type QueueFromNameParams, QueueFullError, type QueueGetParams, type QueueIterateParams, type QueueLenParams, type QueuePutParams, QueueService, RemoteError, Retries, Sandbox, type SandboxCreateParams, type SandboxExecParams, SandboxFile, type SandboxFileMode, type SandboxFromNameParams, type SandboxListParams, SandboxService, SandboxTimeoutError, Secret, type SecretFromNameParams, type SecretFromObjectParams, SecretService, type StdioBehavior, type StreamMode, Tunnel, Volume, type VolumeEphemeralParams, type VolumeFromNameParams, VolumeService, checkForRenamedParams, close, initializeClient };
|
|
6121
|
+
export { AlreadyExistsError, App, type AppFromNameParams, AppService, type ClientOptions, CloudBucketMount, Cls, type ClsFromNameParams, ClsInstance, ClsService, type ClsWithBatchingParams, type ClsWithConcurrencyParams, type ClsWithOptionsParams, ContainerProcess, type DeleteOptions, type EphemeralOptions, FunctionCall, type FunctionCallCancelParams, type FunctionCallGetParams, FunctionCallService, type FunctionFromNameParams, FunctionService, type FunctionStats, FunctionTimeoutError, type FunctionUpdateAutoscalerParams, Function_, Image, type ImageDeleteParams, type ImageDockerfileCommandsParams, ImageService, InternalFailure, InvalidError, type LogLevel, type Logger, type LookupOptions, ModalClient, type ModalClientParams, type ModalReadStream, type ModalWriteStream, NotFoundError, type Profile, Proxy, type ProxyFromNameParams, ProxyService, Queue, type QueueClearParams, type QueueDeleteParams, QueueEmptyError, type QueueEphemeralParams, type QueueFromNameParams, QueueFullError, type QueueGetParams, type QueueIterateParams, type QueueLenParams, type QueuePutParams, QueueService, RemoteError, Retries, Sandbox, type SandboxCreateParams, type SandboxExecParams, SandboxFile, type SandboxFileMode, type SandboxFromNameParams, type SandboxListParams, SandboxService, SandboxTimeoutError, Secret, type SecretDeleteParams, type SecretFromNameParams, type SecretFromObjectParams, SecretService, type StdioBehavior, type StreamMode, Tunnel, Volume, type VolumeDeleteParams, type VolumeEphemeralParams, type VolumeFromNameParams, VolumeService, checkForRenamedParams, close, initializeClient };
|
package/dist/index.d.ts
CHANGED
|
@@ -5082,6 +5082,11 @@ type SecretFromNameParams = {
|
|
|
5082
5082
|
type SecretFromObjectParams = {
|
|
5083
5083
|
environment?: string;
|
|
5084
5084
|
};
|
|
5085
|
+
/** Optional parameters for {@link SecretService#delete client.secrets.delete()}. */
|
|
5086
|
+
type SecretDeleteParams = {
|
|
5087
|
+
environment?: string;
|
|
5088
|
+
allowMissing?: boolean;
|
|
5089
|
+
};
|
|
5085
5090
|
/**
|
|
5086
5091
|
* Service for managing {@link Secret Secrets}.
|
|
5087
5092
|
*
|
|
@@ -5098,6 +5103,12 @@ declare class SecretService {
|
|
|
5098
5103
|
fromName(name: string, params?: SecretFromNameParams): Promise<Secret>;
|
|
5099
5104
|
/** Create a {@link Secret} from a plain object of key-value pairs. */
|
|
5100
5105
|
fromObject(entries: Record<string, string>, params?: SecretFromObjectParams): Promise<Secret>;
|
|
5106
|
+
/**
|
|
5107
|
+
* Delete a named {@link Secret}.
|
|
5108
|
+
*
|
|
5109
|
+
* Warning: Deletion is irreversible and will affect any Apps currently using the Secret.
|
|
5110
|
+
*/
|
|
5111
|
+
delete(name: string, params?: SecretDeleteParams): Promise<void>;
|
|
5101
5112
|
}
|
|
5102
5113
|
/** Secrets provide a dictionary of environment variables for {@link Image}s. */
|
|
5103
5114
|
declare class Secret {
|
|
@@ -5147,6 +5158,11 @@ type VolumeFromNameParams = {
|
|
|
5147
5158
|
type VolumeEphemeralParams = {
|
|
5148
5159
|
environment?: string;
|
|
5149
5160
|
};
|
|
5161
|
+
/** Optional parameters for {@link VolumeService#delete client.volumes.delete()}. */
|
|
5162
|
+
type VolumeDeleteParams = {
|
|
5163
|
+
environment?: string;
|
|
5164
|
+
allowMissing?: boolean;
|
|
5165
|
+
};
|
|
5150
5166
|
/**
|
|
5151
5167
|
* Service for managing {@link Volume}s.
|
|
5152
5168
|
*
|
|
@@ -5168,6 +5184,12 @@ declare class VolumeService {
|
|
|
5168
5184
|
* It persists until closeEphemeral() is called, or the process exits.
|
|
5169
5185
|
*/
|
|
5170
5186
|
ephemeral(params?: VolumeEphemeralParams): Promise<Volume>;
|
|
5187
|
+
/**
|
|
5188
|
+
* Delete a named {@link Volume}.
|
|
5189
|
+
*
|
|
5190
|
+
* Warning: Deletion is irreversible and will affect any Apps currently using the Volume.
|
|
5191
|
+
*/
|
|
5192
|
+
delete(name: string, params?: VolumeDeleteParams): Promise<void>;
|
|
5171
5193
|
}
|
|
5172
5194
|
/** Volumes provide persistent storage that can be mounted in Modal {@link Function_ Function}s. */
|
|
5173
5195
|
declare class Volume {
|
|
@@ -5419,6 +5441,7 @@ type QueueFromNameParams = {
|
|
|
5419
5441
|
/** Optional parameters for {@link QueueService#delete client.queues.delete()}. */
|
|
5420
5442
|
type QueueDeleteParams = {
|
|
5421
5443
|
environment?: string;
|
|
5444
|
+
allowMissing?: boolean;
|
|
5422
5445
|
};
|
|
5423
5446
|
/** Optional parameters for {@link QueueService#ephemeral client.queues.ephemeral()}. */
|
|
5424
5447
|
type QueueEphemeralParams = {
|
|
@@ -5447,6 +5470,8 @@ declare class QueueService {
|
|
|
5447
5470
|
fromName(name: string, params?: QueueFromNameParams): Promise<Queue>;
|
|
5448
5471
|
/**
|
|
5449
5472
|
* Delete a {@link Queue} by name.
|
|
5473
|
+
*
|
|
5474
|
+
* Warning: Deletion is irreversible and will affect any Apps currently using the Queue.
|
|
5450
5475
|
*/
|
|
5451
5476
|
delete(name: string, params?: QueueDeleteParams): Promise<void>;
|
|
5452
5477
|
}
|
|
@@ -6093,4 +6118,4 @@ declare class SandboxTimeoutError extends Error {
|
|
|
6093
6118
|
|
|
6094
6119
|
declare function checkForRenamedParams(params: any, renames: Record<string, string>): void;
|
|
6095
6120
|
|
|
6096
|
-
export { AlreadyExistsError, App, type AppFromNameParams, AppService, type ClientOptions, CloudBucketMount, Cls, type ClsFromNameParams, ClsInstance, ClsService, type ClsWithBatchingParams, type ClsWithConcurrencyParams, type ClsWithOptionsParams, ContainerProcess, type DeleteOptions, type EphemeralOptions, FunctionCall, type FunctionCallCancelParams, type FunctionCallGetParams, FunctionCallService, type FunctionFromNameParams, FunctionService, type FunctionStats, FunctionTimeoutError, type FunctionUpdateAutoscalerParams, Function_, Image, type ImageDeleteParams, type ImageDockerfileCommandsParams, ImageService, InternalFailure, InvalidError, type LogLevel, type Logger, type LookupOptions, ModalClient, type ModalClientParams, type ModalReadStream, type ModalWriteStream, NotFoundError, type Profile, Proxy, type ProxyFromNameParams, ProxyService, Queue, type QueueClearParams, type QueueDeleteParams, QueueEmptyError, type QueueEphemeralParams, type QueueFromNameParams, QueueFullError, type QueueGetParams, type QueueIterateParams, type QueueLenParams, type QueuePutParams, QueueService, RemoteError, Retries, Sandbox, type SandboxCreateParams, type SandboxExecParams, SandboxFile, type SandboxFileMode, type SandboxFromNameParams, type SandboxListParams, SandboxService, SandboxTimeoutError, Secret, type SecretFromNameParams, type SecretFromObjectParams, SecretService, type StdioBehavior, type StreamMode, Tunnel, Volume, type VolumeEphemeralParams, type VolumeFromNameParams, VolumeService, checkForRenamedParams, close, initializeClient };
|
|
6121
|
+
export { AlreadyExistsError, App, type AppFromNameParams, AppService, type ClientOptions, CloudBucketMount, Cls, type ClsFromNameParams, ClsInstance, ClsService, type ClsWithBatchingParams, type ClsWithConcurrencyParams, type ClsWithOptionsParams, ContainerProcess, type DeleteOptions, type EphemeralOptions, FunctionCall, type FunctionCallCancelParams, type FunctionCallGetParams, FunctionCallService, type FunctionFromNameParams, FunctionService, type FunctionStats, FunctionTimeoutError, type FunctionUpdateAutoscalerParams, Function_, Image, type ImageDeleteParams, type ImageDockerfileCommandsParams, ImageService, InternalFailure, InvalidError, type LogLevel, type Logger, type LookupOptions, ModalClient, type ModalClientParams, type ModalReadStream, type ModalWriteStream, NotFoundError, type Profile, Proxy, type ProxyFromNameParams, ProxyService, Queue, type QueueClearParams, type QueueDeleteParams, QueueEmptyError, type QueueEphemeralParams, type QueueFromNameParams, QueueFullError, type QueueGetParams, type QueueIterateParams, type QueueLenParams, type QueuePutParams, QueueService, RemoteError, Retries, Sandbox, type SandboxCreateParams, type SandboxExecParams, SandboxFile, type SandboxFileMode, type SandboxFromNameParams, type SandboxListParams, SandboxService, SandboxTimeoutError, Secret, type SecretDeleteParams, type SecretFromNameParams, type SecretFromObjectParams, SecretService, type StdioBehavior, type StreamMode, Tunnel, Volume, type VolumeDeleteParams, type VolumeEphemeralParams, type VolumeFromNameParams, VolumeService, checkForRenamedParams, close, initializeClient };
|
package/dist/index.js
CHANGED
|
@@ -43902,6 +43902,33 @@ var SecretService = class {
|
|
|
43902
43902
|
throw err;
|
|
43903
43903
|
}
|
|
43904
43904
|
}
|
|
43905
|
+
/**
|
|
43906
|
+
* Delete a named {@link Secret}.
|
|
43907
|
+
*
|
|
43908
|
+
* Warning: Deletion is irreversible and will affect any Apps currently using the Secret.
|
|
43909
|
+
*/
|
|
43910
|
+
async delete(name, params) {
|
|
43911
|
+
try {
|
|
43912
|
+
const secret = await this.fromName(name, {
|
|
43913
|
+
environment: params?.environment
|
|
43914
|
+
});
|
|
43915
|
+
await this.#client.cpClient.secretDelete({
|
|
43916
|
+
secretId: secret.secretId
|
|
43917
|
+
});
|
|
43918
|
+
this.#client.logger.debug(
|
|
43919
|
+
"Deleted Secret",
|
|
43920
|
+
"secret_name",
|
|
43921
|
+
name,
|
|
43922
|
+
"secret_id",
|
|
43923
|
+
secret.secretId
|
|
43924
|
+
);
|
|
43925
|
+
} catch (err) {
|
|
43926
|
+
if (err instanceof NotFoundError && params?.allowMissing) {
|
|
43927
|
+
return;
|
|
43928
|
+
}
|
|
43929
|
+
throw err;
|
|
43930
|
+
}
|
|
43931
|
+
}
|
|
43905
43932
|
};
|
|
43906
43933
|
var Secret = class {
|
|
43907
43934
|
secretId;
|
|
@@ -45061,26 +45088,51 @@ var QueueService = class {
|
|
|
45061
45088
|
* Reference a {@link Queue} by name.
|
|
45062
45089
|
*/
|
|
45063
45090
|
async fromName(name, params = {}) {
|
|
45064
|
-
|
|
45065
|
-
|
|
45066
|
-
|
|
45067
|
-
|
|
45068
|
-
|
|
45069
|
-
|
|
45070
|
-
|
|
45071
|
-
|
|
45072
|
-
|
|
45073
|
-
|
|
45074
|
-
|
|
45075
|
-
|
|
45076
|
-
|
|
45091
|
+
try {
|
|
45092
|
+
const resp = await this.#client.cpClient.queueGetOrCreate({
|
|
45093
|
+
deploymentName: name,
|
|
45094
|
+
objectCreationType: params.createIfMissing ? 1 /* OBJECT_CREATION_TYPE_CREATE_IF_MISSING */ : void 0,
|
|
45095
|
+
environmentName: this.#client.environmentName(params.environment)
|
|
45096
|
+
});
|
|
45097
|
+
this.#client.logger.debug(
|
|
45098
|
+
"Retrieved Queue",
|
|
45099
|
+
"queue_id",
|
|
45100
|
+
resp.queueId,
|
|
45101
|
+
"queue_name",
|
|
45102
|
+
name
|
|
45103
|
+
);
|
|
45104
|
+
return new Queue(this.#client, resp.queueId, name);
|
|
45105
|
+
} catch (err) {
|
|
45106
|
+
if (err instanceof ClientError6 && err.code === Status6.NOT_FOUND)
|
|
45107
|
+
throw new NotFoundError(err.details);
|
|
45108
|
+
throw err;
|
|
45109
|
+
}
|
|
45077
45110
|
}
|
|
45078
45111
|
/**
|
|
45079
45112
|
* Delete a {@link Queue} by name.
|
|
45113
|
+
*
|
|
45114
|
+
* Warning: Deletion is irreversible and will affect any Apps currently using the Queue.
|
|
45080
45115
|
*/
|
|
45081
45116
|
async delete(name, params = {}) {
|
|
45082
|
-
|
|
45083
|
-
|
|
45117
|
+
try {
|
|
45118
|
+
const queue = await this.fromName(name, {
|
|
45119
|
+
environment: params.environment,
|
|
45120
|
+
createIfMissing: false
|
|
45121
|
+
});
|
|
45122
|
+
await this.#client.cpClient.queueDelete({ queueId: queue.queueId });
|
|
45123
|
+
this.#client.logger.debug(
|
|
45124
|
+
"Deleted Queue",
|
|
45125
|
+
"queue_name",
|
|
45126
|
+
name,
|
|
45127
|
+
"queue_id",
|
|
45128
|
+
queue.queueId
|
|
45129
|
+
);
|
|
45130
|
+
} catch (err) {
|
|
45131
|
+
if (err instanceof NotFoundError && params.allowMissing) {
|
|
45132
|
+
return;
|
|
45133
|
+
}
|
|
45134
|
+
throw err;
|
|
45135
|
+
}
|
|
45084
45136
|
}
|
|
45085
45137
|
};
|
|
45086
45138
|
var Queue = class _Queue {
|
|
@@ -46398,6 +46450,34 @@ var VolumeService = class {
|
|
|
46398
46450
|
);
|
|
46399
46451
|
return new Volume(resp.volumeId, void 0, false, ephemeralHbManager);
|
|
46400
46452
|
}
|
|
46453
|
+
/**
|
|
46454
|
+
* Delete a named {@link Volume}.
|
|
46455
|
+
*
|
|
46456
|
+
* Warning: Deletion is irreversible and will affect any Apps currently using the Volume.
|
|
46457
|
+
*/
|
|
46458
|
+
async delete(name, params) {
|
|
46459
|
+
try {
|
|
46460
|
+
const volume = await this.fromName(name, {
|
|
46461
|
+
environment: params?.environment,
|
|
46462
|
+
createIfMissing: false
|
|
46463
|
+
});
|
|
46464
|
+
await this.#client.cpClient.volumeDelete({
|
|
46465
|
+
volumeId: volume.volumeId
|
|
46466
|
+
});
|
|
46467
|
+
this.#client.logger.debug(
|
|
46468
|
+
"Deleted Volume",
|
|
46469
|
+
"volume_name",
|
|
46470
|
+
name,
|
|
46471
|
+
"volume_id",
|
|
46472
|
+
volume.volumeId
|
|
46473
|
+
);
|
|
46474
|
+
} catch (err) {
|
|
46475
|
+
if (err instanceof NotFoundError && params?.allowMissing) {
|
|
46476
|
+
return;
|
|
46477
|
+
}
|
|
46478
|
+
throw err;
|
|
46479
|
+
}
|
|
46480
|
+
}
|
|
46401
46481
|
};
|
|
46402
46482
|
var Volume = class _Volume {
|
|
46403
46483
|
volumeId;
|
|
@@ -46628,7 +46708,7 @@ var AuthTokenManager = class {
|
|
|
46628
46708
|
|
|
46629
46709
|
// src/version.ts
|
|
46630
46710
|
function getSDKVersion() {
|
|
46631
|
-
return true ? "0.5.
|
|
46711
|
+
return true ? "0.5.4" : "0.0.0";
|
|
46632
46712
|
}
|
|
46633
46713
|
|
|
46634
46714
|
// src/logger.ts
|